Repository navigation
Conversation
`'Frac' in var` tested the DataArray's values rather than its name, so remapped MALI fractions were never limited to 1. `xr.Dataset(ds_bedmachine)` raises a TypeError with recent xarray, which no longer accepts a Dataset as data_vars. Use a copy instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add two config options to [remap_mali_topography]: * `map_filename`: a precomputed MALI-to-MPAS-Ocean mapping file (e.g. E3SM's glc-to-ocn coupler map) to use instead of computing one with mbtempest. * `normalize_land_ice_fractions`: set landIceFracObserved and landIceFloatingFracObserved to the floating fraction divided by the remapped MALI ocean fraction (below sea level and not grounded), as E3SM's coupler delivers them with GLC2OCN_SHELF_MASK=ungrounded. Also match MALI's cellMask and the coupler's masks at ties: ice exactly at flotation is floating (draft >= bed) and the ocean mask includes bed == sea level. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These test cases build a new initial condition from MALI AIS 4-to-20-km topography on exactly the culled SOwISC12to30E3r4 mesh used in E3SM, so E3SM's mapping, domain and partition files for that mesh stay valid. `Mesh` takes a new `existing_mesh` argument. When it is set: * `ExistingMeshStep` replaces the base mesh, extracting the horizontal mesh from the existing initial condition given by [existing_mesh]/mesh_filename. * `ExistingCulledMeshStep` replaces the cull step. It masks and "culls" the topography as `CullMeshStep` does but culls no cells. The flood fill that removes land ice not connected to the ice sheet can't start at the South Pole on a culled mesh, so it uses the connected components of the land-ice region that contain land ice in the existing file. * landIceMask and landIceFloatingMask are copied unchanged from the existing file, since E3SM coupling files depend on them. The SOwISC12to30E3r4 config uses E3SM's glc-to-ocn coupler map and normalized land-ice fractions, so landIcePressure and the land-ice fractions match what the coupler delivers with GLC2OCN_SHELF_MASK=ungrounded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On an existing mesh, landIceMask is fixed, so removing land ice from the topography no longer affects the mask. It only makes the initial condition disagree with what E3SM's coupler delivers. On oQU240wLI, the critical-passage mask and the seeded flood fill zeroed landIcePressure in 9 cells where the coupler delivers up to 6e5 Pa. `ExistingCulledMeshStep` now writes its outputs directly instead of going through `_cull_topo()`: the remapped topography with the existing masks, and an identity map from the culled to the base mesh (the existing mesh is both), which remap_ice_shelf_melt needs. The seeded flood fill is no longer needed and is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
These build an initial condition from E3SM's default MALI initial condition for the ais8to30 grid on exactly the oQU240wLI mesh, for a low-resolution E3SM test of importing ice-sheet geometry into the ocean (TL319_oQU240wLI_ais8to30). As on SOwISC12to30E3r4, the land-ice masks come from the existing initial condition, and E3SM's glc-to-ocn coupler map is used. The vertical grid is the existing 60layerPHC grid. `mali_filename` in [remap_mali_topography] may now be an absolute path instead of a file in the mali_topo database. The new ais_8to30km.cfg uses this for the MALI file in E3SM's inputdata on Chrysalis. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
E3SM's shared constants now come from the Physical Constants Dictionary (PCD), and MPAS-Ocean, MALI and E3SM's coupler all use its gravity (9.80665 m s-2), but the constants in mpas_tools are out of date (MPAS-Dev/MPAS-Tools#781). Ice-shelf pressures computed by compass with the old value (9.80616) are 5e-5 lower than those the coupler delivers. compass.constants copies the mpas_tools constants with the PCD's gravity, and compass uses it everywhere instead of mpas_tools.cime.constants. The other constants, including the Earth radius, are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
TestingI ran the All steps passed except
I didn't run the Posted by Claude Code on @xylar's behalf. |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds
global_oceantest cases that build initial conditions from MALI AIS topography on two existing E3SM meshes, SOwISC12to30E3r4 and oQU240wLI. They are for testing ice-shelf melt coupling in E3SM-Project/E3SM#8887.landIceMaskis kept from each existing initial condition so E3SM's coupling files stay valid, and the land-ice fields match what the coupler delivers.For reviewers:
remap_ice_shelf_meltruns out of memory.The PR also fixes two bugs in MALI topography remapping. It switches compass to the PCD's gravity, because the
mpas_toolsconstants are out of date (MPAS-Dev/MPAS-Tools#781).Checklist
api.rst) has any new or modified class, method and/or functions listedTestingin this PR) any testing that was used to verify the changesPosted by Claude Code on @xylar's behalf. The testing, analysis and wording above are AI-authored; please check them accordingly.