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

How select a special region to run the CLM from the global model in CLM?

jteymoori

Javad Teymoori
Member
Adding surface datasets to the namelist defaults isn't a required step. If you have created a surface dataset, e.g., surfdata_0.05x0.05_test_hist_78pfts_CMIP6_simyr2000_c200426.nc, then you just need to point to it in your user_nl_clm.
Dear @oleson ,
Thank you for your response
I have added a new resolution Name in the namelist_definition_ctsm.xml, so the 0.05x0.05_global was added to the end of the valid_values for the id="res" entry.
Now I want to create surface data for this new resolution and for that:

Firstly, for Create SCRIP Grid Files in the $CTSMROOT/tools/mkmapgrids/mkscripgrid.ncl I changed the below scripts:

name = getenv("0.05x0.05_global"); ; Get name of this point

latS = stringtodouble( getenv("-90") ); ; Get south latitude from env variable
latN = stringtodouble( getenv("90") ); ; Get north latitude from env variable
lonE = stringtodouble( getenv("180") ); ; Get east longitude from env variable
lonW = stringtodouble( getenv("-180") ); ; Get west longitude from env variable

nx = stringtointeger( getenv("7200" ) ); ; Get number of grids along longitude lines
ny = stringtointeger( getenv("3600" ) ); ; Get number of grids along latitude lines

Secondly for Generate Mapping Files in the $CTSMROOT/tools/mkmapdata/mkmapdata.s, Given that my new PTNAME is "0.05x0.05_global" and the script mkscripgrid.ncl is located in tools/mkmapgrids, here is how my would run the mkmapdata.sh script from the directory where it is located, I entered the below scripts:
./mkmapdata.sh -r 0.05x0.05 -f /glade/work/jteymoori/CTSM/tools/mkmapgrids/SCRIPgrid_0.05x0.05_global.nc -t global

But I faced this error:
CSMDATA path not known for host derecho7. Set manually before calling mkmapdata.sh. E.g., bash: export CSMDATA=/path/to/csmdata

How can I solve it?
 

slevis

Moderator
But I faced this error:
CSMDATA path not known for host derecho7. Set manually before calling mkmapdata.sh. E.g., bash: export CSMDATA=/path/to/csmdata

How can I solve it?
Please read the error message, because it offers an example of how to solve it.
 

jteymoori

Javad Teymoori
Member
Please read the error message, because it offers an example of how to solve it.
Dear all
After run the below scripts for creating surface data:
./mkmapdata.sh -r 0.05x0.05 -f /glade/work/jteymoori/CTSM/tools/mkmapgrids/SCRIPgrid_0.05x0.05_global.nc -t global
I faced the below error:
CSMDATA path not known for host derecho7. Set manually before calling mkmapdata.sh. E.g., bash: export CSMDATA=/path/to/csmdata
I have tried very hard to find the answer by myself and refused to ask you to help me but unfortunately I couldn't find the good answer. I reviewed some of other persons question in the Discuss CESM frume and based on their answers I tested the below directories for define the CSMDATA directory . but I faced error in all of them.
export CSMDATA=/glade/p/cesmdata/cseg/inputdata/lnd/clm2/mappingdata/grids
export CSMDATA=/glade/p/cesmdata/cseg/inputdata/lnd/clm2/mappingdata/grids
export CSMDATA=/glade/p/cesmdata/inputdata
export CSMDATA=/glade/p/cesmdata/inputdata/lnd
export CSMDATA=/glade/p/cesmdata/inputdata/lnd/clm2
export CSMDATA=/glade/p/cesmdata/inputdata/lnd/clm2/srfdata
export CSMDATA=/glade/p/cesmdata/inputdata/lnd/clm2/surfdata
export CSMDATA=/glade/p/cesmdata/inputdata/lnd/clm2/surfdata_esmf
export CSMDATA=/glade/p/cesmdata/inputdata/lnd/clm2/surfdata_map
export CSMDATA=/glade/p/cesmdata/cseg
export CSMDATA=/glade/p/cesmdata/cseg/inputdata
export CSMDATA=/glade/p/cesmdata/cseg/inputdata/lnd/clm2
export CSMDATA=/glade/p/cesmdata/cseg/inputdata/lnd/clm2/surfdata
export CSMDATA=/glade/p/cesmdata/cseg/inputdata/lnd/clm2/surfdata_map
export CSMDATA=/glade/p/cesmdata/cseg/inputdata/lnd/clm2/surfdata_esmf



Can you tell me the true direction for CSMDATA?
 

jteymoori

Javad Teymoori
Member
The new path should be /glade/campaign/cesm/cesmdata. /glade/p was the old file system.
Thank you so much
But I faced the same error:

./mkmapdata.sh
Script to create mapping files required by mksurfdata_map
query command is ./../../bld/queryDefaultNamelist.pl -silent -namelist clmexp -justvalue -options sim_year=2000 -csmdata /glade/campaign/cesm/cesmdata

Using user specified scrip grid file: /glade/work/jteymoori/CTSM/tools/mkmapgrids/SCRIPgrid_0.05x0.05_global.nc
Output grid resolution is 0.05x0.05
Hostname = derecho7
Machine derecho7 NOT recognized
Path to ESMF binary directory does NOT exist:
Set the environment variable: ESMFBIN_PATH
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
The error:

Machine derecho7 NOT recognized

is related to the fact that that the surface dataset generation tools have not been officially ported to Derecho.

There may be a way to make the older tools work on Derecho, but that might end up being too complicated. It looks like maybe you gave up at some point on creating a 0.05x0.05 dataset based on the instructions below, that were also detailed in previous posts, that use the new mksurfdata_esmf tool that works on Derecho:


That tool has now been released in ctsm5.2.0. But to get you going with a surface dataset and mesh file, let's just skip walking you through that whole process again for now. I have a global 0.05x0.05 surface dataset that can be subsetted for your desired region. It would be compatible with the recently released tag ctsm5.2.0.

If that would work for you, we would need the south and north latitude and east and west longitude bounds of the region you want to simulate. It might take me a couple of days to generate the required files.
 

jteymoori

Javad Teymoori
Member
The error:

Machine derecho7 NOT recognized

is related to the fact that that the surface dataset generation tools have not been officially ported to Derecho.

There may be a way to make the older tools work on Derecho, but that might end up being too complicated. It looks like maybe you gave up at some point on creating a 0.05x0.05 dataset based on the instructions below, that were also detailed in previous posts, that use the new mksurfdata_esmf tool that works on Derecho:


That tool has now been released in ctsm5.2.0. But to get you going with a surface dataset and mesh file, let's just skip walking you through that whole process again for now. I have a global 0.05x0.05 surface dataset that can be subsetted for your desired region. It would be compatible with the recently released tag ctsm5.2.0.

If that would work for you, we would need the south and north latitude and east and west longitude bounds of the region you want to simulate. It might take me a couple of days to generate the required files.
Dear Dr. Oleson
Thank you for your response .
I wanted to do the section Fin the instruction (F) Make CTSM surface dataset (fsurdat file) using the mksurfdata_esmf tool) but this step must be run in the CTSM/tools/mksurfdata_esmf but my case root is not include the mksurfdata_esmf and it just includeing :
contrib , mkmapdata , mkmapgrids, mkprocdata_map , mksurfdata_map , modify_input_files , ncl_scripts , README , README.filecopies , README.testing , site_and_regional

I wanted to run the below scripts:
/gen_mksurfdata_build.sh
./gen_mksurfdata_namelist.py --start-year 2000 --end-year 2000 --model-mesh-nx 7200 --model-mesh-ny 3600 --nocrop --model-mesh lnd_mesh.nc --res 0.05x0.05_global
./gen_mksurfdata_jobscript_single.py --number-of-nodes 24 --tasks-per-node 12 --namelist-file SCRIPgrid_0.05x0.05_global.nc
qsub mksurfdata_jobscript_single

I will appreciate it if you share the global 0.05x0.05 surface datase with me.
The area that I want to run my model on it is the U.S and it have the below lat and lon:
South_lat: 24.2 N
North_ lat: 55 N
West_lon: 125 W
East_lon:lon: 65 W
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
The mksurfdata-esmf tool is now available in the release of ctsm5.2.0. It was not available in older checkouts of main ctsm, only on a separate branch. To get it just clone the CTSM repository and run manage_externals. It will be under tools/mksurfdata_esmf.
We are still working on subsetting a global 0.05x0.05 dataset for your region.
 
Top