Skip to content

Commit bbed61e

Browse files
sdrabenhmathomp4acollowatrayanowmputman
authored
Merge changes from GCMv12-rc15 into develop (#321)
Co-authored-by: Matthew Thompson <matthew.thompson@nasa.gov> Co-authored-by: acollow <allison.collow@nasa.gov> Co-authored-by: Atanas Trayanov <atanas.l.trayanov@nasa.gov> Co-authored-by: William Putman <William.M.Putman@nasa.gov>
1 parent a6f21b2 commit bbed61e

File tree

17 files changed

+424
-141
lines changed

17 files changed

+424
-141
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
- The pressure lid change associated with the introduction of run0 to set 0 above the lid
15+
- Fwet value in dust modified from 0.8 to 1.0
16+
- Dust and Sea salt Emission scale factors updated for L181
17+
- Several changes in the DT alarm logic
18+
- GOCART reference time removed in `GOCART2G_GridCompMod.F90`
19+
- Heartbeat time step removed and `timeToWork` logical added
20+
1421
### Fixed
1522

1623
### Added

ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90

Lines changed: 73 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ subroutine SetServices (GC, RC)
200200
call MAPL_GridCompSetEntryPoint (GC, ESMF_Method_Run, Run, __RC__)
201201
if (data_driven .neqv. .true.) then
202202
call MAPL_GridCompSetEntryPoint (GC, ESMF_Method_Run, Run2, __RC__)
203+
call MAPL_GridCompSetEntryPoint (GC, ESMF_METHOD_RUN, Run0, __RC__)
203204
end if
204205

205206
DEFVAL = 0.0
@@ -385,10 +386,8 @@ subroutine Initialize (GC, import, export, clock, RC)
385386
type (ESMF_Field) :: field, fld
386387
character (len=ESMF_MAXSTR) :: prefix, GCsuffix, diurnal_bb, bin_index
387388
character (len=ESMF_MAXSTR),allocatable :: aerosol_names(:)
388-
real, pointer, dimension(:,:,:) :: int_ptr
389389
real :: CDT ! chemistry timestep (secs)
390390
integer :: HDT ! model timestep (secs)
391-
real, pointer, dimension(:,:,:) :: ple
392391
logical :: data_driven
393392
logical :: bands_are_present
394393
integer, allocatable, dimension(:) :: channels_
@@ -433,7 +432,7 @@ subroutine Initialize (GC, import, export, clock, RC)
433432
! Get DTs
434433
! -------
435434
call MAPL_GetResource(mapl, HDT, Label='RUN_DT:', __RC__)
436-
call MAPL_GetResource(mapl, CDT, Label='GOCART_DT:', default=real(HDT), __RC__)
435+
call MAPL_GetResource(mapl, CDT, Label='GOCART2G_DT:', default=real(HDT), __RC__)
437436
self%CDT = CDT
438437

439438
! Check whether to de-activate diurnal biomass burning (default is *on*)
@@ -492,24 +491,11 @@ subroutine Initialize (GC, import, export, clock, RC)
492491
fld = MAPL_FieldCreate (field, trim(comp_name)//'phobic', __RC__)
493492
call MAPL_StateAdd (aero, fld, __RC__)
494493

495-
! Set internal CAphobic values to 0 where above klid
496-
call MAPL_GetPointer (internal, int_ptr, trim(comp_name)//'phobic', __RC__)
497-
call setZeroKlid(self%km, self%klid, int_ptr)
498-
499494
call ESMF_StateGet (internal, trim(comp_name)//'philic', field, __RC__)
500495
call ESMF_AttributeSet (field, NAME='ScavengingFractionPerKm', VALUE=self%fscav(2), __RC__)
501496
fld = MAPL_FieldCreate (field, trim(comp_name)//'philic', __RC__)
502497
call MAPL_StateAdd (aero, fld, __RC__)
503498

504-
if (.not. data_driven) then
505-
! Set klid
506-
call MAPL_GetPointer(import, ple, 'PLE', __RC__)
507-
call findKlid (self%klid, self%plid, ple, __RC__)
508-
! Set internal CAphilic values to 0 where above klid
509-
call MAPL_GetPointer (internal, int_ptr, trim(comp_name)//'philic', __RC__)
510-
call setZeroKlid(self%km, self%klid, int_ptr)
511-
end if
512-
513499
if (data_driven) then
514500
instance = instanceData
515501

@@ -607,7 +593,71 @@ subroutine Initialize (GC, import, export, clock, RC)
607593
end subroutine Initialize
608594

609595
!============================================================================
596+
!BOP
597+
! !IROUTINE: Run0
598+
599+
! !INTERFACE:
600+
subroutine Run0 (GC, import, export, clock, RC)
601+
602+
! !ARGUMENTS:
603+
type (ESMF_GridComp), intent(inout) :: GC ! Gridded component
604+
type (ESMF_State), intent(inout) :: import ! Import state
605+
type (ESMF_State), intent(inout) :: export ! Export state
606+
type (ESMF_Clock), intent(inout) :: clock ! The clock
607+
integer, optional, intent( out) :: RC ! Error code:
608+
609+
! !DESCRIPTION: Clears klid to 0.0 for Carbon
610+
611+
!EOP
612+
!============================================================================
613+
! Locals
614+
character (len=ESMF_MAXSTR) :: COMP_NAME
615+
type (MAPL_MetaComp), pointer :: MAPL
616+
type (ESMF_State) :: internal
617+
type (wrap_) :: wrap
618+
type (CA2G_GridComp), pointer :: self
619+
real, pointer, dimension(:,:,:) :: intPtr_phobic, intPtr_philic
620+
real, pointer, dimension(:,:,:) :: ple
621+
622+
__Iam__('Run0')
623+
624+
!*****************************************************************************
625+
! Begin...
610626

627+
! Get my name and set-up traceback handle
628+
! ---------------------------------------
629+
call ESMF_GridCompGet (GC, NAME=COMP_NAME, __RC__)
630+
Iam = trim(COMP_NAME) // '::' // Iam
631+
632+
! Get my internal MAPL_Generic state
633+
! -----------------------------------
634+
call MAPL_GetObjectFromGC (GC, MAPL, __RC__)
635+
636+
! Get parameters from generic state.
637+
! -----------------------------------
638+
call MAPL_Get (MAPL, INTERNAL_ESMF_STATE=internal, __RC__)
639+
640+
call MAPL_GetPointer (internal, intPtr_phobic, trim(comp_name)//'phobic', __RC__)
641+
call MAPL_GetPointer (internal, intPtr_philic, trim(comp_name)//'philic', __RC__)
642+
643+
! Get my private internal state
644+
! ------------------------------
645+
call ESMF_UserCompGetInternalState(GC, 'CA2G_GridComp', wrap, STATUS)
646+
VERIFY_(STATUS)
647+
self => wrap%ptr
648+
649+
! Set klid and Set internal values to 0 above klid
650+
! ---------------------------------------------------
651+
call MAPL_GetPointer(import, ple, 'PLE', __RC__)
652+
call findKlid (self%klid, self%plid, ple, __RC__)
653+
call setZeroKlid (self%km, self%klid, intPtr_phobic)
654+
call setZeroKlid (self%km, self%klid, intPtr_philic)
655+
656+
RETURN_(ESMF_SUCCESS)
657+
658+
end subroutine Run0
659+
660+
!============================================================================
611661
!BOP
612662
! !IROUTINE: Run
613663

@@ -621,7 +671,7 @@ subroutine Run (GC, import, export, clock, rc)
621671
type (ESMF_Clock), intent(inout) :: clock ! The clock
622672
integer, optional, intent( out) :: rc ! Error code:
623673

624-
! !DESCRIPTION: Run method for the Sea Salt Grid Component. Determines whether to run
674+
! !DESCRIPTION: Run method for the Carbon Grid Component. Determines whether to run
625675
! data or computational run method.
626676

627677
!EOP
@@ -989,6 +1039,12 @@ subroutine Run2 (GC, import, export, clock, RC)
9891039
VERIFY_(STATUS)
9901040
self => wrap%ptr
9911041

1042+
! Set klid and Set internal values to 0 above klid
1043+
! ---------------------------------------------------
1044+
call findKlid (self%klid, self%plid, ple, __RC__)
1045+
call setZeroKlid (self%km, self%klid, intPtr_phobic)
1046+
call setZeroKlid (self%km, self%klid, intPtr_philic)
1047+
9921048
! Add on SOA from Anthropogenic VOC oxidation
9931049
! -------------------------------------------
9941050
if (trim(comp_name) == 'CA.oc') then

ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ particle_radius_microns: 0.35 0.35
4646
# Sigma of lognormal number distribution
4747
sigma: 2.0 2.0
4848

49-
pressure_lid_in_hPa: 0.01
49+
pressure_lid_in_hPa: 40.0
5050

5151
nbins: 2
5252

ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ fnum: 9.76e17 9.76e17
4949
# Sigma of lognormal number distribution
5050
sigma: 2.20 2.20
5151

52-
pressure_lid_in_hPa: 0.01
52+
pressure_lid_in_hPa: 40.0
5353

5454
nbins: 2
5555

ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fnum: 9.76e17 9.76e17
5353
# Sigma of lognormal number distribution
5454
sigma: 2.20 2.20
5555

56-
pressure_lid_in_hPa: 0.01
56+
pressure_lid_in_hPa: 40.0
5757

5858
nbins: 2
5959

ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90

Lines changed: 69 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ subroutine SetServices (GC, RC)
226226
call MAPL_GridCompSetEntryPoint (GC, ESMF_Method_Run, Run, __RC__)
227227
if (data_driven .neqv. .true.) then
228228
call MAPL_GridCompSetEntryPoint (GC, ESMF_Method_Run, Run2, __RC__)
229+
call MAPL_GridCompSetEntryPoint (GC, ESMF_Method_Run, Run0, __RC__)
229230
end if
230231

231232
DEFVAL = 0.0
@@ -404,8 +405,6 @@ subroutine Initialize (GC, import, export, clock, RC)
404405
character (len=ESMF_MAXSTR) :: bin_index, prefix
405406
real :: CDT ! chemistry timestep (secs)
406407
integer :: HDT ! model timestep (secs)
407-
real, pointer, dimension(:,:,:,:) :: int_ptr
408-
real, pointer, dimension(:,:,:) :: ple
409408
logical :: data_driven
410409
integer :: NUM_BANDS
411410
logical :: bands_are_present
@@ -458,7 +457,7 @@ subroutine Initialize (GC, import, export, clock, RC)
458457
! Get DTs
459458
! -------
460459
call MAPL_GetResource(mapl, HDT, Label='RUN_DT:', __RC__)
461-
call MAPL_GetResource(mapl, CDT, Label='GOCART_DT:', default=real(HDT), __RC__)
460+
call MAPL_GetResource(mapl, CDT, Label='GOCART2G_DT:', default=real(HDT), __RC__)
462461
self%CDT = CDT
463462

464463
! Load resource file
@@ -511,15 +510,6 @@ subroutine Initialize (GC, import, export, clock, RC)
511510
fld = MAPL_FieldCreate (field, 'DU', __RC__)
512511
call MAPL_StateAdd (aero, fld, __RC__)
513512

514-
if (.not. data_driven) then
515-
! Set klid
516-
call MAPL_GetPointer(import, ple, 'PLE', __RC__)
517-
call findKlid (self%klid, self%plid, ple, __RC__)
518-
! Set internal DU values to 0 where above klid
519-
call MAPL_GetPointer (internal, int_ptr, 'DU', __RC__)
520-
call setZeroKlid4d (self%km, self%klid, int_ptr)
521-
end if
522-
523513
call ESMF_AttributeSet(field, NAME='ScavengingFractionPerKm', value=self%fscav(1), __RC__)
524514

525515
if (data_driven) then
@@ -611,6 +601,67 @@ subroutine Initialize (GC, import, export, clock, RC)
611601

612602
end subroutine Initialize
613603

604+
!============================================================================
605+
!BOP
606+
! !IROUTINE: Run0
607+
608+
! !INTERFACE:
609+
subroutine Run0 (GC, import, export, clock, RC)
610+
611+
! !ARGUMENTS:
612+
type (ESMF_GridComp), intent(inout) :: GC ! Gridded component
613+
type (ESMF_State), intent(inout) :: import ! Import state
614+
type (ESMF_State), intent(inout) :: export ! Export state
615+
type (ESMF_Clock), intent(inout) :: clock ! The clock
616+
integer, optional, intent( out) :: RC ! Error code:
617+
618+
! !DESCRIPTION: Clears klid to 0.0 for Dust
619+
620+
!EOP
621+
!============================================================================
622+
! Locals
623+
character (len=ESMF_MAXSTR) :: COMP_NAME
624+
type (MAPL_MetaComp), pointer :: MAPL
625+
type (ESMF_State) :: internal
626+
type (wrap_) :: wrap
627+
type (DU2G_GridComp), pointer :: self
628+
real, pointer, dimension(:,:,:) :: ple
629+
real, pointer, dimension(:,:,:,:) :: ptr4d_int
630+
631+
__Iam__('Run0')
632+
633+
!*****************************************************************************
634+
! Begin...
635+
636+
! Get my name and set-up traceback handle
637+
! ---------------------------------------
638+
call ESMF_GridCompGet (GC, NAME=COMP_NAME, __RC__)
639+
Iam = trim(COMP_NAME) // '::' // Iam
640+
641+
! Get my internal MAPL_Generic state
642+
! -----------------------------------
643+
call MAPL_GetObjectFromGC (GC, MAPL, __RC__)
644+
645+
! Get parameters from generic state.
646+
! -----------------------------------
647+
call MAPL_Get (MAPL, INTERNAL_ESMF_STATE=internal, __RC__)
648+
649+
! Get my private internal state
650+
! ------------------------------
651+
call ESMF_UserCompGetInternalState(GC, 'DU2G_GridComp', wrap, STATUS)
652+
VERIFY_(STATUS)
653+
self => wrap%ptr
654+
655+
! Set klid and Set internal values to 0 above klid
656+
! ---------------------------------------------------
657+
call MAPL_GetPointer(import, ple, 'PLE', __RC__)
658+
call findKlid (self%klid, self%plid, ple, __RC__)
659+
call MAPL_GetPointer (internal, NAME='DU', ptr=ptr4d_int, __RC__)
660+
call setZeroKlid4d (self%km, self%klid, ptr4d_int)
661+
662+
RETURN_(ESMF_SUCCESS)
663+
664+
end subroutine Run0
614665

615666
!============================================================================
616667
!BOP
@@ -966,6 +1017,11 @@ subroutine Run2 (GC, import, export, clock, RC)
9661017
allocate(dqa, mold=wet1, __STAT__)
9671018
allocate(drydepositionfrequency, mold=wet1, __STAT__)
9681019

1020+
! Set klid and Set internal DU values to 0 above klid
1021+
! ---------------------------------------------------
1022+
call findKlid (self%klid, self%plid, ple, __RC__)
1023+
call setZeroKlid4d (self%km, self%klid, DU)
1024+
9691025
! Dust Settling
9701026
! -------------
9711027
do n = 1, self%nbins
@@ -1001,7 +1057,7 @@ subroutine Run2 (GC, import, export, clock, RC)
10011057
select case (self%wet_removal_scheme)
10021058
case ('gocart')
10031059
do n = 1, self%nbins
1004-
fwet = 0.8
1060+
fwet = 1.0
10051061
call WetRemovalGOCART2G(self%km, self%klid, self%nbins, self%nbins, n, self%cdt, 'dust', &
10061062
KIN, MAPL_GRAV, fwet, DU(:,:,:,n), ple, t, airdens, &
10071063
pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, DUWT, __RC__)

ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ particle_density: 2500. 2650. 2650. 2650. 2650.
1717
# Ginoux emission scheme
1818
# -----------------------
1919
emission_scheme: ginoux
20-
#Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 #original values for (a,b,c,d,e,f)
21-
Ch_DU: 0.3 0.3 0.11 0.11 0.11 0.088
20+
Ch_DU: 0.20 0.15 0.10 0.09 0.080 0.070 # L181 values for (a,b,c,d,e,f)
21+
#Ch_DU: 0.30 0.30 0.11 0.11 0.110 0.088 # L072 values for (a,b,c,d,e,f)
2222

2323
# source_fraction: 0.0435465 0.106903 0.220117 0.484606 0.144828
2424
source_fraction: 0.1 0.25 0.25 0.25 0.25
@@ -63,7 +63,7 @@ maringFlag: .true.
6363

6464
nbins: 5
6565

66-
pressure_lid_in_hPa: 0.01
66+
pressure_lid_in_hPa: 40.0
6767

6868
# FENGSHA settings
6969
alpha: 0.16

0 commit comments

Comments
 (0)