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

Guidance on Running with LME datasets with CESM2.1.3 (CLM5)

wvsi3w

wvsi3w
Member
Yes, it is.
Thank you very much dear Keith for your answer.
I tested the case with these changes into my user_nl_clm and thankfully it did work (there is no need to assign the surfdata file as it is already set):
Code:
soil_layerstruct= '23SL_3.5m'
use_init_interp = .true.

check_dynpft_consistency =.false.
do_transient_crops=.false.
do_transient_pfts=.false.
flanduse_timeseries=' '

So, until here I have set land cover change to be constant (1850), landuse_timeseries are also omitted.
before I ask my question I need to refer to this quote from you regarding the dtlimit and monthly dataset. I have talked with my supervisors and couple of other colleagues and we decided to stick with the monthly data as land has a longer memory than atmosphere and monthly can be accepted for the goal of our project. However, I have a mini question about that dtlimit which I couldn't figure out why 3hourly is equal to 1.5 and monthly is 1.e36? what is 1.5 and what is 1.e36? is this 1x e to the power of 36? is it seconds in a month (doubt it), hours???

Back to my main question, now that almost everything is set for a spin-down simulation using data from year 500, I need to know if there is a way to set CO2 for that year in the model because the plot below is from the reference where my dataset has used its GHGs and I want to have similar CO2 as well. It is showing almost constant value of CO2 from year 500 to 1850 (I guess it is 275 ppm). The CLM5 documentation shows ways of running with historical CO2, but this period that I am trying to run (and trying to spin-down) I believe is pre-historical.


1747930690833.png
From (Meinhausen et al., 2017): doi:10.5194/gmd-10-2057-2017

Therefore, I think we need to have either a constant value for CO2 (like 275ppm) but I don't know how to set it in my case (is it supposed to be set in user_nl_clm as well? and how?), or we can have a transient CO2 file because I see this file "fco2_datm_global_simyr_1750-2014_CMIP6_c180929.nc" exist in the CO2 folder of my input data and I think we should either change it or set some option in the namelists to ignore this file?

Another concern is that there are other inputdata for land "urbandata", "firedata", ... that are for the historical period and not pre-historical. Should we set them off somehow as well or we can ignore these files for my case? how about the solar file inside "/inputdata/atm/cam/solar/" (SolarForcing1995-2005avg_c160929.nc)? Can we ignore this one as well or should we turn this one off as well?

Thank you in advance for your support.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Regarding dtlimit, I found this documentation:


<entry id="dtlimit" per_stream_entry="true">
<type>real(30)</type>
<category>streams</category>
<group>shr_strdata_nml</group>
<desc>
array (up to 30 elements) of delta time ratio limits placed on the
time interpolation associated with the array of streams. this real
value causes the model to stop if the ratio of the running maximum
delta time divided by the minimum delta time is greater than the
dtlimit for that stream. for instance, with daily data, the delta
time should be exactly one day throughout the dataset and the computed
maximum divided by minimum delta time should always be 1.0. for
monthly data, the delta time should be between 28 and 31 days and the
maximum ratio should be about 1.1. the running value of the delta
time is computed as data is read and any wraparound or cycling is also
included. this input helps trap missing data or errors in cycling.
to turn off trapping, set the value to 1.0e30 or something similar.
</desc>

The error you got was:

(shr_strdata_advance) ERROR: for stream 1
(shr_strdata_advance) ERROR: dt limit1 62.0000000000000
28.0000000000000 1.50000000000000
(shr_strdata_advance) ERROR: dt limit2 18500201 0 18500301 0

And the corresponding code is:

SDAT%dtmin(n) = min(SDAT%dtmin(n),dtime)
SDAT%dtmax(n) = max(SDAT%dtmax(n),dtime)
if ((SDAT%dtmax(n)/SDAT%dtmin(n)) > SDAT%dtlimit(n)) then
write(logunit,*) trim(subname),' ERROR: for stream ',n
write(logunit,*) trim(subName),' ERROR: dt limit1 ',SDAT%dtmax(n),SDAT%dtmin(n),SDAT%dtlimit(n)
write(logunit,*) trim(subName),' ERROR: dt limit2 ',SDAT%ymdLB(n),SDAT%todLB(n), &
SDAT%ymdUB(n),SDAT%todUB(n)
call shr_sys_abort(trim(subName)//' ERROR dt limit for stream')
endif

So, 62/28 = 2.2 which is > 1.5

My suggestion was to set dtlimit to something large to avoid this, but looking at this closer this would seem to indicate that you may have a 62 day gap in your forcing data somewhere? I'd look at the time stamps in your forcing files. Maybe your monthly time stamps should be in the middle of the month?
 

wvsi3w

wvsi3w
Member
Regarding dtlimit, I found this documentation:


<entry id="dtlimit" per_stream_entry="true">
<type>real(30)</type>
<category>streams</category>
<group>shr_strdata_nml</group>
<desc>
array (up to 30 elements) of delta time ratio limits placed on the
time interpolation associated with the array of streams. this real
value causes the model to stop if the ratio of the running maximum
delta time divided by the minimum delta time is greater than the
dtlimit for that stream. for instance, with daily data, the delta
time should be exactly one day throughout the dataset and the computed
maximum divided by minimum delta time should always be 1.0. for
monthly data, the delta time should be between 28 and 31 days and the
maximum ratio should be about 1.1. the running value of the delta
time is computed as data is read and any wraparound or cycling is also
included. this input helps trap missing data or errors in cycling.
to turn off trapping, set the value to 1.0e30 or something similar.
</desc>

The error you got was:

(shr_strdata_advance) ERROR: for stream 1
(shr_strdata_advance) ERROR: dt limit1 62.0000000000000
28.0000000000000 1.50000000000000
(shr_strdata_advance) ERROR: dt limit2 18500201 0 18500301 0

And the corresponding code is:

SDAT%dtmin(n) = min(SDAT%dtmin(n),dtime)
SDAT%dtmax(n) = max(SDAT%dtmax(n),dtime)
if ((SDAT%dtmax(n)/SDAT%dtmin(n)) > SDAT%dtlimit(n)) then
write(logunit,*) trim(subname),' ERROR: for stream ',n
write(logunit,*) trim(subName),' ERROR: dt limit1 ',SDAT%dtmax(n),SDAT%dtmin(n),SDAT%dtlimit(n)
write(logunit,*) trim(subName),' ERROR: dt limit2 ',SDAT%ymdLB(n),SDAT%todLB(n), &
SDAT%ymdUB(n),SDAT%todUB(n)
call shr_sys_abort(trim(subName)//' ERROR dt limit for stream')
endif

So, 62/28 = 2.2 which is > 1.5

My suggestion was to set dtlimit to something large to avoid this, but looking at this closer this would seem to indicate that you may have a 62 day gap in your forcing data somewhere? I'd look at the time stamps in your forcing files. Maybe your monthly time stamps should be in the middle of the month?
Dear Keith,
Thank you so much for your explanation.

I have looked at the forcing files (using ncdump -v time xxxx.nc) and as we know already it is showing one value for each month (two bnds with days since 0500-01-01):
Code:
netcdf \0500-01 {
dimensions:
        time = UNLIMITED ; // (1 currently)
        bnds = 2 ;
        lon = 288 ;
        lat = 192 ;
variables:
        double time(time) ;
                time:standard_name = "time" ;
                time:long_name = "time" ;
                time:bounds = "time_bnds" ;
                time:units = "days since 0500-01-01 00:00:00" ;
                time:calendar = "365_day" ;
                time:axis = "T" ;
        double time_bnds(time, bnds) ;

and by visualizing the NC files (ncview) we see that indeed as you mentioned it is referring to the mid point of each month (see below):
1748031301044.png
1748031267380.png
1748031229281.png

Is this concerning (I mean technically)? ((I have to emphasize that the concern regarding having only one value for month in our specific project is resolved scientifically and we can justify it as well))

Besides that, may I know your helpful opinion on the other forcings I asked in my previous message please (CO2, lnd, etc). Thanks a lot.
 

wvsi3w

wvsi3w
Member
Dear Keith @oleson and Sam @slevis

I dont know why I cant access information on these (link1, link2, link3, ...) and they show unsafe access and I am asked for user and pass (which I dont remember if I had any, and it was not like this before).

Anyhow, that's why I am asking for help here regarding the steps to set the CO2, and other forcings I mentioned in my previous message (May 22nd) because I don't have access to some of the useful documentation.

1- So, as you see my spin-down simulation starts from year 500 and the graph I showed you above is giving us values around 275ppm, then I think I should change the "CLM_CO2_TYPE" to constant (how? with xmlchange? or in user_nl_clm?) and set "CCSM_CO2_PPMV" to 275 (./xmlchange CCSM_CO2_PPMV=275, like this?). Also the explanation here is kinda confusing, which made me to double check with you about the exact steps to set the CO2 in my case to the constant value of 275 for the year 500 to 1850.

2- About the Aerosol, since this spin-down is from year 500 then I want to turn the aerosol off somehow, this is what I found from the forum and documentation "DATM_PRESAERO" but I am not sure if this is the way that I need to set this off & how to do it. The explanation here says that we can set it to constant for 1850 (which I guess is the only option that suits my case for the year 500, because I assume there is no option to turn aerosol off?)

3- Since I am going to do this spin-down from a spun-up file (from my last spin-up which I used a different soil layer structure) then I assume setting the "use_init_interp" to true doesn't make sense because
"❌❌(Setting use_init_interp = .true. is needed when doing a transient run using an initial conditions file from a non-transient run,

or a non-transient run using an initial conditions file from a transient run,

or when running a resolution or configuration that differs from the initial conditions.)❌❌" right?

4- how about "urbandata" + "firedata" for the year 500? I think I should turn these off as well, but how?

5- The solar file inside "/inputdata/atm/cam/solar/" (SolarForcing1995-2005avg_c160929.nc)? Can we ignore this one? or should we turn this one off too?

-- are there any other file or option or forcing that I am missing and I need to modify before starting the spin-down process?
 

slevis

Moderator
Staff member
@wvsi3w the community most familiar with what you're trying to do is the Paleo community, so I will let them respond to you. Keep in mind also that what you're attempting is unsupported, so mostly you're on your own figuring things out. This will involve a lot of trial-and-error, which is completely fine and expected in numerical modeling, so do not feel daunted by that.
 

slevis

Moderator
Staff member
For question (1) it may help you to open the file env_run.xml to see the documentation on the variables that you're asking about.
 

wvsi3w

wvsi3w
Member
@slevis Thanks a lot for your response.

I did try a test run with the following options added to my previous setup:
./case.build --clean
./case.build --clean-all
./xmlchange DATM_PRESAERO=clim_1850
./xmlchange CLM_CO2_TYPE="constant"
./xmlchange CCSM_CO2_PPMV=280.0

+ removed use_init_interp = .true. from user_nl_clm
./case.setup
./case.build
./case.submit

And it did work with these changes. However, when I check my user_nl_datm I still see CO2 and aerosol being the previous versions:
Code:
&datm_nml
  decomp = "1d"
  factorfn = "null"
  force_prognostic_true = .false.
  iradsw = 1
  presaero = .true.
  restfilm = "undefined"
  restfils = "undefined"
  wiso_datm = .false.
/
&shr_strdata_nml
  datamode = "CLMNCEP"
  domainfile = "/home/USER/projects/def-xxxx/USER/inputdata/share/domains/domain.lnd.fv0.9x1.25_gx1v7.151020.nc"
  dtlimit = 1.e36, 1.e36, 1.e36, 1.e36, 1.e36, 1.e36
  fillalgo = "nn", "nn", "nn", "nn", "nn", "nn"
  fillmask = "nomask", "nomask", "nomask", "nomask", "nomask", "nomask"
  fillread = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  fillwrite = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  mapalgo = "bilinear", "bilinear", "bilinear", "bilinear", "bilinear", "nn"
  mapmask = "nomask", "nomask", "nomask", "nomask", "nomask", "nomask"
  mapread = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  mapwrite = "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET", "NOT_SET"
  readmode = "single", "single", "single", "single", "single", "single"
  streams = "datm.streams.txt.CLMGSWP3v1.Solar 1901 500 500",
      "datm.streams.txt.CLMGSWP3v1.Precip 1901 500 500",
      "datm.streams.txt.CLMGSWP3v1.TPQW 1901 500 500",
      "datm.streams.txt.presaero.trans_1850-2000 1849 1849 2014",
      "datm.streams.txt.topo.observed 1 1 1",
      "datm.streams.txt.co2tseries.20tr 1850 1850 2014"
  taxmode = "cycle", "cycle", "cycle", "cycle", "cycle", "extend"
  tintalgo = "coszen", "nearest", "linear", "linear", "lower", "linear"
  vectors = "null"
/

Is this normal? I checked my env_run after I changed these: ./xmlchange DATM_PRESAERO=clim_1850 + ./xmlchange CLM_CO2_TYPE="constant" + ./xmlchange CCSM_CO2_PPMV=280.0

And I see that env_run is changed according to what I put there but I dont know if I should worry about the datm.streams for CO2 and aerosol in my user_nl_datm file? Should I set the "datm.streams.txt.presaero.trans_1850-2000 1849 1849 1849" + "datm.streams.txt.co2tseries.20tr 1850 1850 1850"???
 

wvsi3w

wvsi3w
Member
Also, about the "use_init_interp", since I am going to run a spin-down (same resolution as the finidat file) and it says that I should turn use_init_intrep to true when I am running with a configuration that differs from the initial conditions, so should I turn this to true???

My spun-up file is from a 1deg "I" compset which I did using a different soil layer structure, so for that I did turn on the use_init_intrep to true. Now that I have the spun-up file and now that I want to do the spin-down (using different forcing from year 500), should I turn use_init_intrep to true? I personally dont think so because I am using the same soil layer now (the only thing which was different in previous run from the finidat condition). I need your opinion.
 
Top