Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions src/Applications/GEOSctm_App/GEOSCTM.rc.tmpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# GEOS-CTM resource file, modeled after AGCM.rc
SimType: CTM
FeedBack_QV: .FALSE.

# Atmospheric Model Configuration Parameters
# ------------------------------------------
Expand Down Expand Up @@ -50,6 +51,7 @@ NUM_BACKEND_PES: @NUM_BACKEND_PES
ADJUST_DT: .FALSE.
CHEMISTRY_RUN_AT_INTERVAL_START: .TRUE.
CHEMISTRY_DT: @LONG_DT
GMICHEM_DT: @LONG_DT
GOCART_DT: @LONG_DT
HEMCO_DT: @LONG_DT
GF_DT: @LONG_DT
Expand Down
6 changes: 3 additions & 3 deletions src/Applications/GEOSctm_App/MERRA2_ExtData.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ Exports:
ZPBL: { variable: PBLH, collection: TAVG1_2D_FLX_NX, regrid: BILINEAR, sample: MERRA2.timestep }
PPBL: { variable: PBLTOP, collection: TAVG1_2D_SLV_NX, regrid: BILINEAR, sample: MERRA2.timestep }
ZLCL: { variable: ZLCL, collection: TAVG1_2D_SLV_NX, regrid: BILINEAR, sample: MERRA2.timestep }
PRECTOT: { variable: PRECTOTCORR, collection: TAVG1_2D_FLX_NX, regrid: BILINEAR, sample: MERRA2.timestep }
# PRECTOT: { variable: PRECTOTCORR, collection: TAVG1_2D_FLX_NX, regrid: BILINEAR, sample: MERRA2.timestep } incompatible with PRECCON
PRECTOT: { variable: PRECTOT, collection: TAVG1_2D_FLX_NX, regrid: BILINEAR, sample: MERRA2.timestep }
PRECCON: { variable: PRECCON, collection: TAVG1_2D_FLX_NX, regrid: BILINEAR, sample: MERRA2.timestep }
PRECANV: { variable: PRECANV, collection: TAVG1_2D_FLX_NX, regrid: BILINEAR, sample: MERRA2.timestep }
PRECLSC: { variable: PRECLSC, collection: TAVG1_2D_FLX_NX, regrid: BILINEAR, sample: MERRA2.timestep }
Expand Down Expand Up @@ -121,8 +122,7 @@ Exports:
DELP: { variable: DELP, collection: TAVG3_3D_CLD_NV, regrid: BILINEAR, sample: MERRA2.timestep }
QLTOT1: { variable: QL, collection: INST3_3D_ASM_NV, regrid: BILINEAR, sample: MERRA2.timestep_negoff }
QITOT1: { variable: QI, collection: INST3_3D_ASM_NV, regrid: BILINEAR, sample: MERRA2.timestep_negoff }
U: { variable: U, collection: INST3_3D_ASM_NV, regrid: BILINEAR, sample: MERRA2.timestep }
V: { variable: V, collection: INST3_3D_ASM_NV, regrid: BILINEAR, sample: MERRA2.timestep }
U;V: { variable: U;V, collection: INST3_3D_ASM_NV, regrid: BILINEAR, sample: MERRA2.timestep }
OMEGA: { variable: OMEGA, collection: TAVG3_3D_ASM_NV, regrid: BILINEAR, sample: MERRA2.timestep }
REV_AN: { variable: REEVAPLSAN, collection: TAVG3_3D_MST_NV, regrid: BILINEAR, sample: MERRA2.timestep }

Expand Down
38 changes: 26 additions & 12 deletions src/Applications/GEOSctm_App/README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
As of Apr 17, 2025:
As of September 2, 2025:

Requires modifications in these repo's:

Expand All @@ -14,14 +14,21 @@ Requires modifications in these repo's:

CHEM :
pushd src/Components/GEOSctm_GridComp/@GEOSchem_GridComp/
git merge remotes/origin/feature/mmanyin/lightning_update
git merge remotes/origin/feature/mmanyin/update_for_CTM
popd

GMI :
pushd src/Components/GEOSctm_GridComp/@GEOSchem_GridComp/@GMI
git merge remotes/origin/feature/mmanyin/august_ctm_edits
popd

TR will work w/ the default options in ctm_setup

ExtData2G is TRUE by default, using yaml files.
GEOS-CTM still is able to run with the old rc files, but be advised
that they likely will not be kept up-to-date.
There are problems with using ExtData1G in this context, and no efforts
will be put towards backwards compatibility, so please use ExtData2G.
NOTE: 1G had the ability to regrid vertically (e.g. 44 pressure levels -> 72 eta levels),
but 2G cannot do this.

Only the MERRA2 met-fields are fully supported at this time.

Expand All @@ -32,7 +39,7 @@ for the convenience of comparison with GCM. They are skipped
by the addition of simple 'goto' statements.

ChemEnv imports a few fields that are not available in the CTM context, so
NULL imports are quietly added in the run-script; search for
NULL imports are quietly added in the run-script; search the script for
'Until ChemEnv accounts for Imports'

GOCART includes the hard-coded filename "AGCM.rc" .
Expand All @@ -46,19 +53,26 @@ GMI:
GMI needs imports RI and RL for CloudJ. It requests the imports
even when it doesn't need them, so we compensate with NULL entries;
search the run-script for 'Until GMI accounts for Imports'
We need to decide if/how to run CloudJ in CTM.
A future release of GMI will handle RI and RL better.

GOCART
Currently when running the 'data' instances, DU and NI
are friendly to transport. This is a bug.
TR tracers can still run, but GMI will flag a problem
because the GMI-specific convection will fail to find
mw values. Apply GOCART PR #307 to fix.
GMI can supply aerosols; if this option is selected during setup,
optics filenames are appended to GEOSCTM.rc

GOCART
Currently when running the 'data' instances, DU and NI
are friendly to transport. This is a bug. Follow the instructions
at the top of this file to correct. Or apply GOCART PR #307.

TR
Don't run TR tracers at the same time as GMI; they will be problematic
because the GMI-specific convection will fail to find mw values.

HEMCO:
If GOCART2G is running, even if it's in DATA DRIVEN mode, HEMCO
still needs to be running the GOCART2G instance, because CHEM cannot tell
what mode GOCART2G is running in, so it adds a HEMCO->GOCART2G connectivity
whether it's needed or not.

Timestep-
Change the HEARTBEAT to 450 in CAP.rc, change *_DT to 450 in GEOSCTM.rc and
in MERRA2_ExtData.yaml.tmpl change PT15M to PT7M30S .
48 changes: 38 additions & 10 deletions src/Components/GEOSctm_GridComp/GEOS_ctmEnvGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,16 @@ subroutine SetServices ( GC, RC )
VLOCATION = MAPL_VLocationCenter, __RC__ )
END IF

IF ( (TRIM(state%metType) == 'MERRA2') .OR. &
(TRIM(state%metType) == 'MERRA1') ) THEN
call MAPL_AddImportSpec(GC, &
SHORT_NAME = 'DQRC', &
LONG_NAME = 'convective_rainwater_source', &
UNITS = 'kg/kg/s', &
DIMS = MAPL_DimsHorzVert, &
VLOCATION = MAPL_VLocationCenter, __RC__ )
END IF

! Only doing the Imports if we are not doing Idealized Passive Tracer
!----------------------------------------------------------
IF (.NOT. state%enable_pTracers) THEN
Expand Down Expand Up @@ -805,6 +815,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
real, pointer, dimension(:,:,:) :: QLTOT => null()
real, pointer, dimension(:,:,:) :: QITOT1 => null()
real, pointer, dimension(:,:,:) :: QLTOT1 => null()
real, pointer, dimension(:,:,:) :: DQRC => null()
real, pointer, dimension(:,:) :: cellArea => null()
real, pointer, dimension(:,:) :: PS0 => null()
real, pointer, dimension(:,:) :: PS1 => null()
Expand Down Expand Up @@ -1069,7 +1080,7 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
! ---------------------------------------
call derive_AIRDENS_MASS()

IF (.NOT. CTMenv_STATE%enable_pTracers) THEN
! IF (.NOT. CTMenv_STATE%enable_pTracers) THEN

IF (ASSOCIATED(UC0)) THEN
call MAPL_GetPointer ( EXPORT, Uexp, 'U', ALLOC=.TRUE., __RC__ )
Expand All @@ -1096,6 +1107,8 @@ subroutine Run ( GC, IMPORT, EXPORT, CLOCK, RC )
!-------------------------------------------
call derive_CNV_QC()

IF (.NOT. CTMenv_STATE%enable_pTracers) THEN

!----------------
! Vegetation Type
!----------------
Expand Down Expand Up @@ -1316,18 +1329,33 @@ end subroutine derive_QCTOT
!-------------------------------------------------------
!
subroutine derive_CNV_QC()
! Expected: QCTOT derived in derive_QCTOT
! Imports: QITOT1, QLTOT1

! This was in effect until May 2025
! It appears to be Total Condensate Increment
! ! Expected: QCTOT derived in derive_QCTOT
! ! Imports: QITOT1, QLTOT1
! ! Exports: CNV_QC
! call MAPL_GetPointer ( IMPORT, QITOT1, 'QITOT1', __RC__ )
! call MAPL_GetPointer ( IMPORT, QLTOT1, 'QLTOT1', __RC__ )
! IF (ASSOCIATED(QCTOT) .AND. ASSOCIATED(QLTOT1) .AND. ASSOCIATED(QITOT1) ) THEN
! call MAPL_GetPointer ( EXPORT, CNV_QC, 'CNV_QC', ALLOC=.TRUE., __RC__ )
! CNV_QC(:,:,:) = QCTOT(:,:,:) - ( QLTOT1(:,:,:) + QITOT1(:,:,:) )

! WHERE ( CNV_QC(:,:,:) < 0.0 ) CNV_QC(:,:,:) = 0.0
! CNV_QC(:,:,:) = CNV_QC(:,:,:) *(DT/(30.0*SecondsPerMinute))
! ENDIF

! Imports: DQRC
! Exports: CNV_QC
call MAPL_GetPointer ( IMPORT, QITOT1, 'QITOT1', __RC__ )
call MAPL_GetPointer ( IMPORT, QLTOT1, 'QLTOT1', __RC__ )
IF (ASSOCIATED(QITOT) .AND. ASSOCIATED(QLTOT1) .AND. ASSOCIATED(QITOT1) ) THEN
call MAPL_GetPointer ( IMPORT, DQRC, 'DQRC', __RC__ )
IF (ASSOCIATED(DQRC)) THEN
call MAPL_GetPointer ( EXPORT, CNV_QC, 'CNV_QC', ALLOC=.TRUE., __RC__ )
CNV_QC(:,:,:) = QCTOT(:,:,:) - ( QLTOT1(:,:,:) + QITOT1(:,:,:) )

WHERE ( CNV_QC(:,:,:) < 0.0 ) CNV_QC(:,:,:) = 0.0
CNV_QC(:,:,:) = CNV_QC(:,:,:) *(DT/(30.0*SecondsPerMinute))
CNV_QC(:,:,:) = DQRC(:,:,:) * 68006.5 ! an approximate scaling - manyin 5.2.25
ELSE
status=99
_VERIFY(status)
ENDIF

end subroutine derive_CNV_QC
!
!-------------------------------------------------------
Expand Down
4 changes: 0 additions & 4 deletions src/Components/GEOSctm_GridComp/GEOS_ctmGridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,6 @@ subroutine SetServices ( GC, RC )
IF ((TRIM(state%metType) == "F515_516") .OR. &
(TRIM(state%metType) == "F5131")) state%metType = "FP"

! Turn Convection on for any Chemistry configuration
IF (.NOT. state%enable_pTracers) THEN
state%do_ctmConvection = .TRUE.
ENDIF

IF ( MAPL_am_I_root() ) THEN
PRINT*
Expand Down