diff --git a/CHANGELOG.md b/CHANGELOG.md index eaeb459db..fa24a886d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -370,6 +370,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [14.2.1] - 2023-10-10 ### Added +- Added option to run GEOS-Chem at 0.125x0.15625 resolution using GEOS-FP derived winds fields generated from c720 mass fluxes archived by GMAO + +## [Unreleased 14.2.1] - TBD +### Added - Script `test/difference/diffTest.sh`, checks 2 different integration tests for differences - Added GCHP environment file and export/unset env variables in run script for NASA Pleiades cluster `SatDiagnEdge` collection to all GEOS-Chem Classic `HISTORY.rc` templates diff --git a/GeosCore/flexgrid_read_mod.F90 b/GeosCore/flexgrid_read_mod.F90 index 93ea8cbc0..7811a2cbb 100644 --- a/GeosCore/flexgrid_read_mod.F90 +++ b/GeosCore/flexgrid_read_mod.F90 @@ -34,10 +34,14 @@ MODULE FlexGrid_Read_Mod ! PUBLIC :: FlexGrid_Read_CN PUBLIC :: FlexGrid_Read_A1 + PUBLIC :: FlexGrid_Read_A1dyn PUBLIC :: FlexGrid_Read_A3 + PUBLIC :: FlexGrid_Read_I1dyn_1 + PUBLIC :: FlexGrid_Read_I1dyn_2 PUBLIC :: FlexGrid_Read_I3_1 PUBLIC :: FlexGrid_Read_I3_2 PUBLIC :: Copy_I3_Fields + PUBLIC :: Copy_I1dyn_Fields ! ! !REMARKS: ! Assumes that you have a netCDF library (either v3 or v4) installed on @@ -546,6 +550,143 @@ END SUBROUTINE FlexGrid_Read_A1 !------------------------------------------------------------------------------ !BOP ! +! !IROUTINE: FlexGrid_Read_a1dyn +! +! !DESCRIPTION: Routine to read variables and attributes from a NetCDF +! met fields file containing 1-hr time-averaged (A1) data. +!\\ +!\\ +! !INTERFACE: +! + SUBROUTINE FlexGrid_Read_A1dyn( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & + State_Met ) +! +! !USES: +! + USE Input_Opt_Mod, ONLY : OptInput + USE State_Grid_Mod, ONLY : GrdState + USE State_Met_Mod, ONLY : MetState + USE Get_Met_Mod +! +! !INPUT PARAMETERS: +! + INTEGER, INTENT(IN) :: YYYYMMDD ! GMT date in YYYY/MM/DD format + INTEGER, INTENT(IN) :: HHMMSS ! GMT time in hh:mm:ss format + TYPE(OptInput), INTENT(IN) :: Input_Opt ! Input Options object + TYPE(GrdState), INTENT(IN) :: State_Grid ! Grid State object +! +! !INPUT/OUTPUT PARAMETERS: +! + TYPE(MetState), INTENT(INOUT) :: State_Met ! Meteorology State object +! +! !REMARKS: +! This routine was automatically generated by the Perl script ncCodeRead, +! and was subsequently hand-edited for compatibility with GEOS-Chem. +! . +! Even though the netCDF file is self-describing, the GEOS-FP data, +! dimensions, and units are pre-specified according to the GMAO GEOS-FP +! file specification. Therefore we can "cheat" a little bit and not have +! to read netCDF attributes to find what these values are. +! . +! Special handling for surface precipitation fields: +! --------------------------------------------------------------------------- +! In GEOS-FP (and in MERRA), the PRECTOT etc. surface precipitation +! met fields fields have units of [kg/m2/s]. In all other GEOS +! versions, PREACC and PRECON have units of [mm/day]. +! . +! Therefore, for backwards compatibility with existing code, apply +! the following unit conversion to the GEOS-5 PRECTOT and PRECCON +! fields: +! . +! kg | m3 | 86400 s | 1000 mm +! ------+----------+---------+--------- = 86400 +! m2 s | 1000 kg | day | m +! ^ +! | +! 1 / density of water +! +! !REVISION HISTORY: +! 30 Jan 2012 - R. Yantosca - Initial version +! See https://github.com/geoschem/geos-chem for complete history +!EOP +!------------------------------------------------------------------------------ +!BOC +! +! !LOCAL VARIABLES: +! + ! Scalars + INTEGER :: t_index ! Time index + CHARACTER(LEN=16) :: stamp ! Time and date stamp + CHARACTER(LEN=255) :: v_name ! netCDF variable name + CHARACTER(LEN=255) :: errMsg ! Error message + CHARACTER(LEN=255) :: caller ! Name of this routine + + ! Saved scalars + INTEGER, SAVE :: lastDate = -1 ! Stores last YYYYMMDD value + INTEGER, SAVE :: lastTime = -1 ! Stores last hhmmss value + + ! Arrays + REAL*4 :: Q(State_Grid%NX,State_Grid%NY,State_Grid%NZ) ! Temporary data arrray + + !====================================================================== + ! Skip if we have already read data for this date & time + !====================================================================== + IF ( YYYYMMDD == lastDate .and. HHMMSS == lastTime ) THEN + stamp = TimeStamp_String( YYYYMMDD, HHMMSS ) + WRITE( 6, 20 ) stamp + 20 FORMAT( ' - FLEXGRID A1dyn met fields for ', a, & + ' have been read already' ) + RETURN + ENDIF + + !====================================================================== + ! Select the proper time slice + !====================================================================== + + ! Name of this routine (for error printout) + caller = "FlexGrid_Read_A1dyn (flexgrid_read_mod.F90)" + + ! Find the proper time-slice to read from disk + t_index = ( HHMMSS / 10000 ) + 1 + + ! Stop w/ error if the time index is invalid + IF ( t_index < 1 .or. t_index > 24 ) THEN + WRITE( errMsg, 100 ) t_index + 100 FORMAT( 'Time_index value ', i5, ' must be in the range 1 to 24!' ) + CALL Error_Stop( errMsg, caller ) + ENDIF + + !====================================================================== + ! Get met fields from HEMCO + !====================================================================== + + ! Read U + v_name = "U" + CALL Get_Met_3D( Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index ) + State_Met%U = Q + + ! Read V + v_name = "V" + CALL Get_Met_3D( Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index ) + State_Met%V = Q + + ! Echo info + stamp = TimeStamp_String( YYYYMMDD, HHMMSS ) + WRITE( 6, 10 ) stamp + 10 FORMAT( ' - Found all A1dyn met fields for ', a ) + + + ! Save date & time for next iteration + lastDate = YYYYMMDD + lastTime = HHMMSS + + END SUBROUTINE FlexGrid_Read_A1dyn +!EOC +!------------------------------------------------------------------------------ +! GEOS-Chem Global Chemical Transport Model ! +!------------------------------------------------------------------------------ +!BOP +! ! !IROUTINE: FlexGrid_Read_a3 ! ! !DESCRIPTION: Convenience wrapper for the following routines which read @@ -860,15 +1001,20 @@ SUBROUTINE FlexGrid_Read_A3dyn( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & CALL Get_Met_3D( Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index ) State_Met%RH = Q - ! Read U - v_name = "U" - CALL Get_Met_3D( Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index ) - State_Met%U = Q + ! 0.125x0.15625 uses A1dyn archive + IF ( TRIM(State_Grid%GridRes) /= '0.125x0.15625' ) THEN - ! Read V - v_name = "V" - CALL Get_Met_3D( Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index ) - State_Met%V = Q + ! Read U + v_name = "U" + CALL Get_Met_3D( Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index ) + State_Met%U = Q + + ! Read V + v_name = "V" + CALL Get_Met_3D( Input_Opt, State_Grid, Q, TRIM(v_name), t_index=t_index ) + State_Met%V = Q + + ENDIF ! Echo info stamp = TimeStamp_String( YYYYMMDD, HHMMSS ) @@ -1226,6 +1372,170 @@ SUBROUTINE FlexGrid_Read_I3_1( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & ! Get met fields from HEMCO !====================================================================== + ! Name of this routine (for error printout) + caller = 'FlexGrid_Read_I3_1 (flexgrid_read_mod.F90)' + + ! Find the proper time-slice to read from disk + t_index = ( HHMMSS / 030000 ) + 1 + + ! Stop w/ error if the time index is invalid + IF ( t_index < 1 .or. t_index > 8 ) THEN + WRITE( errMsg, 100 ) t_index + 100 FORMAT( 'Time_index value ', i5, ' must be in the range 1 to 8!' ) + CALL Error_Stop( errMsg, caller ) + ENDIF + + ! Resolution 0.125x0.15625 uses I1dyn archive for PS, SPHU (xlwang, 06/2024) + IF ( TRIM(State_Grid%GridRes) .NE. '0.125x0.15625' ) THEN + + !------------------------------------------------- + ! Read 2D data + !------------------------------------------------- + + ! Read PS + v_name = "PS" + CALL Get_Met_2D( Input_Opt, State_Grid, Q2, TRIM(v_name), t_index=t_index ) + State_Met%PS1_WET = Q2 + + !------------------------------------------------- + ! Read 3D data + !------------------------------------------------- + + !---------------------------------------------------------------- + ! Prior to 2/3/12: + ! For now, skip reading Potential Vorticity (bmy, 2/3/12) + !! Read PV + !v_name = "PV" + !CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) + !!Q3 = ABS(1.0e6*Q3) ! PV to PVU + !State_Met%PV = Q3 + !---------------------------------------------------------------- + + ! Read SPHU + v_name = "SPHU" + CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) + State_Met%SPHU1 = Q3 + + ENDIF + + ! Read T + v_name = "TMPU" + CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) + State_Met%TMPU1 = Q3 + + ! Echo info + stamp = TimeStamp_String( YYYYMMDD, HHMMSS ) + WRITE( 6, 10 ) stamp + 10 FORMAT( ' - Found all I3 met fields for ', a ) + + !------------------------------------------------- + ! Unit conversions & special handling + !------------------------------------------------- + + ! Resolution 0.125x0.15625 uses I1dyn archive for PS, SPHU (xlwang, 06/2024) + IF ( TRIM(State_Grid%GridRes) /= '0.125x0.15625' ) THEN + + WHERE ( State_Met%SPHU1 < 0d0 ) + + ! NOTE: Now set negative Q to a small positive # + ! instead of zero, so as not to blow up logarithms + State_Met%SPHU1 = 1d-32 + + ELSEWHERE + + ! Convert GEOS-FP specific humidity from [kg/kg] to [g/kg] + State_Met%SPHU1 = State_Met%SPHU1 * 1000d0 + + ENDWHERE + + IF ( TRIM(Input_Opt%MetField) == 'MERRA2' .or. & + TRIM(Input_Opt%MetField) == 'MODELE2.1' .or. & + TRIM(Input_Opt%MetField) == 'MODELE2.2' ) THEN + ! Convert PS1_WET from [Pa] to [hPa] + State_Met%PS1_WET = State_Met%PS1_WET * 1e-2_fp + ENDIF + + ! Initialize State_Met%SPHU to State_Met%SPHU1. After all future MET + ! field reads (flexgrid_read_i3_2) we will interpolate State_Met%SPHU + ! from the values of State_Met vars SPHU1 and SPHU2. + State_Met%SPHU = State_Met%SPHU1 + + ENDIF + + ! Initialize State_Met%T to State_Met%TMPU1. After all future MET + ! field reads (flexgrid_read_i3_2) we will interpolate State_Met%T + ! from the values of State_Met vars TMPU1 and TMPU2. + State_Met%T = State_Met%TMPU1 + + END SUBROUTINE FlexGrid_Read_I3_1 +!EOC +!------------------------------------------------------------------------------ +! GEOS-Chem Global Chemical Transport Model ! +!------------------------------------------------------------------------------ +!BOP +! +! !IROUTINE: FlexGrid_Read_I3_2 +! +! !DESCRIPTION: Routine to read variables and attributes from a NetCDF +! met fields file containing 3-hr instantaneous (I3) data. +!\\ +!\\ +! !INTERFACE: +! + SUBROUTINE FlexGrid_Read_I3_2( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & + State_Met ) +! +! !USES: +! + USE Input_Opt_Mod, ONLY : OptInput + USE State_Grid_Mod, ONLY : GrdState + USE State_Met_Mod, ONLY : MetState + USE Get_Met_Mod +! +! !INPUT PARAMETERS: +! + INTEGER, INTENT(IN) :: YYYYMMDD ! GMT date in YYYY/MM/DD format + INTEGER, INTENT(IN) :: HHMMSS ! GMT time in hh:mm:ss format + TYPE(OptInput), INTENT(IN) :: Input_Opt ! Input Options object + TYPE(GrdState), INTENT(IN) :: State_Grid ! Grid State object +! +! !INPUT/OUTPUT PARAMETERS: +! + TYPE(MetState), INTENT(INOUT) :: State_Met ! Meteorology State object +! +! !REMARKS: +! This routine was automatically generated by the Perl script ncCodeRead, +! and was subsequently hand-edited for compatibility with GEOS-Chem. +! . +! Even though the netCDF file is self-describing, the GEOS-FP data, +! dimensions, and units are pre-specified according to the GMAO GEOS-FP +! file specification. Therefore we can "cheat" a little bit and not have +! to read netCDF attributes to find what these values are. +! +! !REVISION HISTORY: +! 30 Jan 2012 - R. Yantosca - Initial version +! See https://github.com/geoschem/geos-chem for complete history +!EOP +!------------------------------------------------------------------------------ +!BOC +! +! !LOCAL VARIABLES: +! + ! Scalars + INTEGER :: t_index ! Time index + CHARACTER(LEN=16) :: stamp ! Time and date stamp + CHARACTER(LEN=255) :: v_name ! netCDF variable name + CHARACTER(LEN=255) :: errMsg ! Error message + CHARACTER(LEN=255) :: caller ! Name of this routine + + ! Arrays + REAL*4 :: Q2(State_Grid%NX,State_Grid%NY ) ! 2D temporary data arrray + REAL*4 :: Q3(State_Grid%NX,State_Grid%NY,State_Grid%NZ) ! 3D temporary data arrray + + !====================================================================== + ! Get met fields from HEMCO + !====================================================================== + ! Name of this routine (for error printout) caller = 'FlexGrid_Read_I3_2 (flexgrid_read_mod.F90)' @@ -1239,6 +1549,224 @@ SUBROUTINE FlexGrid_Read_I3_1( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & CALL Error_Stop( errMsg, caller ) ENDIF + ! Resolution 0.125x0.15625 uses I1dyn archive for PS, SPHU (xlwang, 06/2024) + IF ( TRIM(State_Grid%GridRes) .NE. '0.125x0.15625' ) THEN + + !------------------------------------------------- + ! Read 2D data + !------------------------------------------------- + + ! Read PS + IF ( HHMMSS == 000000 ) THEN + v_name = "PS_NEXTDAY" + ELSE + v_name = "PS" + ENDIF + CALL Get_Met_2D( Input_Opt, State_Grid, Q2, TRIM(v_name), t_index=t_index ) + State_Met%PS2_WET = Q2 + + !------------------------------------------------- + ! Read 3D data + !------------------------------------------------- + + !---------------------------------------------------------------- + ! Prior to 2/3/12: + ! For now, skip reading Potential Vorticity (bmy, 2/3/12) + !! Read PV + !IF ( HHMMSS == 000000 ) THEN + ! v_name = "PV_NEXTDAY" + !ELSE + ! v_name = "PV" + !ENDIF + !CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) + !!Q3 = ABS(1.0e6*Q3) ! PV to PVU + !State_Met%PV = Q3 + !---------------------------------------------------------------- + + ! Read SPHU + IF ( HHMMSS == 000000 ) THEN + v_name = "SPHU_NEXTDAY" + ELSE + v_name = "SPHU" + ENDIF + CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) + State_Met%SPHU2 = Q3 + + ENDIF + + !------------------------------------------------- + ! Read 3D data + !------------------------------------------------- + + ! Read T + IF ( HHMMSS == 000000 ) THEN + v_name = "TMPU_NEXTDAY" + ELSE + v_name = "TMPU" + ENDIF + CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) + State_Met%TMPU2 = Q3 + + ! Echo info + stamp = TimeStamp_String( YYYYMMDD, HHMMSS ) + WRITE( 6, 10 ) stamp + 10 FORMAT( ' - Found all I3 met fields for ', a ) + + !------------------------------------------------- + ! Unit conversions & special handling + !------------------------------------------------- + ! Resolution 0.125x0.15625 uses I1dyn archive for PS, SPHU (xlwang, 06/2024) + IF ( TRIM(State_Grid%GridRes) /= '0.125x0.15625' ) THEN + + WHERE ( State_Met%SPHU2 < 0d0 ) + + ! NOTE: Now set negative Q to a small positive # + ! instead of zero, so as not to blow up logarithms + State_Met%SPHU2 = 1d-32 + + ELSEWHERE + + ! Convert specific humidity from [kg/kg] to [g/kg] + State_Met%SPHU2 = State_Met%SPHU2 * 1000d0 + + ENDWHERE + + IF ( TRIM(Input_Opt%MetField) == 'MERRA2' .or. & + TRIM(Input_Opt%MetField) == 'MODELE2.1' .or. & + TRIM(Input_Opt%MetField) == 'MODELE2.2' ) THEN + ! Convert PS2_WET from [Pa] to [hPa] + State_Met%PS2_WET = State_Met%PS2_WET * 1e-2_fp + ENDIF + + ENDIF + + END SUBROUTINE FlexGrid_Read_I3_2 +!EOC +!------------------------------------------------------------------------------ +! GEOS-Chem Global Chemical Transport Model ! +!------------------------------------------------------------------------------ +!BOP +! +! !IROUTINE: copy_i3_fields +! +! !DESCRIPTION: Subroutine COPY\_I3\_FIELDS copies the I-3 fields at the +! end of a 3-hr timestep. The I-3 fields at the end of a given 3-hr timestep +! become the fields at the beginning of the next 3-hr timestep. +!\\ +!\\ +! !INTERFACE: +! + SUBROUTINE COPY_I3_FIELDS( State_Met, State_Grid ) +! +! !USES: +! + USE State_Met_Mod, ONLY : MetState + USE State_Grid_Mod, ONLY : GrdState +! +! !INPUT PARAMETERS: +! + TYPE(GrdState), INTENT(IN) :: State_Grid ! Grid State object + TYPE(MetState), INTENT(INOUT) :: State_Met ! Meteorology State object +! +! !REVISION HISTORY: +! 13 Apr 2004 - R. Yantosca - Initial version +! See https://github.com/geoschem/geos-chem for complete history +!EOP +!------------------------------------------------------------------------------ +!BOC +! + ! Resolution 0.125x0.15625 uses I1dyn archive for PS, SPHU (xlwang, 06/2024) + IF ( TRIM(State_Grid%GridRes) .NE. '0.125x0.15625' ) THEN + State_Met%PS1_WET = State_Met%PS2_WET ! I3 surface pressure [hPa] + State_Met%PS1_DRY = State_Met%PS2_DRY ! I3 surface pressure [hPa] + State_Met%SPHU1 = State_Met%SPHU2 ! I3 specific humidity [g/kg] + ENDIF + + State_Met%TMPU1 = State_Met%TMPU2 ! I3 temperature [K] + + + END SUBROUTINE COPY_I3_FIELDS +!EOC +!------------------------------------------------------------------------------ +! GEOS-Chem Global Chemical Transport Model ! +!------------------------------------------------------------------------------ +!BOP +! +! !IROUTINE: FlexGrid_Read_I1dyn_1 +! +! !DESCRIPTION: Routine to read variables and attributes from a NetCDF +! met fields file containing 1-hr instantaneous (I1dyn) data. +!\\ +!\\ +! !INTERFACE: +! + SUBROUTINE FlexGrid_Read_I1dyn_1( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & + State_Met ) +! +! !USES: +! + USE Input_Opt_Mod, ONLY : OptInput + USE State_Grid_Mod, ONLY : GrdState + USE State_Met_Mod, ONLY : MetState + USE Get_Met_Mod +! +! !INPUT PARAMETERS: +! + INTEGER, INTENT(IN) :: YYYYMMDD ! GMT date in YYYY/MM/DD format + INTEGER, INTENT(IN) :: HHMMSS ! GMT time in hh:mm:ss format + TYPE(OptInput), INTENT(IN) :: Input_Opt ! Input Options object + TYPE(GrdState), INTENT(IN) :: State_Grid ! Grid State object +! +! !INPUT/OUTPUT PARAMETERS: +! + TYPE(MetState), INTENT(INOUT) :: State_Met ! Meteorology State object +! +! !REMARKS: +! This routine was automatically generated by the Perl script ncCodeRead, +! and was subsequently hand-edited for compatibility with GEOS-Chem. +! . +! Even though the netCDF file is self-describing, the GEOS-FP data, +! dimensions, and units are pre-specified according to the GMAO GEOS-FP +! file specification. Therefore we can "cheat" a little bit and not have +! to read netCDF attributes to find what these values are. +! +! !REVISION HISTORY: +! 30 Jan 2012 - R. Yantosca - Initial version +! See https://github.com/geoschem/geos-chem for complete history +!EOP +!------------------------------------------------------------------------------ +!BOC +! +! !LOCAL VARIABLES: +! + ! Scalars + INTEGER :: t_index ! Time index + CHARACTER(LEN=16) :: stamp ! Time and date stamp + CHARACTER(LEN=255) :: v_name ! netCDF variable name + CHARACTER(LEN=255) :: errMsg ! Error message + CHARACTER(LEN=255) :: caller ! Name of this routine + + ! Arrays + REAL*4 :: Q2(State_Grid%NX,State_Grid%NY ) ! 2D temporary data arrray + REAL*4 :: Q3(State_Grid%NX,State_Grid%NY,State_Grid%NZ) ! 3D temporary data arrray + + !====================================================================== + ! Get met fields from HEMCO + !====================================================================== + + ! Name of this routine (for error printout) + caller = 'FlexGrid_Read_I1dyn_1 (flexgrid_read_mod.F90)' + + ! Find the proper time-slice to read from disk + t_index = ( HHMMSS / 10000 ) + 1 + + ! Stop w/ error if the time index is invalid + IF ( t_index < 1 .or. t_index > 24 ) THEN + WRITE( errMsg, 100 ) t_index + 100 FORMAT( 'Time_index value ', i5, ' must be in the range 1 to 24!' ) + CALL Error_Stop( errMsg, caller ) + ENDIF + !------------------------------------------------- ! Read 2D data !------------------------------------------------- @@ -1252,30 +1780,15 @@ SUBROUTINE FlexGrid_Read_I3_1( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & ! Read 3D data !------------------------------------------------- - !---------------------------------------------------------------- - ! Prior to 2/3/12: - ! For now, skip reading Potential Vorticity (bmy, 2/3/12) - !! Read PV - !v_name = "PV" - !CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) - !!Q3 = ABS(1.0e6*Q3) ! PV to PVU - !State_Met%PV = Q3 - !---------------------------------------------------------------- - - ! Read QV + ! Read SPHU v_name = "SPHU" CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) State_Met%SPHU1 = Q3 - ! Read T - v_name = "TMPU" - CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) - State_Met%TMPU1 = Q3 - ! Echo info stamp = TimeStamp_String( YYYYMMDD, HHMMSS ) WRITE( 6, 10 ) stamp - 10 FORMAT( ' - Found all I3 met fields for ', a ) + 10 FORMAT( ' - Found all I1dyn met fields for ', a ) !------------------------------------------------- ! Unit conversions & special handling @@ -1300,30 +1813,27 @@ SUBROUTINE FlexGrid_Read_I3_1( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & State_Met%PS1_WET = State_Met%PS1_WET * 1e-2_fp ENDIF - ! Initialize State_Met%T to State_Met%TMPU1 and State_Met%SPHU to - ! State_Met%SPHU1. After all future MET field reads (flexgrid_read_i3_2) - ! we will interpolate State_Met%T from the values of State_Met vars - ! TMPU1 and TMPU2 and State_Met%SPHU from the values of State_Met vars - ! SPHU1 and SPHU2. - State_Met%T = State_Met%TMPU1 - State_Met%SPHU = State_Met%SPHU1 + ! Initialize State_Met%SPHU to State_Met%SPHU1. After all future MET + ! field reads (flexgrid_read_I1dyn_2) we will interpolate State_Met%SPHU + ! from the values of State_Met vars SPHU1 and SPHU2. + State_Met%SPHU = State_Met%SPHU1 - END SUBROUTINE FlexGrid_Read_I3_1 + END SUBROUTINE FlexGrid_Read_I1dyn_1 !EOC !------------------------------------------------------------------------------ ! GEOS-Chem Global Chemical Transport Model ! !------------------------------------------------------------------------------ !BOP ! -! !IROUTINE: FlexGrid_Read_I3_2 +! !IROUTINE: FlexGrid_Read_I1dyn_2 ! ! !DESCRIPTION: Routine to read variables and attributes from a NetCDF -! met fields file containing 3-hr instantaneous (I3) data. +! met fields file containing 1-hr instantaneous (I1dyn) data. !\\ !\\ ! !INTERFACE: ! - SUBROUTINE FlexGrid_Read_I3_2( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & + SUBROUTINE FlexGrid_Read_I1dyn_2( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & State_Met ) ! ! !USES: @@ -1378,15 +1888,15 @@ SUBROUTINE FlexGrid_Read_I3_2( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & !====================================================================== ! Name of this routine (for error printout) - caller = 'FlexGrid_Read_I3_2 (flexgrid_read_mod.F90)' + caller = 'FlexGrid_Read_I1dyn_2 (flexgrid_read_mod.F90)' ! Find the proper time-slice to read from disk - t_index = ( HHMMSS / 030000 ) + 1 + t_index = ( HHMMSS / 10000 ) + 1 ! Stop w/ error if the time index is invalid - IF ( t_index < 1 .or. t_index > 8 ) THEN + IF ( t_index < 1 .or. t_index > 24 ) THEN WRITE( errMsg, 100 ) t_index - 100 FORMAT( 'Time_index value ', i5, ' must be in the range 1 to 8!' ) + 100 FORMAT( 'Time_index value ', i5, ' must be in the range 1 to 24!' ) CALL Error_Stop( errMsg, caller ) ENDIF @@ -1407,21 +1917,7 @@ SUBROUTINE FlexGrid_Read_I3_2( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & ! Read 3D data !------------------------------------------------- - !---------------------------------------------------------------- - ! Prior to 2/3/12: - ! For now, skip reading Potential Vorticity (bmy, 2/3/12) - !! Read PV - !IF ( HHMMSS == 000000 ) THEN - ! v_name = "PV_NEXTDAY" - !ELSE - ! v_name = "PV" - !ENDIF - !CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) - !!Q3 = ABS(1.0e6*Q3) ! PV to PVU - !State_Met%PV = Q3 - !---------------------------------------------------------------- - - ! Read QV + ! Read SPHU IF ( HHMMSS == 000000 ) THEN v_name = "SPHU_NEXTDAY" ELSE @@ -1430,19 +1926,10 @@ SUBROUTINE FlexGrid_Read_I3_2( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) State_Met%SPHU2 = Q3 - ! Read T - IF ( HHMMSS == 000000 ) THEN - v_name = "TMPU_NEXTDAY" - ELSE - v_name = "TMPU" - ENDIF - CALL Get_Met_3D( Input_Opt, State_Grid, Q3, TRIM(v_name), t_index=t_index ) - State_Met%TMPU2 = Q3 - ! Echo info stamp = TimeStamp_String( YYYYMMDD, HHMMSS ) WRITE( 6, 10 ) stamp - 10 FORMAT( ' - Found all I3 met fields for ', a ) + 10 FORMAT( ' - Found all I1dyn met fields for ', a ) !------------------------------------------------- ! Unit conversions & special handling @@ -1467,23 +1954,23 @@ SUBROUTINE FlexGrid_Read_I3_2( YYYYMMDD, HHMMSS, Input_Opt, State_Grid, & State_Met%PS2_WET = State_Met%PS2_WET * 1e-2_fp ENDIF - END SUBROUTINE FlexGrid_Read_I3_2 + END SUBROUTINE FlexGrid_Read_I1dyn_2 !EOC !------------------------------------------------------------------------------ ! GEOS-Chem Global Chemical Transport Model ! !------------------------------------------------------------------------------ !BOP ! -! !IROUTINE: copy_i3_fields +! !IROUTINE: copy_I1dyn_fields ! -! !DESCRIPTION: Subroutine COPY\_I3\_FIELDS copies the I-3 fields at the -! end of a 3-hr timestep. The I-3 fields at the end of a given 3-hr timestep -! become the fields at the beginning of the next 3-hr timestep. +! !DESCRIPTION: Subroutine COPY\_I1dyn\_FIELDS copies the I-1 fields at the +! end of a 1-hr timestep. The I-1 fields at the end of a given 1-hr timestep +! become the fields at the beginning of the next 1-hr timestep. !\\ !\\ ! !INTERFACE: ! - SUBROUTINE COPY_I3_FIELDS( State_Met ) + SUBROUTINE COPY_I1dyn_FIELDS( State_Met ) ! ! !USES: ! @@ -1500,12 +1987,11 @@ SUBROUTINE COPY_I3_FIELDS( State_Met ) !------------------------------------------------------------------------------ !BOC ! - State_Met%PS1_WET = State_Met%PS2_WET ! I3 surface pressure [hPa] - State_Met%PS1_DRY = State_Met%PS2_DRY ! I3 surface pressure [hPa] - State_Met%SPHU1 = State_Met%SPHU2 ! I3 specific humidity [g/kg] - State_Met%TMPU1 = State_Met%TMPU2 ! I3 temperature [K] + State_Met%PS1_WET = State_Met%PS2_WET ! I1dyn surface pressure [hPa] + State_Met%PS1_DRY = State_Met%PS2_DRY ! I1dyn surface pressure [hPa] + State_Met%SPHU1 = State_Met%SPHU2 ! I1dyn specific humidity [g/kg] - END SUBROUTINE COPY_I3_FIELDS + END SUBROUTINE COPY_I1dyn_FIELDS !EOC END MODULE FlexGrid_Read_Mod #endif diff --git a/GeosCore/hco_interface_gc_mod.F90 b/GeosCore/hco_interface_gc_mod.F90 index 3391b9bf8..61f94da0c 100644 --- a/GeosCore/hco_interface_gc_mod.F90 +++ b/GeosCore/hco_interface_gc_mod.F90 @@ -4363,6 +4363,10 @@ SUBROUTINE Get_Met_Fields( Input_Opt, State_Chm, State_Grid, & IF ( PHASE == 0 .or. ITS_TIME_FOR_A1() .and. & .not. ITS_TIME_FOR_EXIT() ) THEN CALL FlexGrid_Read_A1( D(1), D(2), Input_Opt, State_Grid, State_Met ) + + IF ( TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + CALL FlexGrid_Read_A1dyn( D(1), D(2), Input_Opt, State_Grid, State_Met ) + ENDIF ENDIF !---------------------------------- @@ -4385,41 +4389,46 @@ SUBROUTINE Get_Met_Fields( Input_Opt, State_Chm, State_Grid, & D = GET_FIRST_I3_TIME() CALL FlexGrid_Read_I3_1( D(1), D(2), Input_Opt, State_Grid, State_Met ) - ! Get delta pressure per grid box stored in restart file to allow - ! mass conservation across consecutive runs. - v_name = 'DELPDRY' - CALL HCO_GC_GetPtr( Input_Opt, State_Grid, TRIM(v_name), Ptr3D, RC, FOUND=FOUND ) - IF ( FOUND ) THEN - State_Met%DELP_DRY = Ptr3D - IF ( Input_Opt%amIRoot ) THEN - WRITE(6,*) 'Initialize DELP_DRY from restart file' - ENDIF - ELSE - IF ( Input_Opt%amIRoot ) THEN - WRITE(6,*) 'DELP_DRY not found in restart, set to zero' - ENDIF - ENDIF - Ptr3D => NULL() + ! Resolution 0.125x0.15625 uses I1dyn archive (xlwang, 06/2024) + IF ( TRIM(State_Grid%GridRes) /= '0.125x0.15625' ) THEN + + ! Get delta pressure per grid box stored in restart file to allow + ! mass conservation across consecutive runs. + v_name = 'DELPDRY' + CALL HCO_GC_GetPtr( Input_Opt, State_Grid, TRIM(v_name), Ptr3D, RC, FOUND=FOUND ) + IF ( FOUND ) THEN + State_Met%DELP_DRY = Ptr3D + IF ( Input_Opt%amIRoot ) THEN + WRITE(6,*) 'Initialize DELP_DRY from restart file' + ENDIF + ELSE + IF ( Input_Opt%amIRoot ) THEN + WRITE(6,*) 'DELP_DRY not found in restart, set to zero' + ENDIF + ENDIF + Ptr3D => NULL() + + ! Set dry surface pressure (PS1_DRY) from State_Met%PS1_WET + ! and compute avg dry pressure near polar caps + CALL Set_Dry_Surface_Pressure( State_Grid, State_Met, 1 ) + CALL AvgPole( State_Grid, State_Met%PS1_DRY ) - ! Set dry surface pressure (PS1_DRY) from State_Met%PS1_WET - ! and compute avg dry pressure near polar caps - CALL Set_Dry_Surface_Pressure( State_Grid, State_Met, 1 ) - CALL AvgPole( State_Grid, State_Met%PS1_DRY ) + ! Compute avg moist pressure near polar caps + CALL AvgPole( State_Grid, State_Met%PS1_WET ) - ! Compute avg moist pressure near polar caps - CALL AvgPole( State_Grid, State_Met%PS1_WET ) + ! Initialize surface pressures prior to interpolation + ! to allow initialization of floating pressures + State_Met%PSC2_WET = State_Met%PS1_WET + State_Met%PSC2_DRY = State_Met%PS1_DRY + CALL Set_Floating_Pressures( State_Grid, State_Met, RC ) - ! Initialize surface pressures prior to interpolation - ! to allow initialization of floating pressures - State_Met%PSC2_WET = State_Met%PS1_WET - State_Met%PSC2_DRY = State_Met%PS1_DRY - CALL Set_Floating_Pressures( State_Grid, State_Met, RC ) + ! Call AIRQNT to compute initial air mass quantities + ! Do not update initial tracer concentrations since not read + ! from restart file yet (ewl, 10/28/15) + CALL AirQnt( Input_Opt, State_Chm, State_Grid, State_Met, & + RC, update_mixing_ratio=.FALSE. ) - ! Call AIRQNT to compute initial air mass quantities - ! Do not update initial tracer concentrations since not read - ! from restart file yet (ewl, 10/28/15) - CALL AirQnt( Input_Opt, State_Chm, State_Grid, State_Met, & - RC, update_mixing_ratio=.FALSE. ) + ENDIF ! not 0.125x0.15625 ENDIF @@ -4429,16 +4438,87 @@ SUBROUTINE Get_Met_Fields( Input_Opt, State_Chm, State_Grid, & D = GET_I3_TIME() CALL FlexGrid_Read_I3_2( D(1), D(2), Input_Opt, State_Grid, State_Met ) - ! Set dry surface pressure (PS2_DRY) from State_Met%PS2_WET - ! and compute avg dry pressure near polar caps - CALL Set_Dry_Surface_Pressure( State_Grid, State_Met, 2 ) - CALL AvgPole( State_Grid, State_Met%PS2_DRY ) + ! Resolution 0.125x0.15625 use I1dyn archive (xlwang, 06/2024) + IF ( TRIM(State_Grid%GridRes) .NE. '0.125x0.15625' ) THEN - ! Compute avg moist pressure near polar caps - CALL AvgPole( State_Grid, State_Met%PS2_WET ) + ! Set dry surface pressure (PS2_DRY) from State_Met%PS2_WET + ! and compute avg dry pressure near polar caps + CALL Set_Dry_Surface_Pressure( State_Grid, State_Met, 2 ) + CALL AvgPole( State_Grid, State_Met%PS2_DRY ) + + ! Compute avg moist pressure near polar caps + CALL AvgPole( State_Grid, State_Met%PS2_WET ) + + ENDIF ! not 0.125x0.15625 ENDIF + !---------------------------------- + ! Read 1-hr instantanous data + !---------------------------------- + + ! Resolution 0.125x0.15625 uses I1dyn archive (xlwang, 06/2024) + IF ( TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + + IF ( PHASE == 0 ) THEN + D = GET_FIRST_I1dyn_TIME() + CALL FlexGrid_Read_I1dyn_1( D(1), D(2), Input_Opt, State_Grid, State_Met ) + + ! Get delta pressure per grid box stored in restart file to allow + ! mass conservation across consecutive runs. + v_name = 'DELPDRY' + CALL HCO_GC_GetPtr( Input_Opt, State_Grid, TRIM(v_name), Ptr3D, RC, FOUND=FOUND ) + IF ( FOUND ) THEN + State_Met%DELP_DRY = Ptr3D + IF ( Input_Opt%amIRoot ) THEN + WRITE(6,*) 'Initialize DELP_DRY from restart file' + ENDIF + ELSE + IF ( Input_Opt%amIRoot ) THEN + WRITE(6,*) 'DELP_DRY not found in restart, set to zero' + ENDIF + ENDIF + Ptr3D => NULL() + + ! Set dry surface pressure (PS1_DRY) from State_Met%PS1_WET + ! and compute avg dry pressure near polar caps + CALL Set_Dry_Surface_Pressure( State_Grid, State_Met, 1 ) + CALL AvgPole( State_Grid, State_Met%PS1_DRY ) + + ! Compute avg moist pressure near polar caps + CALL AvgPole( State_Grid, State_Met%PS1_WET ) + + ! Initialize surface pressures prior to interpolation + ! to allow initialization of floating pressures + State_Met%PSC2_WET = State_Met%PS1_WET + State_Met%PSC2_DRY = State_Met%PS1_DRY + CALL Set_Floating_Pressures( State_Grid, State_Met, RC ) + + ! Call AIRQNT to compute initial air mass quantities + ! Do not update initial tracer concentrations since not read + ! from restart file yet (ewl, 10/28/15) + CALL AirQnt( Input_Opt, State_Chm, State_Grid, State_Met, & + RC, update_mixing_ratio=.FALSE. ) + + ENDIF + + ! Read in I1dyn fields at t+3hours for this timestep + IF ( ITS_TIME_FOR_I1dyn() .and. .not. ITS_TIME_FOR_EXIT() ) THEN + + D = GET_I1dyn_TIME() + CALL FlexGrid_Read_I1dyn_2( D(1), D(2), Input_Opt, State_Grid, State_Met ) + + ! Set dry surface pressure (PS2_DRY) from State_Met%PS2_WET + ! and compute avg dry pressure near polar caps + CALL Set_Dry_Surface_Pressure( State_Grid, State_Met, 2 ) + CALL AvgPole( State_Grid, State_Met%PS2_DRY ) + + ! Compute avg moist pressure near polar caps + CALL AvgPole( State_Grid, State_Met%PS2_WET ) + + ENDIF + + ENDIF END SUBROUTINE Get_Met_Fields !EOC #endif diff --git a/GeosCore/input_mod.F90 b/GeosCore/input_mod.F90 index 0f85d4a0e..2589d8831 100644 --- a/GeosCore/input_mod.F90 +++ b/GeosCore/input_mod.F90 @@ -957,8 +957,8 @@ SUBROUTINE Config_Grid( Config, Input_Opt, State_Grid, RC ) ENDIF ! Save the delta X and Y values - State_Grid%DY = Cast_and_RoundOff( subStrs(1), places=4 ) - State_Grid%DX = Cast_and_RoundOff( subStrs(2), places=4 ) + State_Grid%DY = Cast_and_RoundOff( subStrs(1), places=6 ) + State_Grid%DX = Cast_and_RoundOff( subStrs(2), places=6 ) !------------------------------------------------------------------------ ! Level range @@ -984,8 +984,8 @@ SUBROUTINE Config_Grid( Config, Input_Opt, State_Grid, RC ) CALL GC_Error( errMsg, RC, thisLoc ) RETURN ENDIF - State_Grid%XMin = Cast_and_RoundOff( a_str(1), places=4 ) - State_Grid%XMax = Cast_and_RoundOff( a_str(2), places=4 ) + State_Grid%XMin = Cast_and_RoundOff( a_str(1), places=6 ) + State_Grid%XMax = Cast_and_RoundOff( a_str(2), places=6 ) ! Make sure values are in valid rangre IF ( State_Grid%XMin >= State_Grid%XMax ) THEN @@ -1021,8 +1021,8 @@ SUBROUTINE Config_Grid( Config, Input_Opt, State_Grid, RC ) CALL GC_Error( errMsg, RC, thisLoc ) RETURN ENDIF - State_Grid%YMin = Cast_and_RoundOff( a_str(1), places=4 ) - State_Grid%YMax = Cast_and_RoundOff( a_str(2), places=4 ) + State_Grid%YMin = Cast_and_RoundOff( a_str(1), places=6 ) + State_Grid%YMax = Cast_and_RoundOff( a_str(2), places=6 ) ! Make sure values are in valid range IF ( State_Grid%YMin >= State_Grid%YMax ) THEN @@ -4659,6 +4659,8 @@ SUBROUTINE Check_Time_Steps( Input_Opt, State_Grid, RC ) MAX_DYN = 600 ELSE IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN MAX_DYN = 300 + ELSE IF ( TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + MAX_DYN = 300 ELSE MAX_DYN = 3600 ENDIF diff --git a/GeosCore/pjc_pfix_window_mod.F90 b/GeosCore/pjc_pfix_window_mod.F90 index 6d7fd1e6e..cdc7716cf 100644 --- a/GeosCore/pjc_pfix_window_mod.F90 +++ b/GeosCore/pjc_pfix_window_mod.F90 @@ -1209,12 +1209,15 @@ SUBROUTINE Convert_Winds(State_Grid, igd, tdt, cosp, crx, cry, uu, vv) ri2 = i2_gl rj2m1 = j2_gl - 1 - IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN - dl = 2.0e+0_fp * PI / 1152.0_fp - dp = PI /720e+0_fp - ELSEIF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN + IF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN dl = 2.0e+0_fp * PI / 576.0_fp dp = PI /360e+0_fp + ELSE IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN + dl = 2.0e+0_fp * PI / 1152.0_fp + dp = PI /720e+0_fp + ELSE IF ( TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + dl = 2.0e+0_fp * PI / 2304.0_fp + dp = PI /1440e+0_fp ENDIF dtdy = tdt / (Re * dp) @@ -1373,12 +1376,15 @@ SUBROUTINE Calc_Horiz_Mass_Flux & ri2 = i2_gl rj2m1 = j2_gl - 1 - IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN - dl = 2.0e+0_fp * PI / 1152.0_fp - dp = PI /720.0_fp - ELSEIF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN + IF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN dl = 2.0e+0_fp * PI / 576.0_fp dp = PI /360.0_fp + ELSE IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN + dl = 2.0e+0_fp * PI / 1152.0_fp + dp = PI /720.0_fp + ELSE IF ( TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + dl = 2.0e+0_fp * PI / 2304.0_fp + dp = PI /1440.0_fp ENDIF facty = 0.5_fp * tdt / (Re * dp) @@ -1866,18 +1872,22 @@ SUBROUTINE INIT_PJC_PFIX_WINDOW( State_Grid ) ENDDO ! Longitude spacing - IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN - DLON_FV = 2.0_fp * PI / 1152.0_fp - ELSE IF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN + IF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN DLON_FV = 2.0_fp * PI / 576.0_fp + ELSE IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN + DLON_FV = 2.0_fp * PI / 1152.0_fp + ELSE IF ( TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + DLON_FV = 2.0_fp * PI / 2304.0_fp ENDIF ! Latitude edge at south pole [radians] !ELAT_FV(1) = -0.5e+0_fp * PI - IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN - ELAT_FV(1) = CLAT_FV(1) - 0.125_fp * PI / 180.0_fp - ELSE IF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN + IF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN ELAT_FV(1) = CLAT_FV(1) - 0.25_fp * PI / 180.0_fp + ELSE IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN + ELAT_FV(1) = CLAT_FV(1) - 0.125_fp * PI / 180.0_fp + ELSE IF ( TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + ELAT_FV(1) = CLAT_FV(1) - 0.0625_fp * PI / 180.0_fp ENDIF ! SIN and COS of lat edge at south pole [unitless] @@ -1897,10 +1907,12 @@ SUBROUTINE INIT_PJC_PFIX_WINDOW( State_Grid ) ! Latitude edge at North Pole [radians] !ELAT_FV(J2_GL+1) = 0.5e+0_fp * PI ! for nested NA or EA (lzh, 07/20/2010) - IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN - ELAT_FV(J2_GL+1) = CLAT_FV(J2_GL)+0.125_fp * PI / 180.0_fp - ELSE IF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN + IF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN ELAT_FV(J2_GL+1) = CLAT_FV(J2_GL)+0.25_fp * PI / 180.0_fp + ELSE IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN + ELAT_FV(J2_GL+1) = CLAT_FV(J2_GL)+0.125_fp * PI / 180.0_fp + ELSE IF ( TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + ELAT_FV(J2_GL+1) = CLAT_FV(J2_GL)+0.0625_fp * PI / 180.0_fp ENDIF ! SIN of lat edge at North Pole diff --git a/GeosCore/sulfate_mod.F90 b/GeosCore/sulfate_mod.F90 index dbc815db9..b2c578e4f 100644 --- a/GeosCore/sulfate_mod.F90 +++ b/GeosCore/sulfate_mod.F90 @@ -1122,16 +1122,18 @@ SUBROUTINE SRCSF30( Input_Opt, State_Grid, State_Met, State_Chm, TC2, RC ) !AREA3D(:,:,1) = AREA(:,:) !AREA3D(:,:,2) = AREA(:,:) - ! comment out if shut off subgridcoag bc,14/12/23 + ! comment out if shut off subgridcoag bc,14/12/23 ! Define subgrid coagulation timescale (win, 10/28/08) !IF ( TRIM(State_Grid%GridRes) == '4.0x5.0' ) THEN ! TSCALE = 10.0_fp*3600.0_fp ! 10 hours !ELSE IF ( TRIM(State_Grid%GridRes) == '2.0x2.5' ) THEN TSCALE = 5.0_fp*3600.0_fp - !!ELSE IF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN + !ELSE IF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN ! TSCALE = 1.0_fp*3600.0_fp !ELSE IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN ! TSCALE = 0.5_fp*3600.0_fp + !ELSE IF ( TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + ! TSCALE = 0.25*3600. !ENDIF ! Point to species array diff --git a/GeosCore/tomas_mod.F90 b/GeosCore/tomas_mod.F90 index 85c1c8d37..badce1353 100644 --- a/GeosCore/tomas_mod.F90 +++ b/GeosCore/tomas_mod.F90 @@ -6483,6 +6483,8 @@ SUBROUTINE INIT_TOMAS( Input_Opt, State_Chm, State_Grid, RC ) ! SGCTSCALE = 1.0_fp*3600.0_fp !ELSE IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN ! SGCTSCALE = 0.50_fp*3600.0_fp + !ELSE IF ( TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + ! SGCTSCALE = 0.25*3600. !ENDIF #if defined(TOMAS40) diff --git a/GeosCore/tpcore_window_mod.F90 b/GeosCore/tpcore_window_mod.F90 index 6b05e6c17..6e0705d80 100644 --- a/GeosCore/tpcore_window_mod.F90 +++ b/GeosCore/tpcore_window_mod.F90 @@ -301,10 +301,12 @@ subroutine init_WINDOW(State_Grid, im,jm,km,jfirst,jlast,ng, mg, dt, ae, clat) pi = 4. * atan(1.) - IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN - dlon = 2.*pi / float(1152) !(dan) - ELSEIF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN - dlon = 2.*pi / float(576) !(dan) + IF ( TRIM(State_Grid%GridRes) == '0.5x0.625' ) THEN + dlon = 2.*pi / float(576) + ELSE IF ( TRIM(State_Grid%GridRes) == '0.25x0.3125' ) THEN + dlon = 2.*pi / float(1152) + ELSE IF ( TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + dlon = 2.*pi / float(2304) ENDIF ! dan for window diff --git a/GeosUtil/time_mod.F90 b/GeosUtil/time_mod.F90 index 8e3ca7a0e..e35f3ef46 100644 --- a/GeosUtil/time_mod.F90 +++ b/GeosUtil/time_mod.F90 @@ -62,10 +62,12 @@ MODULE TIME_MOD PUBLIC :: GET_A1_TIME PUBLIC :: GET_A3_TIME PUBLIC :: GET_I3_TIME + PUBLIC :: GET_I1dyn_TIME PUBLIC :: GET_BC_TIME PUBLIC :: GET_FIRST_A1_TIME PUBLIC :: GET_FIRST_A3_TIME PUBLIC :: GET_FIRST_I3_TIME + PUBLIC :: GET_FIRST_I1dyn_TIME PUBLIC :: GET_FIRST_BC_TIME PUBLIC :: ITS_TIME_FOR_CHEM PUBLIC :: ITS_TIME_FOR_CONV @@ -78,6 +80,7 @@ MODULE TIME_MOD PUBLIC :: ITS_TIME_FOR_A1 PUBLIC :: ITS_TIME_FOR_A3 PUBLIC :: ITS_TIME_FOR_I3 + PUBLIC :: ITS_TIME_FOR_I1dyn PUBLIC :: ITS_TIME_FOR_BC PUBLIC :: ITS_TIME_FOR_EXIT PUBLIC :: ITS_MIDMONTH @@ -1726,6 +1729,81 @@ END FUNCTION GET_I3_TIME !------------------------------------------------------------------------------ !BOP ! +! !IROUTINE: Get_i1dyn_time +! +! !DESCRIPTION: Function GET\_I1dyn\_TIME returns the correct YYYYMMDD and +! HHMMSS values that are needed to read in the next instantaneous 1-hour +! (I-1) fields. +!\\ +!\\ +! !INTERFACE: +! + FUNCTION GET_I1dyn_TIME() RESULT( DATE ) +! +! !RETURN VALUE: +! + INTEGER :: DATE(2) ! YYYYMMDD and HHMMSS values +! +! !REMARKS: +! Modified for start times other than 0 GMT. +! +! !REVISION HISTORY: +! 15 Jun 2024 - X. Wang - Initial version, for 0.125x0.15625 +! See https://github.com/geoschem/geos-chem for complete history +!EOP +!------------------------------------------------------------------------------ +!BOC +! +! !LOCAL VARIABLES: +! + LOGICAL, SAVE :: FIRST = .TRUE. + INTEGER :: HH, MM, SS, SECS, OFFSET + + !================================================================= + ! ALL MET FIELDS: + !================================================================= + + IF ( FIRST ) THEN + + !-------------------------------------------------------------- + ! FIRST-TIME ONLY! Get the proper # of hours until the next + ! I1dyn time. Also works for start times other than 0 GMT. + !-------------------------------------------------------------- + + ! Split NHMS into hours, mins, seconds + CALL YMD_EXTRACT( NHMS, HH, MM, SS ) + + ! Compute seconds elapsed in the 1-hour interval + SECS = MOD( HH, 1 )*3600 + MM*60 + SS + + ! Compute offset to next I-1 time + OFFSET = 3600 - SECS + + ! Get YYYY/MM/DD and hh:mm:ss to next I1dyn time + DATE = GET_TIME_AHEAD( OFFSET ) + + ! Reset first-time flag + FIRST = .FALSE. + + ELSE + + !-------------------------------------------------------------- + ! Other than the 1st time: Search 180 mins ahead + !-------------------------------------------------------------- + + ! We need to read in the I-1 fields 1h (60 mins, or 3600 secs) + ! ahead of time + DATE = GET_TIME_AHEAD( 3600 ) + + ENDIF + + END FUNCTION GET_I1dyn_TIME +!EOC +!------------------------------------------------------------------------------ +! GEOS-Chem Global Chemical Transport Model ! +!------------------------------------------------------------------------------ +!BOP +! ! !IROUTINE: Get_bc_time ! ! !DESCRIPTION: Function GET\_BC\_TIME returns the correct YYYYMMDD and HHMMSS @@ -1922,6 +2000,54 @@ END FUNCTION GET_FIRST_I3_TIME !------------------------------------------------------------------------------ !BOP ! +! !IROUTINE: Get_first_i1dyn_time +! +! !DESCRIPTION: Function GET\_FIRST\_I1dyn\_TIME returns the correct YYYYMMDD and +! HHMMSS values the first time that I-1 fields are read in from disk. +!\\ +!\\ +! !INTERFACE: +! + FUNCTION GET_FIRST_I1dyn_TIME() RESULT( DATE ) +! +! !RETURN VALUE: +! + INTEGER :: DATE(2) ! YYYYMMDD, HHMMSS values +! +! !REVISION HISTORY: +! 15 Jun 2024 - X. Wang - Initial version, for 0.125x0.15625 +! See https://github.com/geoschem/geos-chem for complete history +!EOP +!------------------------------------------------------------------------------ +!BOC +! +! !LOCAL VARIABLES: +! + INTEGER :: HH, MM, SS, SECS, OFFSET + + !================================================================== + ! Compute first I-6 time for all met field types + !================================================================== + + ! Split NYMS into hours, mins, seconds + CALL YMD_EXTRACT( NHMS, HH, MM, SS ) + + ! Compute seconds elapsed in the 3-hour interval + SECS = MOD( HH, 1 )*3600 + MM*60 + SS + + ! Compute offset to nearest I-6 time + OFFSET = -SECS + + ! Get YYYY/MM/DD and hh:mm:ss to nearest I-6 time + DATE = GET_TIME_AHEAD( OFFSET ) + + END FUNCTION GET_FIRST_I1dyn_TIME +!EOC +!------------------------------------------------------------------------------ +! GEOS-Chem Global Chemical Transport Model ! +!------------------------------------------------------------------------------ +!BOP +! ! !IROUTINE: Get_first_bc_time ! ! !DESCRIPTION: Function GET\_FIRST\_BC\_TIME returns the correct YYYYMMDD and @@ -2371,6 +2497,43 @@ END FUNCTION ITS_TIME_FOR_I3 !------------------------------------------------------------------------------ !BOP ! +! !IROUTINE: Its_Time_For_i1dyn +! +! !DESCRIPTION: Function ITS\_TIME\_FOR\_I1dyn returns TRUE if it is time to read +! in I1 (instantaneous 1-hr fields) and FALSE otherwise. +!\\ +!\\ +! !INTERFACE: +! + FUNCTION ITS_TIME_FOR_I1dyn() RESULT( FLAG ) +! +! !RETURN VALUE: +! + LOGICAL :: FLAG +! +! !REVISION HISTORY: +! 15 Jun 2024 - X. Wang - Initial version, for 0.125x0.15625 +! See https://github.com/geoschem/geos-chem for complete history +!EOP +!------------------------------------------------------------------------------ +!BOC +! +! !LOCAL VARAIABLES: +! + LOGICAL, SAVE :: FIRST = .TRUE. + + ! We read in I1dyn fields every hours at 00, 01, 02, ... GMT + FLAG = ( ( MOD( NHMS, 10000 ) == 0 ) .or. FIRST ) + + FIRST = .FALSE. + + END FUNCTION ITS_TIME_FOR_I1dyn +!EOC +!------------------------------------------------------------------------------ +! GEOS-Chem Global Chemical Transport Model ! +!------------------------------------------------------------------------------ +!BOP +! ! !IROUTINE: Its_Time_For_bc ! ! !DESCRIPTION: Function ITS\_TIME\_FOR\_BC returns TRUE if it is time to read diff --git a/Interfaces/GCClassic/main.F90 b/Interfaces/GCClassic/main.F90 index 6a0c87ff0..e343b7590 100644 --- a/Interfaces/GCClassic/main.F90 +++ b/Interfaces/GCClassic/main.F90 @@ -1867,13 +1867,29 @@ PROGRAM GEOS_Chem !===================================================================== IF ( notDryRun ) THEN IF ((mod(get_hour(), 3) .eq. 0) .AND. (get_minute() .eq. 0)) THEN - CALL Copy_I3_Fields( State_Met ) + CALL Copy_I3_Fields( State_Met, State_Grid ) IF ( VerboseAndRoot ) THEN CALL Debug_Msg( '### MAIN: after COPY_I3_FIELDS' ) ENDIF ENDIF ENDIF + !===================================================================== + ! ***** C O P Y I - 1 d y n F I E L D S ***** + ! + ! The I-1 fields at the end of an outer timestep (every 1 hours) + ! become the fields at the beginning of the next timestep. + ! This update must occur before writing History. + !===================================================================== + IF ( notDryRun .and. TRIM(State_Grid%GridRes) == '0.125x0.15625' ) THEN + IF ((mod(get_hour(), 1) .eq. 0) .AND. (get_minute() .eq. 0)) THEN + CALL Copy_I1dyn_Fields( State_Met ) + IF ( VerboseAndRoot ) THEN + CALL Debug_Msg( '### MAIN: after COPY_I1dyn_FIELDS' ) + ENDIF + ENDIF + ENDIF + !--------------------------------------------------------------------- ! ***** H I S T O R Y W R I T E ***** !--------------------------------------------------------------------- diff --git a/run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.gmao_metfields_0125 b/run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.gmao_metfields_0125 new file mode 100644 index 000000000..e7dc79ebe --- /dev/null +++ b/run/GCClassic/HEMCO_Config.rc.templates/HEMCO_Config.rc.gmao_metfields_0125 @@ -0,0 +1,154 @@ +#------------------------------------------------------------------------------ +# Harmonized Emissions Component (HEMCO) ! +#------------------------------------------------------------------------------ +#BOP +# +# !MODULE: HEMCO_Config.rc +# +# !DESCRIPTION: Contains configuration information for GMAO meteorology fields +# in HEMCO. +#\\ +#\\ +# !REMARKS: +# See The HEMCO User's Guide for file details: +# http://wiki.geos-chem.org/The_HEMCO_User%27s_Guide +# +# !REVISION HISTORY: +# See https://github.com/geoschem/geos-chem for complete history +#EOP +#------------------------------------------------------------------------------ +#BOC +############################################################################### +### BEGIN SECTION SETTINGS +############################################################################### + +ROOT: ${RUNDIR_DATA_ROOT}/HEMCO +METDIR: ${RUNDIR_DATA_ROOT}/GEOS_0.25x0.3125/GEOS_FP +HIGHRES: ${RUNDIR_MET_DIR} + +### END SECTION SETTINGS ### + +############################################################################### +### BEGIN SECTION BASE EMISSIONS +############################################################################### + +# ExtNr Name sourceFile sourceVar sourceTime C/R/E SrcDim SrcUnit Species ScalIDs Cat Hier + +#============================================================================== +# --- Meteorology fields --- +#============================================================================== + +# --- CN fields --- +* FRLAKE $METDIR/$CNYR/01/$MET.$CNYR0101.CN.025x03125.NA.$NC FRLAKE */1/1/0 C xy 1 * - 1 1 +* FRLAND $METDIR/$CNYR/01/$MET.$CNYR0101.CN.025x03125.NA.$NC FRLAND */1/1/0 C xy 1 * - 1 1 +* FRLANDIC $METDIR/$CNYR/01/$MET.$CNYR0101.CN.025x03125.NA.$NC FRLANDIC */1/1/0 C xy 1 * - 1 1 +* FROCEAN $METDIR/$CNYR/01/$MET.$CNYR0101.CN.025x03125.NA.$NC FROCEAN */1/1/0 C xy 1 * - 1 1 +* PHIS $METDIR/$CNYR/01/$MET.$CNYR0101.CN.025x03125.NA.$NC PHIS */1/1/0 C xy 1 * - 1 1 + +# --- A1 fields --- +* ALBEDO $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC ALBEDO 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* CLDTOT $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC CLDTOT 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* EFLUX $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC EFLUX 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* EVAP $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC EVAP 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* FRSEAICE $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC FRSEAICE 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* FRSNO $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC FRSNO 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* GRN $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC GRN 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* GWETROOT $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC GWETROOT 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* GWETTOP $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC GWETTOP 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* HFLUX $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC HFLUX 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* LAI $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC LAI 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* LWGNT $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC LWGNT 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* PARDF $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC PARDF 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* PARDR $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC PARDR 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* PBLH $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC PBLH 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* PRECANV $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC PRECANV 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* PRECCON $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC PRECCON 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* PRECLSC $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC PRECLSC 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* PRECSNO $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC PRECSNO 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* PRECTOT $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC PRECTOT 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* QV2M $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC QV2M 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SEAICE00 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SEAICE00 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SEAICE10 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SEAICE10 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SEAICE20 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SEAICE20 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SEAICE30 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SEAICE30 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SEAICE40 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SEAICE40 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SEAICE50 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SEAICE50 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SEAICE60 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SEAICE60 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SEAICE70 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SEAICE70 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SEAICE80 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SEAICE80 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SEAICE90 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SEAICE90 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SLP $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SLP 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SNODP $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SNODP 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SNOMAS $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SNOMAS 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* SWGDN $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC SWGDN 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* TO3 $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC TO3 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* TROPPT $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC TROPPT 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* TS $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC TS 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* T2M $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC T2M 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* U10M $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC U10M 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* USTAR $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC USTAR 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* V10M $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC V10M 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 +* Z0M $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A1.025x03125.NA.$NC Z0M 1980-2021/1-12/1-31/*/+30minute EFY xy 1 * - 1 1 + +# --- A3cld fields --- +* CLOUD $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3cld.025x03125.NA.$NC CLOUD 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* OPTDEPTH $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3cld.025x03125.NA.$NC OPTDEPTH 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* QI $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3cld.025x03125.NA.$NC QI 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* QL $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3cld.025x03125.NA.$NC QL 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* TAUCLI $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3cld.025x03125.NA.$NC TAUCLI 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* TAUCLW $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3cld.025x03125.NA.$NC TAUCLW 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 + +# --- A3dyn fields --- +* DTRAIN $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3dyn.025x03125.NA.$NC DTRAIN 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* OMEGA $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3dyn.025x03125.NA.$NC OMEGA 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* RH $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3dyn.025x03125.NA.$NC RH 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 + +# --- A3mstC fields --- +* DQRCU $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3mstC.025x03125.NA.$NC DQRCU 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* DQRLSAN $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3mstC.025x03125.NA.$NC DQRLSAN 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* REEVAPCN $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3mstC.025x03125.NA.$NC REEVAPCN 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* REEVAPLS $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3mstC.025x03125.NA.$NC REEVAPLS 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 + +# --- A3mstE fields --- +* CMFMC $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3mstE.025x03125.NA.$NC CMFMC 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* PFICU $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3mstE.025x03125.NA.$NC PFICU 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* PFILSAN $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3mstE.025x03125.NA.$NC PFILSAN 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* PFLCU $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3mstE.025x03125.NA.$NC PFLCU 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 +* PFLLSAN $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.A3mstE.025x03125.NA.$NC PFLLSAN 1980-2021/1-12/1-31/*/+90minute EFY xyz 1 * - 1 1 + +# --- I3 fields --- +* TMPU $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.I3.025x03125.NA.$NC T 1980-2021/1-12/1-31/* EFY xyz 1 * - 1 1 +* TMPU_NEXTDAY $METDIR/$YYYY/$MM/$MET.$YYYY$MM$DD.I3.025x03125.NA.$NC T 1980-2021/1-12/1-31/1/+1day EFY xyz 1 * - 1 1 + +# --- 0.125x0.15625 fields --- +* U $HIGHRES/Y$YYYY/M$MM/D$DD/GEOS.fp.asm.A1dyn.0125x015625.NA.$YYYY$MM$DD.nc4 UA 2021-2023/1-12/1-31/* EFY xyz 1 * - 1 1 +* V $HIGHRES/Y$YYYY/M$MM/D$DD/GEOS.fp.asm.A1dyn.0125x015625.NA.$YYYY$MM$DD.nc4 VA 2021-2023/1-12/1-31/* EFY xyz 1 * - 1 1 +* PS $HIGHRES/Y$YYYY/M$MM/D$DD/GEOS.fp.asm.I1dyn.0125x015625.NA.$YYYY$MM$DD.nc4 PS 2021-2023/1-12/1-31/* EFY xy 1 * - 1 1 +* SPHU $HIGHRES/Y$YYYY/M$MM/D$DD/GEOS.fp.asm.I1dyn.0125x015625.NA.$YYYY$MM$DD.nc4 QV 2021-2023/1-12/1-31/* EFY xyz 1 * - 1 1 + +* PS_NEXTDAY $HIGHRES/Y$YYYY/M$MM/D$DD/GEOS.fp.asm.I1dyn.0125x015625.NA.$YYYY$MM$DD.nc4 PS 2021-2023/1-12/1-31/*/+1day EFY xy 1 * - 1 1 +* SPHU_NEXTDAY $HIGHRES/Y$YYYY/M$MM/D$DD/GEOS.fp.asm.I1dyn.0125x015625.NA.$YYYY$MM$DD.nc4 QV 2021-2023/1-12/1-31/*/+1day EFY xyz 1 * - 1 1 + +#============================================================================== +# --- Fields for lightning emissions (Extension 103) --- +# +# Native-resolution lightning flash rates constrained to LIS/OTD climatology +# and convective depth are now prescribed as offline meteorology. +# --Lee Murray (16 Jan 2019) +#============================================================================== +(((LightNOx +(((.not.LightningClimatology +* FLASH_DENS $ROOT/OFFLINE_LIGHTNING/v2020-03/$MET/$YYYY/FLASH_CTH_$MET_0.25x0.3125_$YYYY_$MM.nc4 LDENS 1980-2021/1-12/1-31/0-23/+90minute RFY3 xy 1 * - 1 1 +* CONV_DEPTH $ROOT/OFFLINE_LIGHTNING/v2020-03/$MET/$YYYY/FLASH_CTH_$MET_0.25x0.3125_$YYYY_$MM.nc4 CTH 1980-2021/1-12/1-31/0-23/+90minute RFY3 xy 1 * - 1 1 +))).not.LightningClimatology + +(((LightningClimatology +* FLASH_DENS $ROOT/OFFLINE_LIGHTNING/v2020-03/$MET/CLIM/FLASH_CTH_$MET_0.25x0.3125_2014-2019.ymonmean.nc4 LDENS 2019/1-12/1/0 C xy 1 * - 1 1 +* CONV_DEPTH $ROOT/OFFLINE_LIGHTNING/v2020-03/$MET/CLIM/FLASH_CTH_$MET_0.25x0.3125_2014-2019.ymonmean.nc4 CTH 2019/1-12/1/0 C xy 1 * - 1 1 +)))LightningClimatology +)))LightNOx + +### END SECTION BASE EMISSIONS ### + +### END OF HEMCO INPUT FILE ### +#EOC \ No newline at end of file diff --git a/run/GCClassic/createRunDir.sh b/run/GCClassic/createRunDir.sh index 9594d89c0..3ce2c55cd 100755 --- a/run/GCClassic/createRunDir.sh +++ b/run/GCClassic/createRunDir.sh @@ -533,6 +533,7 @@ else printf " 3. 0.5 x 0.625\n" if [[ "x${met}" == "xgeosfp" ]]; then printf " 4. 0.25 x 0.3125\n" + printf " 5. 0.125 x 0.15625\n" fi fi @@ -550,8 +551,6 @@ while [ "${valid_res}" -eq 0 ]; do grid_res='05x0625' RUNDIR_VARS+="$(cat ${gcdir}/run/shared/settings/05x0625.txt)\n" elif [[ "x${res_num}" == "x4" ]]; then - # Error check: Don't allow a 0.25 x 0.3125 MERRA-2 rundir. - # -- Melissa Sulprizio, Bob Yantosca (12 Sep 2023) if [[ "x${met}" == "xmerra2" ]]; then valid_res=0 printf "Cannot create a MERRA-2 rundir at 0.25 x 0.3125 " @@ -559,6 +558,15 @@ while [ "${valid_res}" -eq 0 ]; do fi grid_res='025x03125' RUNDIR_VARS+="$(cat ${gcdir}/run/shared/settings/025x03125.txt)\n" + elif [[ "x${res_num}" == "x5" ]]; then + if [[ "x${met}" == "xmerra2" ]]; then + valid_res=0 + printf "Cannot create a MERRA-2 rundir at 0.125 x 0.15625 " + printf "resolution!\nPlease make another selection.\n" + fi + grid_res='0125x015625' + RUNDIR_VARS+="$(cat ${gcdir}/run/shared/settings/0125x015625.txt)\n" + RUNDIR_VARS+="RUNDIR_MET_FIELD_CONFIG='HEMCO_Config.rc.gmao_metfields_0125'\n" else valid_res=0 printf "Invalid horizontal resolution option.\n" @@ -566,7 +574,7 @@ while [ "${valid_res}" -eq 0 ]; do fi done -if [[ "${met}" != "geosit" ]] && [[ "${grid_res}" = "05x0625" || "${grid_res}" = "025x03125" ]]; then +if [[ "${met}" != "geosit" ]] && [[ "${grid_res}" = "05x0625" || "${grid_res}" = "025x03125" ]] || [[ ${grid_res} = "0125x015625" ]]; then printf "${thinline}Choose horizontal grid domain:${thinline}" printf " 1. Global\n" printf " 2. Asia\n" @@ -589,7 +597,7 @@ if [[ "${met}" != "geosit" ]] && [[ "${grid_res}" = "05x0625" || "${grid_res}" = if [[ ${grid_res} = "05x0625" ]]; then RUNDIR_VARS+="RUNDIR_GRID_LON_RANGE='[ 60.0, 150.0]'\n" RUNDIR_VARS+="RUNDIR_GRID_LAT_RANGE='[-11.0, 55.0]'\n" - elif [[ ${grid_res} = "025x03125" ]]; then + elif [[ ${grid_res} = "025x03125" ]] || [[ ${grid_res} = "0125x015625" ]]; then RUNDIR_VARS+="RUNDIR_GRID_LON_RANGE='[ 70.0, 140.0]'\n" RUNDIR_VARS+="RUNDIR_GRID_LAT_RANGE='[ 15.0, 55.0]'\n" fi @@ -599,7 +607,7 @@ if [[ "${met}" != "geosit" ]] && [[ "${grid_res}" = "05x0625" || "${grid_res}" = if [[ ${grid_res} = "05x0625" ]]; then RUNDIR_VARS+="RUNDIR_GRID_LON_RANGE='[-30.0, 50.0]'\n" RUNDIR_VARS+="RUNDIR_GRID_LAT_RANGE='[ 30.0, 70.0]'\n" - elif [[ ${grid_res} = "025x03125" ]]; then + elif [[ ${grid_res} = "025x03125" ]] || [[ ${grid_res} = "0125x015625" ]]; then RUNDIR_VARS+="RUNDIR_GRID_LON_RANGE='[-15.0, 40.0 ]'\n" RUNDIR_VARS+="RUNDIR_GRID_LAT_RANGE='[ 32.75, 61.25]'\n" fi @@ -609,7 +617,7 @@ if [[ "${met}" != "geosit" ]] && [[ "${grid_res}" = "05x0625" || "${grid_res}" = if [[ ${grid_res} = "05x0625" ]]; then RUNDIR_VARS+="RUNDIR_GRID_LON_RANGE='[-140.0, -40.0]'\n" RUNDIR_VARS+="RUNDIR_GRID_LAT_RANGE='[ 10.0, 70.0]'\n" - elif [[ ${grid_res} = "025x03125" ]]; then + elif [[ ${grid_res} = "025x03125" ]] || [[ ${grid_res} = "0125x015625" ]]; then RUNDIR_VARS+="RUNDIR_GRID_LON_RANGE='[-130.0, -60.0]'\n" RUNDIR_VARS+="RUNDIR_GRID_LAT_RANGE='[ 9.75, 60.0]'\n" fi @@ -643,7 +651,7 @@ fi RUNDIR_VARS+="$(cat ${shared_met_settings})\n" # shared_met_settings needs to be included after RUNDIR_GRID_DIR is defined # Set timesteps according to grid resolution -if [[ ${grid_res} = "05x0625" ]] || [[ ${grid_res} = "025x03125" ]]; then +if [[ ${grid_res} = "05x0625" ]] || [[ ${grid_res} = "025x03125" ]] || [[ ${grid_res} = "0125x015625" ]]; then RUNDIR_VARS+="RUNDIR_TRANSPORT_TS='300'\n" RUNDIR_VARS+="RUNDIR_CHEMISTRY_TS='600'\n" else diff --git a/run/shared/settings/0125x015625.txt b/run/shared/settings/0125x015625.txt new file mode 100644 index 000000000..79f244a66 --- /dev/null +++ b/run/shared/settings/0125x015625.txt @@ -0,0 +1,3 @@ +RUNDIR_GRID_RES='0125x015625' +RUNDIR_GRID_RES_LONG='0.125x0.15625' +RUNDIR_GRID_DIR='0.125x0.15625'