Skip to content

Commit

Permalink
Move toms_mod variables and pointers to State_Chm.
Browse files Browse the repository at this point in the history
This update moves toms_mod variables and pointers to State_Chm to further remove shared global arrays within GEOS-Chem.

Some subroutine calls have been updated, including in the GC-Classic and GCHP interface.

Signed-off-by: Haipeng Lin <[email protected]>
  • Loading branch information
jimmielin committed May 24, 2020
1 parent 59a7e29 commit 941d524
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 192 deletions.
9 changes: 0 additions & 9 deletions GeosCore/cleanup.F90
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ SUBROUTINE CLEANUP( Input_Opt, State_Grid, ERROR, RC )
#ifdef TOMAS
USE TOMAS_MOD, ONLY : CLEANUP_TOMAS !sfarina, 1/16/13
#endif
USE TOMS_MOD, ONLY : CLEANUP_TOMS
USE TPCORE_FVDAS_MOD, ONLY : EXIT_TPCORE
USE TPCORE_WINDOW_MOD, ONLY : EXIT_TPCORE_WINDOW
#if !defined( ESMF_ ) && !defined( MODEL_ )
Expand Down Expand Up @@ -178,14 +177,6 @@ SUBROUTINE CLEANUP( Input_Opt, State_Grid, ERROR, RC )
RETURN
ENDIF

! Cleanup TOMS module
CALL CLEANUP_TOMS( RC )
IF ( RC /= GC_SUCCESS ) THEN
ErrMsg = 'Error encountered in "Cleanup_TOMS"!'
CALL GC_Error( ErrMsg, RC, ThisLoc )
RETURN
ENDIF

IF ( State_Grid%NestedGrid ) THEN
CALL EXIT_TPCORE_WINDOW()
ELSE
Expand Down
2 changes: 1 addition & 1 deletion GeosCore/fast_jx_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ SUBROUTINE FAST_JX( WLAOD, Input_Opt, State_Chm, State_Diag, &
! Overhead ozone column [DU] at (NLON, NLAT)
! These values are either from the met fields or TOMS/SBUV,
! depending on the settings in input.geos
O3_TOMS = GET_OVERHEAD_O3( NLON, NLAT )
O3_TOMS = GET_OVERHEAD_O3( State_Chm, NLON, NLAT )

! CTM ozone densities (molec/cm3) at (NLON, NLAT)
O3_CTM = 0e+0_fp
Expand Down
11 changes: 0 additions & 11 deletions GeosCore/gc_environment_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,6 @@ SUBROUTINE GC_Init_Extra( Diag_List, Input_Opt, State_Chm, &
USE Sulfate_Mod, ONLY : Init_Sulfate
USE Tagged_CO_Mod, ONLY : Init_Tagged_CO
USE Tagged_O3_Mod, ONLY : Init_Tagged_O3
USE Toms_Mod, ONLY : Init_Toms
USE Vdiff_Pre_Mod, ONLY : Set_Vdiff_Values
USE WetScav_Mod, ONLY : Init_WetScav
#ifdef BPCH_DIAG
Expand Down Expand Up @@ -651,16 +650,6 @@ SUBROUTINE GC_Init_Extra( Diag_List, Input_Opt, State_Chm, &
ENDIF
ENDIF

!-----------------------------------------------------------------
! Initialize "toms_mod.F90"
!-----------------------------------------------------------------
CALL Init_Toms( Input_Opt, State_Chm, State_Diag, State_Grid, RC )
IF ( RC /= GC_SUCCESS ) THEN
ErrMsg = 'Error encountered in "Init_Toms"!'
CALL GC_Error( ErrMsg, RC, ThisLoc )
RETURN
ENDIF

!=================================================================
! Initialize specialty simulation modules here
!=================================================================
Expand Down
4 changes: 2 additions & 2 deletions GeosCore/main.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ PROGRAM GEOS_Chem
IF ( Input_Opt%USE_TOMS_O3 ) THEN
! Get TOMS overhead O3 columns for photolysis from
! the HEMCO data structure (bmy, 3/20/15)
CALL Read_TOMS( Input_Opt, RC )
CALL Read_TOMS( Input_Opt, State_Chm, RC )

! Trap potential errors
IF ( RC /= GC_SUCCESS ) THEN
Expand Down Expand Up @@ -2560,7 +2560,7 @@ SUBROUTINE Get_Overhead_O3_For_FastJ( Input_Opt, State_Grid, State_Met )

! Get the overhead O3 column for FAST-J. Take either the
! TOMS O3 data or the column O3 directly from the met fields
CALL Compute_Overhead_O3( Input_Opt, State_Grid, DAY, &
CALL Compute_Overhead_O3( Input_Opt, State_Grid, State_Chm, DAY, &
Input_Opt%USE_O3_FROM_MET, &
State_Met%TO3 )
ENDIF
Expand Down
2 changes: 1 addition & 1 deletion GeosCore/rrtmg_rad_transfer_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ SUBROUTINE DO_RRTMG_RAD_TRANSFER( ThisDay, ThisMonth, &
! Overhead ozone column [DU]
! These values are either from the met fields or TOMS/SBUV,
! depending on the settings in input.geos
O3COL = GET_OVERHEAD_O3(I,J)
O3COL = GET_OVERHEAD_O3(State_Chm, I,J)

! CTM ozone densities (molec/cm3)
O3_CTM = 0d0
Expand Down
Loading

0 comments on commit 941d524

Please sign in to comment.