I have been plowing through some of the issues involved in getting v3.6 compiled on one of my Linux machines. I started with the w2_generic source code, and created a makefile based on a previous thread (http://w2forum.cee.pdx.edu/?q=node/283). I have zero experience with make, so while i managed to get this makefile to run and create a large number of object files, I don't see a "cequalw2" executable anywhere.
But anyhow, I am pleased to report that much of the compiling trouble had to do with file format errors and "long lines", whereby the gfortran compiler simply wanted a line continuation declared (using "&" to join to smaller lines into a single line of code). Something that took me a while to figure out simply cause i haven't coded fortran since 1987. :) Anyhow, while I still can't actually run the model, all of the files in the makefile that I created seem to compile OK. I have created a directory that contains each of those files and the make file on my server if anyone is interested. Also, I have created a wiki page where I have documented the changes to some degree (I have not done formal diff files or anything).
Wiki: http://sifn.bse.vt.edu/sifnwiki/index.php/Cequalw2_compiling
Modified Source: http://deq1.bse.vt.edu/projects/cequalw2/w2_36_generic_src/
I would be delighted if anyone else was interested in this little side project who could give me a hand getting this to full operational.
Regards,
Robert
Successful Compile on CentOS
I had a small error in my makefile due to my inexperience with make and the fact that the example file was posted as "Filtered HTML" - one needs to select the "Plain text" format when posting code on this forum it seems. My make was successful, and I tested running the executable cequalw2, however, I have yet to put together or obtain a working model, so all I could do was verify that it would indeed execute and complain about the lack of a control file. So far so good!
makefile:
objects = w2modules.o w2_36_gen.o input.o balances.o date.o density.o endsimulation.o gas-transfer.o gate-spill-pipe.o \
heat-exchange.o hydroinout.o init-cond.o init-geom.o init.o layeraddsub.o \
macrophyte-aux.o output.o outputa.o outputinit.o restart.o shading.o tdg.o temperature.o \
time-varying-data.o transport.o update.o az.o \
water-quality.o waterbody.o withdrawal.o wqconstituents.o
#FFLAGS = -ffree-line-length-huge -ftrace=full -fzero -c -gstabs+
FFLAGS = -gstabs+ -fopenmp
# compiler choices = ifort f95 gfortran
fcompiler = gfortran
cequalw2: $(objects)
$(fcompiler) $(FFLAGS) -o cequalw2 $(objects)
w2modules.o: w2modules.f90
$(fcompiler) $(FFLAGS) w2modules.f90
w2_36_gen.o: w2_36_gen.f90
$(fcompiler) $(FFLAGS) w2_36_gen.f90
input.o: input.f90
$(fcompiler) $(FFLAGS) input.f90
az.o: az.f90
$(fcompiler) $(FFLAGS) az.f90
balances.o: balances.f90
$(fcompiler) $(FFLAGS) balances.f90
date.o: date.f90
$(fcompiler) $(FFLAGS) date.f90
density.o: density.f90
$(fcompiler) $(FFLAGS) density.f90
endsimulation.o: endsimulation.f90
$(fcompiler) $(FFLAGS) endsimulation.f90
gas-transfer.o: gas-transfer.f90
$(fcompiler) $(FFLAGS) gas-transfer.f90
gate-spill-pipe.o: gate-spill-pipe.f90
$(fcompiler) $(FFLAGS) gate-spill-pipe.f90
heat-exchange.o: heat-exchange.f90
$(fcompiler) $(FFLAGS) heat-exchange.f90
hydroinout.o: hydroinout.f90
$(fcompiler) $(FFLAGS) hydroinout.f90
init-cond.o: init-cond.f90
$(fcompiler) $(FFLAGS) init-cond.f90
init-geom.o: init-geom.f90
$(fcompiler) $(FFLAGS) init-geom.f90
init.o: init.f90
$(fcompiler) $(FFLAGS) init.f90
layeraddsub.o: layeraddsub.f90
$(fcompiler) $(FFLAGS) layeraddsub.f90
macrophyte-aux.o: macrophyte-aux.f90
$(fcompiler) $(FFLAGS) macrophyte-aux.f90
output.o: output.f90
$(fcompiler) $(FFLAGS) output.f90
outputa.o: outputa.f90
$(fcompiler) $(FFLAGS) outputa.f90
outputinit.o: outputinit.f90
$(fcompiler) $(FFLAGS) outputinit.f90
restart.o: restart.f90
$(fcompiler) $(FFLAGS) restart.f90
shading.o: shading.f90
$(fcompiler) $(FFLAGS) shading.f90
tdg.o: tdg.f90
$(fcompiler) $(FFLAGS) tdg.f90
temperature.o: temperature.f90
$(fcompiler) $(FFLAGS) temperature.f90
time-varying-data.o: time-varying-data.f90
$(fcompiler) $(FFLAGS) time-varying-data.f90
transport.o: transport.f90
$(fcompiler) $(FFLAGS) transport.f90
update.o: update.f90
$(fcompiler) $(FFLAGS) update.f90
water-quality.o: water-quality.f90
$(fcompiler) $(FFLAGS) water-quality.f90
waterbody.o: waterbody.f90
$(fcompiler) $(FFLAGS) waterbody.f90
withdrawal.o: withdrawal.f90
$(fcompiler) $(FFLAGS) withdrawal.f90
wqconstituents.o: wqconstituents.f90
$(fcompiler) $(FFLAGS) wqconstituents.f90
verified on linux CentOS 5
The 3.6 build on linux with fortran mentioned above has now been verified running the "DeGray Reservoir" example from the 3.7 install package.
r.b.