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

change crop planting window dates

samrabin

Sam Rabin
Member
Hi Xiang,

  1. The values over the ocean are there so that, if the land/ocean mask ever changes, I don't have to update the input files (as I would if I applied the mask). They will not be used if a gridcell has no land (and therefore no crop area). They were generated with a nearest-neighbor extrapolation, in case you were wondering.
  2. Yes, sorry, that information is outdated. (It still applies for anyone who turns off the new default crop calendar system, though.)
  3. The original crop calendar data come from the Global Gridded Crop Model Intercomparison / ISIMIP-Crop input dataset. The original dataset and more information are available here. It has input data even in ridiculous places because GGCMI/ISIMIP runs require that we simulate every crop in every gridcell. As with the data over the ocean, a crop's values won't be used if CLM has no area of that crop there.
  4. Yes, you would change the values only in the gridcells that have rice in your simulations. (Again, you could change the values in gridcells without rice, but that would have no effect.) You would use the surface dataset if using an 1850 or 2000 compset, but if using a Hist or SSP compset, you would want to look at the appropriate landuse timeseries file to identify gridcells that EVER have rice.
 

xgao304

Member

Dear @samrabin,​

I am looking at the "min_NH_planting_date/max_NH_planting_date" in the parameter file "clm50_params.c241119.nc", both variables have
units "YYYYMMDD", their values look something like below:

min_NH_planting_date = _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 401, 401, 401, 401, 901, 901, 501, 501, 401, 401, 901, 901, 401, 401,
901, 901, _, _, _, _, _, _, _, _, 401, 401, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 101, 101, _, _, _, _, 101, 101, _, _, 401, 401,
401, 401, 320, 320, 415, 415 ;

max_NH_planting_date = _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 615, 615, 615, 615, 1130, 1130, 615, 615, 615, 615, 1130, 1130, 615, 615,
1130, 1130, _, _, _, _, _, _, _, _, 531, 531, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, 228, 228, _, _, _, _, 331, 331, _, _, 615, 615, 615, 615, 415, 415, 701, 701 ;

I thought those values are based on "DOY", but they could be larger than 365. I am wondering how to interpret them. If I want to change them,
It is better for me to know what they represent.

Thanks,

Xiang
 

samrabin

Sam Rabin
Member
Good question. Those are in the very strange (M)MDD format. So, e.g.:
  • 615 = June 15
  • 1130 = November 30
There are no years because it's not possible to change these values over time.
 

samrabin

Sam Rabin
Member
Well, I guess that's not exactly true: You could change values over time by simulating one calendar year at a time, providing a new parameter file for each calendar year.
 

xgao304

Member
Thanks. That is good to know. I am wondering how to implement this in reality. Assume that I am running 10 years, each year has its own parameter file, how to let the code know to read each year's own parameter file (where to specify the relevant information)? -- by the way, I am talking about cesm2.1.3 package, not the ctsm stand alone, unless this feature can be only achieved through the ctsm new version?
 

xgao304

Member
Dear @samrabin,

I have some further questions. I am running cesm2.1.3 with changed crop calendar via the parameter file.

I did two cases, one is successful, another failed. the two cases are running the same compset with the same domain file and surface dataset.

The only difference between two cases is that the case 2 (failed one) used changed parameter file, which I put in the user_nl_clm as follows:

paramfile = '/net/fs12/d2/xgao/ctsm5.3/modified_data/bororice_sowdate.nc'

I did not specify stream_fldFileName_swindow_start =' ' and stream_fldFileName_swindow_end = '' in the user_nl_clm as it gives me the error message during the case setup (file not found). lnd_in indicates that the new parameter file has been specified correctly.

I attached the log files for the failed case. Could you give me some suggestions about what is going on?
 

Attachments

  • atm.log.327280.241211-145839.txt
    12.6 KB · Views: 0
  • cesm.log.327280.241211-145839.txt
    180.3 KB · Views: 0
  • lnd.log.327280.241211-145839.txt
    21.3 KB · Views: 1

samrabin

Sam Rabin
Member
Unfortunately, there's not a nice way to do it in the version you're running. You would have to:
  1. Set up your case with the paramfile pointing at the file with values for the first year. (In user_nl_clm: paramfile = '/path/to/paramfile_year1.nc')
  2. Run a year (STOP_OPTION=nyears, STOP_N=1), saving restart files at the end.
  3. Change the paramfile to point at the file with values for the second year.
  4. Run another year.
  5. Etc. ...
One thing to keep in mind is that your version probably contains a bug that might impact your simulations by making it so that some crops in some gridcells only get planted every other year. Briefly, the fix requires two changes to the code in the harvest part of the CropPhenology() subroutine (i.e., the conditional block containing cphase(p) = 4._r8):
  1. Set cropplant(p) to false if the crop was planted in the previous calendar year (i..e, if jday > idop); otherwise set cropplant(p) to true.
  2. Always sets idop to NOT_PLANTED

Re: your most recent message: It looks like you have at least one variable missing from the paramfile you specified. See near the end of lnd.log:
Code:
 ncd_inqvid: variable tau_l1 is not on dataset
 

xgao304

Member
the original parameter file (clm5_params.c171117.nc) does not have that variable either. I only replace the values of rice for
max_NH_planting_date and min_NH_planting_date of the original parameter file (using ncap2). I don't think other variables will be changed.
If I compare the lnd_in between two cases:

< paramfile = '/net/fs12/d2/xgao/ctsm5.3/modified_data/bororice_sowdate.nc'
---
> paramfile = '/net/fs01/data/cesm2/inputdata/lnd/clm2/paramdata/clm5_params.c171117.nc'

< !# /net/fs05/d1/xgao/cesm2.1.3/cesm/components/clm/bld/CLM build-namelist -cimeroot /net/fs05/d1/xgao/cesm2.1.3/cesm/cime/scripts/Tools/../.. -infile /net/fs05/d1/xgao/cesm2.1.3/cases/test_Brice/Buildconf/clmconf/namelist -csmdata /net/fs01/data/cesm2/inputdata -inputdata /net/fs05/d1/xgao/cesm2.1.3/cases/test_Brice/Buildconf/clm.input_data_list -ignore_ic_year -namelist &clm_inparm start_ymd=19830101 / -use_case 2000_control -res UNSET -clm_usr_name UNSET -clm_start_type default -envxml_dir /net/fs05/d1/xgao/cesm2.1.3/cases/test_Brice -l_ncpl 48 -lnd_frac /net/fs05/d1/xgao/cesm2.1.3/cases/sim_setup/Bangladesh/BANGdatacrews_small/domain.lnd.0.1x0.1_gx1v7_BANGcrews_c240211.nc -glc_nec 10 -co2_ppmv 367.0 -co2_type constant -config /net/fs05/d1/xgao/cesm2.1.3/cases/test_Brice/Buildconf/clmconf/config_cache.xml -bgc bgc -crop -clm_accelerated_spinup off -lnd_tuning_mode clm5_0_GSWP3v1

> !# /net/fs05/d1/xgao/cesm2.1.3/cesm/components/clm/bld/CLM build-namelist -cimeroot /net/fs05/d1/xgao/cesm2.1.3/cesm/cime/scripts/Tools/../.. -infile /net/fs05/d1/xgao/cesm2.1.3/cases/test/Buildconf/clmconf/namelist -csmdata /net/fs01/data/cesm2/inputdata -inputdata /net/fs05/d1/xgao/cesm2.1.3/cases/test/Buildconf/clm.input_data_list -ignore_ic_year -namelist &clm_inparm start_ymd=19830101 / -use_case 2000_control -res UNSET -clm_usr_name UNSET -clm_start_type default -envxml_dir /net/fs05/d1/xgao/cesm2.1.3/cases/test -l_ncpl 48 -lnd_frac /net/fs05/d1/xgao/cesm2.1.3/cases/sim_setup/Bangladesh/BANGdatacrews_small/domain.lnd.0.1x0.1_gx1v7_BANGcrews_c240211.nc -glc_nec 10 -co2_ppmv 367.0 -co2_type constant -config /net/fs05/d1/xgao/cesm2.1.3/cases/test/Buildconf/clmconf/config_cache.xml -bgc bgc -crop -clm_accelerated_spinup off -lnd_tuning_mode clm5_0_GSWP3v1


The headers of parameter files don't show much difference either (see the attchement).

I am wondering if the error message could be caused by some others not the variable tau_I1?

Thanks,

Xiang
 

Attachments

  • header_diff.txt
    3 KB · Views: 1

samrabin

Sam Rabin
Member
I might be confused, but from the history attribute in that diff file it looks like you started with a much newer paramfile (clm50_params_nfix.c241119.nc) than clm5_params.c171117.nc.
 

xgao304

Member
Thanks. Good catch. Now it is working. The successful case was run a while ago. I don't specify the version of the parameter file to be used.
Although there are several versions of parameter files in the inputdata directory, it seems that the model automatically picked the
version c171117.nc.

Actually, I would like to check with you: is there always an default parameter file for specific compset? And the new versions may not always work, correct?

Thanks,

Xiang
 

samrabin

Sam Rabin
Member
Yes, exactly. You can check the default parameter file for any given compset by searching for paramfile in bld/namelist_files/namelist_defaults_ctsm.xml. You can also search for paramfile in the case directory's CaseDocs/lnd_in.
 
Top