-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds notes about generating surface dataset and initial condition for ELM #6582
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6f601bf
Adds notes about generating ELM land IC
bishtgautam 3e6959e
Fixes a typo
bishtgautam ff40c9c
Adds notes about using mksurfdata_map
bishtgautam f61c6f8
Few fixes
bishtgautam 512b328
Fixes few default settings
bishtgautam 1204d21
Adds notes on creating surface dataset with 10 glacier layers
bishtgautam 7ba6c85
Address review comments
bishtgautam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: | ||
|
||
```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 | ||
``` | ||
|
||
## 2. Obtaining an ELM restart file | ||
|
||
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 \ | ||
elmi.v3-NARRM.northamericax4v1pg2_r025_IcoswISC30E3r5.1850-01-01-00000.c`date "+%Y%m%d"`.nc | ||
``` | ||
|
||
## 3. Compiling `interpinic` | ||
|
||
```bash | ||
# Load relevant modules | ||
cd <e3sm-dir> | ||
eval $(./cime/CIME/Tools/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 | ||
|
||
cd ../ | ||
``` | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cd .. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed. |
||
## 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. | ||
|
||
```bash | ||
>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 <e3sm-dir> | ||
eval $(./cime/CIME/Tools/get_case_env) | ||
|
||
# Change dir to `interpinic` | ||
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 \ | ||
-o elmi.v3-NARRM.northamericax4v1pg2_r025_IcoswISC30E3r5.1850-01-01-00000.c20240903.nc | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# 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 | ||
|
||
```bash | ||
cd <e3ms-dir> | ||
eval $(./cime/CIME/Tools/get_case_env) | ||
``` | ||
|
||
## 2. Compile `mksurfdata_map` | ||
|
||
```bash | ||
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 | ||
``` | ||
|
||
## Build the namelist | ||
|
||
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. The `namelist` file with default number of glaciers (equal to zero) can be generated as: | ||
|
||
```bash | ||
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 | ||
``` | ||
|
||
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 | ||
|
||
```bash | ||
salloc --nodes 1 --qos interactive --time 01:00:00 --constraint cpu --account e3sm | ||
|
||
srun -n 1 ./mksurfdata_map < namelist | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing "export" ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export
is not required.