Skip to content

Commit 18cbe07

Browse files
authored
Merge pull request #1183 from GEOS-ESM/feature/pchakrab/grid-get-coord
Update to use MAPL_GridGetCoordinates to retrieve lats and lons
2 parents a41a330 + 3087d5e commit 18cbe07

File tree

4 files changed

+20
-10
lines changed

4 files changed

+20
-10
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ workflows:
2121
#baselibs_version: *baselibs_version
2222
repo: GEOSgcm
2323
checkout_fixture: true
24-
mepodevelop: true
25-
checkout_mapl3_release_branch: true
26-
persist_workspace: true # Needs to be true to run fv3/gcm experiment, costs extra
24+
mepodevelop: false
25+
fixture_branch: release/MAPL-v3
26+
persist_workspace: false # Needs to be true to run fv3/gcm experiment, costs extra
2727

2828
######################################################
2929
# # Run AMIP GCM (1 hour, no ExtData) #

.github/workflows/push-to-develop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
uses: actions/checkout@v5
1515
with:
1616
fetch-depth: 0
17+
filter: blob:none
1718
- name: Run the action
1819
uses: devops-infra/[email protected]
1920
with:

.github/workflows/workflow.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,19 @@ jobs:
1919
build_gcm:
2020
strategy:
2121
matrix:
22-
compiler: [ifort, gfortran-14, gfortran-15]
22+
#compiler: [ifort, gfortran-14, gfortran-15]
23+
# We remove ifort because for some reason, MAPL3 + ifort + Github CI
24+
# is running out of space on the device. For now, CircleCI will
25+
# continue to test ifort.
26+
compiler: [gfortran-14, gfortran-15]
2327
build-type: [Debug]
2428
uses: GEOS-ESM/CI-workflows/.github/workflows/geosgcm_build_tests.yml@project/geosgcm
2529
with:
2630
compiler: ${{ matrix.compiler }}
2731
cmake-build-type: ${{ matrix.build-type }}
2832
fixture-repo: GEOS-ESM/GEOSgcm
2933
fixture-ref: release/MAPL-v3
34+
run-mepo-develop: false
3035

3136
spack_build:
3237
uses: GEOS-ESM/CI-workflows/.github/workflows/spack_gcc_build.yml@project/geosgcm
@@ -36,3 +41,5 @@ jobs:
3641
with:
3742
fixture-repo: GEOS-ESM/GEOSgcm
3843
fixture-ref: release/MAPL-v3
44+
run-mepo-develop: false
45+
patch-esmf: true

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSgwd_GridComp/GEOS_GwdGridComp.F90

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module GEOS_GwdGridCompMod
4848
use mapl3g_RestartModes, only: MAPL_RESTART_SKIP
4949
use mapl3g_VerticalStaggerLoc, only: VERTICAL_STAGGER_NONE, VERTICAL_STAGGER_CENTER, VERTICAL_STAGGER_EDGE
5050
use mapl3g_UngriddedDims, only: UngriddedDims
51-
use mapl3g_Geom_API, only: MAPL_GridGet
51+
use mapl3g_Geom_API, only: MAPL_GridGet, MAPL_GridGetCoordinates
5252
use mapl3g_State_API, only: MAPL_StateGetPointer
5353
use mapl3g_UngriddedDim, only: UngriddedDim
5454

@@ -225,8 +225,8 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC )
225225
! Local derived type aliases
226226

227227
type(ESMF_Grid) :: grid
228-
integer :: IM, JM !, dims_(3)
229-
real, pointer, dimension(:,:) :: LATS
228+
integer :: IM, JM !, dims_(3)
229+
real, allocatable :: lats(:,:), lons(:,:)
230230

231231
character(len=:), allocatable :: GRIDNAME
232232
character(len=4) :: imchar
@@ -284,7 +284,8 @@ subroutine Initialize ( GC, IMPORT, EXPORT, CLOCK, RC )
284284

285285
! Grid info
286286
call MAPL_GridCompGet(gc, grid=grid, num_levels=LM, _RC)
287-
call MAPL_GridGet(grid, im=IM, jm=JM, latitudes=lats, _RC)
287+
call MAPL_GridGet(grid, im=IM, jm=JM, _RC)
288+
call MAPL_GridGetCoordinates(grid, latitudes=lats, longitudes=lons, _RC)
288289

289290
! Get grid name to determine IMSIZE
290291
call MAPL_GridCompGetResource(gc, 'AGCM.GRIDNAME', GRIDNAME, _RC)
@@ -461,7 +462,7 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
461462
!real :: effgworo, effgwbkg
462463
!real :: CDMBGWD1, CDMBGWD2
463464
!real :: bgstressmax
464-
real, pointer, dimension(:,:) :: LATS
465+
real, allocatable, dimension(:,:) :: LATS, LONS
465466
! Rayleigh friction parameters
466467

467468
REAL :: H0, HH, Z1, TAU1
@@ -499,7 +500,8 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
499500

500501
! Grid info
501502
call MAPL_GridCompGet(gc, grid=grid, num_levels=LM, _RC)
502-
call MAPL_GridGet(grid, im=IM, jm=JM, latitudes=lats, _RC)
503+
call MAPL_GridGet(grid, im=IM, jm=JM, _RC)
504+
call MAPL_GridGetCoordinates(grid, latitudes=lats, longitudes=lons, _RC)
503505

504506
! call ESMF_ClockGetAlarm(clock,
505507

0 commit comments

Comments
 (0)