Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

CLM output variables (CTSM History Fields)

nevergiveup

nevergiveup
Member
Hi,
I want to output aerodynamical resistance (RAM1), sensible heat from veg (FSH_V), roughness length over vegetation, sensible heat (Z0HV) and latent heat flux (EFLX_LH_TOT) in CLM model, so I set
echo "hist_fincl1='TG','RAM1','Z0HV','Z0HG','FSH_V','FSH_G','EFLX_LH_TOT'" >> user_nl_clm

However, error shows:
317 ERROR: ERROR in /dat01/jack/clm5.0/src/main/histFileMod.F90 at line 691
318 htapes_fieldlist ERROR: RAM1 in fincl( 3 ) for history tape 1 not found

do you know how to fix it?
 

nevergiveup

nevergiveup
Member
I use ./create_newcase --case $CASE --res CLM_USRDAT --compset I2000Clm50SpGs --mach jack --run-unsupported,
model version = 'release-clm5.0.27-1-gc7a45bdf'
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
According to the code, those variables are only available when running BGC mode, e.g., for RAM1 in FrictionVelocityMod.F90:

if (use_cn) then
this%ram1_patch(begp:endp) = spval
call hist_addfld1d (fname='RAM1', units='s/m', &
avgflag='A', long_name='aerodynamical resistance ', &
ptr_patch=this%ram1_patch, default='inactive')
end if

and you are running in SP mode (I2000Clm50SpGs).
However, I think you could remove the if statements and recompile. I'm not sure why those variables were encapsulated in an if use_cn statement to begin with, I think those variables are valid in SP mode.
 

nevergiveup

nevergiveup
Member
According to the code, those variables are only available when running BGC mode, e.g., for RAM1 in FrictionVelocityMod.F90:

if (use_cn) then
this%ram1_patch(begp:endp) = spval
call hist_addfld1d (fname='RAM1', units='s/m', &
avgflag='A', long_name='aerodynamical resistance ', &
ptr_patch=this%ram1_patch, default='inactive')
end if

and you are running in SP mode (I2000Clm50SpGs).
However, I think you could remove the if statements and recompile. I'm not sure why those variables were encapsulated in an if use_cn statement to begin with, I think those variables are valid in SP mode.
thanks, following your suggestion, I have removed the if statements, but the error was the same :
315 ERROR: ERROR in /dat01/jack/clm5.0/src/main/histFileMod.F90 at line 691
316 ENDRUN:
317 ERROR: ERROR in /dat01/jack/clm5.0/src/main/histFileMod.F90 at line 691
318 htapes_fieldlist ERROR: RAM1 in fincl( 3 ) for history tape 1 not found

do you know how to fix it or change the compset? I just want to output ground temperature and the relevant variables ( e.g., RAM1','Z0HV','Z0HG','FSH_V','FSH_G','EFLX_LH_TOT) using GSWP3
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I've tried this a couple of times here and it seems to work fine.
Have you tried cleaning your build and re-building? Maybe it's not picking up your code changes.

./case.build --clean-all
./case.build

One thing I don't quite understand is that the error message states that it is fincl(3) in history tape(1). The error should refer to fincl(1) since you only have a single history file stream.
 

nevergiveup

nevergiveup
Member
(1)I have created a new case by using ./create_newcase --case $CASE --res CLM_USRDAT --compset I2000Clm50SpGs --mach jack --run-unsupported , however , the same error occurs, I doubted that I didn't modified the FrictionVelocityMod.F90 correctly ,I have attached the screenshot and the code below, could you please have a look?
(2) Regarding the fincl(3) in history tape(1), I have attached the final error file reported by CLM , I replaced the defaulted atmospheric forcing with another forcing dataset (1 hourly , 0.1°), so I set echo "tintalgo = 'nearest', 'nearest', 'nearest', 'linear', 'lower'" >> user_nl_datm, maybe this is the reason it is fincl(3) in history tape(1)?
 

Attachments

  • cesm.log.txt
    32.9 KB · Views: 4
  • FrictionVelocityMod.F90.png
    FrictionVelocityMod.F90.png
    35.9 KB · Views: 15
  • FrictionVelocityMod.F90.txt
    37.4 KB · Views: 2

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Just comment out the line that has the if statement ("if (use_cn) then") and the "end if" line, don't comment out this:

this%ram1_patch(begp:endp) = spval
call hist_addfld1d (fname='RAM1', units='s/m', &
avgflag='A', long_name='aerodynamical resistance ', &
ptr_patch=this%ram1_patch, default='inactive')
 

nevergiveup

nevergiveup
Member
Just comment out the line that has the if statement ("if (use_cn) then") and the "end if" line, don't comment out this:

this%ram1_patch(begp:endp) = spval
call hist_addfld1d (fname='RAM1', units='s/m', &
avgflag='A', long_name='aerodynamical resistance ', &
ptr_patch=this%ram1_patch, default='inactive')
thanks a lot , it works.
 
Top