Repository navigation
Merge COMPASS contents from MPAS-Dev/MPAS-Model/develop - #1
Merged
Merged
Conversation
Python3 treats supprocess.check_output as a byte, which is no longer strictly equivalent to a string as in python2. Consequently, conversion is needed for equivalence between the strings for the python3 migration.
This is needed for copying config files that may then be altered by the user within a test case. Since there is a significant amount of redundant code between this and and support for the `add_link` tag, a helper function has been added to encapsulate the redundancy. Some error messages have been modified to raise exceptions.
This merge makes a dict of test cases, each with a dict of info: core, configuration, resolution, test, procs and treads. This will be useful later on in both determining whether prerequisite tasks are present and in determining how to run many tests in parallel
Make sure they are also in the test suite
This prevents variables being in global scope that we may not want.
This is specified either in the config file or at the command line.
This will allow different cores to be synced with different versions of the compass conda environment and will allow each core to update the version its develop branch as needed.
Collaborator
Author
|
@mark-petersen and @matthewhoffman, I don't think this one needs a review because not many commits are involved and they have already been reviewed on MPAS-Model. I'm going to merge. |
trhille
added a commit
to trhille/compass
that referenced
this pull request
Sep 26, 2026
Addressed review comments MPAS-Dev#1, MPAS-Dev#2, MPAS-Dev#3, MPAS-Dev#4, MPAS-Dev#5, MPAS-Dev#6, MPAS-Dev#7, MPAS-Dev#8 from the Copilot review. Deferred MPAS-Dev#9 (Dask dependency) and MPAS-Dev#10 (test suite) as low priority. CODE FIXES: region) to the nearest region by great-circle distance (cKDTree), instead of silently assigning them to basin 1 via argmax. Overlapping cells (multiple regions) still pick the first matching region. Added lat/lon parameters to build_basin_ids and updated the call site in load_mesh_and_basins. greenland_3d.py so only the public API (Config and run) remains non- underscored. This satisfies the repository convention that non-underscore module-scope symbols should be documented in api.rst. ice) with a finite JSON target would crash calibrate_gamma0 instead of being excluded. Now NaN out empty regions in the target array before calibration, so active_regions correctly excludes both NaN targets and empty regions. DOC FIXES: (it uses forcing_interval_annual). GrIS 3D stays in Monthly (correct). {mesh}_2dThermalForcing_*.nc (GrIS) and {mesh}_3dThermalForcing_*.nc (AIS; optional GrIS), and fixed lowercase smb→SMB. locations (user/dev ismip7_forcing.rst) since the checked-in JSON requests 20 levels and it's configurable. NETCDF3_64BIT" to "netCDF4 engine → nccopy -k nc6 for CDF-2" (actual implementation uses netCDF4 + nccopy conversion). block (required by ismip7_run as melt_params_path but was undocumented). Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
trhille
added a commit
to trhille/compass
that referenced
this pull request
Sep 29, 2026
…d; document validation helper Copilot findings MPAS-Dev#1-4 were valid: 1. Source version not in filename (HIGH): The forcing archive versions each source (e.g. v1, v2, v2.1) as a directory, and ForcingSource.version carries it, but output filenames omitted it. Upgrading from v1 to v2 in the archive caused the 'skip if exists' guard to reuse stale v1 output. 2. 3-D guard mishandles partial runs (HIGH): The first_chunk guard skipped the whole step when only the first chunk existed, leaving later chunks unwritten after a timeout. greenland_3d already has its own PER-CHUNK skip logic that correctly resumes partial runs. 3. Overwrite config ignored (MEDIUM): The first_chunk guard ran before the JSON was loaded, defeating a user's 'overwrite=true' request. greenland_3d's own logic honors cfg.overwrite. 4. netcdf_file_is_valid missing from API (LOW): Function had a complete docstring but was not registered in the Sphinx autosummary. Changes: - Embed source.version (or job.version) in all output filenames, placed BEFORE the year range: {mesh}_SMB_{model}_{scenario}_{version}_{start}- {end}.nc. Placement before the year range preserves trailing patterns that downstream regexes anchor to (_\d{4}-\d{4}$, _(\d{4})\.nc$), so no changes needed in greenland_3d.py or ismip7_run/set_up_experiment.py. - Remove the step-level first_chunk guard from build_3d_thermal_forcing.py (the redundant/conflicting guard added in commit 90fc71a). Delegate to greenland_3d's own per-chunk skip/overwrite logic, which is finer-grained (handles partial runs correctly) and overwrite-aware (honors the JSON cfg.overwrite flag). - Add remap.netcdf_file_is_valid to docs/developers_guide/landice/api.rst (before remap.extrapolate_source, following source order). Affected filenames (10 steps): - Atmosphere: {version}_{start}-{end}.nc for SMB, temperature, runoff, gradients - Ocean: {version}_{start}-{end}.nc for 2D/3D thermal forcing; climatology already embedded version (unchanged) - Fracture: {stem}_{version}{ext} (no year range) Downstream globs (*SMB*.nc, *2dThermalForcing_*.nc) still match; no regex changes needed. Now a version bump produces a new filename -> guard doesn't fire -> output regenerates (fixes staleness hazard). The GrIS 3-D path now honors overwrite and resumes partial runs correctly. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
1 task done
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 branch contains the full history of https://github.com/MPAS-Dev/MPAS-Model/tree/develop/testing_and_setup/compass