NCAR / NWS_hydro_models

Hydrology models adapted from NWS conceptual modeling approaches and code.
GNU General Public License v3.0
7 stars 17 forks source link

Can't compile .exe #22

Open psbecker opened 6 months ago

psbecker commented 6 months ago

After the command "make -f Makefile" in the src_bin/driver/ folder, I get the following warning/ error: Warning: Possible change of value in conversion from REAL(8) to REAL(4) at (1) [-Wconversion] make: *** [Makefile:161: compile_calib] Error 1

And the executable file won't compile so I then can't run the SnowSacUH.exe.

Any ideas on how to fix this?

andywood commented 6 months ago

Hi, it's unlikely that this warning caused the compilation error (it's a warning, not an error) -- can you share a more detailed output from the compilation attempt?

psbecker commented 6 months ago

This is further up in the output where it gives an error. Does this help? `Warning: Nonconforming tab character at (1) [-Wtabs] /home/pabecker/NWS_hydro_models/Snow17SacUH/src_bin//driver/multi_driver.f90:1:1:

1 | This code runs the Snow17, Sacramento and UH routing model for multiple HRUs within a basin
  | 1

Error: Unclassifiable statement at (1) /home/pabecker/NWS_hydro_models/Snow17SacUH/src_bin//driver/multi_driver.f90:39:2:

39 | julian_day,write_snow17_state,write_sac_state, & | 1`

andywood commented 6 months ago

What compiler are you using? It looks like it has to do with the line continuation ... often these things are compiler specific. You may need a flag in the compilation statement.

psbecker commented 6 months ago

I'm using gfortran which I was sure to flag

andywood commented 6 months ago

You could try replacing the tabs above (near the warning) with space ... that could be the source, though I don't know how this compiled with gfortran previously if so. Perhaps the gfortan code has upgraded and is not more stringent. There should not be tabs in that file, in any case.