parameter must be a compile-time constant

Status
Not open for further replies.

aelkouk

ahmed elkouk
Member
Hello

I am trying to move hardcoded parameters in a modified CLM50 version (based on release-clm5.0). To do that, I am following Oleson commits e.g., First round of moving parameters to param file. · olyson/ctsm@9a3c0f3

I am getting the following compile error when trying to move parameters (e.g., om_frac_sf, csol_sand) in biogeophys/SoilStateInitTimeConstMod.F90:

/glade/work/elkoukah/ctsm_gw/cime/../src/biogeophys/SoilStateInitTimeConstMod.F90(25): error #6683: A kind type parameter must be a compile-time constant. [R8]
25 real(r8) :: csol_sand ! Heat capacity of sand *10^6 (J/K/m3)
26 ----------^
27 /glade/work/elkoukah/ctsm_gw/cime/../src/biogeophys/SoilStateInitTimeConstMod.F90(108): error #6633: The type of the actual argument differs from the type of the dummy argument. [CSOL_SAND]
28 call readNcdioScalar(ncid, 'csol_sand', subname, params_inst%csol_sand)
29 -----------------------------------------------------------------^

Thank you!
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I was trying to look at your code (/glade/work/elkoukah/ctsm_gw/src/biogeophys/SoilStateInitTimeConstMod.F90) to try to help sort this out, but I don't see any of the statements referenced above. Have you moved this code or changed it?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Ok, you will need this statement at the top of that module:

use shr_kind_mod , only : r8 => shr_kind_r8

I think that should address this error:

/glade/work/elkoukah/ctsm_gw/cime/../src/biogeophys/SoilStateInitTimeConstMod.F90(25): error #6683: A kind type parameter must be a compile-time constant. [R8]
25 real(r8) :: csol_sand ! Heat capacity of sand *10^6 (J/K/m3)

and maybe the second error, not sure....
 
Status
Not open for further replies.
Back
Top