Skip to content

Commit

Permalink
Merge pull request #119 from GEOS-ESM/develop
Browse files Browse the repository at this point in the history
Merge Develop into Main: "This PR removes chevron comments, and also comments out print statements. Overall it makes the code a bit more readable and reduces "chatter" in the log file. It is zero-diff."
  • Loading branch information
mmanyin authored Mar 16, 2021
2 parents 3a061f5 + 4bafdca commit 688014a
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 54 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ GEOSCHEMchem_GridComp/ @GEOS-ESM/geoschemchem-team @GEOS-ESM/chemistry-gatekee
HEMCO_GridComp/ @GEOS-ESM/geoschemchem-team @GEOS-ESM/chemistry-gatekeepers
Shared/HEMCO/ @GEOS-ESM/geoschemchem-team @GEOS-ESM/chemistry-gatekeepers

# The Python Transition Team will own Python files
# until the Python 3 transition is completed
*.py @GEOS-ESM/python-transition-team

# The GEOS CMake Team is the CODEOWNER for the CMakeLists.txt files in this repository
CMakeLists.txt @GEOS-ESM/cmake-team

87 changes: 35 additions & 52 deletions GEOS_ChemEnvGridComp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,18 @@ module GEOS_ChemEnvGridCompMod
use ESMF
use MAPL

!!!! >>>>>>>>>>>>>>>> OVP
use OVP, only: OVP_init, OVP_end_of_timestep_hms, OVP_mask, OVP_apply_mask
!!!! <<<<<<<<<<<<<<<< OVP
use OVP, only: OVP_init, OVP_end_of_timestep_hms, OVP_mask, OVP_apply_mask

implicit none
private

!!!! >>>>>>>>>>>>>>>> OVP
INTEGER, SAVE, ALLOCATABLE :: MASK_10AM(:,:)
INTEGER, SAVE, ALLOCATABLE :: MASK_2PM(:,:)
INTEGER, SAVE :: OVP_FIRST_HMS
INTEGER, SAVE :: OVP_RUN_DT
INTEGER, SAVE :: OVP_GC_DT
INTEGER, SAVE :: OVP_MASK_DT
LOGICAL :: ovp_setup_done
!!!! <<<<<<<<<<<<<<<< OVP
INTEGER, SAVE, ALLOCATABLE :: MASK_10AM(:,:)
INTEGER, SAVE, ALLOCATABLE :: MASK_2PM(:,:)
INTEGER, SAVE :: OVP_FIRST_HMS
INTEGER, SAVE :: OVP_RUN_DT
INTEGER, SAVE :: OVP_GC_DT
INTEGER, SAVE :: OVP_MASK_DT
LOGICAL :: OVP_setup_done

! !PUBLIC MEMBER FUNCTIONS:

Expand Down Expand Up @@ -84,9 +80,7 @@ subroutine SetServices ( GC, RC )
VERIFY_(STATUS)
Iam = trim(COMP_NAME) // 'SetServices'

!!!! >>>>>>>>>>>>>>>> OVP
ovp_setup_done = .FALSE.
!!!! <<<<<<<<<<<<<<<< OVP
OVP_setup_done = .FALSE.

! Register services for this component
! ------------------------------------
Expand Down Expand Up @@ -253,27 +247,25 @@ subroutine SetServices ( GC, RC )
VLOCATION = MAPL_VLocationNone, RC=STATUS)
VERIFY_(STATUS)

!!!! >>>>>>>>>>>>>>>> OVP

call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'OVP10_AIRDENS', &
LONG_NAME = 'moist_air_density_10am_local', &
UNITS = 'kg m-3', &
DIMS = MAPL_DimsHorzVert, &
VLOCATION = MAPL_VLocationCenter, &
RC=STATUS )
VERIFY_(STATUS)
! 10am overpass AIRDENS
! ---------------------
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'OVP10_AIRDENS', &
LONG_NAME = 'moist_air_density_10am_local', &
UNITS = 'kg m-3', &
DIMS = MAPL_DimsHorzVert, &
VLOCATION = MAPL_VLocationCenter, RC=STATUS)
VERIFY_(STATUS)

call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'OVP14_AIRDENS', &
! 2pm overpass AIRDENS
! ---------------------
call MAPL_AddExportSpec(GC, &
SHORT_NAME = 'OVP14_AIRDENS', &
LONG_NAME = 'moist_air_density_2pm_local', &
UNITS = 'kg m-3', &
DIMS = MAPL_DimsHorzVert, &
VLOCATION = MAPL_VLocationCenter, &
RC=STATUS )
VERIFY_(STATUS)

!!!! <<<<<<<<<<<<<<<< OVP
UNITS = 'kg m-3', &
DIMS = MAPL_DimsHorzVert, &
VLOCATION = MAPL_VLocationCenter, RC=STATUS)
VERIFY_(STATUS)

!EOS

Expand Down Expand Up @@ -408,18 +400,13 @@ subroutine Run2 ( GC, IMPORT, EXPORT, CLOCK, RC )

integer :: k, k0

!!!! >>>>>>>>>>>>>>>> OVP
REAL, POINTER, DIMENSION(:,:,:) :: DATA_FOR_OVP_3D => NULL()
REAL, POINTER, DIMENSION(:,:,:) :: OVP10_OUTPUT_3D => NULL()
REAL, POINTER, DIMENSION(:,:,:) :: OVP14_OUTPUT_3D => NULL()

REAL, POINTER, DIMENSION(:,:,:) :: DATA_FOR_OVP_3D => NULL()
REAL, POINTER, DIMENSION(:,:,:) :: OVP10_OUTPUT_3D => NULL()
REAL, POINTER, DIMENSION(:,:,:) :: OVP14_OUTPUT_3D => NULL()

INTEGER :: CURRENT_HMS ! for the end of the timestep

real(ESMF_KIND_R4), pointer, dimension(:,:) :: LONS

!!!! <<<<<<<<<<<<<<<< OVP
INTEGER :: CURRENT_HMS ! for the end of the timestep

real(ESMF_KIND_R4), pointer, dimension(:,:) :: LONS


! Begin...
Expand Down Expand Up @@ -506,26 +493,24 @@ subroutine Run2 ( GC, IMPORT, EXPORT, CLOCK, RC )
if (associated(pr_snow)) deallocate(pr_snow)
end if

!!!! >>>>>>>>>>>>>>>> OVP

IF ( ovp_setup_done .eqv. .FALSE. ) THEN
IF ( OVP_setup_done .eqv. .FALSE. ) THEN

! Set up Overpass Masks
! --------------------
CALL OVP_init ( GC, "CHEM_DT:", LONS, OVP_RUN_DT, OVP_GC_DT, __RC__ ) ! Get LONS, timesteps

PRINT*,'in CHEMENV the RUN_DT and CHEM_DT values are: ', OVP_RUN_DT, OVP_GC_DT
! IF(MAPL_AM_I_ROOT()) PRINT*,'in CHEMENV the RUN_DT and CHEM_DT values are: ', OVP_RUN_DT, OVP_GC_DT

! In this case we update the Exports only after each CHEMENV timestep:
OVP_MASK_DT = OVP_GC_DT

OVP_FIRST_HMS = OVP_end_of_timestep_hms( CLOCK, OVP_MASK_DT )
IF(MAPL_AM_I_ROOT()) PRINT*,'CHEMENV FIRST_HMS =',OVP_FIRST_HMS
! IF(MAPL_AM_I_ROOT()) PRINT*,'CHEMENV FIRST_HMS =',OVP_FIRST_HMS

CALL OVP_mask ( LONS=LONS, DELTA_TIME=OVP_MASK_DT, OVERPASS_HOUR=10, MASK=MASK_10AM )
CALL OVP_mask ( LONS=LONS, DELTA_TIME=OVP_MASK_DT, OVERPASS_HOUR=14, MASK=MASK_2PM )

ovp_setup_done = .TRUE.
OVP_setup_done = .TRUE.

END IF

Expand All @@ -545,8 +530,6 @@ subroutine Run2 ( GC, IMPORT, EXPORT, CLOCK, RC )
CALL OVP_apply_mask( DATA_FOR_OVP_3D, OVP10_OUTPUT_3D, MASK_10AM, OVP_FIRST_HMS, CURRENT_HMS, K_EDGES=.FALSE., __RC__ )
CALL OVP_apply_mask( DATA_FOR_OVP_3D, OVP14_OUTPUT_3D, MASK_2PM, OVP_FIRST_HMS, CURRENT_HMS, K_EDGES=.FALSE., __RC__ )

!!!! <<<<<<<<<<<<<<<< OVP


! All Done
! --------
Expand Down
4 changes: 2 additions & 2 deletions TR_GridComp/TR_GridCompMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ SUBROUTINE Initialize_ ( GC, IMPORT, EXPORT, CLOCK, RC )

CALL OVP_init ( GC, "TR_DT:", LONS, OVP_RUN_DT, OVP_GC_DT, __RC__ ) ! Get LONS, timesteps

IF(MAPL_AM_I_ROOT()) PRINT*,'TR OVP_RUN_DT OVP_GC_DT : ',OVP_RUN_DT, OVP_GC_DT
! IF(MAPL_AM_I_ROOT()) PRINT*,'TR OVP_RUN_DT OVP_GC_DT : ',OVP_RUN_DT, OVP_GC_DT

! ESMF_AlarmIsRinging -- is it affected by TR_DT ? Yes.

Expand All @@ -1548,7 +1548,7 @@ SUBROUTINE Initialize_ ( GC, IMPORT, EXPORT, CLOCK, RC )
! OVP_MASK_DT = OVP_RUN_DT

OVP_FIRST_HMS = OVP_end_of_timestep_hms( CLOCK, OVP_MASK_DT )
IF(MAPL_AM_I_ROOT()) PRINT*,'TR FIRST_HMS =',OVP_FIRST_HMS
! IF(MAPL_AM_I_ROOT()) PRINT*,'TR FIRST_HMS =',OVP_FIRST_HMS

CALL OVP_mask ( LONS=LONS, DELTA_TIME=OVP_MASK_DT, OVERPASS_HOUR=10, MASK=MASK_10AM )
CALL OVP_mask ( LONS=LONS, DELTA_TIME=OVP_MASK_DT, OVERPASS_HOUR=14, MASK=MASK_2PM )
Expand Down

0 comments on commit 688014a

Please sign in to comment.