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

ERROR: carbon or nitrogen state critically negative ERROR in CNPrecisionControlMod.F90

AnuNTNU

Anusha Sathyanadh
New Member
Hi
I am trying to add two bioenergy crops (switchgrass and Miscanthus) to my CLM5 version within NorESM2 framework, following the instructions here, Add two bioenergy crops (switchgrass and Miscanthus) by yanyanchengHydro · Pull Request #884 · ESCOMP/CTSM . And I could succesfully built the case after merging in the 8 source codes listed in the PR. But while running, I get a run error which says
memory_write: model date = 20150102 0 memory = -0.00 MB (highwater) 525.87 MB (usage) (pe= 136 comps= cpl ATM ICE)
memory_write: model date = 20150103 0 memory = -0.00 MB (highwater) 573.38 MB (usage) (pe= 384 comps= OCN)
memory_write: model date = 20150103 0 memory = -0.00 MB (highwater) 525.87 MB (usage) (pe= 136 comps= cpl ATM ICE)
memory_write: model date = 20150103 0 memory = -0.00 MB (highwater) 476.33 MB (usage) (pe= 372 comps= cpl ATM WAV)
ERROR: Carbon or Nitrogen patch negative = 0.000000000000000E+000
-77.3977623435493
ERROR: limits = -60.0000000000000 -6.00000000000000
ENDRUN:
ERROR:
ERROR: carbon or nitrogen state critically negative ERROR in CNPrecisionControl
Mod.F90 at line 248
Image PC Routine Line Source
cesm.exe 0000000002961696 Unknown Unknown Unknown


Does anyone has any idea what this error is related to ? I am yet to modify the laduse and surafce file to add biocrops and to spin up CLM, but the error doesnt seems to be related to that. Any help woould be appreciated


Thanks in Advance
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
The error implies that some nitrogen state variable is likely negative at each time step and is accumulating those negative values until exceeding the error threshold of -6, or it could be a single large negative value at that particular time step. You should be able to identify the variable by looking at line 248 in CNPrecisionControlMod.F90. Presumably, if the model runs fine under the same setup and conditions but without the code mods, then this would obviously point to the code mods as the problem.
There is some troubleshooting information here that might be useful:

 

AnuNTNU

Anusha Sathyanadh
New Member
Do I need to spin up CLM5 if I change the PCT_CFT distribution in the surface dataset? This is my compset I2000Clm50BgcCrop_SGLC and I changed the PCT_CFT distribution of simulation year 2000 to that of 2090 in the surf data file, with also swapping some cfts.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
It's probably a good idea to do some spinup, at least enough to get soil temperature and soil moisture adjusted to the new pft configuration before conducting analysis. During initialization, the initial file will be mapped to the new pfts but there will be an adjustment period.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Yes, it is necessary to do the next step. The length really depends on whether spunup carbon/nitrogen is important for your analysis (requires longer spinups) or whether you are mainly just interested in surface fluxes and soil temperature/moisture (requires shorter spinups). You can get an idea of how spunup carbon/nitrogen is by using the ncl script I've placed on our ftp site:

ftp://ftp.cgd.ucar.edu/pub/oleson/SpinupStability_BGC_v10.ncl

There are instructions within the script on how to use it. It produces plots of the type that are shown in the User's Guide you referenced. You could try it first on your AD simulation.
The other script on the ftp site (SpinupStability_SP_v9.ncl) is for SP simulations but you could probably use it to look at how well soil temperature/moisture is spunup.
 

AnuNTNU

Anusha Sathyanadh
New Member
Thanks, I am running the second step for 400 years now. My interest is to overcome the error I encounter related to C or N critically low when i am trying to use the modified source codes to add bioenergy crops. Does it make sense to test the source codes after spinning up CLM for the surface data ? And about the spin up, i did the the first step with the new surface data in user_nl_clm and copied the restart and rpointer files to the final spinup, do I also need to have the surface data in user_nl_clm for the final step?
 

slevis

Moderator
Hello @AnuNTNU,

If I understand correctly, you have changed two things:
1) the surface data to include bioenergy crops
2) the code to change the behavior of bioenergy crops

Generally spin-up questions depend on your specific modeling experiment and your experimental design. If you want to spin up the model with the new source code, then you should include that. Alternatively you could start using the new source code after you have completed other spin-up.

Regarding the new surface data: If you are spinning up with your new surface dataset, then you need to point to the new surface dataset in all the steps.

Sam Levis
 

AnuNTNU

Anusha Sathyanadh
New Member
Hi @slevis,
But do you think one need to spin up the 2000 surface data in this compset I2000Clm50BgcCrop_SGLC or spin up is only needed when you change something for the initial condition year 1850 ?
 

slevis

Moderator
If you are running transient simulations, you may prefer to spin up for 1850. I don't know enough about your experiments to offer insight. Ultimately the decision about experimental design is yours. If others in the community wish to offer suggestions, they may do so.
 
Top