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

GitFlow: Merge develop into main for 2.53 release #3363

Merged
merged 23 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
49bbf79
still trying to fix GOCART2G array indexing
aoloso Jan 14, 2025
ef5e024
more updates
bena-nasa Jan 15, 2025
f7b8f4e
fixes #3338
bena-nasa Jan 16, 2025
08bd747
removed unnecessary comments
aoloso Jan 17, 2025
75c7d64
Merge branch 'develop' into fix_with_ben
aoloso Jan 17, 2025
b94da73
more updates
bena-nasa Jan 21, 2025
8d71ed2
update changelog
bena-nasa Jan 21, 2025
66c3284
Merge branch 'develop' into feature/bmauer/fixes-#3338
bena-nasa Jan 21, 2025
53b183b
Merge pull request #3351 from GEOS-ESM/feature/bmauer/fixes-#3338
bena-nasa Jan 21, 2025
1634fef
Merge branch 'develop' into fix_with_ben
mathomp4 Jan 22, 2025
46c6473
Update to ESMA_env v4.34.1
mathomp4 Jan 22, 2025
6bfafd9
fix changlog and remove prints
bena-nasa Jan 22, 2025
f306557
restore missing line in changelog
bena-nasa Jan 22, 2025
0cd45b0
Merge pull request #3356 from GEOS-ESM/feature/bmauer/remove_time_prints
tclune Jan 22, 2025
c2a6a8b
Merge branch 'develop' into bugfix/mathomp4/fix-esmaenv
mathomp4 Jan 22, 2025
b2aa817
Fix up changelog
mathomp4 Jan 22, 2025
e60dfc4
Merge branch 'develop' into fix_with_ben
mathomp4 Jan 23, 2025
260d563
Update changelog
mathomp4 Jan 23, 2025
6ad5003
Merge pull request #3350 from GEOS-ESM/fix_with_ben
mathomp4 Jan 24, 2025
e0ddb42
Merge branch 'develop' into bugfix/mathomp4/fix-esmaenv
mathomp4 Jan 24, 2025
de02ef9
Merge pull request #3355 from GEOS-ESM/bugfix/mathomp4/fix-esmaenv
mathomp4 Jan 24, 2025
beebb29
Prepare for 2.53.0 Release
mathomp4 Jan 24, 2025
142a615
Merge pull request #3362 from GEOS-ESM/feature/mathomp4/prepare-for-2…
mathomp4 Jan 24, 2025
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
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [2.53.0] - 2025-01-24

### Changed

- Updated ExtData so that if files are missing in a sequence the last value will be perisisted if one has not chosen `exact` option
- Update `components.yaml`
- `ESMA_env` v4.34.1
- Fix GEOSpyD module on GMAO Desktops

### Fixed

- Changes were made to add attributes to the subgrids (i.e. created by dividing the MPI subdomain into smaller subdomains equal to the number of OpenMP threads) such that the correct dimensions for the MPI subdomain could be retrieved from the subgrids where ever needed.

## [2.52.0] - 2025-01-17

### Added
Expand All @@ -31,7 +44,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Changed `MAPL_ESMFRegridder` to require the dstMaskValues to be added as grid attribute to use fixed masking, fixes UFS issue
- Changed MAPL_ESMFRegridder to require the dstMaskValues to be added as grid attribute to use fixed masking, fixes UFS issue
- Increased formatting width of time index in ExtData2G diagnostic print
- Updated GitHub checkout action to use blobless clones
- Update CI to use Baselibs 7.29.0 by default
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.52.0
VERSION 2.53.0
LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF

# Set the possible values of build type for cmake-gui
Expand Down
35 changes: 8 additions & 27 deletions Tests/ExtDataRoot_GridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -677,12 +677,8 @@ subroutine CompareState(State1,State2,tol,rc)

integer :: status
integer :: i
real, pointer :: ptr3_1(:,:,:)
real, pointer :: ptr3_2(:,:,:)
real, pointer :: ptr2_1(:,:)
real, pointer :: ptr2_2(:,:)
real, pointer :: ptr1_1(:)
real, pointer :: ptr1_2(:)
real, pointer :: ptr1(:)
real, pointer :: ptr2(:)
integer :: itemcount,rank1,rank2
character(len=ESMF_MAXSTR), allocatable :: NameList(:)
logical, allocatable :: foundDiff(:)
Expand All @@ -706,25 +702,12 @@ subroutine CompareState(State1,State2,tol,rc)
exit
end if
_ASSERT(rank1==rank2,'needs informative message')
call assign_fptr(field1, ptr1, _RC)
call assign_fptr(field2, ptr2, _RC)
_ASSERT(size(ptr1)==size(ptr2),'needs informative message')
foundDiff(i)=.false.
if (rank1==1) then
call MAPL_GetPointer(state1,ptr1_1,trim(nameList(i)),_RC)
call MAPL_GetPointer(state2,ptr1_2,trim(nameList(i)),_RC)
if (any((ptr1_1-ptr1_2) > tol)) then
foundDiff(i) = .true.
end if
else if (rank1==2) then
call MAPL_GetPointer(state1,ptr2_1,trim(nameList(i)),_RC)
call MAPL_GetPointer(state2,ptr2_2,trim(nameList(i)),_RC)
if (any((ptr2_1-ptr2_2) > tol)) then
foundDiff(i) = .true.
end if
else if (rank1==3) then
call MAPL_GetPointer(state1,ptr3_1,trim(nameList(i)),_RC)
call MAPL_GetPointer(state2,ptr3_2,trim(nameList(i)),_RC)
if (any((ptr3_1-ptr3_2) > tol)) then
foundDiff(i) = .true.
end if
if (any(abs(ptr1-ptr2) > tol)) then
foundDiff(i) = .true.
end if
if (foundDiff(i)) then
_FAIL('found difference when compare state')
Expand All @@ -741,10 +724,8 @@ subroutine ForceAllocation(state,rc)

integer :: status

real, pointer :: ptr3d(:,:,:)
real, pointer :: ptr2d(:,:)
integer :: ii
integer :: itemcount,dims
integer :: itemcount
character(len=ESMF_MAXSTR), allocatable :: NameList(:)
type (ESMF_StateItem_Flag), allocatable :: itemTypeList(:)
type(ESMF_Field) :: Field
Expand Down
22 changes: 22 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/AGCM1.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
NX: 1
NY: 1

Root.GRID_TYPE: LatLon
Root.GRIDNAME: DC90x45-PC
Root.LM: 3
Root.IM_WORLD: 90
Root.JM_WORLD: 45
Root.POLE: 'PC'
Root.DATELINE: 'DC'

RUN_MODE: GenerateExports

EXPORT_STATE::
VAR1 , time , days , xy , c
::

FILL_DEF::
VAR1 time
::

REF_TIME: 20070927 000000
22 changes: 22 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/AGCM2.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
NX: 1
NY: 1

Root.GRID_TYPE: LatLon
Root.GRIDNAME: DC90x45-PC
Root.LM: 3
Root.IM_WORLD: 90
Root.JM_WORLD: 90
Root.POLE: 'PC'
Root.DATELINE: 'DC'

RUN_MODE: GenerateExports

EXPORT_STATE::
VAR1 , time , days , xy , c
::

FILL_DEF::
VAR1 time
::

REF_TIME: 20070927 000000
26 changes: 26 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/AGCM3.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
NX: 1
NY: 1

Root.GRID_TYPE: LatLon
Root.GRIDNAME: DC900x45-PC
Root.LM: 3
Root.IM_WORLD: 90
Root.JM_WORLD: 45
Root.POLE: 'PC'
Root.DATELINE: 'DC'

RUN_MODE: CompareImports

IMPORT_STATE::
VAR1 , time , days , xy , c
::

EXPORT_STATE::
VAR1 , time , days , xy , c
::

FILL_DEF::
VAR1 3.0
::

REF_TIME: 20080101 000000
5 changes: 5 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/CAP.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CASES::
CAP1.rc
CAP2.rc
CAP3.rc
::
8 changes: 8 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/CAP1.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ROOT_NAME: Root
ROOT_CF: AGCM1.rc
HIST_CF: HISTORY1.rc

BEG_DATE: 20070926 230000

JOB_SGMT: 00000004 000000
HEARTBEAT_DT: 3600
8 changes: 8 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/CAP2.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ROOT_NAME: Root
ROOT_CF: AGCM2.rc
HIST_CF: HISTORY2.rc

BEG_DATE: 20071001 210000

JOB_SGMT: 00000003 000000
HEARTBEAT_DT: 3600
9 changes: 9 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/CAP3.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ROOT_NAME: Root
ROOT_CF: AGCM3.rc
HIST_CF: HISTORY3.rc

BEG_DATE: 20070930 000000

JOB_SGMT: 00000001 120000
HEARTBEAT_DT: 3600

12 changes: 12 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/ExtData.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#CASE_SENSITIVE_VARIABLE_NAMES: .false.
Ext_AllowExtrap: .false.
Prefetch: .true.
DEBUG_LEVEL: 20

PrimaryExports%%
VAR2D NA 2008 N 0 none none VAR2D case1.nc4
%%


DerivedExports%%
%%
13 changes: 13 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/HISTORY1.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GRID_LABELS:
::

COLLECTIONS: case1
::

case1.template: '%y4%m2%d2.nc4',
case1.format: 'CFIO',
case1.frequency: 240000,
#case1.duration: 000000,
case1.ref_time: 000000,
case1.fields: 'VAR1', 'Root',
::
13 changes: 13 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/HISTORY2.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GRID_LABELS:
::

COLLECTIONS: case1
::

case1.template: '%y4%m2%d2.nc4',
case1.format: 'CFIO',
case1.frequency: 240000,
#case1.duration: 000000,
case1.ref_time: 000000,
case1.fields: 'VAR1', 'Root',
::
13 changes: 13 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/HISTORY3.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GRID_LABELS:
::

COLLECTIONS:
::

case2.template: 'nc4',
case2.format: 'CFIO',
case2.frequency: 240000,
case2.duration: 000000,
case2.ref_time: 000000,
case2.fields: 'VAR2D', 'Root',
::
1 change: 1 addition & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test multiple datasets where an export uses both with with no extrapolation outside and crosses transition date
12 changes: 12 additions & 0 deletions Tests/ExtData_Testing_Framework/test_cases/case37/extdata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Collections:
fstream1: {template: "case1.%y4%m2%d2.nc4", valid_range: "2007-09-22/2007-09-30"}
fstream2: {template: "case2.%y4%m2%d2.nc4", valid_range: "2007-10-01/2007-10-08"}

Samplings:
s1:
time_interpolation: False

Exports:
VAR1:
- {starting: "2007-09-22", variable: VAR1, collection: fstream1, sample: s1, fail_on_missing_file: false}
- {starting: "2007-10-01", variable: VAR1, collection: fstream2, sample: s1, fail_on_missing_file: false}
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ case33
case34
case35
case36
case37
58 changes: 46 additions & 12 deletions base/Base/Base_Base_implementation.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1557,11 +1557,24 @@ module subroutine MAPL_GRID_INTERIOR(GRID,I1,IN,J1,JN)
integer :: gridRank
integer, allocatable :: localDeToDeMap(:)
integer :: rc
logical :: isPresent
integer :: global_grid_info(10)

i1=-1
j1=-1
in=-1
jn=-1

call ESMF_AttributeGet(grid, name="GLOBAL_GRID_INFO", isPresent=isPresent, _RC)
if (isPresent) then
call ESMF_AttributeGet(grid, name="GLOBAL_GRID_INFO", valueList=global_grid_info, _RC)
I1 = global_grid_info(7)
IN = global_grid_info(8)
j1 = global_grid_info(9)
JN = global_grid_info(10)
_RETURN(_SUCCESS)
end if

call ESMF_GridGet (GRID, dimCount=gridRank, distGrid=distGrid, _RC)
call ESMF_DistGridGet(distGRID, delayout=layout, _RC)
call ESMF_DELayoutGet(layout, deCount = nDEs, localDeCount=localDeCount,_RC)
Expand Down Expand Up @@ -2138,6 +2151,24 @@ module subroutine MAPL_GridGetInterior(GRID,I1,IN,J1,JN)
integer :: deId
integer :: gridRank
integer :: rc
logical :: isPresent
integer :: global_grid_info(10)

i1=-1
j1=-1
in=-1
jn=-1

call ESMF_AttributeGet(grid, name="GLOBAL_GRID_INFO", isPresent=isPresent, _RC)
if (isPresent) then
call ESMF_AttributeGet(grid, name="GLOBAL_GRID_INFO", valueList=global_grid_info, _RC)
I1 = global_grid_info(7)
IN = global_grid_info(8)
j1 = global_grid_info(9)
JN = global_grid_info(10)
_RETURN(_SUCCESS)
end if


call ESMF_GridGet (GRID, dimCount=gridRank, distGrid=distGrid, _RC)
call ESMF_DistGridGet(distGRID, delayout=layout, _RC)
Expand Down Expand Up @@ -2627,9 +2658,7 @@ module subroutine MAPL_GetHorzIJIndex(npts,II,JJ,lon,lat,lonR8,latR8,Grid, rc)
tmp_lats = latR8
end if

!AOO change tusing GridType atribute if (im_world*6==jm_world) then
call ESMF_AttributeGet(grid, name='GridType', value=grid_type, _RC)
if(trim(grid_type) == "Cubed-Sphere") then
if (im_world*6==jm_world) then

call MAPL_GetGlobalHorzIJIndex(npts, II, JJ, lon=lon, lat=lat, lonR8=lonR8, latR8=latR8, Grid=Grid, _RC)

Expand Down Expand Up @@ -2868,28 +2897,33 @@ function grid_is_ok(grid) result(OK)
type(ESMF_Grid), intent(inout) :: grid
logical :: OK
integer :: I1, I2, J1, J2, j
real(ESMF_KIND_R8), pointer :: corner_lons(:,:), corner_lats(:,:)
real(ESMF_KIND_R8), allocatable :: corner_lons(:,:), corner_lats(:,:)
real(ESMF_KIND_R8), allocatable :: lonRe(:), latRe(:)
real(ESMF_KIND_R8), allocatable :: accurate_lat(:), accurate_lon(:)
real(ESMF_KIND_R8) :: stretch_factor, target_lon, target_lat, shift0
real :: tolerance
integer :: local_dims(3)

tolerance = epsilon(1.0)
call MAPL_GridGetInterior(grid,I1,I2,J1,J2)
call MAPL_GridGet(grid, localCellCountPerDim=local_dims, _RC)
OK = .true.
! check the edge of face 1 along longitude
call ESMF_GridGetCoord(grid,localDE=0,coordDim=1,staggerloc=ESMF_STAGGERLOC_CORNER, &
farrayPtr=corner_lons, rc=status)
call ESMF_GridGetCoord(grid,localDE=0,coordDim=2,staggerloc=ESMF_STAGGERLOC_CORNER, &
farrayPtr=corner_lats, rc=status)
!call ESMF_GridGetCoord(grid,localDE=0,coordDim=1,staggerloc=ESMF_STAGGERLOC_CORNER, &
! farrayPtr=corner_lons, _RC)
!call ESMF_GridGetCoord(grid,localDE=0,coordDim=2,staggerloc=ESMF_STAGGERLOC_CORNER, &
! farrayPtr=corner_lats, _RC)
allocate(corner_lons(local_dims(1)+1, local_dims(2)+1))
allocate(corner_lats(local_dims(1)+1, local_dims(2)+1))
call MAPL_GridGetCorners(grid, corner_lons, corner_lats, _RC)


if ( I1 == 1 .and. J1 == 1 ) then
allocate(lonRe(j2-j1+1), latRe(j2-j1+1))
call MAPL_Reverse_Schmidt(grid, stretched, J2-J1+1, lonR8=corner_lons(1,:), &
latR8=corner_lats(1,:), lonRe=lonRe, latRe=latRe, _RC)
allocate(lonRe(local_dims(2)), latRe(local_dims(2)))
call MAPL_Reverse_Schmidt(grid, stretched, local_dims(2), lonR8=corner_lons(1,1:local_dims(2)), &
latR8=corner_lats(1,1:local_dims(2)), lonRe=lonRe, latRe=latRe, _RC)

allocate(accurate_lon(j2-j1+1), accurate_lat(j2-j1+1))
allocate(accurate_lon(local_dims(2)), accurate_lat(local_dims(2)))

shift0 = shift
if (stretched) shift0 = 0
Expand Down
Loading
Loading