Skip to content

Commit

Permalink
Merge pull request #2188 from GEOS-ESM/hotfix/bmauer/fixes-#2187
Browse files Browse the repository at this point in the history
fixes #2187
  • Loading branch information
mathomp4 committed Jun 13, 2023
2 parents dea3ee7 + 3f7e4fc commit 29c9ba3
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 39 deletions.
40 changes: 20 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ parameters:

# Anchors to prevent forgetting to update a version
os_version: &os_version ubuntu20
baselibs_version: &baselibs_version v7.7.0
baselibs_version: &baselibs_version v7.13.0
bcs_version: &bcs_version v11.00.0
tag_build_arg_name: &tag_build_arg_name maplversion

Expand Down Expand Up @@ -148,25 +148,6 @@ workflows:
fixture_branch: develop
checkout_mapl_branch: true

# Build GEOSadas (ifort only, needs a couple develop branches)
- ci/build:
name: build-GEOSadas-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [ifort]
resource_class: xlarge
baselibs_version: *baselibs_version
repo: GEOSadas
checkout_fixture: true
# This branch on GEOSadas will be used to track subrepos needed
# for GEOSadas + MAPL develop much like how we do with MAPL 3
#fixture_branch: feature/mathomp4/mapldevelop
checkout_mapl_branch: true
mepodevelop: false
rebuild_procs: 1

# Run GCM (1 hour, no ExtData)
- ci/run_gcm:
name: run-GCM-on-<< matrix.compiler >>
Expand Down Expand Up @@ -218,6 +199,25 @@ workflows:
- build-and-test-MAPL-on-<< matrix.compiler >>-using-Unix Makefiles
baselibs_version: *baselibs_version

build-GEOSadas:
jobs:
# Build GEOSadas (ifort only, needs a couple develop branches)
- ci/build:
name: build-GEOSadas-on-<< matrix.compiler >>
context:
- docker-hub-creds
matrix:
parameters:
compiler: [ifort]
resource_class: xlarge
baselibs_version: *baselibs_version
repo: GEOSadas
checkout_fixture: true
#fixture_branch: feature/mathomp4/ignore-heldsuarez
checkout_mapl_branch: true
mepodevelop: false
rebuild_procs: 1

build-and-publish-docker:
when:
equal: [ "release", << pipeline.parameters.GHA_Event >> ]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
name: Build and Test MAPL GNU
runs-on: ubuntu-latest
container:
image: gmao/ubuntu20-geos-env-mkl:v7.7.0-openmpi_4.1.4-gcc_12.1.0
image: gmao/ubuntu20-geos-env-mkl:v7.13.0-openmpi_4.1.4-gcc_12.1.0
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
# It seems like we might not need secrets on GitHub Actions which is good for forked
# pull requests
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
name: Build and Test MAPL Intel
runs-on: ubuntu-latest
container:
image: gmao/ubuntu20-geos-env:v7.7.0-intelmpi_2021.6.0-intel_2022.1.0
image: gmao/ubuntu20-geos-env:v7.13.0-intelmpi_2021.6.0-intel_2022.1.0
# Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495
# It seems like we might not need secrets on GitHub Actions which is good for forked
# pull requests
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [2.39.3] - 2023-06-12

### Fixed

- Fixed a bug when performing vertical regridding in History when the output grid cannot be decomposed so that every core has a DE

## [2.39.2] - 2023-05-30

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif ()

project (
MAPL
VERSION 2.39.2
VERSION 2.39.3
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

# Set the possible values of build type for cmake-gui
Expand Down
31 changes: 15 additions & 16 deletions base/MAPL_VerticalMethods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -293,28 +293,27 @@ subroutine correct_topo(this,field,rc)

integer :: rank,k,status
real, pointer :: ptr(:,:,:)
type(ESMF_FieldStatus_Flag) :: fieldStatus
type(ESMF_Grid) :: grid
logical :: has_de

_ASSERT(allocated(this%surface_level),"class not setup to do topography correction")
if (this%regrid_type == VERTICAL_METHOD_ETA2LEV) then
call ESMF_FieldGet(field,rank=rank,rc=status)
_VERIFY(status)
if (rank==3) then
call ESMF_FieldGet(field, status=fieldStatus, rc=status)
_VERIFY(STATUS)
if (fieldStatus == ESMF_FIELDSTATUS_COMPLETE) then
call ESMF_FieldGet(field,grid=grid,_RC)
has_de = MAPL_GridHasDE(grid,_RC)
if (has_de) then
call ESMF_FieldGet(field,rank=rank,rc=status)
_VERIFY(status)
if (rank==3) then
call ESMF_FieldGet(field,0,farrayptr=ptr,rc=status)
_VERIFY(status)
else
allocate(ptr(0,0,0),_STAT)
do k=1,size(ptr,3)
if (this%ascending) then
where(this%surface_level<this%scaled_levels(k)) ptr(:,:,k)=MAPL_UNDEF
else
where(this%surface_level>this%scaled_levels(k)) ptr(:,:,k)=MAPL_UNDEF
end if
end do
end if
do k=1,size(ptr,3)
if (this%ascending) then
where(this%surface_level<this%scaled_levels(k)) ptr(:,:,k)=MAPL_UNDEF
else
where(this%surface_level>this%scaled_levels(k)) ptr(:,:,k)=MAPL_UNDEF
end if
end do
end if
end if
_RETURN(_SUCCESS)
Expand Down

0 comments on commit 29c9ba3

Please sign in to comment.