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

surface_map and landuse_timeseries datasets required for the stand-alone CLM5 run

knreddy

K Narender Reddy
Member
Hello,
I am trying to run a stand-alone clm model using the compset HIST_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_SROF_SGLC_SWAV in an attempt to run the model for the period 1980-2015 to evaluate the crop growth and carbon fluxes from croplands in India. I set out to run the model using the following surface_map and landuse_timeseries datasets:
flanduse_timeseries = '.../cesm/inputdata/lnd/clm2/surfdata_map/landuse.timeseries_0.9x1.25_rcp8.5_simyr1850-2100_c141219.nc'
fsurdat = '../cesm/inputdata/lnd/clm2/surfdata_map/surfdata.pftdyn_0.9x1.25_rcp8.5_simyr1850-2100_c130524.nc'
These datasets were not prepared to be used for the CLM5 experiments. I am running the CLM5BGC-CROP model, and hence the model requires a variety of variables as inputs amongst which GLACIER_REGION is one. The GLACIER_REGION variable is not present in the surface dataset I am using.
And I understand that for running a transient model both landuse_timeseries and surface_map datasets should have the same timeline. I have searched through the new releases ("release-clm5.0.30", "release-clm5.0.31/", and "release-clm5.0.34/") as well. No datasets fulfilling my requirement are available. I request the Land model working group to provide datasets for the simyrs 1850 to 2100 under the SSP535 scenario (datasets at different two resolutions {0.9x1.25, 0.43x0.67} ). This would help me to successfully run the model. I also want to know if there is an option of requesting the required datasets.
Thank you. Hoping for a reply.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Generally, it is best practice to let the model tell you what the datasets should be for the desired compset and resolution (grid).
For example, this command using release-clm5.0.35:

./create_newcase --case clm50_clm5.0.35_1deg_GSWP3V1_hist --compset HIST_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_SROF_SGLC_SWAV --res f09_g17 --run-unsupported

would create case clm50_clm5.0.35_1deg_GSWP3V1_hist. The datasets that would be used in lnd_in are:

fsurdat = '/glade/p/cesmdata/cseg/inputdata/lnd/clm2/surfdata_map/release-clm5.0.18/surfdata_0.9x1.25_hist_78pfts_CMIP6_simyr1850_c190214.nc'
flanduse_timeseries = '/glade/p/cesmdata/cseg/inputdata/lnd/clm2/surfdata_map/landuse.timeseries_0.9x1.25_hist_78pfts_CMIP6_simyr1850-2015_c170824.nc'

That would enable you to run the model for 1980-2015.
 

knreddy

K Narender Reddy
Member
Dear Oleson,
Thanks for enlightening me about the surface dataset. I've made the suggested changes and I've completed the transient run and the results look great.
I am trying to investigate the crop properties over the Indian region, so running the model at 0.5 deg resolution or even finer, if possible, would be really helpful. Are there 0.5 deg surface and land-use datasets to carry out the experiment for the same time period 1980-2015?
Thank you again.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
With respect to the supported release version, release-cesm2.1.3, I don't see any higher resolution datasets available out of the box.
However, you could create a 0.5deg case using, for example,

./create_newcase --case clm50_cesm213R_hcru_GSWP3V1_hist --res hcru_hcru --compset IHistClm50BgcCrop --run-unsupported

Here, hcru_hcru is the name of the 0.5 resolution.

Then you would have to create surface dataset and landuse timeseries files using the mksurfdata_map tool:


The mapping files for this resolution do exist already, so, after building the mksurfdata_map code, you should be able to do this to generate the datasets:

./mksurfdata.pl -res 360x720cru -years 1850-2000

The "360x720cru" for the tool corresponds to hcru_hcru for the model. Although the years specified here are 1850-2000, the landuse dataset generated will be for 1850-2015.

If you are just interested in a region (e.g., India) and don't want to run globally, then you would need to create regional, instead of global, datasets.
 

knreddy

K Narender Reddy
Member
This is of great help to me in conducting the experiments at a regional scale and at a finer resolution. Thank you for answering these questions very patiently.
I have another question. While running the CLM5BGCCROP with DATM for the period 1980-2015, I am using the out-of-the-box data to run the model. I want to do a spin-up first and then use the output as initial data for the model. How would you suggest going about it?

I have run an Accelerated Spinup case as directed in 1.5.5. Spinup of CLM5.0-BGC-Crop — ctsm release-clm5.0 documentation. The model didn't move ahead of the initial time step. I am attaching the log files of the run. It would be really helpful if you could guide me through the spinup process.

Thank you
 

Attachments

  • lnd.log.3143686.pbshpc.220630-154210.txt
    115 KB · Views: 5
  • cpl.log.3143686.pbshpc.220630-154210.txt
    41.3 KB · Views: 0
  • cesm.log.3143686.pbshpc.220630-154210.txt
    183.6 KB · Views: 4
  • atm.log.3143686.pbshpc.220630-154210.txt
    13.5 KB · Views: 0

oleson

Keith Oleson
CSEG and Liaisons
Staff member
The cesm log shows an error and a traceback:

forrtl: severe (174): SIGSEGV, segmentation fault occurred
cesm.exe 0000000000DC92AA pionfget_mod_mp_g 291 pionfget_mod.F90.in
cesm.exe 0000000000561246 initinterp2dvar_m 290 initInterp2dvar.F90.in
cesm.exe 0000000000567641 initinterpmultile 315 initInterpMultilevelContainer.F90
cesm.exe 00000000005655AC initinterpmultile 117 initInterpMultilevelContainer.F90
cesm.exe 0000000000557A7F initinterpmod_mp_ 399 initInterp.F90
cesm.exe 00000000004E52A0 clm_initializemod 546 clm_initializeMod.F90
cesm.exe 00000000004CFD1A lnd_comp_mct_mp_l 233 lnd_comp_mct.F90
cesm.exe 000000000043110E component_mod_mp_ 267 component_mod.F90
cesm.exe 0000000000417900 cime_comp_mod_mp_ 1232 cime_comp_mod.F90
cesm.exe 000000000042FD05 MAIN__ 114 cime_driver.F90

This indicates the model is having trouble interpolating the initial file provided by finidat in lnd_in to the grid you are running on.
In particular, it seems to have a problem setting up the interpolators for multi-level variables.
I'm not sure what to suggest however. In order for me to help further and possibly try to replicate the failure on our HPC here, I would need the following information requested here:


The only other thing I can think of is that since you appear to be only using 96 processors, maybe you are running out of memory on your machine. You could try running a lower resolution case or increasing your pe-count.
 

knreddy

K Narender Reddy
Member
I'm sharing the steps followed to run the SPIN-up case:

./create_newcase --case /home/cas/phd/asz198070/BGC_Spinup --res f09_g17 --compset 1850_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_CISM2%NOEVOLVE_SWAV --machine PADUM

./xmlchange CLM_ACCELERATED_SPINUP="on"

./xmlchange RESUBMIT=3,STOP_N=50,STOP_OPTION=nyears,STOP_DATE=02010101

The case submit file is as follows:
#!/usr/bin/env python
# Batch system directives
#PBS -N BGC_Spinup
#PBS -P ***********
#PBS -q high
#PBS -m bea
#PBS -M asz198070@iitd.ac.in
#PBS -l select=4:ncpus=24:mpiprocs=24
#PBS -l walltime=60:00:00
#PBS -r n
#PBS -l place=scatter
#PBS -S /bin/bash

I am attaching the log files regarding the run.

Please do the needful.
 

Attachments

  • atm.log.3143686.pbshpc.220630-154210.txt
    13.5 KB · Views: 0
  • cesm.log.3143686.pbshpc.220630-154210.txt
    183.6 KB · Views: 3
  • cpl.log.3143686.pbshpc.220630-154210.txt
    41.3 KB · Views: 1
  • lnd.log.3143686.pbshpc.220630-154210.txt
    115 KB · Views: 2

oleson

Keith Oleson
CSEG and Liaisons
Staff member
First of all, i didn't see that you provided the version of the model that you are running. My answers here are based on release-cesm2.1.3.
I see that you are changing STOP_N, STOP_OPTION, and STOP_DATE. Since you are setting the first two, you don't need to set the third.
Interestingly, if I use your xmlchange command, I end up with the following in my env_run.xml:

<entry id="STOP_DATE" value="528449">

I think it is having a problem with the leading zero. This results in the model crashing right away. If I use ./xmlchange STOP_DATE=2010101, this seems to work fine. Regardless, I don't think this is causing your problem, but I'd check your STOP_DATE in env_run.xml. And try your simulation without setting it.
That said, the simulation runs successfully for 1 year on our machine.
I assume from your comments above you've successfully ported the model to your machine and have run other simulations successfully. If not, look in the porting Forum for instructions.
Other than that, I don't have any other ideas, sorry. I'll ping @sacks here in case he has any ideas about this interpolation error.
 

knreddy

K Narender Reddy
Member
Thank you, @oleson.
I am using release-cesm2.1.1. Initially, my env_run.xml had a similar error. <entry id="STOP_DATE" value="528449">. I have corrected the error by turning off the STOP_DATE, submitted the model run.
The cesm log shows an error and a traceback:

forrtl: severe (174): SIGSEGV, segmentation fault occurred
cesm.exe 0000000000DC92AA pionfget_mod_mp_g 291 pionfget_mod.F90.in
cesm.exe 0000000000561246 initinterp2dvar_m 290 initInterp2dvar.F90.in
cesm.exe 0000000000567641 initinterpmultile 315 initInterpMultilevelContainer.F90
cesm.exe 00000000005655AC initinterpmultile 117 initInterpMultilevelContainer.F90
cesm.exe 0000000000557A7F initinterpmod_mp_ 399 initInterp.F90
cesm.exe 00000000004E52A0 clm_initializemod 546 clm_initializeMod.F90
cesm.exe 00000000004CFD1A lnd_comp_mct_mp_l 233 lnd_comp_mct.F90
cesm.exe 000000000043110E component_mod_mp_ 267 component_mod.F90
cesm.exe 0000000000417900 cime_comp_mod_mp_ 1232 cime_comp_mod.F90
cesm.exe 000000000042FD05 MAIN__ 114 cime_driver.F90

This indicates the model is having trouble interpolating the initial file provided by finidat in lnd_in to the grid you are running on.
In particular, it seems to have a problem setting up the interpolators for multi-level variables.
I'm not sure what to suggest however. In order for me to help further and possibly try to replicate the failure on our HPC here, I would need the following information requested here:


The only other thing I can think of is that since you appear to be only using 96 processors, maybe you are running out of memory on your machine. You could try running a lower resolution case or increasing your pe-count.
Would running the model from a cold start solve the issue of interpolating initial data?
 

knreddy

K Narender Reddy
Member
With respect to the supported release version, release-cesm2.1.3, I don't see any higher resolution datasets available out of the box.
However, you could create a 0.5deg case using, for example,

./create_newcase --case clm50_cesm213R_hcru_GSWP3V1_hist --res hcru_hcru --compset IHistClm50BgcCrop --run-unsupported

Here, hcru_hcru is the name of the 0.5 resolution.

Then you would have to create surface dataset and landuse timeseries files using the mksurfdata_map tool:


The mapping files for this resolution do exist already, so, after building the mksurfdata_map code, you should be able to do this to generate the datasets:

./mksurfdata.pl -res 360x720cru -years 1850-2000

The "360x720cru" for the tool corresponds to hcru_hcru for the model. Although the years specified here are 1850-2000, the landuse dataset generated will be for 1850-2015.

If you are just interested in a region (e.g., India) and don't want to run globally, then you would need to create regional, instead of global, datasets.
Hello Oleson,
I have successfully run the standalone CLM5 model using the cesm2.1.1 version using the out-of-the-box datasets for land use time series and surface data. I have attempted to create 360x720 land use time series and surface datasets using the above-mentioned method. Initially, I didn't have many map files, so I downloaded the missing files required for creating the data. The code was running fine, but i have encountered an error saying:

In mkpftMod::mkpft()...
Attempting to make PFTs .....
Creating surface datasets with extra types for crops; total pfts = 78
netcdf error from domain_read rcode = 2 error =
No such file or directory

abort:
ERROR in mksurfdata_map: 34304

I am attaching the log file to this message for further reference. Please help me in rectifying this error.
Thanks in advance
 

Attachments

  • mksurfdata_test.log.txt
    36.4 KB · Views: 3

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I tried that here, it worked fine.
I see this in your log file:

input pft dynamic dataset for year 1850 is :
/scratch/civil/phd/cez218275/cesm2_2_0_mksurf/cesm2/my_cesm_sandbox/components/
clm/tools/mkmapdata/lnd/clm2/rawdata/pftcftdynharv.0.25x0.25.LUH2.histsimyr1850
-2015.c170629/mksrf_landuse_histclm50

It seems like the file name is truncated, it should be:

input pft dynamic dataset for year 1850 is :
/scratch/civil/phd/cez218275/cesm2_2_0_mksurf/cesm2/my_cesm_sandbox/components/
clm/tools/mkmapdata/lnd/clm2/rawdata/pftcftdynharv.0.25x0.25.LUH2.histsimyr1850
-2015.c170629/mksrf_landuse_histclm50_LUH2_1850.c170629.nc

The lines of code that are reading those files is:

write(6,*)'input pft dynamic dataset for year ', year, ' is : ', trim(fname)
read(nfdyn, '(A195,1x,I4)', iostat=ier) fhrvname, year2

So the file length limit appears to be 195 characters and yours is greater than that.
So try to put those file in a location with a shorter length.
The file names can be found in landuse_timeseries_hist_78pfts_CMIP6_simyr1850-2015.txt.
 

knreddy

K Narender Reddy
Member
Thank you so much for providing the solution. Sorry for the trouble; I should have figured that out myself. Now the command works fine without any error, and I can create the surface data and land use time series.
 

knreddy

K Narender Reddy
Member
Hello,
I am using the created global landuse time series and surface dataset to prepare a regional subset for -ne 40.0,100.0 -sw 0.0,60.0. I am using the domain file created using the map file: map_0.25x0.25_MODIS_to_360x720cru_nomask_aave_da_c120830.nc

While running the code $GETREGDIR/getregional_datasets.pl -ne 20.0,80.0 -sw 10.0,70.0 -I sample_inlist -o sample_outlist, I am getting the following error:

fatal:Argument type mismatch on argument (2) of (getfilecoord_namenlen) can not coerce
fatal:["Execute.c":8637]:Execute: Error occurred at or near line 213 in file /home/cas/phd/asz198070/CESM_HPC/cesm2.1.1/components/clm/tools/ncl_scripts/getregional_datasets.ncl

I am using cesm2.1.1. I am attaching the sample_inlist, sample_outlist, and header files for the NetCDF domain, land use, and surface files. by creating the regional data sets, I can continue with my experiments. I can see from the error that the argument's name is not matching. I couldn't tell exactly which arguments are causing this issue.

Thank you in advance
 

Attachments

  • landuse_metadata.txt
    6.5 KB · Views: 1
  • surfdata_metadata.txt
    16 KB · Views: 0
  • domain_metadata.txt
    2.2 KB · Views: 1
  • sample_outlist.txt
    641 bytes · Views: 1
  • sample_inlist.txt
    948 bytes · Views: 1

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I think your error is probably related to this bug in getregional_datasets.ncl described here:


There is a suggested fix there.
 

knreddy

K Narender Reddy
Member
Thank you for the quick response. It worked. I have the regional dataset required for my experiments now.
 

knreddy

K Narender Reddy
Member
hi,
while building the cesm i am getting the following error:
out=
err=ERROR : CLM build-namelist::CLMBuildNamelist::check_for_perl_utils() : Cannot find perl module "XML/Lite.pm" in directory
"/home/cas/asz198070/CESM_HPC/cesm2.1.1/cime/utils/perl5lib"

The path should have been "/home/cas/phd/asz198070/CESM_HPC/cesm2.1.1/cime/utils/perl5lib" instead of "/home/cas/asz198070/CESM_HPC/cesm2.1.1/cime/utils/perl5lib".

I have attempted changing the 'cimeroot' path in "/home/cas/phd/asz198070/CESM_HPC/cesm2.1.1/components/clm/bld/CLMBuildNamelist.pm", but the error persists. What can I do to overcome this error?

Thanks
 
Top