DATM Error in running point simulation from CESM script

Status
Not open for further replies.

jiamengl

Jiameng Lai
Member
Hi, I was using ~/CTSM/tools/site_and_regional to get surface data/domain file/datm files, and trying to run a single point simulations.

I can successfully run it while creating cases from CTSM script root, but met errors while creating cases from CESM script root (it said CLM_USRDAT_DIR, PTS_LON, and PTS_LAT do not exist). I asked this questions in CTSM tutorial, seems like CESM was not updated to be able to use this tool for single point simulations.

Then I followed the user guide (1.6.3. Running Single Point Configurations — ctsm CTSM master documentation), but using the domain file and surface data obtained from the subset_data tool.

Here are my code:

# use subset_data tool
cd ~/CTSM/tools/site_and_regional
module load python
ncar_pylib
./subset_data point --lat 55.5 --lon 11.6 --site DK_SOR --dompft 8 --pctpft 100 --create-surface --create-domain --create-datm --datm-syr 2000 --datm-eyr 2000 --create-user-mods --outdir /glade/scratch/jiamengl/subset_data
deactivate
# create case
cd ~/my_cesm_sandbox/cime/scripts
./create_newcase --case ~/case/I2000Clm50BgcCropGs.v3.gm.ocs.c13.point --compset 2000_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV --res CLM_USRDAT --project UCOR0047 --user-mods-dir /glade/scratch/jiamengl/subset_data/user_mods --run-unsupported
cd ~/case/I2000Clm50BgcCropGs.v3.gm.ocs.c13.point
./xmlchange ATM_DOMAIN_PATH=/glade/scratch/jiamengl/subset_data,LND_DOMAIN_PATH=/glade/scratch/jiamengl/subset_data
./xmlchange ATM_DOMAIN_FILE=domain.lnd.fv0.9x1.25_gx1v7_DK_SOR_c220527.nc,LND_DOMAIN_FILE=domain.lnd.fv0.9x1.25_gx1v7_DK_SOR_c220527.nc
./xmlchange CLM_USRDAT_NAME=DK_SOR
./case.setup
./case.build
./xmlchange DIN_LOC_ROOT=/glade/scratch/jiamengl/subset_data
./xmlchange STOP_OPTION=nyears,STOP_N=1
./xmlchange RUN_STARTDATE=2000-01-01
./xmlchange DOUT_S_ROOT=~/case/output/I2000Clm50BgcCropGs.v1.ocs.Ogee.c13.point
./xmlchange DATM_CLMNCEP_YR_START=2000
./xmlchange DATM_CLMNCEP_YR_END=2000
./xmlchange DATM_CLMNCEP_YR_ALIGN=2000
./case.submit

I can successfully submit, but error occurs in reading the stream file for topo_forcing. Please see below for error message in atm.log (also attached)

(shr_strdata_init) stream 5
(shr_strdata_init) filePath = 5
/glade/scratch/jiamengl/subset_data/atm/datm7/topo_forcing/
(shr_strdata_init) fileName = 5
/glade/scratch/jiamengl/subset_data/atm/datm7/topo_forcing/topodata_0.9x1.25_US
GS_070110_stream_c151201.nc
(shr_strdata_init) timeName = 5 time
(shr_strdata_init) lonName = 5 LONGXY
(shr_strdata_init) latName = 5 LATIXY
(shr_strdata_init) hgtName = 5 unknownname
(shr_strdata_init) maskName = 5 mask
(shr_strdata_init) areaName = 5 area
(shr_ncread_domain) ERROR xc ndim = 0
ERROR: (shr_ncread_domain) ERROR ndim must be 1 or 2 for xc

I guess something goes wrong with my datm setting. Also it is strange to me that my user_nl_datm_streams has been changed to point to my subset datm files (I manually substitute the $CLM_USRDAT_DIR with my datm file directory); but seems the datm.streams in Buildconf/datmconf still remain unchanged?

Can anyone help me with this?
 

jiamengl

Jiameng Lai
Member
Sorry I failed to attach files. Here they are.
 

Attachments

ayhwong

Anthony Y. H. Wong
New Member
I encountered the same exact error in CESM2.1.5 . Does anyone have any experience on how to tackle it?
 

peverley

Courtney Peverley
Moderator
Staff member
Hi Anthony,

Can you elaborate on your setup/configurations so that I can help diagnose the problem and/or reproduce it?

Courtney
 

slevis

Moderator
Staff member
I have a few thoughts regarding these issues:
1) If I understood correctly, @jiamengl found that the subset_data tool was incompatible with their cesm checkout, while it worked in a ctsm checkout.
2) Next (again if I understood correctly) @jiamengl and @ayhwong took the results from the tool and used them in a case created by the cesm checkout. Considering that the tool was incompatible with the cesm checkout, I recommend creating the case in the ctsm checkout in which the tool worked.
 

jiamengl

Jiameng Lai
Member
I have a few thoughts regarding these issues:
1) If I understood correctly, @jiamengl found that the subset_data tool was incompatible with their cesm checkout, while it worked in a ctsm checkout.
2) Next (again if I understood correctly) @jiamengl and @ayhwong took the results from the tool and used them in a case created by the cesm checkout. Considering that the tool was incompatible with the cesm checkout, I recommend creating the case in the ctsm checkout in which the tool worked.
Thanks for the suggestion. Yes I was able to run site simulation successfully in CTSM, but still not in CESM.
 

ayhwong

Anthony Y. H. Wong
New Member
Thanks for all your input. Can I still run single point CLM simulation under cesm2.1.5 using the older tools (mkmapdata etc.)?
 

slevis

Moderator
Staff member
Thanks for all your input. Can I still run single point CLM simulation under cesm2.1.5 using the older tools (mkmapdata etc.)?
I have not tried it, but I would expect that single-point simulations will work in cesm2.1.5 if you use files consistent with that version.
 

xiaoxiaokuishu

Ru Xu
Member
I have not tried it, but I would expect that single-point simulations will work in cesm2.1.5 if you use files consistent with that version.
Hi, Slevis,

I did not have /tools/site_and_regional folder, I only have clm5/tools, the content is

PTCLM README.filecopies contrib mkmapgrids mksurfdata_map
README README.testing mkmapdata mkprocdata_map ncl_scripts

But it seems ./subset_data point --lat 55.5 --lon 11.6 --site DK_SOR --dompft 8 --pctpft 100 --create-surface --create-domain --create-datm --datm-syr 2000 --datm-eyr 2000 --create-user-mods --outdir /glade/scratch/jiamengl/subset_data (from /tools/site_and_regional) is much
easier to create domain/surface and datm data? As read from 1.6.3.3.2, it seems much more complex

Best
Ru
 

xiaoxiaokuishu

Ru Xu
Member
Agreed, "subset_data point" should be easier.
Hi, Slevis,

Thanks for the reply. But I have some confusions,

(1) CTSM will create domainfiles, but CTSM will not use the domainfiles,right?
(2) CLM did not have subset_data tools, I have to use complex tools to make surf/domain files if I use CLM,
(3) the output from subset_data under CTSM can not be directly used by CLM5.0, as they might existed incompatibility?

Best
Ru
 

xiaoxiaokuishu

Ru Xu
Member
Hi, I was using ~/CTSM/tools/site_and_regional to get surface data/domain file/datm files, and trying to run a single point simulations.

I can successfully run it while creating cases from CTSM script root, but met errors while creating cases from CESM script root (it said CLM_USRDAT_DIR, PTS_LON, and PTS_LAT do not exist). I asked this questions in CTSM tutorial, seems like CESM was not updated to be able to use this tool for single point simulations.

Then I followed the user guide (1.6.3. Running Single Point Configurations — ctsm CTSM master documentation), but using the domain file and surface data obtained from the subset_data tool.

Here are my code:

# use subset_data tool
cd ~/CTSM/tools/site_and_regional
module load python
ncar_pylib
./subset_data point --lat 55.5 --lon 11.6 --site DK_SOR --dompft 8 --pctpft 100 --create-surface --create-domain --create-datm --datm-syr 2000 --datm-eyr 2000 --create-user-mods --outdir /glade/scratch/jiamengl/subset_data
deactivate
# create case
cd ~/my_cesm_sandbox/cime/scripts
./create_newcase --case ~/case/I2000Clm50BgcCropGs.v3.gm.ocs.c13.point --compset 2000_DATM%GSWP3v1_CLM50%BGC-CROP_SICE_SOCN_MOSART_SGLC_SWAV --res CLM_USRDAT --project UCOR0047 --user-mods-dir /glade/scratch/jiamengl/subset_data/user_mods --run-unsupported
cd ~/case/I2000Clm50BgcCropGs.v3.gm.ocs.c13.point
./xmlchange ATM_DOMAIN_PATH=/glade/scratch/jiamengl/subset_data,LND_DOMAIN_PATH=/glade/scratch/jiamengl/subset_data
./xmlchange ATM_DOMAIN_FILE=domain.lnd.fv0.9x1.25_gx1v7_DK_SOR_c220527.nc,LND_DOMAIN_FILE=domain.lnd.fv0.9x1.25_gx1v7_DK_SOR_c220527.nc
./xmlchange CLM_USRDAT_NAME=DK_SOR
./case.setup
./case.build
./xmlchange DIN_LOC_ROOT=/glade/scratch/jiamengl/subset_data
./xmlchange STOP_OPTION=nyears,STOP_N=1
./xmlchange RUN_STARTDATE=2000-01-01
./xmlchange DOUT_S_ROOT=~/case/output/I2000Clm50BgcCropGs.v1.ocs.Ogee.c13.point
./xmlchange DATM_CLMNCEP_YR_START=2000
./xmlchange DATM_CLMNCEP_YR_END=2000
./xmlchange DATM_CLMNCEP_YR_ALIGN=2000
./case.submit

I can successfully submit, but error occurs in reading the stream file for topo_forcing. Please see below for error message in atm.log (also attached)

(shr_strdata_init) stream 5
(shr_strdata_init) filePath = 5
/glade/scratch/jiamengl/subset_data/atm/datm7/topo_forcing/
(shr_strdata_init) fileName = 5
/glade/scratch/jiamengl/subset_data/atm/datm7/topo_forcing/topodata_0.9x1.25_US
GS_070110_stream_c151201.nc
(shr_strdata_init) timeName = 5 time
(shr_strdata_init) lonName = 5 LONGXY
(shr_strdata_init) latName = 5 LATIXY
(shr_strdata_init) hgtName = 5 unknownname
(shr_strdata_init) maskName = 5 mask
(shr_strdata_init) areaName = 5 area
(shr_ncread_domain) ERROR xc ndim = 0
ERROR: (shr_ncread_domain) ERROR ndim must be 1 or 2 for xc

I guess something goes wrong with my datm setting. Also it is strange to me that my user_nl_datm_streams has been changed to point to my subset datm files (I manually substitute the $CLM_USRDAT_DIR with my datm file directory); but seems the datm.streams in Buildconf/datmconf still remain unchanged?

Can anyone help me with this?
Hi @jiamengl

I meet the exact the sampe error, my domain file is from CTSM5.1, but I use it for CLM5.0 simulation,
have you solve the problem?

Best
Ru
 
Last edited by a moderator:

slevis

Moderator
Staff member
1) Correct, subset_data will output domain files, but recent versions of the CTSM do not use domain files.
2) subset_data was developed long after clm5, so you may have better luck generating fsurdat/domain files using clm5.
3) Yes, it seems as though you are encountering incompatibilities between subset_data outputs and clm5.
 

xiaoxiaokuishu

Ru Xu
Member
1) Correct, subset_data will output domain files, but recent versions of the CTSM do not use domain files.
2) subset_data was developed long after clm5, so you may have better luck generating fsurdat/domain files using clm5.
3) Yes, it seems as though you are encountering incompatibilities between subset_data outputs and clm5.
Hi, Slevis

Thanks for the reply, but for me the subset_data seems much easier to use, as it do not need to config machines,
question (3), I suspsect the domainfile output from subset_data may have some intrenal structure probelem,
as I can not cdo sinfo/showname the domainfiles, but other files workes well.....
 

slevis

Moderator
Staff member
I tried a simple test in my version of the ctsm (ctsm5.3.013):
./subset_data region --lat1 -10 --lat2 10 --lon1 10 --lon2 20 --create-domain
Then I tried ncdump domain.lnd.fv0.9x1.25_gx1v7_10.0-20.0_-10.0-10.0_c241216.nc
and it worked. I do not have familiarity with cdo commands.
 

xiaoxiaokuishu

Ru Xu
Member
I tried a simple test in my version of the ctsm (ctsm5.3.013):
./subset_data region --lat1 -10 --lat2 10 --lon1 10 --lon2 20 --create-domain
Then I tried ncdump domain.lnd.fv0.9x1.25_gx1v7_10.0-20.0_-10.0-10.0_c241216.nc
and it worked. I do not have familiarity with cdo commands.
Thanks, Slevis!
 

xiaoxiaokuishu

Ru Xu
Member
I tried a simple test in my version of the ctsm (ctsm5.3.013):
./subset_data region --lat1 -10 --lat2 10 --lon1 10 --lon2 20 --create-domain
Then I tried ncdump domain.lnd.fv0.9x1.25_gx1v7_10.0-20.0_-10.0-10.0_c241216.nc
and it worked. I do not have familiarity with cdo commands.
Hi, Slevis,
I have a question of subset the regional data, If I hope to subset a specific surfdata ( I mean the surface data I already modified as apposed
to the default one), How can I point to this dataset with the blow command?
./subset_data region --lat1 -10 --lat2 10 --lon1 10 --lon2 20 --create-surface


Best
RU
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
There are a couple of configuration files in site_and_regional; default_data_1850.cfg and default_data_2000.cfg. These specify the surface dataset, etc. that subset_data subsets from. You could create your own configuration and point to that using the --cfg-file argument to subset_data.
 
Status
Not open for further replies.
Back
Top