Skip to content
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

Bug fix in FieldSpec::adapt_vertical_grid #3165

Merged
merged 13 commits into from
Nov 12, 2024

Conversation

pchakraborty
Copy link
Collaborator

@pchakraborty pchakraborty commented Nov 8, 2024

Types of change(s)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Trivial change (affects only documentation or cleanup)
  • Refactor (no functional changes, no api changes)

Checklist

  • Tested this change with a run of GEOSgcm
  • Ran the Unit Tests (make tests)

Description

Fixed a bug where the wrong units (of the field to be regridded, instead of the units of the vertical grid), was being passed to VerticalGrid::get_coordinate_field. This necessitated several related changes

  • Added class variable units and its accessors to VerticalGrid

Note

This causes the issue that DYN will now need to define two vertical grids - one for pressure and another for height. Maybe that's okay, but needs further consideration.

  • Updated ComponentSpecParser::parse_geometry_spec where the ModelVerticalGrid gets created
  • Updated Test_ModelVerticalGrid.pf
  • Added a Scenarios test vertical_regridding_3 where component A (Model vertical grid) exports PL (hPa) and E_A (K) which are in turn imported by components B and C (FixedLevels vertical grid)

Also

  • Updated the type of the levels(:) array in FixedLevelsVerticalGrid: real32 -> ESMF_TYPEKIND_R4
  • Catching exceptions for adapter match and adapt methods
  • Updated Test_Scenarios.pf to deactivate vertical_regridding_2/3 tests only for gfortran builds

Related Issue

@pchakraborty pchakraborty self-assigned this Nov 8, 2024
@pchakraborty pchakraborty added 🪲 Bug Something isn't working 0 Diff The changes in this pull request have verified to be zero-diff with the target branch. Changelog Skip Skips the Changelog Enforcer 📈 MAPL3 MAPL 3 Related labels Nov 8, 2024
@pchakraborty pchakraborty marked this pull request as ready for review November 11, 2024 13:42
@pchakraborty pchakraborty requested a review from a team as a code owner November 11, 2024 13:42
@pchakraborty pchakraborty merged commit 5ac1078 into release/MAPL-v3 Nov 12, 2024
35 of 37 checks passed
@pchakraborty pchakraborty deleted the feature/pchakrab/vertical-regridding branch November 12, 2024 15:06
@pchakraborty pchakraborty restored the feature/pchakrab/vertical-regridding branch November 12, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 🪲 Bug Something isn't working Changelog Skip Skips the Changelog Enforcer 📈 MAPL3 MAPL 3 Related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants