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

The unusual C pool value in soil

Dong Peng

Dong Peng
Member
Hello, everyone. I met some issues with the weird values of the soil C pool. I tried to add erosion loss of Carbon in the carbon cycle based on E3SM. But when I read in the value of the soil carbon pool, the value can reach 1.0 x 10E36("soilbiogeochem_carbonstate_inst%decomp_cpools_vr_col"), which was weird. I am sure no changes have been applied to the soil carbon cycle calculation. Does anyone have any insights into this issue? Thanks.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
That value is a "special value" (spval in the code) used as an initialization value or a fill value. It's possible you are either using that array or a part of that array before the values are calculated or for a soil level or pool that is not used in your configuration.
 

Dong Peng

Dong Peng
Member
That value is a "special value" (spval in the code) used as an initialization value or a fill value. It's possible you are either using that array or a part of that array before the values are calculated or for a soil level or pool that is not used in your configuration.
Thanks, Oleson. You are right. My colleague reminded me that it could be an empty value(spval) which was the same as you said. I tried to add some conditional statements like " is_soil(l)", but the spval still join the calculation processes. Parts of parameters have normal values but most of them are spval. Are there any format statements for this situation? Avoid the spval join calculation.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
There are a couple of examples like this:

if (this%decomp_cpools_vr_col(i,j,k) /= spval .and. .not. isnan(this%decomp_cpools_vr_col(i,j,k)) ) then

But I think I would look at the conditions under which the variable is used and restrict your use to that. E.g., in InitCold within SoilBiogeochemCarbonStateType.F90 I see that decomp_cpools_vr_col is only initialized for istsoil or istcrop landunits:

if (lun%itype(l) == istsoil .or. lun%itype(l) == istcrop) then
 

Dong Peng

Dong Peng
Member
There are a couple of examples like this:

if (this%decomp_cpools_vr_col(i,j,k) /= spval .and. .not. isnan(this%decomp_cpools_vr_col(i,j,k)) ) then

But I think I would look at the conditions under which the variable is used and restrict your use to that. E.g., in InitCold within SoilBiogeochemCarbonStateType.F90 I see that decomp_cpools_vr_col is only initialized for istsoil or istcrop landunits:

if (lun%itype(l) == istsoil .or. lun%itype(l) == istcrop) then
Hi, Oleson. I tried "if (this%decomp_cpools_vr_col(i,j,k) /= spval .and. .not. isnan(this%decomp_cpools_vr_col(i,j,k)) ) then" as a conditional statement, but it doesn't help. I referred the fire loss processes(subroutine CNFireFluxes in module CNFireLi2014Mod), it doesn't use such conditional statements when adding this parameter into the calculation.

The initcold has applied to lun%ifspecial(l); it had been called this%SetValues in the last part. I think it could not be the reason.

Actually, the bug I met was that when I add carbon loss processes in the carbon cycle. I got "NetCDF: Numeric conversion not representable" as a reply. I know which variable could be the field that I can't write into nc files.

But, I tried "
if (cpools_deposit(c,l) == spval .or. isnan(cpools_deposit(c,l))) then
cpools_deposit(c,l) = 0._r8
end if
"
to remove the spval and nan value at the end of the calculation. Still, I got "NetCDF: Numeric conversion not representable" as a reply.

Which was weird. I hope it could not be the trouble related to the compiler.

Thanks, Oleson.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Unfortunately, this is too complicated for us to provide any help other than general suggestions, particularly since you are introducing new code. Perhaps you can simplify your troubleshooting by setting up a single point simulation and use write statements to track down the spval and nan occurrences.
 

Dong Peng

Dong Peng
Member
Unfortunately, this is too complicated for us to provide any help other than general suggestions, particularly since you are introducing new code. Perhaps you can simplify your troubleshooting by setting up a single point simulation and use write statements to track down the spval and nan occurrences.
Got it. Many thanks, Oleson. I will try to simplify the code until it can well running from E3SM to CESM2. Another question. I got "GPTLstopf: timer "l:bgc_interp" was already off." and " newchild: child "CPL:RUN_LOOP" can't be a parent of itself" in cesm log file. Have you met this before?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I looked at some log files from recent runs and didn't see any messages of that kind. From other Forum posts, I gather those are referring to the timers set in the model to output timing statistics. I don't think they would stop the model.
If you haven't already, make sure you can run the model successfully out of the box, without any of your code or namelist changes.
 
Top