From 6f601bfb6fe2948787de60d44de5a3fa2275bd28 Mon Sep 17 00:00:00 2001 From: Gautam Bisht Date: Tue, 3 Sep 2024 14:30:47 -0700 Subject: [PATCH 1/7] Adds notes about generating ELM land IC --- components/elm/docs/user-guide/index.md | 5 ++ components/elm/docs/user-guide/interpinic.md | 79 ++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 components/elm/docs/user-guide/interpinic.md diff --git a/components/elm/docs/user-guide/index.md b/components/elm/docs/user-guide/index.md index 7995e54acb36..d33278ce7617 100644 --- a/components/elm/docs/user-guide/index.md +++ b/components/elm/docs/user-guide/index.md @@ -76,3 +76,8 @@ Using the above-mentioned settings: [FATES](fates.md) can be run in various modes with ELM through the use of namelist settings. The [FATES User's Guide section on namelist options](https://fates-users-guide.readthedocs.io/en/latest/user/Namelist-Options-and-Run-Time-Modes.html) provides guidance on enabling these different FATES run modes. + +## Generate land initial condition + +Initial ELM condition can be generated using `interpinic` and the notes about it are available [here](interpinic.md). + diff --git a/components/elm/docs/user-guide/interpinic.md b/components/elm/docs/user-guide/interpinic.md new file mode 100644 index 000000000000..63f8c30b03da --- /dev/null +++ b/components/elm/docs/user-guide/interpinic.md @@ -0,0 +1,79 @@ +# Creating an ELM initial condition file + +An ELM initial condition (IC) file can be created by remapping an existing IC file from +one resolution to another using the `interpinic`, located at +`components/elm/tools/interpinic`. An ELM IC file is in the same format as an ELM restart file. +The composet of the remapped IC file will be the same as that of the input IC file. +So, for a new ELM SP-mode IC file, use an ELM input file corresponding to the SP-mode. + +The steps involved in creating a new IC files are as follows: + +1. Identifying an input ELM IC or restart file that will be remapped. +2. Obtaining an ELM restart file at the new resolution. +3. Compiling `interpinic` on the machine of interest. +4. Running `interpinic` to perform the interpolation. + +The notes below provide an example of creating 1850 ELM IC file for the NARRM grid using E3SM v3 LR piControl from year = 0101. These notes are provided for Chrysalis. + +### 1. Identification of the input ELM IC file + +The identified input land condition file for this case is the following: + +``` +/lcrc/group/e3sm2/ac.golaz/E3SMv3/v3.LR.piControl/archive/rest/0101-01-01-00000/v3.LR.piControl.elm.r.0101-01-01-00000.nc +``` + +## 2. Obtaining an ELM restart file + +Using an existing NARRM land IC and making a copy of it + +``` +cd components/elm/tools/interpinic + +cp /lcrc/group/e3sm/data/inputdata/lnd/clm2/initdata_map/elmi.v3-NARRM.northamericax4v1pg2_r025_IcoswISC30E3r5.1870-01-01-00000.c20240704.nc \ +elmi.v3-NARRM.northamericax4v1pg2_r025_IcoswISC30E3r5.1850-01-01-00000.c`date "+%Y%m%d"`.nc +``` + +## 3. Compiling `interpinic` + +``` +# Load relevant modules +cd +eval $(./cime/CIME/Tools/get_case_env/get_case_env) + +# change directory +cd components/elm/tools/interpinic/src + +export USER_LDFLAGS="-L$NETCDF_C_DIR/lib -lnetcdf -L$NETCDF_F_DIR/lib -lnetcdff -L$HDF5_DIR/lib -lhdf5" + +USER_FC=ifort LIB_NETCDF="`nc-config --flibs`" INC_NETCDF="`nf-config --includedir`" make VERBOSE=1 + +``` + +## 4. Run `interpinic` + +The `interpinic ` can then be run via the following batch job (e.g., `remap.r025_RRSwISC6to18E3r4.1850.batch`) to generate the initial condition. + +``` +>cat remap.r025_RRSwISC6to18E3r4.1850.batch + +#!/bin/sh +#SBATCH --job-name=remap +#SBATCH --nodes=1 +#SBATCH --exclusive +#SBATCH --time 24:00:00 +#SBATCH -p slurm +#SBATCH --account esmd + +# Load relevant modules. +cd +eval $(./cime/CIME/Tools/get_case_env/get_case_env) + +# Change dir to `interpinic` +cd components/elm/tools/interpinic/src + +srun -n 1 ./interpinic \ +-i /lcrc/group/e3sm2/ac.golaz/E3SMv3/v3.LR.piControl/archive/rest/0101-01-01-00000/v3.LR.piControl.elm.r.0101-01-01-00000.nc \ +-o elmi.v3-NARRM.northamericax4v1pg2_r025_IcoswISC30E3r5.1850-01-01-00000.c20240903.nc +``` + From 3e6959e0260e962bf402825108cb76286a32be6b Mon Sep 17 00:00:00 2001 From: Gautam Bisht Date: Wed, 18 Sep 2024 07:17:31 -0700 Subject: [PATCH 2/7] Fixes a typo --- components/elm/docs/user-guide/interpinic.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/elm/docs/user-guide/interpinic.md b/components/elm/docs/user-guide/interpinic.md index 63f8c30b03da..5127aeeb94a9 100644 --- a/components/elm/docs/user-guide/interpinic.md +++ b/components/elm/docs/user-guide/interpinic.md @@ -15,7 +15,7 @@ The steps involved in creating a new IC files are as follows: The notes below provide an example of creating 1850 ELM IC file for the NARRM grid using E3SM v3 LR piControl from year = 0101. These notes are provided for Chrysalis. -### 1. Identification of the input ELM IC file +## 1. Identification of the input ELM IC file The identified input land condition file for this case is the following: @@ -39,7 +39,7 @@ elmi.v3-NARRM.northamericax4v1pg2_r025_IcoswISC30E3r5.1850-01-01-00000.c`date "+ ``` # Load relevant modules cd -eval $(./cime/CIME/Tools/get_case_env/get_case_env) +eval $(./cime/CIME/Tools/get_case_env) # change directory cd components/elm/tools/interpinic/src From ff40c9cff08029ec29b3a98f974f74357dab61aa Mon Sep 17 00:00:00 2001 From: Gautam Bisht Date: Wed, 18 Sep 2024 07:32:45 -0700 Subject: [PATCH 3/7] Adds notes about using mksurfdata_map --- components/elm/docs/user-guide/index.md | 8 ++- .../elm/docs/user-guide/surface_dataset.md | 49 +++++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 components/elm/docs/user-guide/surface_dataset.md diff --git a/components/elm/docs/user-guide/index.md b/components/elm/docs/user-guide/index.md index d33278ce7617..bfab59d92b1f 100644 --- a/components/elm/docs/user-guide/index.md +++ b/components/elm/docs/user-guide/index.md @@ -77,7 +77,11 @@ Using the above-mentioned settings: The [FATES User's Guide section on namelist options](https://fates-users-guide.readthedocs.io/en/latest/user/Namelist-Options-and-Run-Time-Modes.html) provides guidance on enabling these different FATES run modes. -## Generate land initial condition +## Create land surface dataset + +A new surface dataset for ELM is generated using `mksurfdata_map` and the notes about it are available [here](surface_dataset.md) -Initial ELM condition can be generated using `interpinic` and the notes about it are available [here](interpinic.md). +## Generate land initial condition + +Initial ELM condition can be generated using `interpinic` and the notes about it are available [here](interpinic.md). \ No newline at end of file diff --git a/components/elm/docs/user-guide/surface_dataset.md b/components/elm/docs/user-guide/surface_dataset.md new file mode 100644 index 000000000000..c513d2d1f59f --- /dev/null +++ b/components/elm/docs/user-guide/surface_dataset.md @@ -0,0 +1,49 @@ +# Creating an ELM surface dataset + +The notes describe the steps in creating an ELM surface dataset at 0.5x0.5 resolution for 1950 on Perlmutter. + +1. Load the appropriate modules. + +``` +cd +eval $(./cime/CIME/Tools/get_case_env) +``` + +2. Compile `mksurfdata_map`. + +``` +cd components/elm/tools/mksurfdata_map/src/ + +make clean +export USER_LDFLAGS="-L$NETCDF_DIR/lib -lnetcdf -lnetcdff -lnetcdf_intel" +export USER_LDFLAGS=$USER_LDFLAGS" -L$HDF5_DIR/lib -lhdf5 -lhdf5_fortran -lhdf5_hl_intel -lhdf5hl_fortran_intel" + +USER_FC=ifort LIB_NETCDF="`nc-config --flibs`" INC_NETCDF="`nf-config --includedir`" make VERBOSE=1 +``` + +3. Build the namelist. This steps assumes that the resolution for which the new surface dataset is being created is a supported resolution. +If the surface dataset is being created for an unsupported resolution, 16 mapping files will have to be created to map the raw datasets +onto this unsupported resolution. + +``` +cd ../ + +RES=0.5x0.5 +YR=1950 +DIN_LOC_ROOT=/global/cfs/cdirs/e3sm/inputdata + +./mksurfdata.pl -res $RES -years $YR -d -dinlc $DIN_LOC_ROOT +mv namelist namelist.$RES.$YR +``` + +4. Run `mksurfdata_map` via an interactive job. + +``` +salloc --nodes 1 --qos interactive --time 01:00:00 --constraint cpu --account e3sm + +RES=0.5x0.5 +YR=1950 +NAMELIST=namelist.$RES.$YR + +srun -n 1 ./mksurfdata_map < $NAMELIST +``` \ No newline at end of file From f61c6f8000a9418c7e5e9f2f6976d4bbb8352a89 Mon Sep 17 00:00:00 2001 From: Gautam Bisht Date: Wed, 18 Sep 2024 08:14:05 -0700 Subject: [PATCH 4/7] Few fixes --- components/elm/docs/user-guide/index.md | 3 +-- components/elm/docs/user-guide/interpinic.md | 12 +++++------ .../elm/docs/user-guide/surface_dataset.md | 20 ++++++++++--------- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/components/elm/docs/user-guide/index.md b/components/elm/docs/user-guide/index.md index bfab59d92b1f..43fe53d66552 100644 --- a/components/elm/docs/user-guide/index.md +++ b/components/elm/docs/user-guide/index.md @@ -81,7 +81,6 @@ provides guidance on enabling these different FATES run modes. A new surface dataset for ELM is generated using `mksurfdata_map` and the notes about it are available [here](surface_dataset.md) - ## Generate land initial condition -Initial ELM condition can be generated using `interpinic` and the notes about it are available [here](interpinic.md). \ No newline at end of file +Initial ELM condition can be generated using `interpinic` and the notes about it are available [here](interpinic.md). diff --git a/components/elm/docs/user-guide/interpinic.md b/components/elm/docs/user-guide/interpinic.md index 5127aeeb94a9..fcb897834f22 100644 --- a/components/elm/docs/user-guide/interpinic.md +++ b/components/elm/docs/user-guide/interpinic.md @@ -19,7 +19,7 @@ The notes below provide an example of creating 1850 ELM IC file for the NARRM gr The identified input land condition file for this case is the following: -``` +```bash /lcrc/group/e3sm2/ac.golaz/E3SMv3/v3.LR.piControl/archive/rest/0101-01-01-00000/v3.LR.piControl.elm.r.0101-01-01-00000.nc ``` @@ -27,7 +27,7 @@ The identified input land condition file for this case is the following: Using an existing NARRM land IC and making a copy of it -``` +```bash cd components/elm/tools/interpinic cp /lcrc/group/e3sm/data/inputdata/lnd/clm2/initdata_map/elmi.v3-NARRM.northamericax4v1pg2_r025_IcoswISC30E3r5.1870-01-01-00000.c20240704.nc \ @@ -36,7 +36,7 @@ elmi.v3-NARRM.northamericax4v1pg2_r025_IcoswISC30E3r5.1850-01-01-00000.c`date "+ ## 3. Compiling `interpinic` -``` +```bash # Load relevant modules cd eval $(./cime/CIME/Tools/get_case_env) @@ -47,14 +47,13 @@ cd components/elm/tools/interpinic/src export USER_LDFLAGS="-L$NETCDF_C_DIR/lib -lnetcdf -L$NETCDF_F_DIR/lib -lnetcdff -L$HDF5_DIR/lib -lhdf5" USER_FC=ifort LIB_NETCDF="`nc-config --flibs`" INC_NETCDF="`nf-config --includedir`" make VERBOSE=1 - ``` ## 4. Run `interpinic` -The `interpinic ` can then be run via the following batch job (e.g., `remap.r025_RRSwISC6to18E3r4.1850.batch`) to generate the initial condition. +The `interpinic` can then be run via the following batch job (e.g., `remap.r025_RRSwISC6to18E3r4.1850.batch`) to generate the initial condition. -``` +```bash >cat remap.r025_RRSwISC6to18E3r4.1850.batch #!/bin/sh @@ -76,4 +75,3 @@ srun -n 1 ./interpinic \ -i /lcrc/group/e3sm2/ac.golaz/E3SMv3/v3.LR.piControl/archive/rest/0101-01-01-00000/v3.LR.piControl.elm.r.0101-01-01-00000.nc \ -o elmi.v3-NARRM.northamericax4v1pg2_r025_IcoswISC30E3r5.1850-01-01-00000.c20240903.nc ``` - diff --git a/components/elm/docs/user-guide/surface_dataset.md b/components/elm/docs/user-guide/surface_dataset.md index c513d2d1f59f..04d5b00f63ce 100644 --- a/components/elm/docs/user-guide/surface_dataset.md +++ b/components/elm/docs/user-guide/surface_dataset.md @@ -2,16 +2,16 @@ The notes describe the steps in creating an ELM surface dataset at 0.5x0.5 resolution for 1950 on Perlmutter. -1. Load the appropriate modules. +## 1. Load the appropriate modules -``` +```bash cd eval $(./cime/CIME/Tools/get_case_env) ``` -2. Compile `mksurfdata_map`. +## 2. Compile `mksurfdata_map` -``` +```bash cd components/elm/tools/mksurfdata_map/src/ make clean @@ -21,11 +21,13 @@ export USER_LDFLAGS=$USER_LDFLAGS" -L$HDF5_DIR/lib -lhdf5 -lhdf5_fortran -lhdf5_ USER_FC=ifort LIB_NETCDF="`nc-config --flibs`" INC_NETCDF="`nf-config --includedir`" make VERBOSE=1 ``` -3. Build the namelist. This steps assumes that the resolution for which the new surface dataset is being created is a supported resolution. +## Build the namelist + +This steps assumes that the resolution for which the new surface dataset is being created is a supported resolution. If the surface dataset is being created for an unsupported resolution, 16 mapping files will have to be created to map the raw datasets onto this unsupported resolution. -``` +```bash cd ../ RES=0.5x0.5 @@ -36,9 +38,9 @@ DIN_LOC_ROOT=/global/cfs/cdirs/e3sm/inputdata mv namelist namelist.$RES.$YR ``` -4. Run `mksurfdata_map` via an interactive job. +## Run `mksurfdata_map` via an interactive job -``` +```bash salloc --nodes 1 --qos interactive --time 01:00:00 --constraint cpu --account e3sm RES=0.5x0.5 @@ -46,4 +48,4 @@ YR=1950 NAMELIST=namelist.$RES.$YR srun -n 1 ./mksurfdata_map < $NAMELIST -``` \ No newline at end of file +``` From 512b328f2722f8ce277a0824fb5b41de37b90b5d Mon Sep 17 00:00:00 2001 From: Gautam Bisht Date: Fri, 20 Sep 2024 10:58:53 -0700 Subject: [PATCH 5/7] Fixes few default settings --- .../bld/namelist_files/namelist_defaults.xml | 82 +++++++++---------- .../namelist_files/namelist_definition.xml | 2 +- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/components/elm/bld/namelist_files/namelist_defaults.xml b/components/elm/bld/namelist_files/namelist_defaults.xml index e76a5647b4e7..ab737d8f5941 100644 --- a/components/elm/bld/namelist_files/namelist_defaults.xml +++ b/components/elm/bld/namelist_files/namelist_defaults.xml @@ -325,7 +325,7 @@ lnd/clm2/surfdata_map/surfdata_64x128_simyr2000_c170111.nc lnd/clm2/surfdata_map/surfdata_nldas2_simyr2000_c181207.nc - + lnd/clm2/surfdata_map/surfdata_0.125x0.125_simyr2000_c190730.nc lnd/clm2/surfdata_map/surfdata_0.9x1.25_simyr2000_c180404.nc @@ -396,7 +396,7 @@ lnd/clm2/surfdata_map/surfdata_360x720cru_simyr1850_c180216.nc lnd/clm2/surfdata_map/surfdata_48x96_simyr1850_c130927.nc - + lnd/clm2/surfdata_map/surfdata_0.125x0.125_simyr1850_c190730.nc lnd/clm2/surfdata_map/surfdata_0.9x1.25_simyr1850_c180306.nc @@ -1686,13 +1686,6 @@ this mask will have smb calculated over the entire global land surface lnd/clm2/mappingdata/maps/2.5x3.33/map_1km-merge-10min_HYDRO1K-merge-nomask_to_2.5x3.33_nomask_aave_da_c130405.nc - - -lnd/clm2/mappingdata/maps/0.25x0.25/map_0.01x0.01_nomask_to_0.25x0.25_nomask_aave_da_c240501.nc - - - @@ -2056,76 +2049,83 @@ this mask will have smb calculated over the entire global land surface lnd/clm2/mappingdata/maps/northamericax4v1pg2/map_0.5x0.5_GSDTG2000_to_northamericax4v1pg2_nomask_aave_da_c210112.nc - + -lnd/clm2/mappingdata/maps/0.125x0.125/map_0.5x0.5_AVHRR_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_0.5x0.5_MODIS_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_0.9x1.25_GRDC_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_10x10min_IGBPmergeICESatGIS_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_10x10min_nomask_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_1km-merge-10min_HYDRO1K-merge-nomask_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_360x720cru_cruncep_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_3x3min_GLOBE-Gardner-mergeGIS_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_3x3min_GLOBE-Gardner_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_3x3min_LandScan2004_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_3x3min_MODIS_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_3x3min_USGS_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_5x5min_IGBP-GSDP_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_5x5min_ISRIC-WISE_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_5x5min_nomask_to_0.125x0.125_nomask_aave_da_c190725.nc -lnd/clm2/mappingdata/maps/0.125x0.125/map_0.5x0.5_GSDTG2000_to_0.125x0.125_nomask_aave_da_c190725.nc - + -lnd/clm2/mappingdata/maps/0.25x0.25/map_0.5x0.5_AVHRR_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_0.5x0.5_MODIS_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_0.9x1.25_GRDC_to_0.25x0.25_nomask_aave_da_c240124.nc lnd/clm2/mappingdata/maps/0.25x0.25/map_10x10min_IGBPmergeICESatGIS_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_10x10min_nomask_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_1km-merge-10min_HYDRO1K-merge-nomask_to_0.25x0.25_nomask_aave_da_c240123.nc lnd/clm2/mappingdata/maps/0.25x0.25/map_360x720cru_cruncep_to_0.25x0.25_nomask_aave_da_c240124.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_3x3min_GLOBE-Gardner-mergeGIS_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_3x3min_GLOBE-Gardner_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_3x3min_LandScan2004_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_3x3min_MODIS_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_3x3min_USGS_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_5x5min_IGBP-GSDP_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_5x5min_ISRIC-WISE_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_360x720_cruncep_to_0.25x0.25_nomask_aave_da_c240124.nc +lnd/clm2/mappingdata/maps/0.25x0.25/map_5x5min_nomask_to_0.25x0.25_nomask_aave_da_c240123.nc -lnd/clm2/mappingdata/maps/0.25x0.25/map_0.5x0.5_GSDTG2000_to_0.25x0.25_nomask_aave_da_c240123.nc +lnd/clm2/mappingdata/maps/0.25x0.25/map_0.01x0.01_nomask_to_0.25x0.25_nomask_aave_da_c240501.nc +lnd/clm2/mappingdata/maps/0.25x0.25/map_0.1x0.1_nomask_to_0.25x0.25_nomask_aave_da_c240308.nc + lnd/clm2/mappingdata/maps/antarcticax4v1/map_0.5x0.5_AVHRR_to_antarcticax4v1_nomask_aave_da_c210130.nc diff --git a/components/elm/bld/namelist_files/namelist_definition.xml b/components/elm/bld/namelist_files/namelist_definition.xml index 7063d7a11054..d36bf5565ce3 100644 --- a/components/elm/bld/namelist_files/namelist_definition.xml +++ b/components/elm/bld/namelist_files/namelist_definition.xml @@ -1502,7 +1502,7 @@ If TRUE, irrigation will be active (find surface datasets with active irrigation +"1000,850,1100,1350,1600,1850,1855,1865,1875,1885,1895,1905,1915,1925,1935,1945,1950,1955,1965,1975,1980,1985,1995,2000,2005,2010,2015,2025,2035,2045,2055,2065,2075,2085,2095,2100,2105"> Year to simulate and to provide datasets for (such as surface datasets, initial conditions, aerosol-deposition, Nitrogen deposition rates etc.) A sim_year of 1000 corresponds to data used for testing only, NOT corresponding to any real datasets. A sim_year greater than 2005 corresponds to rcp scenario data From 1204d21fdfe4c3af43ddce44ce4ac945de7e458d Mon Sep 17 00:00:00 2001 From: Gautam Bisht Date: Fri, 20 Sep 2024 11:04:58 -0700 Subject: [PATCH 6/7] Adds notes on creating surface dataset with 10 glacier layers --- .../elm/docs/user-guide/surface_dataset.md | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/components/elm/docs/user-guide/surface_dataset.md b/components/elm/docs/user-guide/surface_dataset.md index 04d5b00f63ce..5adaad100d6c 100644 --- a/components/elm/docs/user-guide/surface_dataset.md +++ b/components/elm/docs/user-guide/surface_dataset.md @@ -23,9 +23,9 @@ USER_FC=ifort LIB_NETCDF="`nc-config --flibs`" INC_NETCDF="`nf-config --included ## Build the namelist -This steps assumes that the resolution for which the new surface dataset is being created is a supported resolution. +This step assumes that the resolution for which the new surface dataset is being created is a supported resolution. If the surface dataset is being created for an unsupported resolution, 16 mapping files will have to be created to map the raw datasets -onto this unsupported resolution. +onto this unsupported resolution. The `namelist` file with default number of glaciers (equal to zero) can be generated as: ```bash cd ../ @@ -35,7 +35,16 @@ YR=1950 DIN_LOC_ROOT=/global/cfs/cdirs/e3sm/inputdata ./mksurfdata.pl -res $RES -years $YR -d -dinlc $DIN_LOC_ROOT -mv namelist namelist.$RES.$YR +``` + +An example of generating the namelist for 0.25 deg (`r025`) resolution for 1980 with 10 glacier layers is as follows: + +```bash +RES=r025 +YR=1980 +DIN_LOC_ROOT=/global/cfs/cdirs/e3sm/inputdata + +./mksurfdata.pl -res $RES -years $YR -d -dinlc $DIN_LOC_ROOT -glc_nec 10 ``` ## Run `mksurfdata_map` via an interactive job @@ -43,9 +52,5 @@ mv namelist namelist.$RES.$YR ```bash salloc --nodes 1 --qos interactive --time 01:00:00 --constraint cpu --account e3sm -RES=0.5x0.5 -YR=1950 -NAMELIST=namelist.$RES.$YR - -srun -n 1 ./mksurfdata_map < $NAMELIST +srun -n 1 ./mksurfdata_map < namelist ``` From 7ba6c85a8e907d56713aaa78a13b0966586cb9f4 Mon Sep 17 00:00:00 2001 From: Gautam Bisht Date: Wed, 9 Oct 2024 07:29:38 -0400 Subject: [PATCH 7/7] Address review comments --- components/elm/docs/user-guide/interpinic.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/elm/docs/user-guide/interpinic.md b/components/elm/docs/user-guide/interpinic.md index fcb897834f22..f868ee7e8d2a 100644 --- a/components/elm/docs/user-guide/interpinic.md +++ b/components/elm/docs/user-guide/interpinic.md @@ -47,6 +47,8 @@ cd components/elm/tools/interpinic/src export USER_LDFLAGS="-L$NETCDF_C_DIR/lib -lnetcdf -L$NETCDF_F_DIR/lib -lnetcdff -L$HDF5_DIR/lib -lhdf5" USER_FC=ifort LIB_NETCDF="`nc-config --flibs`" INC_NETCDF="`nf-config --includedir`" make VERBOSE=1 + +cd ../ ``` ## 4. Run `interpinic` @@ -66,10 +68,10 @@ The `interpinic` can then be run via the following batch job (e.g., `remap.r025_ # Load relevant modules. cd -eval $(./cime/CIME/Tools/get_case_env/get_case_env) +eval $(./cime/CIME/Tools/get_case_env) # Change dir to `interpinic` -cd components/elm/tools/interpinic/src +cd components/elm/tools/interpinic/ srun -n 1 ./interpinic \ -i /lcrc/group/e3sm2/ac.golaz/E3SMv3/v3.LR.piControl/archive/rest/0101-01-01-00000/v3.LR.piControl.elm.r.0101-01-01-00000.nc \