Skip to content

Commit 4689e6a

Browse files
authored
Merge pull request #717 from GEOS-ESM/develop
Sync develop into main
2 parents 377221d + d4775d5 commit 4689e6a

File tree

86 files changed

+5011
-1485
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+5011
-1485
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSgwd_GridComp/GEOS_GwdGridComp.F90

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -711,11 +711,6 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
711711
real :: bgstressmax
712712
real, pointer, dimension(:,:) :: LATS
713713

714-
character(len=ESMF_MAXSTR) :: GRIDNAME
715-
character(len=4) :: imchar
716-
character(len=2) :: dateline
717-
integer :: imsize,nn
718-
719714
! Rayleigh friction parameters
720715

721716
REAL :: H0, HH, Z1, TAU1
@@ -752,16 +747,6 @@ subroutine RUN ( GC, IMPORT, EXPORT, CLOCK, RC )
752747
RC=STATUS )
753748
VERIFY_(STATUS)
754749

755-
! Get grid name to determine IMSIZE
756-
call MAPL_GetResource(MAPL,GRIDNAME,'AGCM_GRIDNAME:', RC=STATUS)
757-
VERIFY_(STATUS)
758-
GRIDNAME = AdjustL(GRIDNAME)
759-
nn = len_trim(GRIDNAME)
760-
dateline = GRIDNAME(nn-1:nn)
761-
imchar = GRIDNAME(3:index(GRIDNAME,'x')-1)
762-
read(imchar,*) imsize
763-
if(dateline.eq.'CF') imsize = imsize*4
764-
765750
! Gravity wave drag
766751
! -----------------
767752

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOS_SurfaceGridComp.F90

Lines changed: 538 additions & 1 deletion
Large diffs are not rendered by default.

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set (alldirs
66
GEOScatchCN_GridComp
77
GEOSlana_GridComp
88
GEOSroute_GridComp
9+
GEOSigni_GridComp
910
)
1011

1112
esma_add_library (${this}

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOS_LandGridComp.F90

Lines changed: 71 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
module GEOS_LandGridCompMod
55

66
!BOP
7-
! !MODULE: GEOS_LandGridCompMod -- A Module to combine VegDyn and Catch Gridded Components
7+
! !MODULE: GEOS_LandGridCompMod -- A Module to combine VegDyn and Catch, and Igni Gridded Components
88

99
! !DESCRIPTION: This gridded component operates on the land tiles as
1010
! as child of GEOS\_SurfaceGridComp. The core functionality is the
@@ -30,6 +30,7 @@ module GEOS_LandGridCompMod
3030
use GEOS_VegdynGridCompMod, only : VegdynSetServices => SetServices
3131
use GEOS_CatchGridCompMod, only : CatchSetServices => SetServices
3232
use GEOS_CatchCNGridCompMod, only : CatchCNSetServices => SetServices
33+
use GEOS_IgniGridCompMod, only : IgniSetServices => SetServices
3334
! use GEOS_RouteGridCompMod, only : RouteSetServices => SetServices
3435

3536
implicit none
@@ -45,7 +46,9 @@ module GEOS_LandGridCompMod
4546

4647
integer :: VEGDYN
4748
integer, allocatable :: CATCH(:), ROUTE (:), CATCHCN (:)
48-
INTEGER :: LSM_CHOICE, RUN_ROUTE, DO_GOSWIM
49+
integer :: LSM_CHOICE, RUN_ROUTE, DO_GOSWIM
50+
integer :: IGNI
51+
logical :: DO_FIRE_DANGER
4952

5053
contains
5154

@@ -153,6 +156,7 @@ subroutine SetServices ( GC, RC )
153156
call ESMF_ConfigLoadFile(SCF,SURFRC,rc=status) ; VERIFY_(STATUS)
154157
call MAPL_GetResource (SCF, RUN_ROUTE, label='RUN_ROUTE:', DEFAULT=0, __RC__ )
155158
call MAPL_GetResource (SCF, DO_GOSWIM, label='N_CONST_LAND4SNWALB:', DEFAULT=0, __RC__ )
159+
call MAPL_GetResource (SCF, DO_FIRE_DANGER, label='FIRE_DANGER:', DEFAULT=.false., __RC__ )
156160
call ESMF_ConfigDestroy (SCF, __RC__)
157161

158162
SELECT CASE (LSM_CHOICE)
@@ -204,7 +208,14 @@ subroutine SetServices ( GC, RC )
204208
! end do
205209
! end if
206210
! ENDIF
207-
211+
212+
if (DO_FIRE_DANGER) then
213+
IGNI = MAPL_AddChild(GC, NAME='IGNI'//trim(tmp), SS=IgniSetServices, RC=STATUS)
214+
VERIFY_(STATUS)
215+
else
216+
IGNI = -1
217+
end if
218+
208219
!BOS
209220

210221
!------------------------------------------------------------
@@ -1343,6 +1354,37 @@ subroutine SetServices ( GC, RC )
13431354
! VERIFY_(STATUS)
13441355
! ENDIF
13451356

1357+
1358+
if (DO_FIRE_DANGER) then
1359+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'FFMC', CHILD_ID = IGNI, __RC__ )
1360+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'GFMC', CHILD_ID = IGNI, __RC__ )
1361+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'DMC', CHILD_ID = IGNI, __RC__ )
1362+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'DC', CHILD_ID = IGNI, __RC__ )
1363+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'ISI', CHILD_ID = IGNI, __RC__ )
1364+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'BUI', CHILD_ID = IGNI, __RC__ )
1365+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'FWI', CHILD_ID = IGNI, __RC__ )
1366+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'DSR', CHILD_ID = IGNI, __RC__ )
1367+
1368+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'FFMC_DAILY', CHILD_ID = IGNI, __RC__ )
1369+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'DMC_DAILY', CHILD_ID = IGNI, __RC__ )
1370+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'DC_DAILY', CHILD_ID = IGNI, __RC__ )
1371+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'ISI_DAILY', CHILD_ID = IGNI, __RC__ )
1372+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'BUI_DAILY', CHILD_ID = IGNI, __RC__ )
1373+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'FWI_DAILY', CHILD_ID = IGNI, __RC__ )
1374+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'DSR_DAILY', CHILD_ID = IGNI, __RC__ )
1375+
1376+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'FFMC_DAILY_', CHILD_ID = IGNI, __RC__ )
1377+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'DMC_DAILY_', CHILD_ID = IGNI, __RC__ )
1378+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'DC_DAILY_', CHILD_ID = IGNI, __RC__ )
1379+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'ISI_DAILY_', CHILD_ID = IGNI, __RC__ )
1380+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'BUI_DAILY_', CHILD_ID = IGNI, __RC__ )
1381+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'FWI_DAILY_', CHILD_ID = IGNI, __RC__ )
1382+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'DSR_DAILY_', CHILD_ID = IGNI, __RC__ )
1383+
1384+
call MAPL_AddExportSpec ( GC, SHORT_NAME = 'VPD', CHILD_ID = IGNI, __RC__ )
1385+
end if
1386+
1387+
13461388
!EOS
13471389

13481390
!------------------------------------------------------------
@@ -1367,6 +1409,19 @@ subroutine SetServices ( GC, RC )
13671409
RC=STATUS )
13681410
VERIFY_(STATUS)
13691411

1412+
if (DO_FIRE_DANGER) then
1413+
call MAPL_AddConnectivity ( &
1414+
GC, &
1415+
SHORT_NAME = (/ 'MOT2M ', 'MOQ2M ', &
1416+
'MOU10M ', 'MOV10M ', &
1417+
'PRLAND ', 'SWDOWNLAND', &
1418+
'ASNOW ', 'SNOWDP ' /), &
1419+
DST_ID = IGNI, &
1420+
SRC_ID = CATCH(I), &
1421+
RC = STATUS )
1422+
VERIFY_(STATUS)
1423+
end if
1424+
13701425
! IF(RUN_ROUTE == 1) THEN
13711426
! call MAPL_AddConnectivity ( &
13721427
! GC ,&
@@ -1387,6 +1442,19 @@ subroutine SetServices ( GC, RC )
13871442
SRC_ID = VEGDYN , &
13881443
RC=STATUS )
13891444

1445+
if (DO_FIRE_DANGER) then
1446+
call MAPL_AddConnectivity ( &
1447+
GC, &
1448+
SHORT_NAME = (/ 'MOT2M ', 'MOQ2M ', &
1449+
'MOU10M ', 'MOV10M ', &
1450+
'PRLAND ', 'SWDOWNLAND', &
1451+
'ASNOW ', 'SNOWDP ' /), &
1452+
DST_ID = IGNI, &
1453+
SRC_ID = CATCHCN(I), &
1454+
RC = STATUS )
1455+
VERIFY_(STATUS)
1456+
end if
1457+
13901458
! IF(RUN_ROUTE == 1) THEN
13911459
! call MAPL_AddConnectivity ( &
13921460
! GC ,&

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM40_GridComp/CLM40/clm_varpar.F90

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ module clm_varpar
99
! Module containing CLM parameters
1010
!
1111
! !USES:
12+
13+
use clm_varpar_shared, only : VAR_COL =>VAR_COL_40, VAR_PFT => VAR_PFT_40, &
14+
numpft => numpft_CN, NUM_ZON => NUM_ZON_CN, &
15+
NUM_VEG => NUM_VEG_CN
16+
1217
!
1318
! !PUBLIC TYPES:
1419
implicit none
@@ -23,7 +28,6 @@ module clm_varpar
2328
! Define indices used in surface file read
2429
! maxpatch_pft = max number of plant functional types in naturally vegetated landunit
2530

26-
integer, parameter :: numpft = 19 ! actual # of pfts (without bare)
2731
integer :: maxpatch_pft
2832

2933
! clm_varpar_init seems to do something similar; less prone to error to move
@@ -39,10 +43,6 @@ module clm_varpar
3943
! CatchCN parameters
4044
! ------------------
4145

42-
integer, parameter, PUBLIC :: NUM_ZON=3 ! number of CN hydrology zones per tile
43-
integer, parameter, PUBLIC :: NUM_VEG=4 ! number of CN PFTs per zone
44-
integer, parameter, PUBLIC :: VAR_COL=40 ! number of CN column restart variables
45-
integer, parameter, PUBLIC :: VAR_PFT=74 ! number of CN PFT variables per column
4646
real, parameter, PUBLIC, dimension(NUM_ZON) :: CN_zone_weight = (/0.10,0.45,0.45/) ! gkw: tunable; must sum to 1
4747
integer, parameter, PUBLIC :: map_cat(0:numpft) = (/4,3,3,3,1,1,2,2,2,5,5,5,6,4,4,4,4,4,4,4/) ! gkw: 0 -> 6, since 8 now gone
4848

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM40_GridComp/GEOS_CatchCNCLM40GridComp.F90

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5167,13 +5167,10 @@ subroutine Driver ( RC )
51675167
! Variables for FPAR
51685168
! --------------------------
51695169
real , allocatable, dimension (:,:) :: parzone
5170+
character(len=ESMF_MAXSTR) :: Co2_CycleFile
51705171

51715172
IAm=trim(COMP_NAME)//"::RUN2::Driver"
51725173

5173-
! Begin
5174-
5175-
IAm=trim(COMP_NAME)//"Driver"
5176-
51775174
! --------------------------------------------------------------------------
51785175
! Get time step from configuration
51795176
! --------------------------------------------------------------------------
@@ -5656,7 +5653,11 @@ subroutine Driver ( RC )
56565653
call MPI_Info_create(info, STATUS); VERIFY_(status)
56575654
call MPI_Info_set(info, "romio_cb_read", "automatic", STATUS); VERIFY_(status)
56585655

5659-
STATUS = NF_OPEN ('CO2_MonthlyMean_DiurnalCycle.nc4', NF_NOWRITE, CTfile); VERIFY_(status)
5656+
call MAPL_GetResource (MAPL, CO2_CycleFile, label = 'CO2_MonthlyMean_DiurnalCycle_FILE:', &
5657+
default = 'CO2_MonthlyMean_DiurnalCycle.nc4', RC=STATUS )
5658+
VERIFY_(STATUS)
5659+
5660+
STATUS = NF_OPEN (trim(CO2_CycleFile), NF_NOWRITE, CTfile); VERIFY_(status)
56605661

56615662
allocate (CT_CO2V (1: NUNQ, 1:12, 1:8))
56625663
allocate (CTCO2_TMP (1:CT_grid_N_lon, 1:CT_grid_N_lat, 1:12, 1:8))

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM45_GridComp/CLM45/clm_varpar.F90

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ module clm_varpar
1010
!
1111
! !USES:
1212
!
13+
use clm_varpar_shared, only : VAR_COL =>VAR_COL_45, VAR_PFT => VAR_PFT_45, &
14+
numpft => numpft_CN, NUM_ZON => NUM_ZON_CN, &
15+
NUM_VEG => NUM_VEG_CN
1316
! !PUBLIC TYPES:
1417
implicit none
1518
save
@@ -26,7 +29,6 @@ module clm_varpar
2629
! Define indices used in surface file read
2730
! maxpatch_pft = max number of plant functional types in naturally vegetated landunit
2831

29-
integer, parameter :: numpft = 19 ! actual # of pfts (without bare), same as in Catchment-CN.clm4
3032
integer :: maxpatch_pft
3133

3234
! clm_varpar_init seems to do something similar; less prone to error to move
@@ -85,10 +87,6 @@ module clm_varpar
8587
! 8: DESERT => 0
8688
! 9: ICE => n/a
8789

88-
integer, parameter, PUBLIC :: NUM_ZON=3 ! number of CN hydrology zones per tile
89-
integer, parameter, PUBLIC :: NUM_VEG=4 ! number of CN PFTs per zone
90-
integer, parameter, PUBLIC :: VAR_COL=35 ! number of CN column restart variables
91-
integer, parameter, PUBLIC :: VAR_PFT=75 ! number of CN PFT variables per column
9290
real, parameter, PUBLIC, dimension(NUM_ZON) :: CN_zone_weight = (/0.10,0.45,0.45/) ! gkw: tunable; must sum to 1
9391
integer, parameter, PUBLIC :: map_cat(0:numpft) = (/4,3,3,3,1,1,2,2,2,5,5,5,6,4,4,4,4,4,4,4/)
9492

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/GEOScatchCNCLM45_GridComp/GEOS_CatchCNCLM45GridComp.F90

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5115,7 +5115,7 @@ subroutine Driver ( RC )
51155115
real, allocatable, dimension(:,:,:) :: pft
51165116

51175117
real, allocatable, dimension(:) :: lnfm
5118-
character(len=ESMF_MAXSTR) :: LNFMFile
5118+
character(len=ESMF_MAXSTR) :: LNFMFile, CO2_CycleFile
51195119

51205120
integer :: ntile, nv, dpy, ierr, iok, ndt
51215121
integer, save :: year_prev = -9999
@@ -5653,7 +5653,9 @@ subroutine Driver ( RC )
56535653
call MPI_Info_create(info, STATUS); VERIFY_(status)
56545654
call MPI_Info_set(info, "romio_cb_read", "automatic", STATUS); VERIFY_(status)
56555655

5656-
STATUS = NF_OPEN ('CO2_MonthlyMean_DiurnalCycle.nc4', NF_NOWRITE, CTfile); VERIFY_(status)
5656+
call MAPL_GetResource (MAPL, CO2_CycleFile, label = 'CO2_MonthlyMean_DiurnalCycle_FILE:', default = 'CO2_MonthlyMean_DiurnalCycle.nc4', RC=STATUS )
5657+
VERIFY_(STATUS)
5658+
STATUS = NF_OPEN (trim(CO2_CycleFile), NF_NOWRITE, CTfile); VERIFY_(status)
56575659

56585660
allocate (CT_CO2V (1: NUNQ, 1:12, 1:8))
56595661
allocate (CTCO2_TMP (1:CT_grid_N_lon, 1:CT_grid_N_lat, 1:12, 1:8))

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatchCN_GridComp/Shared/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ esma_set_this(OVERRIDE GEOS_CatchCNShared)
33
set (srcs
44
nanMod.F90
55
catchmentCN.F90
6-
catchcn_iau.F90)
6+
catchcn_iau.F90
7+
clm_varpar_shared.F90)
78

89
esma_add_library (${this}
910
SRCS ${srcs}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module clm_varpar_shared
2+
3+
!-----------------------------------------------------------------------
4+
!BOP
5+
!
6+
! !MODULE: clm_varpar_shared
7+
!
8+
! !DESCRIPTION:
9+
! Module containing CLM parameters
10+
!
11+
! !USES:
12+
!
13+
! !PUBLIC TYPES:
14+
implicit none
15+
save
16+
!
17+
! Define number of levels
18+
19+
integer, parameter :: numpft_CN = 19 ! actual # of pfts (without bare), same as in Catchment-CN.clm4
20+
21+
integer, parameter, PUBLIC :: NUM_ZON_CN=3 ! number of CN hydrology zones per tile
22+
integer, parameter, PUBLIC :: NUM_VEG_CN=4 ! number of CN PFTs per zone
23+
integer, parameter, PUBLIC :: VAR_COL_40=40 ! number of CN column restart variables
24+
integer, parameter, PUBLIC :: VAR_PFT_40=74 ! number of CN PFT variables per column
25+
integer, parameter, PUBLIC :: VAR_COL_45=35 ! number of CN column restart variables
26+
integer, parameter, PUBLIC :: VAR_PFT_45=75 ! number of CN PFT variables per column
27+
28+
!------------------------------------------------------------------------------
29+
end module clm_varpar_shared

0 commit comments

Comments
 (0)