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

CLM5 crashes after adding history field

I am using CLM5 to run single-point simulations at multiple Fluxnet sites. Everything works fine if my user_nl_cm file is set for one years worth of hourly output:






fsurdat = '/no_backup/GroupData/CLM/ptclm_data_files/1x1pt_CA-Man/surfdata_1x1pt_CA-Man_hist_16pfts_Irrig_CMIP6_simyr2000_c190203.nc'


hist_nhtfrq = -1


hist_mfilt = 8784






However, the model crashes if I try to make a simple change to include one more history field. As an example, I am trying to add an extra history field for hourly average GPP:






fsurdat = '/no_backup/GroupData/CLM/ptclm_data_files/1x1pt_CA-Man/surfdata_1x1pt_CA-Man_hist_16pfts_Irrig_CMIP6_simyr2000_c190203.nc'


hist_nhtfrq = -1,-1


hist_mfilt = 8784, 8784


hist_fincl2 = "GPP:A"







Upon submission, CLM crashes. The relevant error message is:






------------------------------------------------------------


Successfully read restart data for restart run


hist_htapes_build Initializing clm2 history files


------------------------------------------------------------


htapes_fieldlist ERROR: WT in fincl( 8 ) for history tape 1 not found


ENDRUN:


ERROR: ERROR in /home/thiagods/models/clm5.0/src/main/histFileMod.F90 at line 690






What might be causing this error?






Thanks in advance,


Thiago.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I'm not quite sure, but are you doing a restart (CONTINUE_RUN=True)?  If so, you can't change the history fields in this case.  You either have to do a branch or a startup run.
 
Hi Keith, thanks a lot for the reply. No, it is not a restart run:





./xmlquery RUN_TYPE


RUN_TYPE: startup






./xmlquery CONTINUE_RUN


CONTINUE_RUN: FALSE






Perhaps the condition you mentioned also applies to a startup run?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I think the problem is that you are requesting GPP, but that variable is only active for BGC mode, and you are using SP mode.  The corresponding variable in SP mode is FPSN
 
Hi Keith, thanks for the follow-up! I think you're right because I tried adding non-carbon variables such as sensible and latent heat and the model ran just fine.






I am using the I1PtClm50SpGs compset as per instructions of the CLM5 User Guide: https://escomp.github.io/ctsm-docs/doc/build/html/users_guide/running-PTCLM/introduction-to-ptclm.html#example-6-1-example-of-running-ptclmmkdata-for-us-umb-on-cheyenne. However, GPP and NEE are critical variables for my research because I will be comparing model simulations against tower measurements of carbon fluxes. The suggested variable FPSN (photosynthesis rate) wouldn't quite work for that purpose.






Unfortunately it looks like there is not a "I1PtClm50Bgc" compset (i.e. a single-point case with BGC enabled) that I can use... I guess my next question then would be: is there any way to "convert" a SP case to a BGC one?






I'm thinking that maybe there is some parameter that I can change in order to activate the Biogeochemistry model even within a SP compset -- or actually disable SP in favour of BGC, since they don't seem to be compatible...


 
So, I just went ahead and used the long name to create a custom compset with BGC that uses tower forcings as meteorological input:






2000_DATM%1PT_CLM50%BGC_SICE_SOCN_MOSART_SGLC_SWAV






rather than






2000_DATM%1PT_CLM50%SP_SICE_SOCN_MOSART_SGLC_SWAV






Notice the "BGC" instead of "SP". CIME initially complained that this is not a supported combination, but I proceeded anyway with a "--run-unsupported".




Do you see any issues with this combination? Do I have to spin-up this simulation? The User's Guide instructs on how to perform a spin up, but it's not clear to me when I need to -- only if running from a cold start or even if running from arbitrary initial conditions.




Thanks again,


Thiago.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
You could have added the following to CLM_BLDNML_OPTS in your env-run.xml for your original case: -bgc bgcYes, you will have to spinup, particularly in BGC mode and since you are using tower forcing.
 
Hi Keith,






I will keep that in mind too, though it looks like both solutions would reach the same result.






Thanks a lot for your hints; they definitely solved my problem.




 
Hi -
Apologies for bumping this thread. I am trying to run CLM5 in point mode (PTCLM) and need to extract carbon-related variables such as C14_NEE which appear to only be in the biogeochem module. Am I understanding this correctly: when running in point mode, you cannot output variables (e.g. C14_NEE) specific to the biogeochem module ?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
You can run single-point CLM5 in BGC mode which activates the biogeochem modules. You would just add the following to CLM_BLDNML_OPTS in your env_run.xml for your case: -bgc bgc
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
To turn on isotopes, e.g., to get C14_NEE output, set this in your user_nl_clm:

use_c13 = .true.
use_c14 = .true.
use_c13_timeseries = .true.
use_c14_bombspike = .true.
 
Top