-
Notifications
You must be signed in to change notification settings - Fork 456
E3SM atmospheric initial condition remap tool (model-to-model) #8007
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
Open
tangq
wants to merge
4
commits into
master
Choose a base branch
from
tangq/atm/remap_atmIC_m2m
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+703
−0
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
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 hidden or 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,92 @@ | ||
| # E3SM Initial Condition Remapping Workflow | ||
|
|
||
| Remap E3SM atmospheric initial conditions from one grid to another with proper surface pressure adjustment for topography differences. | ||
|
|
||
| ## Quick Start | ||
|
|
||
| ### 1. Get the Scripts | ||
|
|
||
| From E3SM repository: | ||
|
|
||
| ```bash | ||
| # Clone or navigate to E3SM repository | ||
| cd /path/to/E3SM/tools/remap_atmIC_m2m/ | ||
| cp -r . /path/to/your/working/directory/ | ||
| cd /path/to/your/working/directory/ | ||
| ``` | ||
|
|
||
| Or download directly from: | ||
| <https://github.com/E3SM-Project/E3SM/tree/master/tools/remap_atmIC_m2m/> | ||
|
|
||
| Example files available at: | ||
| <https://portal.nersc.gov/cfs/e3sm/tang30/remap_atmIC_m2m/> | ||
|
|
||
| ### 2. Prepare Input Files | ||
|
|
||
| You need: | ||
|
|
||
| - Source initial condition file: `${CASENAME}.eam.i.${TIMESTAMP}.nc` | ||
| - ESMF remapping weights: `map_source_to_target.nc` | ||
| - Source grid topography file | ||
| - Target grid topography file | ||
| - Vertical coordinate template: `E3SM_vert_coor_L80.nc` | ||
|
|
||
| ### 3. Edit Configuration | ||
|
|
||
| Edit `remap_atmIC_m2m.sh`: | ||
|
|
||
| ```bash | ||
| CASENAME="v3.LR.historical_0091" | ||
| TIMESTAMP="2015-01-01-00000" | ||
| SOURCE_GRID="ne30np4" | ||
| TARGET_GRID="northamericax4v1np4" | ||
| GRID_LABEL="northamericax4v1pg2" | ||
| ``` | ||
|
|
||
| ### 4. Run | ||
|
|
||
| ```bash | ||
| ./remap_atmIC_m2m.sh | ||
| ``` | ||
|
|
||
| Output: `${CASENAME}_mapped_${TARGET_GRID}-topoadj.eam.i.${TIMESTAMP}.nc` | ||
|
|
||
| ## Files | ||
|
Member
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. Move this to the top. Explain what "m2m" means. |
||
|
|
||
| - `remap_atmIC_m2m.sh` - Main workflow script | ||
| - `adjust_ps_m2m.py` - Python script for PS adjustment | ||
| - `README.md` - This file | ||
|
|
||
| ## What It Does | ||
|
|
||
| 1. **Horizontal remapping** - Maps IC from source to target grid | ||
| 2. **PS adjustment** - Adjusts surface pressure for topography differences | ||
| 3. **Vertical remapping** - Interpolates to new vertical coordinate | ||
| 4. **Cleanup** - Removes intermediate files (set `KEEP_INTERMEDIATE="yes"` to keep) | ||
|
|
||
| ## Configuration Options | ||
|
|
||
| In `remap_atmIC_m2m.sh`: | ||
|
|
||
| | Variable | Description | Example | | ||
| |---------------------|----------------------|----------------------------| | ||
| | `CASENAME` | Case name | `v3.LR.historical_0091` | | ||
| | `TIMESTAMP` | Time stamp | `2015-01-01-00000` | | ||
| | `SOURCE_GRID` | Source grid | `ne30np4` | | ||
| | `TARGET_GRID` | Target grid | `northamericax4v1np4` | | ||
| | `GRID_LABEL` | For file naming | `northamericax4v1pg2` | | ||
| | `VERTICAL_LEVELS` | Vertical levels | `L80` | | ||
| | `PHIS_VAR` | PHIS variable name | `PHIS_d` | | ||
| | `KEEP_INTERMEDIATE` | Keep temp files | `no` (default) | | ||
|
|
||
| ## Requirements | ||
|
|
||
| - E3SM unified environment | ||
|
Member
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. Add a link to this. |
||
| - Python 3 with numpy, netCDF4 | ||
| - NCO tools (ncks, ncremap) | ||
|
|
||
| Load E3SM unified environment: | ||
|
|
||
| ```bash | ||
| source /global/common/software/e3sm/anaconda_envs/load_latest_e3sm_unified_pm-cpu.sh | ||
| ``` | ||
Oops, something went wrong.
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.
Why ESMF in particular? We've tried to move all remapping to TempestRemap.