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
Your problem relates to the datm mesh file. Actually, I see the mesh file you are using to describe the datm forcing grid in your datm.streams.xml:

/glade/work/jteymoori/ctsm5.2.005/CTSM/tools/site_and_regional/subset_data_regional/lnd_mesh.nc

is the mesh for the land grid, i.e., the surface data you are using (200X200 = 40,000).
You need to use a mesh file that describes the datm forcing grid.
Your datm forcing data is

lat = 620 ;
lon = 1160 ;

So you need a mesh file that corresponds to that.
The one you are using has elementCount = 40,000, which is not 620X1160.
So, it's not just that you have a mesh file with elementMask set to 1 everywhere, you also need a completely different datm mesh file.
Dear Oleson
I have a question about LND_NX, LND_NY, ATM_NX, and ATM_NY. How can I calculate them for each region?

I used to use 0.816447 for each degree in the X direction and 1.0943 for each degree in the Y direction for creating a surface dataset with 0.05x0.05 degree resolution; for example, when I want to run the model for a region with 20 degrees in 20 degrees, I use:
NX = (20 x 0.816447) = 16.32 ~ 17
NY = (20 x 1.0943) = 21.886 ~ 22

Is my approach for calculating the NX and NY true?

If I want to use a surface dataset with a 0.05x0.05 resolution, is this the correct method, or is there no connection between the resolution of the surface dataset and NX and NY?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Those need to be set to the lat/lon dimensions of the surface dataset. So yes there is a connection.
 

jteymoori

Javad Teymoori
Member
I am using the the surfdata_0.05x0.05-hires_noSP_hist_2005_78pfts_c240516.nc and I want to subset this surface data set for my region as below:

--lat1 33 --lat2 46 --lon1 250 --lon2 272

lat : 33 to 46
lon: 250 to 272
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Go ahead and subset it. Then look at the lsmlon and lsmlat dimensions in that dataset and that's what you would set *_NX and *_NY to, respectively.
 

xiaoxiaokuishu

Ru Xu
Member
I think that is expected behavior at this time:


The regional simulation can use global atm forcing.
Hi, oleson

I perform a regional simulation, I set res to CLM_USRDAT,
./xmlchange LND_NX=34
./xmlchange LND_NY=25
./xmlchange ATM_NX=34
./xmlchange ATM_NY=25

but I did not set ./xmlchange DATM_MODE=CLM1PT, I use default setting
the below error appears, it seems that my forcing data is global but surfdata is regional?
As you mentioned before, the regional simulation can use the global atm forcing?

(shr_dmodel_readstrm) file lb: /work/n02/n02/ruxu/cesm/CESM/cesm_inputdata//atm/datm7/atm_forcing.datm7.GSWP3.0.5d.v1.c170516/Solar/clmforc.GSWP3.c2011.0.5x0.5.Solr.1993-01.nc 1
(shr_dmodel_readstrm) ERROR in data sizes 720 360 248 850
ERROR: (shr_dmodel_readstrm) ERROR in data sizes


Best
Ru
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
@xiaoxiaokuishu you'll have to provide more information in order for us to try to help. Please submit a NEW post with the information requested here:

 

jteymoori

Javad Teymoori
Member
Dear Oleson,
I have created and submitted a case with my atmospheric forcing data by CTSM5.2.00, but I got the below error in the land.log in run directory:


The case's name is land_clm50_ctsm520_0.05x0.05conus_GSWP3V1_2000
the surface data's name is surfdata_land_hist_2000_78pfts_c250104.nc
Input surface dataset is:
/glade/work/jteymoori/ctsm5.2.005/CTSM/tools/site_and_regional/subset_data_regional/surfdata_land_hist_2000_78pfts_c250104.nc
This surface dataset is older and incompatible with this version of CTSM
Dataset version = 5.2 Version expected = 5.3

ERROR in surfrdMod.F90 at line 183

ENDRUN:
ERROR: ERROR: Incompatible surface dataset

I switched the model version to 5.3 with
git switch -c ctsm5.3 and created a new case, subsetted new surface data, and submitted that case with CTSM5.3, but I got the same error as below:

The case's name is land5_3_clm50_ctsm520_0.05x0.05conus_GSWP3V1_2000

the surface data's name is surfdata_land5_3_hist_2000_78pfts_c250105.nc
Input surface dataset is:
/glade/work/jteymoori/ctsm5.2.005/CTSM/tools/site_and_regional/subset_data_regional/surfdata_land5_3_hist_2000_78pfts_c250105.nc
This surface dataset is older and incompatible with this version of CTSM
Dataset version = 5.2 Version expected = 5.3

ERROR in surfrdMod.F90 at line 183

ENDRUN:
ERROR: ERROR: Incompatible surface dataset
/ ERROR


Why did I get these errors, and How can I solve them?
 

slevis

Moderator
Staff member
I think "git switch -c" creates a new branch and switches your work area to that branch. I'm guessing this new branch contains the same code as your 5.2 branch (as opposed to checking out version 5.3), and that's probably why you got exactly the same error.

You may need to
git fetch escomp
git checkout ctsm5.3.016

That happens to be the latest ctsm5.3 tag, so I'm afraid it is still completely unsupported.

...another option is to go back to using an fsurdat file generated by ctsm5.2 instead of one generated by ctsm5.3.
 

jteymoori

Javad Teymoori
Member
I want to run the model with the CTSM5.2 because all of my codes are in 5.2, but after submitting the case, I got the below error. Why I got this email, and how can I solve it?

The case's name is land_clm50_ctsm520_0.05x0.05conus_GSWP3V1_2000
the surface data's name is surfdata_land_hist_2000_78pfts_c250104.nc

Input surface dataset is:
/glade/work/jteymoori/ctsm5.2.005/CTSM/tools/site_and_regional/subset_data_regional/surfdata_land_hist_2000_78pfts_c250104.nc
This surface dataset is older and incompatible with this version of CTSM
Dataset version = 5.2 Version expected = 5.3
ERROR in surfrdMod.F90 at line 183

ENDRUN:
ERROR: ERROR: Incompatible surface dataset5.2.png
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I'm not sure you are using ctsm5.2 code. Your case (land_clm50_ctsm520_0.05x0.05conus_GSWP3V1_2000) seems to be using code from:

/glade/work/jteymoori/ctsm5.2.005/CTSM

Even though the directory name is ctsm5.2.005, if I do a "git describe" in that directory I get:

ctsm5.3.016

which indicates you are using ctsm5.3 code. So I think you need to check out ctsm5.2 code.
 

jteymoori

Javad Teymoori
Member
I'm not sure you are using ctsm5.2 code. Your case (land_clm50_ctsm520_0.05x0.05conus_GSWP3V1_2000) seems to be using code from:

/glade/work/jteymoori/ctsm5.2.005/CTSM

Even though the directory name is ctsm5.2.005, if I do a "git describe" in that directory I get:

ctsm5.3.016

which indicates you are using ctsm5.3 code. So I think you need to check out ctsm5.2 code.
Thank you so much for your response.
I want to work with ctsm5.2.005, although I checked out ctsm5.2.005 and switched to ctsm5.2.005; however, when I use git describe, I see my version is ctsm5.3.016, so when I submit my case, I receive the error that I mentioned in previous posts.
I am confused as to why it can not switch to ctsm5.2.005.

Here is the results of my codes for the switch and checkout to ctsm5.2.005:

git checkout ctsm5.2.005
warning: refname 'ctsm5.2.005' is ambiguous.
Already on 'ctsm5.2.005'

git switch -c ctsm5.2.005
fatal: a branch named 'ctsm5.2.005' already exists

git describe
ctsm5.3.016

1736269140674.png
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
As @slevis mentioned, "git switch -c" creates a branch, which you've named the same as the name of a tag (ctsm5.2.005). So that's probably why you are getting "refname 'ctsm5.2.005' is ambiguous. If I do "git status" on your directory I get:

On branch ctsm5.2.005

So I think you need to delete that branch and then checkout the ctsm5.2.005 tag. To delete it you first need to switch to another branch. So try this:

git switch master
git branch -d ctsm5.2.005
git checkout ctsm5.2.005

Then, "git describe" should hopefully show:

ctsm5.2.005
 

jedwards

CSEG and Liaisons
Staff member
derecho7: ~/sandboxes/CTSM
:) git checkout ctsm5.2.005
Note: switching to 'ctsm5.2.005'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c <new-branch-name>

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 75b34d2d8 Merge pull request #2501 from ekluzek/fixclm50defaults
derecho7: ~/sandboxes/CTSM
:) git log
derecho7: ~/sandboxes/CTSM
:) git describe
ctsm5.2.005
I think that you should remove your sandbox and start over.
 

jteymoori

Javad Teymoori
Member
As @slevis mentioned, "git switch -c" creates a branch, which you've named the same as the name of a tag (ctsm5.2.005). So that's probably why you are getting "refname 'ctsm5.2.005' is ambiguous. If I do "git status" on your directory I get:

On branch ctsm5.2.005

So I think you need to delete that branch and then checkout the ctsm5.2.005 tag. To delete it you first need to switch to another branch. So try this:

git switch master
git branch -d ctsm5.2.005
git checkout ctsm5.2.005

Then, "git describe" should hopefully show:

ctsm5.2.005
Thank you for your effective guidance; I used your codes, and they worked correctly.

I create a case with the name newland_clm50_ctsm520_0.05x0.05conus_GSWP3V1_2000 and a surface date for this case and region with the name
surfdata_newland_hist_2000_78pfts_c250107.nc, but when I built the case, I got the new error that was the first time I encountered it.
Why does it happen, and how can I solve it?


Building lnd with output to /glade/derecho/scratch/jteymoori/newland_clm50_ctsm520_0.05x0.05conus_GSWP3V1_2000/bld/lnd.bldlog.250107-124107
/glade/work/jteymoori/ctsm5.2.005/CTSM/src/main/histFileMod.F90(31):
error #6580: Name in only-list does not exist or is not accessible. [NFSC]

/glade/work/jteymoori/ctsm5.2.005/CTSM/src/main/histFileMod.F90(2504):
error #6404: This name does not have a type, and must have an explicit type. [NFSC]

Component lnd build complete with 163
warnings
clm built in 41.188564 seconds
ERROR: BUILD FAIL: clm.buildlib failed
, cat /glade/derecho/scratch/jteymoori/newland_clm50_ctsm520_0.05x0.05conus_GSWP3V1_2000/bld/lnd.bldlog.250107-124107



1736279784849.png
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
There seems to be some problems with your externals. This command:

./manage_externals/checkout_externals -S

yields:

Processing externals description file : Externals.cfg (/glade/work/jteymoori/ctsm5.2.005/CTSM)
Processing externals description file : Externals_CLM.cfg (/glade/work/jteymoori/ctsm5.2.005/CTSM)
Processing externals description file : .gitmodules (/glade/work/jteymoori/ctsm5.2.005/CTSM/src/fates)
WARNING:root:WARNING: Ignoring unknown fxtag property, in /glade/work/jteymoori/ctsm5.2.005/CTSM/src/fates/.gitmodules
WARNING:root:WARNING: Ignoring unknown fxrequired property, in /glade/work/jteymoori/ctsm5.2.005/CTSM/src/fates/.gitmodules
WARNING:root:WARNING: Ignoring unknown fxdonotuseurl property, in /glade/work/jteymoori/ctsm5.2.005/CTSM/src/fates/.gitmodules
ERROR:root:submodule status has no section, 'tools/landusedata'
Check section names in externals config file

ERROR: submodule status has no section, 'tools/landusedata'
Check section names in externals config file


Perhaps you should try @jedwards suggestion of starting over.
 

jteymoori

Javad Teymoori
Member
There seems to be some problems with your externals. This command:

./manage_externals/checkout_externals -S

yields:

Processing externals description file : Externals.cfg (/glade/work/jteymoori/ctsm5.2.005/CTSM)
Processing externals description file : Externals_CLM.cfg (/glade/work/jteymoori/ctsm5.2.005/CTSM)
Processing externals description file : .gitmodules (/glade/work/jteymoori/ctsm5.2.005/CTSM/src/fates)
WARNING:root:WARNING: Ignoring unknown fxtag property, in /glade/work/jteymoori/ctsm5.2.005/CTSM/src/fates/.gitmodules
WARNING:root:WARNING: Ignoring unknown fxrequired property, in /glade/work/jteymoori/ctsm5.2.005/CTSM/src/fates/.gitmodules
WARNING:root:WARNING: Ignoring unknown fxdonotuseurl property, in /glade/work/jteymoori/ctsm5.2.005/CTSM/src/fates/.gitmodules
ERROR:root:submodule status has no section, 'tools/landusedata'
Check section names in externals config file

ERROR: submodule status has no section, 'tools/landusedata'
Check section names in externals config file


Perhaps you should try @jedwards suggestion of starting over.
Dear Oleson,
I did the methods that @jedwards suggested, but I got the same previous error.
Do you have any other suggestions for solving this error?

1736359691661.png
 

jedwards

CSEG and Liaisons
Staff member
This indicates that you are using manage_externals but fates is using git-fleximod, try removing the
.gitmodules file from the fates directory and see if that solves the problem
or you can go to the CTSM/src/fates directory and manually checkout the fates code indicated by the
top level Externals_CLM.cfg file.
 
Top