-
Notifications
You must be signed in to change notification settings - Fork 20
Port WOA23 extrapolation from Compass #528
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
Draft
xylar
wants to merge
13
commits into
E3SM-Project:main
Choose a base branch
from
xylar:add-extrapolate-woa
base: main
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.
Draft
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7a06830
Generalize e3sm/init topography combine tasks
xylar 1732bce
Fix lat coordinate in tiles in combine topo step
xylar 018c552
Don't add exodus output file for non-cubed sphere topo
xylar 7129e4b
Add ocean_mask to combine topo
xylar effdbb5
Add more lat-lon resolutions to topo/combine
xylar 6a625ce
Add viz for lat-lon in topo/combine
xylar f1f705c
Add global_ocean WOA23 hydrography task
xylar 80c923a
Set parallel system for all components
xylar 0c917c1
Use ocean_mask from combine topo
xylar f54c7af
Add optional viz step to woa23 extrap
xylar c53b363
Several fixes to WOA viz
xylar f7016af
Fix the transects in the viz step
xylar 59b0dc6
Switch WOA23 steps to produce CT/SA
xylar 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
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
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
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,70 @@ | ||
| (dev-ocean-global-ocean)= | ||
|
|
||
| # global_ocean | ||
|
|
||
| The `global_ocean` tasks in `polaris.tasks.ocean.global_ocean` are intended | ||
| for preprocessing and initialization workflows that are upstream of any | ||
| particular MPAS mesh. The first task category under this framework is | ||
| `hydrography/woa23`, which builds a reusable hydrography product from the | ||
| World Ocean Atlas 2023 on its native 0.25-degree latitude-longitude grid. | ||
|
|
||
| (dev-ocean-global-ocean-framework)= | ||
|
|
||
| ## framework | ||
|
|
||
| The shared config options for the WOA23 hydrography task are described in | ||
| {ref}`ocean-global-ocean` in the User's Guide. | ||
|
|
||
| The implementation is intentionally organized around reusable Polaris steps | ||
| rather than around the legacy Compass `utility/extrap_woa` multiprocessing | ||
| workflow. One notable design choice is that the task reuses the combined | ||
| topography product from `e3sm/init` rather than taking a raw topography | ||
| filename as a task-specific input. | ||
|
|
||
| ### cached topography dependency | ||
|
|
||
| The helper | ||
| {py:func}`polaris.tasks.ocean.global_ocean.hydrography.woa23.get_woa23_topography_step` | ||
| creates a shared `e3sm/init` {py:class}`polaris.tasks.e3sm.init.topo.combine.step.CombineStep` | ||
| configured for a 0.25-degree lat-lon target grid. The | ||
| {py:class}`polaris.tasks.ocean.global_ocean.hydrography.woa23.task.Woa23` | ||
| task adds this step with a symlink `combine_topo` and prefers to use a cached | ||
| version of its outputs when matching entries are available in the | ||
| `e3sm/init` cache database. | ||
|
|
||
| This keeps the expensive topography blending logic in one place and makes the | ||
| ocean hydrography preprocessing task consistent with the broader Polaris | ||
| approach to shared, cacheable preprocessing steps. | ||
|
|
||
| (dev-ocean-global-ocean-woa23)= | ||
|
|
||
| ## hydrography/woa23 | ||
|
|
||
| The {py:class}`polaris.tasks.ocean.global_ocean.hydrography.woa23.task.Woa23` | ||
| task is the Polaris port of the WOA preprocessing part of the legacy Compass | ||
| workflow. | ||
|
|
||
| ### combine | ||
|
|
||
| The class | ||
| {py:class}`polaris.tasks.ocean.global_ocean.hydrography.woa23.combine.CombineStep` | ||
| combines January and annual WOA23 temperature and salinity climatologies into | ||
| a single dataset. January values are used where they exist, and annual values | ||
| fill deeper levels where the monthly product is not available. | ||
|
|
||
| WOA23 supplies in-situ temperature and practical salinity, so this step uses | ||
| `gsw` to derive conservative temperature and absolute salinity for the | ||
| canonical `woa_combined.nc` product. | ||
|
|
||
| ### extrapolate | ||
|
|
||
| The class | ||
| {py:class}`polaris.tasks.ocean.global_ocean.hydrography.woa23.extrapolate.ExtrapolateStep` | ||
| uses the cached combined-topography product on the WOA grid together with | ||
| `woa_combined.nc` to build a 3D ocean mask and then fill missing WOA values in | ||
| two stages: | ||
|
|
||
| 1. Horizontal then vertical extrapolation within the ocean mask | ||
| 2. Horizontal then vertical extrapolation into land and grounded-ice regions | ||
|
|
||
| The final output is `woa23_decav_0.25_jan_extrap.nc`. |
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
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,84 @@ | ||
| (ocean-global-ocean)= | ||
|
|
||
| # global_ocean | ||
|
|
||
| This category contains ocean preprocessing tasks that are upstream of any | ||
| particular MPAS mesh. The first task builds a reusable World Ocean Atlas 2023 | ||
| (WOA23) hydrography product on the native 0.25-degree latitude-longitude grid. | ||
|
|
||
| ## supported models | ||
|
|
||
| This task is model-independent and does not require either MPAS-Ocean or | ||
| Omega to be built. | ||
|
|
||
| (ocean-global-ocean-woa23)= | ||
|
|
||
| ## woa23 | ||
|
|
||
| This task is the Polaris port of the legacy Compass | ||
| `utility/extrap_woa` workflow. It combines January and annual WOA23 | ||
| climatologies, uses a cached `e3sm/init` combined-topography product on the | ||
| WOA grid to define the ocean mask used during preprocessing, and then fills | ||
| missing temperature and salinity values through staged horizontal and vertical | ||
| extrapolation. | ||
|
|
||
| The task can be set up with: | ||
|
|
||
| ```bash | ||
| polaris setup -t ocean/global_ocean/hydrography/woa23 ... | ||
| ``` | ||
|
|
||
| ### description | ||
|
|
||
| The task is organized into three inspectable steps: | ||
|
|
||
| 1. `combine_topo` reuses a cached `e3sm/init` combined-topography step | ||
| configured for the WOA23 0.25-degree latitude-longitude grid. | ||
| 2. `combine` creates `woa_combined.nc` by combining January and annual WOA23 | ||
| in-situ temperature and practical-salinity fields, then deriving | ||
| conservative temperature and absolute salinity. | ||
| 3. `extrapolate` creates the final | ||
| `woa23_decav_0.25_jan_extrap.nc` product. | ||
|
|
||
| This layout is intended to match Polaris shared-step conventions so the WOA23 | ||
| preprocessing pipeline can later be reused by mesh-dependent | ||
| `global_ocean` initialization tasks. | ||
|
|
||
| ### mesh | ||
|
|
||
| N/A. This task operates on the native WOA23 latitude-longitude grid rather | ||
| than an MPAS mesh. | ||
|
|
||
| ### vertical grid | ||
|
|
||
| N/A. The task preserves the standard WOA23 depth levels. | ||
|
|
||
| ### initial conditions | ||
|
|
||
| The source fields come from the WOA23 January and annual climatologies in the | ||
| Polaris input database. | ||
|
|
||
| ### forcing | ||
|
|
||
| N/A. | ||
|
|
||
| ### time step and run duration | ||
|
|
||
| N/A. | ||
|
|
||
| ### config options | ||
|
|
||
| ```cfg | ||
| # Options related to generating a reusable WOA23 hydrography product | ||
| [woa23] | ||
|
|
||
| # the minimum weight sum needed to mark a new cell valid in horizontal | ||
| # extrapolation | ||
| extrap_threshold = 0.01 | ||
| ``` | ||
|
|
||
| ### cores | ||
|
|
||
| The local `combine` and `extrapolate` steps run serially. The | ||
| `combine_topo` step is intended to use the cached `e3sm/init` output because | ||
| regenerating the combined topography product is substantially more expensive. | ||
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
Oops, something went wrong.
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.