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

Fix/wjiang/set grid fix #2002

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed set_grid. The grid_type comes from CAP.rc becasue the root gc is not created

### Removed

### Deprecated
Expand Down
8 changes: 7 additions & 1 deletion gridcomps/Cap/MAPL_CapGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,13 @@ subroutine set_grid(this, grid, unusable, lm, grid_type, rc)
external_grid_factory = ExternalGridFactory(grid=grid, lm=lm, _RC)
mapl_grid = grid_manager%make_grid(external_grid_factory, _RC)
! grid_type is an optional parameter that allows GridType to be set explicitly.
call ESMF_ConfigGetAttribute(this%cf_root, value = grid_type_, Label="GridType:", default="", _RC)
call ESMF_ConfigGetAttribute(this%config, value = grid_type_, Label="GridType:", default="", rc=status)
if (status == ESMF_RC_OBJ_NOT_CREATED) then
grid_type_ = ""
else
_VERIFY(status)
endif

if (present(grid_type)) then
if(grid_type_ /= "") then
_ASSERT(grid_type_ == grid_type, "The grid types don't match")
Expand Down