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

Guidance on Running with LME datasets with CESM2.1.3 (CLM5)

wvsi3w

wvsi3w
Member
Dear Sam @slevis
Thank you for your helpful comment. I think I am making some progress since I am seeing new errors:

This is what I did in my system (Narval):
Code:
cd projects/def-XXX/USER/inputdata/lnd/clm2/mappingdata/
mkdir grids
cd grids/
wget https://ftp.cgd.ucar.edu/pub/slevis/for_wvsi3w/SCRIPgrid_0.5x0.5_AVHRR_c110228.nc

cd ~/my_cesm_sandbox/components/clm/tools/mkmapdata

export CSMDATA=/home/USER/projects/def-XXX/USER/inputdata

module load ncl
module load nco
module load StdEnv/2020 intel/2020.1.217 openmpi/4.0.3

module load esmf/8.2.0
export ESMFBIN_PATH=/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/MPI/intel2020/openmpi4/esmf/8.2.0/bin

then:
./mkmapdata.sh --gridfile /home/USER/my_cesm_sandbox/components/clm/tools/mkmapgrids/SCRIPgrid_1x1_nomask.nc --res 1x1

and it creates this file (map_0.5x0.5_AVHRR_to_1x1_nomask_aave_da_c250210.nc) but there is also an error:

Code:
./mkmapdata.sh --gridfile /home/USER/my_cesm_sandbox/components/clm/tools/mkmapgrids/SCRIPgrid_1x1_nomask.nc --res 1x1
./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 /home/USER/projects/def-XXX/USER/inputdata

Using user specified scrip grid file: /home/USER/my_cesm_sandbox/components/clm/tools/mkmapgrids/SCRIPgrid_1x1_nomask.nc
Output grid resolution is 1x1
Hostname = narval1.narval.calcul.quebec
Machine narval1.narval.calcul.quebec NOT recognized
Creating mapping file: map_0.5x0.5_AVHRR_to_1x1_nomask_aave_da_c250210.nc
From input grid: /home/USER/projects/def-XXX/USER/inputdata/lnd/clm2/mappingdata/grids/SCRIPgrid_0.5x0.5_AVHRR_c110228.nc
For output grid: /home/USER/my_cesm_sandbox/components/clm/tools/mkmapgrids/SCRIPgrid_1x1_nomask.nc


 WARNING: deprecated switch -src_type will be ignored.  The file type will be de
 tected automatically

 WARNING: deprecated switch -dst_type will be ignored.  The file type will be de
 tected automatically
 Starting weight generation with these inputs:
   Source File:
 /home/USER/projects/def-XXX/USER/inputdata/lnd/clm2/mappingdata/grids/
 SCRIPgrid_0.5x0.5_AVHRR_c110228.nc
   Destination File:
 /home/USER/my_cesm_sandbox/components/clm/tools/mkmapgrids/SCRIPgrid_1x1_noma
 sk.nc
   Weight File: map_0.5x0.5_AVHRR_to_1x1_nomask_aave_da_c250210.nc
   Source File is in SCRIP format
   Source Grid is a global grid
   Source Grid is a logically rectangular grid
   Use the center coordinates of the source grid to do the regrid
   Destination File is in SCRIP format
   Destination Grid is a global grid
   Destination Grid is a logically rectangular grid
   Use the center coordinates of the destination grid to do the regrid
   Regrid Method: conserve
   Pole option: NONE
   Ignore unmapped destination points
   Line Type: greatcircle
   Norm Type: dstarea
   Extrap. Method: none

 Completed weight generation successfully.

 Copyright (C) 1995-2019 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.6.2
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
(0)     map file: map_0.5x0.5_AVHRR_to_1x1_nomask_aave_da_c250210.nc
(0)     n_s = 143788 max(row)=62616 max(col)=250143
(0)     checking for dups, sorting...
(0)     zeroing out any dups...
(0)     No duplicate weights to remove from mapping file
Creating mapping file: map_0.5x0.5_MODIS_to_1x1_nomask_aave_da_c250210.nc
From input grid: /home/USER/projects/def-XXX/USER/inputdata/lnd/clm2/mappingdata/grids/SCRIPgrid_0.5x0.5_MODIS_c110228.nc
For output grid: /home/USER/my_cesm_sandbox/components/clm/tools/mkmapgrids/SCRIPgrid_1x1_nomask.nc

Input grid file does NOT exist: /home/USER/projects/def-XXX/USER/inputdata/lnd/clm2/mappingdata/grids/SCRIPgrid_0.5x0.5_MODIS_c110228.nc

I tried commenting out this file but it shows other errors for other files too. So I dont think my approach is correct and I guess I should ask for other files too (?)

in the line ~250 of mkmapdata.sh script this is written:
Code:
grids=(                    \
       "0.5x0.5_AVHRR"     \
       "0.25x0.25_MODIS"   \
       "0.5x0.5_MODIS"     \
       "3x3min_LandScan2004" \
       "3x3min_MODISv2"    \
       "3x3min_MODIS-wCsp" \
       "3x3min_USGS"       \
       "5x5min_nomask"     \
       "5x5min_IGBP-GSDP"  \
       "5x5min_ISRIC-WISE" \
       "5x5min_ORNL-Soil" \
       "10x10min_nomask"   \
       "10x10min_IGBPmergeICESatGIS" \
       "3x3min_GLOBE-Gardner" \
       "3x3min_GLOBE-Gardner-mergeGIS" \
       "0.9x1.25_GRDC" \
       "360x720cru_cruncep" \
       "1km-merge-10min_HYDRO1K-merge-nomask" \
      )

right now we have the first one. But it shows the error of "Input grid file does NOT exist" for the rest of this list.
 

slevis

Moderator
Staff member
@oleson just running this by you first:
Shouldn't users on non-ncar computers be able to download the files directly from the repository rather than having us place them on our anonymous ftp?
 

wvsi3w

wvsi3w
Member
@oleson just running this by you first:
Shouldn't users on non-ncar computers be able to download the files directly from the repository rather than having us place them on our anonymous ftp?
Dear Sam @slevis ,
Do you think we can proceed before Keith answers?
Because I believe if I have those missing grid files we can proceed with the required steps and return to this non-ncar issue later with Keith.
Thanks a lot.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Interesting, I don't see SCRIPgrid_3minx3min_USGS_c120912.nc in our inputdata directory either. I think it would be ok to use SCRIPgrid_3x3_USGS_c120912.nc, they have the same creation date.
 

wvsi3w

wvsi3w
Member
Interesting, I don't see SCRIPgrid_3minx3min_USGS_c120912.nc in our inputdata directory either. I think it would be ok to use SCRIPgrid_3x3_USGS_c120912.nc, they have the same creation date.
Hello Keith,
Sorry I forgot to answer this.

I tried it with 3x3_USGS and edited the mkmapdata.sh file (I changed 3x3min_USGS to 3x3_USGS) and then I realized after running the "./mkmapdata.sh" it makes a file (map_0.5x0.5_AVHRR_to_1x1_nomask_aave_da_c250310.nc) BUT it is showing some errors like these:

Code:
Using user specified scrip grid file: /home/USER/my_cesm_sandbox/components/clm/tools/mkmapgrids/SCRIPgrid_1x1_nomask.nc
Output grid resolution is 1x1
(queryDefaultNamelist.pl -silent -namelist clmexp -justvalue -options sim_year=2000 -csmdata /home/USER/projects/def-xxx/USER/inputdata -var scripgriddata -res 3x3 -options lmask=USGS,glc_nec=10 -onlyfiles) ERROR:: invalid resolution entered.
(queryDefaultNamelist.pl -silent -namelist clmexp -justvalue -options sim_year=2000 -csmdata /home/USER/projects/def-xxx/USER/inputdata -var scripgriddata_lrgfile_needed -res 3x3 -options lmask=USGS,glc_nec=10) ERROR:: invalid resolution entered.
(queryDefaultNamelist.pl -silent -namelist clmexp -justvalue -options sim_year=2000 -csmdata /home/USER/projects/def-xxx/USER/inputdata -var scripgriddata_type -res 3x3 -options lmask=USGS,glc_nec=10) ERROR:: invalid resolution entered.

and this error too:
Code:
[narval2:3461648:0:3461648] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x7fffcaf88bf8)
==== backtrace (tid:3461648) ====
 0 0x0000000000020753 ucs_debug_print_backtrace()  /tmp/ebuser/avx2/UCX/1.8.0/GCCcore-9.3.0/ucx-1.8.0/src/ucs/debug/debug.c:653
 1 0x00000000000130f0 __funlockfile()  :0
 2 0x00000000000eeb66 netcdf_mp_nf90_get_var_1d_fourbyteint_.A()  netcdf4.f90:0
 3 0x0000000001dd02ed esmf_ioscripmod_mp_esmf_scripgetvar_.A()  ESMF_IOScrip.F90:0
 4 0x0000000001c1ef3a esmf_gridmod_mp_esmf_gridcreatefrmscrip_()  ???:0
 5 0x0000000001c2c02f esmf_gridmod_mp_esmf_gridcreatefrmncfile_()  ???:0
 6 0x0000000001fd7c8a esmf_regridweightgenmod_mp_esmf_regridweightgenfile_.A()  ESMF_RegridWeightGen.F90:0
 7 0x000000000041382d MAIN__()  ???:0
 8 0x000000000040e9d2 main()  ???:0
 9 0x0000000000023e1b __libc_start_main()  /cvmfs/soft.computecanada.ca/gentoo/2020/usr/src/debug/sys-libs/glibc-2.30-r8/glibc-2.30/csu/../csu/libc-start.c:308
10 0x000000000040e8ea _start()  ???:0
=================================
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source
ESMF_RegridWeight  000000000043755A  for__signal_handl     Unknown  Unknown
libpthread-2.30.s  00007F0CC92020F0  Unknown               Unknown  Unknown
libnetcdff.so.7.0  00007F0CC9F02B66  Unknown               Unknown  Unknown
libesmf.so         00007F0CCC83D2ED  Unknown               Unknown  Unknown
libesmf.so         00007F0CCC68BF3A  esmf_gridmod_mp_e     Unknown  Unknown
libesmf.so         00007F0CCC69902F  esmf_gridmod_mp_e     Unknown  Unknown
libesmf.so         00007F0CCCA44C8A  Unknown               Unknown  Unknown
ESMF_RegridWeight  000000000041382D  Unknown               Unknown  Unknown
ESMF_RegridWeight  000000000040E9D2  Unknown               Unknown  Unknown
libc-2.30.so       00007F0CC9058E1B  __libc_start_main     Unknown  Unknown
ESMF_RegridWeight  000000000040E8EA  Unknown               Unknown  Unknown
Error status returned from mkmapdata script


Then I thought maybe I shouldn't have changed the mkmapdata.sh file content.
So I tried it once again with the previous name of that file (3x3min_USGS) and this time only the segmentation error showed up.


Code:
[narval2:3617285:0:3617285] Caught signal 11 (Segmentation fault: address not mapped to object at address 0x7ffe879a0578)
==== backtrace (tid:3617285) ====
 0 0x0000000000020753 ucs_debug_print_backtrace()  /tmp/ebuser/avx2/UCX/1.8.0/GCCcore-9.3.0/ucx-1.8.0/src/ucs/debug/debug.c:653
 1 0x00000000000130f0 __funlockfile()  :0
 2 0x00000000000eeb66 netcdf_mp_nf90_get_var_1d_fourbyteint_.A()  netcdf4.f90:0
 3 0x0000000001dd02ed esmf_ioscripmod_mp_esmf_scripgetvar_.A()  ESMF_IOScrip.F90:0
 4 0x0000000001c1ef3a esmf_gridmod_mp_esmf_gridcreatefrmscrip_()  ???:0
 5 0x0000000001c2c02f esmf_gridmod_mp_esmf_gridcreatefrmncfile_()  ???:0
 6 0x0000000001fd7c8a esmf_regridweightgenmod_mp_esmf_regridweightgenfile_.A()  ESMF_RegridWeightGen.F90:0
 7 0x000000000041382d MAIN__()  ???:0
 8 0x000000000040e9d2 main()  ???:0
 9 0x0000000000023e1b __libc_start_main()  /cvmfs/soft.computecanada.ca/gentoo/2020/usr/src/debug/sys-libs/glibc-2.30-r8/glibc-2.30/csu/../csu/libc-start.c:308
10 0x000000000040e8ea _start()  ???:0
=================================
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source
ESMF_RegridWeight  000000000043755A  for__signal_handl     Unknown  Unknown
libpthread-2.30.s  00007F2FD2CB30F0  Unknown               Unknown  Unknown
libnetcdff.so.7.0  00007F2FD39B3B66  Unknown               Unknown  Unknown
libesmf.so         00007F2FD62EE2ED  Unknown               Unknown  Unknown
libesmf.so         00007F2FD613CF3A  esmf_gridmod_mp_e     Unknown  Unknown
libesmf.so         00007F2FD614A02F  esmf_gridmod_mp_e     Unknown  Unknown
libesmf.so         00007F2FD64F5C8A  Unknown               Unknown  Unknown
ESMF_RegridWeight  000000000041382D  Unknown               Unknown  Unknown
ESMF_RegridWeight  000000000040E9D2  Unknown               Unknown  Unknown
libc-2.30.so       00007F2FD2B09E1B  __libc_start_main     Unknown  Unknown
ESMF_RegridWeight  000000000040E8EA  Unknown               Unknown  Unknown
Error status returned from mkmapdata script

Is this related to the modules I loaded? do you know how to solve this issue?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I went through this process on our machine successfully. The log file indicated that it was looking for SCRIPgrid_3x3_USGS_c120912.nc, not SCRIPgrid_3minx3min_USGS_c120912.nc. I did not have to change mkmapdata.sh. I'm using release-cesm2.1.4. What version are you using?
 

wvsi3w

wvsi3w
Member
I went through this process on our machine successfully. The log file indicated that it was looking for SCRIPgrid_3x3_USGS_c120912.nc, not SCRIPgrid_3minx3min_USGS_c120912.nc. I did not have to change mkmapdata.sh. I'm using release-cesm2.1.4. What version are you using?
This is odd. I am using 2.1.3.
I have attached the details of what shows after I run ./mkmapdata.sh

also the steps I took. The only explanation for this error could be these:
either I am using wrong modules, or I am using wrong res because 1x1 in most cases should be 0.9x1.25 but I literally used 1x1.
I don't know if my guess of the reasons for this error is legit.

Is there any other way to go through these steps without making the files? I mean if we could modify pre-existing files of domain and etc for our new simulation. my simulation would be using LME (6hourly dataset 1deg). and another simulation (same time length with monthly temporal res). so do you think we can make some changes or tweaks to the already existing files for these cases without going through all these difficulties?
 

Attachments

  • Error status returned from mkmapdata script.txt
    6 KB · Views: 2
  • steps.txt
    482 bytes · Views: 2

oleson

Keith Oleson
CSEG and Liaisons
Staff member
You might have to run in batch mode, using regridbatch.sh, instead of submitting mkmapdata.sh on the command line. It takes a lot of memory.
It's also possible you might have to update your version of esmf, I used 8.6.0.

Is it absolutely essential to run at 1deg X 1deg? Can you run at 0.9x1.25? You indicated you are using 1deg atmospheric forcing data, but the datm should be able to interpolate that to the 0.9x1.25 grid at run time.
 

wvsi3w

wvsi3w
Member
You might have to run in batch mode, using regridbatch.sh, instead of submitting mkmapdata.sh on the command line. It takes a lot of memory.
It's also possible you might have to update your version of esmf, I used 8.6.0.

Is it absolutely essential to run at 1deg X 1deg? Can you run at 0.9x1.25? You indicated you are using 1deg atmospheric forcing data, but the datm should be able to interpolate that to the 0.9x1.25 grid at run time.


Dear Keith,

Following your suggestion, I switched from 1x1 to 0.9x1.25 and re-ran the process (the reason I chose 1x1 was that my postprocessed files from LME datasets are 1x1 so I think I should redo the postprocessing, I agree with you). So here’s what I did:

Generated a new SCRIP grid file using mkscripgrid.ncl with:
NX=288, NY=192
Latitude: -90 to 90
Longitude: 0 to 360
Output file: SCRIPgrid_0.9x1.25_nomask.nc

Set up the mapping environment:
Loaded esmf/8.6.0, ncl/6.6.2, netcdf-mpi/4.9.2, and related dependencies.
Set CSMDATA and ESMFBIN_PATH accordingly.
export RES="0.9x1.25"
export GRIDFILE="/home/USER/my_cesm_sandbox/components/clm/tools/mkmapgrids/SCRIPgrid_0.9x1.25_nomask.nc"
Ran regridbatch.sh to generate mapping files:

It created map_0.5x0.5_AVHRR_to_0.9x1.25_nomask_aave_da_c250312.nc successfully.
However, it crashed when processing map_0.25x0.25_MODIS_to_0.9x1.25_nomask_aave_da_c250312.nc with a segmentation fault.

Checked the PET log, which showed:

ESMF_GridCreate Wrong argument specified - Couldn't find a consistent ordering of corners around each cell in file:
Code:
more PET0.RegridWeightGen.Log
20250312 171755.702 INFO             PET0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
20250312 171755.703 INFO             PET0 !!! THE ESMF_LOG IS SET TO OUTPUT ALL LOG MESSAGES !!!
20250312 171755.703 INFO             PET0 !!!     THIS MAY CAUSE SLOWDOWN IN PERFORMANCE     !!!
20250312 171755.703 INFO             PET0 !!! FOR PRODUCTION RUNS, USE:                      !!!
20250312 171755.703 INFO             PET0 !!!                   ESMF_LOGKIND_Multi_On_Error  !!!
20250312 171755.703 INFO             PET0 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
20250312 171755.703 INFO             PET0 Running with ESMF Version   : 8.6.0
20250312 171755.703 INFO             PET0 ESMF library build date/time: "Dec  6 2023" "14:24:47"
20250312 171755.703 INFO             PET0 ESMF library build location : /tmp/ebuser/avx2/ESMF/8.6.0/gofb-2023a/esmf-8.6.0/
20250312 171755.703 INFO             PET0 ESMF_COMM                   : openmpi
20250312 171755.703 INFO             PET0 ESMF_MOAB                   : enabled
20250312 171755.703 INFO             PET0 ESMF_LAPACK                 : enabled
20250312 171755.703 INFO             PET0 ESMF_NETCDF                 : enabled
20250312 171755.703 INFO             PET0 ESMF_PNETCDF                : disabled
20250312 171755.703 INFO             PET0 ESMF_PIO                    : enabled
20250312 171755.703 INFO             PET0 ESMF_YAMLCPP                : enabled
20250312 171755.901 ERROR            PET0 ESMF_Grid.F90:5532 ESMF_GridCreate Wrong argument specified  -  Couldn't find a consistent ordering of corners aroun
d each cell in file to be able to arrange them into a logically rectangular Grid.
20250312 171755.901 ERROR            PET0 ESMF_Grid.F90:6925 ESMF_GridCreateFrmScrip Wrong argument specified  - Internal subroutine call returned Error
20250312 171755.906 ERROR            PET0 ESMF_Grid.F90:6520 ESMF_GridCreateFrmNCFile Wrong argument specified  - Internal subroutine call returned Error
20250312 171755.906 ERROR            PET0 ESMF_RegridWeightGen.F90:1231 ESMF_RegridWeightGenFile Wrong argument specified  - Internal subroutine call returned
 Error
20250312 171755.906 INFO             PET0  Finalizing ESMF with endflag==ESMF_END_ABORT


This suggests an issue with how grid corners are defined in SCRIPgrid_0.9x1.25_nomask.nc.

Verified the grid file (ncdump -h), and all attributes seemed fine. However, when inspecting grid_corner_lat and grid_corner_lon, the values appear repetitive, which may indicate an issue with how the script assigns grid corners.
Code:
ncdump -v grid_corner_lat,grid_corner_lon SCRIPgrid_0.9x1.25_nomask.nc | head -50
netcdf SCRIPgrid_0.9x1.25_nomask {
dimensions:
        grid_size = 55296 ;
        grid_corners = 4 ;
        grid_rank = 2 ;
variables:
        int grid_dims(grid_rank) ;
        double grid_center_lat(grid_size) ;
                grid_center_lat:units = "degrees" ;
                grid_center_lat:_FillValue = 9.96920996838687e+36 ;
        double grid_center_lon(grid_size) ;
                grid_center_lon:units = "degrees" ;
                grid_center_lon:_FillValue = 9.96920996838687e+36 ;
        int grid_imask(grid_size) ;
                grid_imask:units = "unitless" ;
        double grid_corner_lat(grid_size, grid_corners) ;
                grid_corner_lat:units = "degrees" ;
        double grid_corner_lon(grid_size, grid_corners) ;
                grid_corner_lon:units = "degrees" ;

// global attributes:
                :date_created = "Wed 12 Mar 2025 05:10:42 PM EDT" ;
                :Createdby = "ESMF_regridding.ncl" ;
                :Conventions = "SCRIP" ;
                :title = "SCRIP grid file for global_0.9x1.25" ;
                :history = "Wed 12 Mar 2025 05:10:42 PM EDT: create using mkscripgrid.ncl" ;
                :comment = "Ocean is assumed to non-existant at this point" ;
                :Version = "release-clm5.0.30" ;
data:

 grid_corner_lat =
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,
  -90, -89.0625, -89.0625, -90,


+
Code:
ncdump -v grid_corner_lat SCRIPgrid_0.9x1.25_nomask.nc | grep _FillValue
                grid_center_lat:_FillValue = 9.96920996838687e+36 ;
                grid_center_lon:_FillValue = 9.96920996838687e+36 ;

Is this segmentation fault caused by a known issue with mkscripgrid.ncl?
Should I manually adjust how grid_corner_lat and grid_corner_lon are defined?
Any other debugging steps before retrying the mapping process?

Thanks for your help!
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I suggested 0.9x1.25 because the mapping files for that resolution should already exist. You should be able to go directly to creating a surface dataset. In fact, if you set up a case at that resolution it should use an existing surface dataset and landuse timeseries file at that resolution. You could then modify the surface dataset and landuse timeseries file as I assume you are wanting to do.
 

wvsi3w

wvsi3w
Member
I suggested 0.9x1.25 because the mapping files for that resolution should already exist. You should be able to go directly to creating a surface dataset. In fact, if you set up a case at that resolution it should use an existing surface dataset and landuse timeseries file at that resolution. You could then modify the surface dataset and landuse timeseries file as I assume you are wanting to do.
Dear Keith and Team,
I appreciate your guidance so far.
Now that I understand I can use existing mapping files and surface datasets for 0.9x1.25, I’d like to clarify my specific use case and what steps I should take next. Because of the language barrier and my condition (dyslexia) I learn best visually, so if any video tutorials, workflow diagrams, or even a brief screen-sharing session are available, that would help me understand better. Thank you for your time and expertise!


I have these datasets:
1- LME from CCSM4 (6hourly): Dataset: CESM1 Last Millennium Ensemble Atmosphere Post Processed Data, 6-Hourly Instantaneous Values (which was 2deg and I spent some time processing it and regridded it to 1x1 which I must redo now and make it into 0.9x1.25.)
2- NorESM dataset (monthly): I believe this dataset is already at 0.9x1.25, but I will confirm after the transfer is complete.

I already have a case that reached equilibrium after 750 years of ND decomposition + some hundred years of AD decomposition. The restart files of this spun-up case can be used as input for another spin-up using the LME or NorESM dataset because all are in pre-industrial and another spin-up (maybe 500y total) would be enough. I know this part might seem sort of confusing but it is doable and the co2 part should be considered in this case to represent that time.

Anyhow, this is my situation, I want to simulate using my own soil layer structure (which I modified for permafrost) to see the results of the model throughout LME + NorESM + future scenarios.

So I found that my case uses these files:

fsurdat = '/home/USER/projects/def-xxx/USER/inputdata/lnd/clm2/surfdata_map/release-clm5.0.18/surfdata_0.9x1.25_hist_78pfts_CMIP6_simyr1850_c190214.nc'

flanduse_timeseries = '/home/USER/projects/def-xxx/USER/inputdata/lnd/clm2/surfdata_map/landuse.timeseries_0.9x1.25_hist_78pfts_CMIP6_simyr1850-2015_c170824.nc'

I am not quiet sure if I have to modify something in these files you mentioned above, but could you please let me know if you were in my position what would you do first? I think I should do these steps (correct me if I am wrong):

- create a 1deg case (similar to spun-up case) and set it up
- copy the restart files of spun-up case (+ rpointers)
- change the CO2 somehow (I don't know how) to represent LME and NorESM start time (~ 850 BCE and 500 BCE respectively)
- copy the initial and forcing files (FLDS, FSDS, Q, T, WIND, PS, PERCT) from LME and NorESM into the inputdata for this case
- run spin-up, reach steady state, and run transient

I am 100% sure these steps are not complete and I am missing a lot of things here :)
 

wvsi3w

wvsi3w
Member
P.S. sorry I didn't know the whole process of mapping and gridding is redundant here and prior to this I thought we need to do it whenever we want to use our own forcing
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
First of all, you don't need to regrid the atmospheric forcing data from 1deg to 0.9x1.25. The datm will interpolate your 1deg forcing data to the 0.9x1.25 surface data grid at run time. As we noted before, you need a domain file for the datm data that describes the 1deg grid. The instructions we provided previously are:

To create a domain file, as detailed in the link you shared, you basically need to create a SCRIP grid file and a SCRIP mapping file that can be used as input to gen_domain. Generally speaking, you could use components/clm/tools/mkmapgrids/components/clm/tools/mkmapgrids/mkscripgrid.ncl to create the SCRIP grid file, then cime/tools/mapping/gen_mapping_files/gen_ESMF_mapping_file/create_ESMF_map.sh to create the mapping file, and then cime/tools/mapping/gen_domain_files/gen_domain to create the domain file. Another option is to create a domain file using an offline script following the structure of the GSWP3 domain file example given above.

The process we have been walking you through lately was how to generate a SCRIP file, mapping files, and then finally a surface dataset at 1deg resolution. But it seems that you are running into problems doing that and since you are fine with running at 0.9x1.25 for the surface data, you don't have to do that anymore.

You mention a NorESM monthly dataset, what is that and what are going to use it for? Do you have two different sets of forcing data?

You said you have already spunup a case, what resolution is that at?

Your steps seem fine overall, but what are you going to use for surface data and landuse timeseries files. Our default files are only for 1850-2015. What are you going to use for years prior to 1850?

I think these are questions you need to discuss with your supervisor/advisor.
 

wvsi3w

wvsi3w
Member
First of all, you don't need to regrid the atmospheric forcing data from 1deg to 0.9x1.25. The datm will interpolate your 1deg forcing data to the 0.9x1.25 surface data grid at run time. As we noted before, you need a domain file for the datm data that describes the 1deg grid. The instructions we provided previously are:

To create a domain file, as detailed in the link you shared, you basically need to create a SCRIP grid file and a SCRIP mapping file that can be used as input to gen_domain. Generally speaking, you could use components/clm/tools/mkmapgrids/components/clm/tools/mkmapgrids/mkscripgrid.ncl to create the SCRIP grid file, then cime/tools/mapping/gen_mapping_files/gen_ESMF_mapping_file/create_ESMF_map.sh to create the mapping file, and then cime/tools/mapping/gen_domain_files/gen_domain to create the domain file. Another option is to create a domain file using an offline script following the structure of the GSWP3 domain file example given above.

The process we have been walking you through lately was how to generate a SCRIP file, mapping files, and then finally a surface dataset at 1deg resolution. But it seems that you are running into problems doing that and since you are fine with running at 0.9x1.25 for the surface data, you don't have to do that anymore.

You mention a NorESM monthly dataset, what is that and what are going to use it for? Do you have two different sets of forcing data?

You said you have already spunup a case, what resolution is that at?

Your steps seem fine overall, but what are you going to use for surface data and landuse timeseries files. Our default files are only for 1850-2015. What are you going to use for years prior to 1850?

I think these are questions you need to discuss with your supervisor/advisor.
Thank you Keith for your insights,

1- I did 2 spinups (on two clusters at the same time with the same model, to have one cluster as my control to save time). the spinup is done and it reached steady state for all the desired variables. It was a IHistClm50BgcCrop case (--res f09_g17 which is 1deg: 0.9x1.25) and Component ATM is Data driven ATM GSWP3v1 data set.

2- Based on my supervisor's guidance since the start of this forcing is near pre-industrial, we can use its restart and output of spin-up for another spin-up regarding the LME and NorESM spin-ups. Because the 800 or 500BCE conditions are not much different, so another ~500y of spin-up can make it ready for transient run. ((why the hassle and doing two spin ups you might ask, because we decided to use LME and NorESM later after I started the spin-up and to use them as two different new datasets that haven't been used before for my idea, instead of going with existing 1850-onward datasets that most people used before. Moreover, the NorESM has high and low solar variability and is interesting, and the LME has 6-hourly temporal res and that's interesting too)).

3- I am glad you asked about " for surface data and landuse timeseries files, and what are we going to use for years prior to 1850?" Can we again based on the previous argument, use 1850 land use and surface data? I don't think much has changed regarding those datasets, right? I don't know. I can ask my supervisors again about this but I am pretty sure they mentioned everything before 1850 (except for CO2 which I also don't know how to modify its file for my purpose) is almost similar to 1850s, unless you know better or there are people on the forum who have had the experience of using different landuse and surfdat of pre-1850 that I can use their knowledge (however I asked some questions on the paleo forum and I don't think they are very active there, so my last chance is kinda with you here).

3-1- So, I think our justification of using 1850s surfdata and landuse timeseries files for the year 500 and 850 is rational, unless you scientists refute it. However, I am again unsure how I am supposed to tackle this task, I mean, technically.
How can one have the pre-industrial landuse timeseries files and surfdat to represent 1000 years before 1850 (from 850-1850) or more (from 500-1850)? I guess for example I have to use one year of data from timeseries files and surfdat of 1850 and copy it 1000 times for 850-1850?!!!

3-2- This is similar to my issue with CO2 that I don't know how to tackle. Should I just manually change the CO2 nc file with python to represent the concentration of that time? And what files exactly are these that I need to change (maybe there are some documentation that I missed)?

4- So, I want to do spin-up and transient simulation using the two datasets that I mentioned + with my own soil layer structure, to see the land response to permafrost variables and vegetation in the northern regions. Then what should I do regarding the process where you said "since you are fine with running at 0.9x1.25 for the surface data, you don't have to do that anymore." You mentioned "Your steps seem fine overall" but I didn't get what I should do and what I don't need to do. I think you mean I don't have to do the whole process of domains and grids and maps, so do you mean I just create a case (similar to my spun-up case) and change some minor things there and set the path for inputdata (paths for LME and NorESM)? I am ok with regriding LME back to 0.9x1.25 because I don't want to make things hard to understand for me, I can do it quickly if that's the way to easily do it (without going through the domain steps).

Is there a visual guide on someone who did something similar to my case that I can follow? Or maybe one of your workshops somewhere.

4-1- Also, in the near future I want to use FATES as I said, and I have contacted people from FATES team and participated in their biweekly meetings, and FATES is best with regional simulations and since maybe in the future I would need to do regional simulations with CLM-FATES do I need to go through the steps "To create a domain file" as you mentioned? Because, as far as I understood, these domain creation steps were for when we change the grids or change resolution, or were we changing the domain itself (?)
 

wvsi3w

wvsi3w
Member
Thanks again for all the time and effort you put into this. I am truly grateful for your support
 

wvsi3w

wvsi3w
Member
Hello Paleo scientists

I would like to know your opinion on how to solve this issue I am facing with the inputdata (landuse timeseries, surfdat,...) for years before 1850, and how you managed this.

I asked it here (questions 3, 3-1, and 3-2). Thank you very much.
 
Top