Skip to content

Commit

Permalink
Merge pull request #3039 from GEOS-ESM/bugfix/atrayano/#3038_fix_veri…
Browse files Browse the repository at this point in the history
…cal_attributes

querring VLOCATION on MAPL_VerticalMethods.F90 for rank 2 fields
  • Loading branch information
tclune committed Sep 19, 2024
2 parents b0501c9 + fb9136d commit ae6bc63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Made the POSITIVE field attribute defaults to "down" in case it is not found
- VLOCATION is not querried in MAPL_VerticalMethods.F90 for rank 2 fields
- Fixed time print in Cap GC (from slashes to colons)
- Added ability to read the attribute with explicit type "string" of a netcdf variable.
- Start to implement changes for vertical regridding in ExtData
Expand Down
8 changes: 6 additions & 2 deletions base/MAPL_VerticalMethods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -490,17 +490,21 @@ subroutine append_vertical_metadata(this,metadata,bundle,rc)

do i=1,numVars
call ESMF_FieldBundleGet(bundle,i,field,_RC)
call ESMF_AttributeGet(field,name="POSITIVE", value=positive, _RC)
positive = 'down'
call ESMF_AttributeGet(field,NAME="POSITIVE",isPresent=isPresent,_RC)
if (isPresent) then
call ESMF_AttributeGet(field,name="POSITIVE", value=positive, _RC)
end if
if (i .eq. 1) this%positive=positive
if (i .gt. 1) then
_ASSERT(this%positive==positive,"Fields have mistmatched positive attributes")
this%positive=positive
end if
call ESMF_FieldGet(field,dimCount=FieldRank,_RC)
call ESMF_AttributeGet(field,name="VLOCATION", value=location(i),_RC)
if (fieldRank==2) then
varDims(i)=0
else if (fieldRank==3) then
call ESMF_AttributeGet(field,name="VLOCATION", value=location(i),_RC)
call ESMF_FieldGet(field,farrayPtr=ptr3d,_RC)
varDims(i)=size(ptr3d,3)
if (location(i) == MAPL_VLocationNone) then
Expand Down

0 comments on commit ae6bc63

Please sign in to comment.