You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some issues with creating surface datasets for the nldas2 grid... #1408
It would be useful to have a naming convention for regional grids, so that the tool chain can recognize if the flag mksrf_gridtype should be global or regional. Right now mksurfdata.pl has logic to set it to regional if the name starts with either 1x1_ or 5x5_. If we have a consistent naming convention the tool chain can just set that variable to regional for grids following the regional or single-point naming convention.
I do think the convention I've been following of number of grid points in N-S by E-W followed by underscore and then a descriptive name (where I've used something like townname in lowercase, and State or Country in Caps. For tower sites they often have a descriptive short name that can be used at the end there.
The NLDAS2 regional grid doesn't follow the above convention and is called "0.125nldas2" which is the rough grid size and then nldas2 as the description. Since NLDAS2 is well known that seems to work.
The 0.125nldas2 grid doesn't seem to be recognized in mksurfdata.pl, so I'm surprised that the process works to create that grid. Possibly there was a manual override that was put in place to create the first version of the surface dataset for it.
The 0.125nldas2 grid doesn't seem to be recognized in mksurfdata.pl, so I'm surprised that the process works to create that grid. Possibly there was a manual override that was put in place to create the first version of the surface dataset for it.
That is surprising. It seems like this error check would fail if it were thought to be a global grid:
The reason I noticed this was because of a problem that @swensosc ran into as follows...
When I run mksurfdata:
./mksurfdata.pl -res usrspec -usr_gname western_US -usr_gdate 210624 -usr_mapdir /glade/scratch/swensosc/mapping/western_US
It gives me this error:
Open lake file:
/glade/p/cesm/cseg/inputdata/lnd/clm2/rawdata/mksrf_LakePnDepth_3x3min_simyr200
4_csplk_c151015.nc
(gridmap_map_read) reading mapping matrix data...
(gridmap_map_read) * file name : /glade/scratch/swensosc/mapping/western_US/map_3x3min_nomask_to_western_US_nomask_aave_da_c210624.nc
matrix dimensions rows x cols : 25920000 x 526
number of non-zero elements: 84663
gridmap_check ERROR from mklakwat: mapping areas not conserved
global sum output field = 0.1618750081E+07
global sum input field = 0.1513334049E+09
I told him how to get around it, but wondered why the NLDAS2 case didn't show the problem.
I'm changing the name of this to be specific around the nldas2 grid. I tried creating a surface dataset and the first problem I ran into required this XML change...
mkpftMod::mkpft() WARNING: using a crop input raw dataset for a
non-crop output surface dataset
(gridmap_map_read) reading mapping matrix data...
(gridmap_map_read) * file name : /glade/p/cesm/cseg/inputdata/lnd/clm2/mappingdata/maps/0.125x0.125/map_3x3min_nomask_to_0.125nldas2_nomask_aave_da_c200309.nc
matrix dimensions rows x cols : 25920000 x 103936
number of non-zero elements: 2090320
(gridmap_map_read) ERROR: frac_src out of bounds
max = 2.00000000009117 min = 0.000000000000000E+000
abort:
ERROR in mksurfdata_map: 34304
We should try this in the new mksurfdata_esmf and make sure it works there.
I saw this comment just now. I tried mksurfdata_esmf and it worked:
./gen_mksurfdata_namelist.py --res 0.125nldas2 --start-year 2000 --end-year 2000 # generates namelist
# Skipped step that generates mksurfdata_jobscript_single because I modified a pre-existing one
qsub mksurfdata_jobscript_single # generates fsurdat according to namelist
./create_test SMS_Ld1_PS.nldas2_rnldas2_mnldas2.I2000Ctsm50NwpSpNldas.cheyenne_gnu.clm-default # runs the ctsm
where the SMS test pointed to the surface dataset I just generated: fsurdat = '/glade/work/slevis/git/mksurfdata_toolchain/tools/mksurfdata_esmf/surfdata_0.125nldas2_hist_78pfts_CMIP6_2000_c220614.nc'
Activity
ekluzek commentedon Jun 24, 2021
The 0.125nldas2 grid doesn't seem to be recognized in mksurfdata.pl, so I'm surprised that the process works to create that grid. Possibly there was a manual override that was put in place to create the first version of the surface dataset for it.
billsacks commentedon Jun 24, 2021
That is surprising. It seems like this error check would fail if it were thought to be a global grid:
CTSM/tools/mksurfdata_map/src/mkgridmapMod.F90
Lines 498 to 510 in 2a90c20
(It looks like that's the only place where regional vs. global matters.)
ekluzek commentedon Jul 1, 2021
The reason I noticed this was because of a problem that @swensosc ran into as follows...
I told him how to get around it, but wondered why the NLDAS2 case didn't show the problem.
[-]Naming convention for regional grids...[/-][+]Some issues with creating surface datasets for the nldas2 grid...[/+]ekluzek commentedon Jul 1, 2021
I'm changing the name of this to be specific around the nldas2 grid. I tried creating a surface dataset and the first problem I ran into required this XML change...
ekluzek commentedon Jul 1, 2021
The next issue I ran into was...
ekluzek commentedon Jul 2, 2021
I get a similar problem if I remove the "-hirespft" option as well.
In order to get past those problems I had to make these changes in xml...
Then I ran into a subscript overflow issue...
ekluzek commentedon Apr 27, 2022
We should try this in the new mksurfdata_esmf and make sure it works there.
slevis-lmwg commentedon Jun 14, 2022
I saw this comment just now. I tried mksurfdata_esmf and it worked:
where the SMS test pointed to the surface dataset I just generated:
fsurdat = '/glade/work/slevis/git/mksurfdata_toolchain/tools/mksurfdata_esmf/surfdata_0.125nldas2_hist_78pfts_CMIP6_2000_c220614.nc'billsacks commentedon Sep 8, 2022
It seems like this has been fixed.