Skip to content

Commit

Permalink
Merge pull request #2234 from GEOS-ESM/hotfix/bmauer/fixes-#2232
Browse files Browse the repository at this point in the history
fixes #2232
  • Loading branch information
tclune authored Jul 18, 2023
2 parents ea04e37 + 33ca452 commit da97476
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 9 additions & 7 deletions Apps/time_ave_util.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1166,12 +1166,14 @@ subroutine get_file_levels(filename,vertical_data,rc)
basic_metadata=formatter%read(_RC)
call metadata%create(basic_metadata,trim(filename))
lev_name = metadata%get_level_name(_RC)
call metadata%get_coordinate_info(lev_name,coords=levs,coordUnits=lev_units,long_name=long_name,&
standard_name=standard_name,coordinate_attr=vcoord,_RC)
plevs => levs
vertical_data = VerticalData(levels=plevs,vunit=lev_units,vcoord=vcoord,standard_name=standard_name,long_name=long_name, &
force_no_regrid=.true.,_RC)
nullify(plevs)
if (lev_name /= '') then
call metadata%get_coordinate_info(lev_name,coords=levs,coordUnits=lev_units,long_name=long_name,&
standard_name=standard_name,coordinate_attr=vcoord,_RC)
plevs => levs
vertical_data = VerticalData(levels=plevs,vunit=lev_units,vcoord=vcoord,standard_name=standard_name,long_name=long_name, &
force_no_regrid=.true.,_RC)
nullify(plevs)
end if

if (present(rc)) then
rc=_SUCCESS
Expand All @@ -1185,7 +1187,7 @@ function has_level(grid,rc) result(grid_has_level)
integer, intent(out), optional :: rc
integer :: status, global_dims(3)
call MAPL_GridGet(grid,globalCellCountPerDim=global_dims,_RC)
grid_has_level = (global_dims(3)/=1)
grid_has_level = (global_dims(3)>1)
if (present(rc)) then
RC=_SUCCESS
end if
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed
- Relaxed restriction in the tripolar grid factory so that grids can be made even when the decomposition deos not evenly divide the grid dimension so that the factory can be used in utilities where the core count makes such a condition impossible to satisfiy

### Fixed
- Fix a bug in time\_ave\_util.x so that it can work with files with no veritcal coordinate

### Removed

Expand Down
4 changes: 0 additions & 4 deletions base/MAPL_TripolarGridFactory.F90
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,6 @@ subroutine check_and_fill_consistency(this, unusable, rc)
end if

! Check decomposition/bounds
! Tripolar requires even divisibility
_ASSERT(mod(this%im_world, this%nx) == 0,"needs message")
_ASSERT(mod(this%jm_world, this%ny) == 0,"needs message")

! local extents
call verify(this%nx, this%im_world, this%ims, rc=status)
call verify(this%ny, this%jm_world, this%jms, rc=status)
Expand Down

0 comments on commit da97476

Please sign in to comment.