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

Status
Not open for further replies.

xgao304

Member
Dear Sir:

I would like to change the minimum and maximum planting dates of some crops since the default model values are not consistent with the observations.
It seems that 1) I can change the crop dates specified in the variables "max_NH/SH_planting_date(pft)" and min_NH/SH_planting_date(pft) in the clm input params file.
2) based on the technical note, this can also be achieved through the input map stream files 'stream_fldFileName_swindow_start" and 'stream_fldFileName_swindow_end".

My questions are
1) which way should I use?
2) if I use the 2nd method, where to find those stream files and how to integrate the changes during the model build phase?
3) in the model, the phenology phase is generally determined by the GDD temperature thresholds. If I forcefully change the planting window dates, would it cause any inconsistency in the GDD-based calculation? Do I need to adjust any other relevant parameters?

Thanks,
 

samrabin

Sam Rabin
Member
1) You should use the max/min_NH/SH_planting_date(pft) field on the parameter file if you're okay changing the sowing windows for all gridcells in each hemisphere. This would mean you also need to set stream_fldFileName_swindow_start and stream_fldFileName_swindow_end to the empty string ''.

2) If you want more control than that, you'll use stream_fldFileName_swindow_start and stream_fldFileName_swindow_end. By default, those point to the following files, respectively, in lnd/clm2/cropdata/calendars/processed/:
  • swindow_starts_ggcmi_crop_calendar_phase3_v1.01.2000-2000.20231005_145103.tweaked_latlons.nc
  • swindow_ends_ggcmi_crop_calendar_phase3_v1.01.2000-2000.20231005_145103.tweaked_latlons.nc
You can use those files as a template for making your own files. Then in your case, you would point stream_fldFileName_swindow_start and stream_fldFileName_swindow_end at your files.

3) Yes, using custom sowing windows can result in maturity requirements (the GDD thresholds you mention) that are too low or high. For example, if you move the sowing window to later in the warm season but do not reduce maturity requirement, the crop might not have enough time to reach maturity before it gets cold. If you have an idea of your typical harvest date, you can use this method to calibrate your maturity requirements based on the date at the middle of your sowing window. (Please note that the other sections on that page are out-of-date; they do not reflect that by default now the stream files for sowing window and maturity requirement are used.)
 

samrabin

Sam Rabin
Member
Note that the instructions linked in (3) assume you're using the stream_fldFileName_swindow_start/end method, not the parameter file max/min_NH/SH_planting_date(pft) method.
 

xgao304

Member
@samrabin: Thanks for the information. I have several further questions:

1. I currently run the crop model with all the default settings (without changing any crop calendar) using the following command. Which method is actually used to determine the crop calendar, 1) or 2)?

create_newcase --case BgcCrop2000_BANG_HisD --compset 2000_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_SROF_SGLC_SWAV --res CLM_USRDAT --user-mods-dir $MYDATA_DIR --machine svante --compiler intel --run-unsupported

My confusion is: I have neither set stream_fldFileName_swindow_start = ' ' anywhere, nor my inputdata cropdata directory contains those two files you specified (*weaked_latlons.nc). How do I know which method is actually used?

2. If I change the crop calendar using the method 1 (max/min_NH/SH_planting_date(pft) field on the parameter file), should I set stream files in user_nl_clm? For example:
stream_fldFileName_swindow_start = ' '
stream_fldFileName_swindow_end = ' '

3. If I use the method 2) to change the crop calendar, should I also specify it in "user_nl_clm"?

stream_fldFileName_swindow_start = '/XXXX/my_modified_file1.nc '
stream_fldFileName_swindow_end = ' /XXXX/my_modified_file2.nc'

Thanks,

Xiang
 

samrabin

Sam Rabin
Member
1) Do you know what version of CTSM you're using? If not, do git describe in your CTSM checkout and let me know what it says. My instructions actually assumed you were a somewhat version, but you might not be.

2, 3) Yes, user_nl_clm would be where you make those changes.
 

xgao304

Member
Dear Sam,

Not sure if I completely understand your answer about question 1.

I am using CLM5 coming with the cesm 2.1.3. I have not separately checked out CTSM.
Please let me know if you need any other information.

Thanks,

Xiang
 

xgao304

Member
Here is the results form "git describe"

[xgao@svante-login cesm]$ git describe
cesm2.1.3-rc.01

Thanks,

Xiang
 

samrabin

Sam Rabin
Member
Okay, in that case it looks like you're using an older version that doesn't have the new crop calendar stuff at all. This means that your only option is to use the variables in the parameter file.

Unfortunately it doesn't look like there's an official CESM "release" that includes the new crop calendar stuff. If you use the cesm2_3_beta17 tag, you will get a version of CTSM (ctsm5.2.005) that does include it, although it's off by default.
 

xgao304

Member
Thanks for the information. What would be the command to directly check out the recent version of ctsm (including the new crop calendar stuff) without downloading other cesm components? Does it follow the same way to compile and run as the cesm offline version?

Thanks,

Xiang
 

xgao304

Member
@Sam, Here is what I have done and the relevant results:

$ git clone GitHub - ESCOMP/CTSM: Community Terrestrial Systems Model (includes the Community Land Model of CESM)
$ cd CTSM

[xgao@svante-login CTSM]$ ./manage_externals/checkout_externals
ERROR: Instead of ./manage_externals/checkout_externals
please type './bin/git-fleximod update'
For additional information, please type './bin/git-fleximod --help'

$ ./bin/git-fleximod update
e fates not checked out, aligned at tag sci.1.78.3_api.36.1.0
fates up to date.

Recursively checking out submodules of cism
e source_cism not checked out, aligned at tag cism_main_2.01.013
cism up to date.
rtm up to date.
mosart up to date.
mizuRoute up to date.
ccs_config updated to ccs_config_cesm1.0.0

Recursively checking out submodules of cime

e CIME/non_py/cprnc has no fxtag defined in .gitmodules
cime up to date.
cmeps up to date.

Recursively checking out submodules of cdeps
e fox not checked out, aligned at tag 4.1.2.1
e genf90 not checked out, aligned at hash 4816965
cdeps up to date.
share up to date.
mct up to date.
parallelio up to date.

Skipping optional component doc-builder

[xgao@svante-login CTSM]$ git describe
ctsm5.3.009

My questions: 1) the lines starting with "e" indicate "XX" not checked out, then followed by "XX" up to date - Are all the results normal?
2) I assume the ctsm version 5.3.009 includes the new crop calendar stuff. Is this the version I should use?

Thanks,

Xiang
 

slevis

Moderator
Staff member
1) I think these results are fine. After "./bin/git-fleximod update" you can type "./bin/git-fleximod status" and "git status" to see if things make sense.
2) ctsm5.3.009 should have what you need, though I think @samrabin's earlier comment that it's off by default is still true.
 

xgao304

Member
@Sam:

I tried to port the ctsm 5.3.009 on our system (before I successfully ported the cesm 2.1.3), but get a bit lost. I also tried to search the discussion forum for other similar threads, but could not find some useful information.

For porting the cesm2.1.3, I modified three files under ~/cime/config/cesm/machines by adding the relevant system specification:

1. config_batch.xml
<batch_system MACH="svante" type="slurm">
<batch_submit>sbatch</batch_submit>
<submit_args>
<arg flag="--time" name="$JOB_WALLCLOCK_TIME"/>
</submit_args>
<directives>
<directive> --partition=edr</directive>
<directive> --mem=0</directive>
</directives>
<queues>
<queue walltimemax="24:00:00" nodemin="1" nodemax="128" default="true">edr</queue>
</queues>
</batch_system>

2. config_compilers.xml

<compiler MACH="svante" COMPILER="intel">
<NETCDF_PATH> $(NETCDF)</NETCDF_PATH>
<SLIBS>
<append> -L${NETCDF_PATH}/lib -lnetcdf -lnetcdff </append>
</SLIBS>
<MPI_LIB_NAME>mpi</MPI_LIB_NAME>
<MPI_PATH> $(INC_MPI)/..</MPI_PATH>
</compiler>

3. config_machines.xml
... a lot of system specificaitons.


for ctsm5.3.009, under the directory of ccs_config/machines,

I only changed "config_batch.xml" following the same way as I did in cesm2.1.3. There is no corresponding "config_compilers.xml". "config_machines.xml" has very different contents (only machine names) from what is in cesm2.1.3 ( a lot of system specifications).

The READM file only says "Please refer to the documentation in the config_machines.xml and config_compilers.xml files.". Not sure what is the documentation referred to?

My questions is: in order to port ctsm5.3.009 (not with any other cesm components), what files should I modify for porting?

Thanks,

Xiang
 

xgao304

Member
Is there any ctsm version that includes the new crop calendar stuffs and is by default on? Or, is it easy to turn on or off?

Thanks,

Xiang
 

slevis

Moderator
Staff member
There is no version with it default "on", and for corresponding namelist variables, look in bld/namelist_files/namelist_definition_ctsm.xml.
 

xgao304

Member

@samrabin,​


I have several questions about the parameter files you pointed to me:
  • swindow_starts_ggcmi_crop_calendar_phase3_v1.01.2000-2000.20231005_145103.tweaked_latlons.nc
  • swindow_ends_ggcmi_crop_calendar_phase3_v1.01.2000-2000.20231005_145103.tweaked_latlons.nc
Take swindwo_starts*.nc as an example If I am only interested in changing rice sow window which is variable "sdate1_61" in both files.

I plotted this variable. My questions are:

1. Why there are values over the ocean?
2. According to this link, 2.26. Crops and Irrigation — ctsm CTSM master documentation, rice sowing window is January 1 (DOY 1) ~ February 28 (DOY 59). However, the global map has this variable values ranging from 1 ~ 362. Is the information in the link outdated?

3. I think I can reasonably think not all the grids have the rice growing, but there are values everywhere. Should I interpret the values of the grids without rice simply as some dummy values in order to make the model run?

4. If I only want to change the sowing date of rice, should I simply identify those grids as long as rice% of the grid is > ) (eg., we could use surface dataset to calculate the rice% of the grid)?

Thanks,

Xiang

Screenshot 2024-11-25 at 1.18.09 PM.png
 
Status
Not open for further replies.
Top