diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e2446547..6399bd803 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,23 +8,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Added - Added number of levels with clouds for photolysis to geoschem_config.yml and Input_Opt to pass to Cloud-J - Added `State_Grid%CPU_Subdomain_ID` and `State_Grid%CPU_Subdomain_FirstID` as "identifier numbers" for multiple instances of GEOS-Chem on one core in WRF and CESM +- Added simulation with all diagnostics on in HISTORY.rc to integration tests for GCClassic (including Planeflight + ObsPack) and GCHP +- Added descriptive error message in `Interfaces/GCHP/gchp_historyexportsmod.F90` ### Changed - Now reset `State_Diag%SatDiagnCount` to zero in routine`History_Write` (instead of in `History_Netcdf_Write`) - Update rundir creation scripts to turn off the MEGAN extension for "standard" fullchem simulations - Updated emissions used in CESM to match standard emissions used in the 14.4 offline model - Disable support For FAST-JX for all simulations except Hg +- Replace calls to `GEOS_CHEM_STOP` with calls to `GC_Error` in `planeflight_mod.F90` +- Script `test/integration/GCHP/integrationTestExecute.sh` now resets `cap_restart` time to `000000`, to facilitate manual restart ### Fixed - Typo in `setCommonRunSettings.sh` that made GCHP always choose mass fluxes for meteorology - Fixed bug in # levels with cloud used in photolysis when using GCAP met or CESM - Fixed typos for `SatDiagnEdge` collection in `HISTORY.rc` templates - The `SatDiagnOH` diagnostic now works for the carbon simulation +- Restored missing fields for `UVFlux` collection in `run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem` +- Comment out `UVFlux` diagnostic in the "alldiags" integration test, there is a floating point error. Look at this later. +- Now use SO4 instead of O3 in the GCHP fullchem budget diagnostic (SO4 is soluble, O3 is not) +- Convert `UVFlux_Tag_Names` to uppercase in the comparison in `Get_UVFlux_Bin`(located in`Headers/state_diag_mod.F90`) +- Fixed typo (missing `_` character) in GCHP `DryDep` collection diagnostic entries +- Commented out with `###` emissions diagnostics in the GCHP `HISTORY.rc.fullchem` template that are not present in the corresponding `HEMCO_DIAGN.rc` template ### Removed - Entry `SatDiagnPEDGE` from the `SatDiagn` collection; This needs to go into the `SatDiagnEdge` collection. - ### Changed - Only read photolysis data in `Init_Photolysis` in first instance of GEOS-Chem on each PET in CESM as PIO requires it diff --git a/GeosCore/planeflight_mod.F90 b/GeosCore/planeflight_mod.F90 index 06d0f535a..c9fb51fa5 100644 --- a/GeosCore/planeflight_mod.F90 +++ b/GeosCore/planeflight_mod.F90 @@ -218,11 +218,18 @@ SUBROUTINE SETUP_PLANEFLIGHT( Input_Opt, State_Chm, State_Grid, & INTEGER :: I, IP, N, TEMP, LENGTH INTEGER :: RN, COUNTER, IOS, NYMD, NHMS CHARACTER(LEN=6) :: TYPE + CHARACTER(LEN=255) :: errMsg, thisLoc !================================================================= ! SETUP_PLANEFLIGHT begins here! !================================================================= + ! Initialize + RC = GC_SUCCESS + errMsg = '' + thisLoc = & + ' -> at Setup_Planeflight (located in GeosCore/planeflight_mod.f90)' + ! Assume that there is flight data for today DO_PF = .TRUE. @@ -258,7 +265,12 @@ SUBROUTINE SETUP_PLANEFLIGHT( Input_Opt, State_Chm, State_Grid, & ENDIF ! Compute # of species and # of points & allocate arrays - CALL INIT_PLANEFLIGHT( Input_Opt, State_Grid ) + CALL INIT_PLANEFLIGHT( Input_Opt, State_Grid, RC ) + IF ( RC /= GC_SUCCESS ) THEN + errMsg = 'Error encountered in "Init_Planeflight!"' + CALL GC_Error( errMsg, RC, thisLoc ) + RETURN + ENDIF ! Return if there are no flight track points for today IF ( NPOINTS == 0 ) THEN @@ -368,11 +380,10 @@ SUBROUTINE READ_VARIABLES( Input_Opt, State_Chm, IU_FILE, RC ) ! !USES: ! USE ErrCode_Mod - USE ERROR_MOD, ONLY : GEOS_CHEM_STOP - USE FILE_MOD, ONLY : IOERROR - USE Input_Opt_Mod, ONLY : OptInput - USE Species_Mod, ONLY : Species - USE State_Chm_Mod, ONLY : ChmState + USE FILE_MOD, ONLY : IOERROR + USE Input_Opt_Mod, ONLY : OptInput + USE Species_Mod, ONLY : Species + USE State_Chm_Mod, ONLY : ChmState ! ! !INPUT PARAMETERS: ! @@ -396,7 +407,7 @@ SUBROUTINE READ_VARIABLES( Input_Opt, State_Chm, IU_FILE, RC ) LOGICAL :: IS_FULLCHEM INTEGER :: M, N, NUM, R, IK, IOS, nAdvect, P INTEGER :: PR, J, NF, FM - CHARACTER(LEN=255) :: LINE + CHARACTER(LEN=255) :: LINE, errMsg, thisLoc CHARACTER(LEN=10) :: PRODNAME ! Objects @@ -406,8 +417,10 @@ SUBROUTINE READ_VARIABLES( Input_Opt, State_Chm, IU_FILE, RC ) ! READ_VARIABLES begins here! !================================================================= - ! Assume success - RC = GC_SUCCESS + ! Initialize + RC = GC_SUCCESS + errMsg = '' + thisLoc = ' -> at Read_Variables (located in GeosCore/planeflight_mod.F90)' ! Get fields from Input_Opt IS_FULLCHEM = Input_Opt%ITS_A_FULLCHEM_SIM @@ -475,12 +488,11 @@ SUBROUTINE READ_VARIABLES( Input_Opt, State_Chm, IU_FILE, RC ) ! Make sure the tracer # is valid! IF ( NUM < 0 .or. NUM > nAdvect ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, 100 ) TRIM( LINE ) + WRITE( errMsg, 100 ) TRIM( LINE ) 100 FORMAT( 'TRACER ', i4, ' is out of range!' ) - WRITE( 6, '(a)' ) 'STOP in SETUP_PLANEFLIGHT!' - WRITE( 6, '(a)' ) REPEAT( '=', 79 ) + CALL GC_ERROR( errMsg, RC, thisLoc ) + RETURN ENDIF - CALL GEOS_CHEM_STOP ENDIF ! Save in PVAR -- add offset of 100000 @@ -500,10 +512,9 @@ SUBROUTINE READ_VARIABLES( Input_Opt, State_Chm, IU_FILE, RC ) ! Make sure the tracer # is valid! IF ( NUM < 0 .or. NUM > nAdvect ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, 100 ) TRIM( LINE ) - WRITE( 6, '(a)' ) 'STOP in SETUP_PLANEFLIGHT!' - WRITE( 6, '(a)' ) REPEAT( '=', 79 ) - CALL GEOS_CHEM_STOP + WRITE( errMsg, 100 ) TRIM( LINE ) + CALL GC_ERROR( errMsg, RC, thisLoc ) + RETURN ENDIF ENDIF @@ -603,6 +614,7 @@ SUBROUTINE READ_VARIABLES( Input_Opt, State_Chm, IU_FILE, RC ) !=========================================================== ! Uptake coefficient for SOA formation (eam, 06/2015) + ! NOTE: This may not work !=========================================================== CASE( 'GAMM' ) @@ -805,12 +817,11 @@ SUBROUTINE READ_VARIABLES( Input_Opt, State_Chm, IU_FILE, RC ) ! Stop w/ error IF ( PVAR(N) == -999 ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE (6,*) 'Cant match up J-rate reaction number' - WRITE (6,*) NUM, P - WRITE (6,*) 'NOTE: Reactions indexs are from FJX_j2j.dat' - WRITE (6,*) 'Stopping' + WRITE ( errMsg, 105 ) NUM, P +105 FORMAT( 'Cant match up J-rate reaction number', 2i6 ) + CALL GC_ERROR( errMsg, RC, thisLoc ) + RETURN ENDIF - CALL GEOS_CHEM_STOP ENDIF ENDIF @@ -854,11 +865,9 @@ SUBROUTINE READ_VARIABLES( Input_Opt, State_Chm, IU_FILE, RC ) ! Error check IF ( PVAR(N) == 0 ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, '(a)' ) 'ERROR: invalid species!' - WRITE( 6, 110 ) TRIM( LINE ) -110 FORMAT( 'Species ', a, ' not found!' ) - WRITE( 6, '(a)' ) 'STOP in PLANEFLIGHT!' - CALL GEOS_CHEM_STOP + WRITE( errMsg, 110 ) PVAR(N) +110 FORMAT( 'Species ', i5, ' not found!' ) + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF ENDIF @@ -891,7 +900,6 @@ SUBROUTINE READ_POINTS( Input_Opt, State_Grid, State_Met, IU_FILE, RC ) ! !USES: ! USE ErrCode_Mod - USE ERROR_MOD, ONLY : GEOS_CHEM_STOP USE FILE_MOD, ONLY : IOERROR USE GC_GRID_MOD, ONLY : GET_IJ USE Input_Opt_Mod, ONLY : OptInput @@ -920,22 +928,26 @@ SUBROUTINE READ_POINTS( Input_Opt, State_Grid, State_Met, IU_FILE, RC ) ! ! !LOCAL VARIABLES: ! - INTEGER :: N, IOS, QYY, QMM, QDD, QHH, QMN - REAL*4 :: LAT, LON, PRES, OBS - REAL*4 :: TAMB, H2OMR, POTTEMP, GPSALT - CHARACTER(LEN=7) :: TYPE - CHARACTER(LEN=7) :: NAME + INTEGER :: N, IOS, QYY, QMM, QDD, QHH, QMN + REAL*4 :: LAT, LON, PRES, OBS + REAL*4 :: TAMB, H2OMR, POTTEMP, GPSALT + CHARACTER(LEN=7) :: TYPE + CHARACTER(LEN=7) :: NAME + CHARACTER(LEN=255) :: thisLoc + CHARACTER(LEN=512) :: errMsg ! ajt for CCGG - INTEGER :: IJ(2), L, L_ALT - REAL(fp) :: MOD_ELEV + INTEGER :: IJ(2), L, L_ALT + REAL(fp) :: MOD_ELEV !================================================================= ! READ_POINTS begins here! !================================================================= ! Assume success - RC = GC_SUCCESS + RC = GC_SUCCESS + errMsg = '' + thisLoc = ' -> at Read_Points (located in GeosCore/planeflight_mod.F90)' ! Read 4 header lines DO N = 1, 4 @@ -967,42 +979,37 @@ SUBROUTINE READ_POINTS( Input_Opt, State_Grid, State_Met, IU_FILE, RC ) ! Error check MONTH IF ( QMM < 1 .or. QMM > 12 ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, 105 ) QMM - WRITE( 6, 106 ) -105 FORMAT( 'ERROR: MONTH out of range: ', f8.3 ) -106 FORMAT( 'STOP in READ_POINTS (planeflight_mod.F90)' ) + WRITE( errMsg, 105 ) QMM +105 FORMAT( 'ERROR: MONTH out of range: ', i3 ) + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF - CALL GEOS_CHEM_STOP ENDIF ! Error check DAY IF ( QDD < 1 .or. QDD > 31 ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, 110 ) QDD -111 WRITE( 6, 106 ) -110 FORMAT( 'ERROR: DAY out of range: ', f8.3 ) + WRITE( errMsg, 110 ) QDD +110 FORMAT( 'ERROR: DAY out of range: ', i3 ) + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF - CALL GEOS_CHEM_STOP ENDIF ! Error check HOUR IF ( QHH < 0 .or. QHH > 23 ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, 115 ) QHH - WRITE( 6, 106 ) -115 FORMAT( 'ERROR: HOUR out of range: ', f8.3 ) + WRITE( errMsg, 115 ) QHH +115 FORMAT( 'ERROR: HOUR out of range: ', i3 ) + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF - CALL GEOS_CHEM_STOP ENDIF ! Error check MINUTES IF ( QMN < 0 .or. QMN > 59 ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, 120 ) QMN - WRITE( 6, 106 ) -120 FORMAT( 'ERROR: MINUTES out of range: ', f8.3 ) + WRITE( errMsg, 120 ) QMN +120 FORMAT( 'ERROR: MINUTES out of range: ', i3 ) + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF - CALL GEOS_CHEM_STOP ENDIF ! Store type in the global PTYPE array @@ -1028,21 +1035,19 @@ SUBROUTINE READ_POINTS( Input_Opt, State_Grid, State_Met, IU_FILE, RC ) ! Error check LONGITUDE IF ( LON < -180.0 .OR. LON > 180.0 ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, 125 ) LON - WRITE( 6, 106 ) 'STOP in READ_POINTS (planeflight_mod.F90)' + WRITE( errMsg, 125 ) LON 125 FORMAT( 'ERROR: Longitude out of range: ', f8.3 ) + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF - CALL GEOS_CHEM_STOP ENDIF ! Error check LATITUDE IF ( LAT < -90.0 .OR. LAT > 90.0 ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, 130 ) LAT - WRITE( 6, 106 ) 'STOP in READ_POINTS (planeflight_mod.F90)' + WRITE( errMsg, 130 ) LAT 130 FORMAT( 'ERROR: Latitude out of range: ', f8.3 ) + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF - CALL GEOS_CHEM_STOP ENDIF ! Skip observations outside the domain @@ -1095,18 +1100,17 @@ SUBROUTINE READ_POINTS( Input_Opt, State_Grid, State_Met, IU_FILE, RC ) ! Make sure it is the users intention for 'S' to represent ! surface observations IF ( NAME(1:1) .EQ. 'S' .and. Input_Opt%amIRoot ) THEN - WRITE( 6, '(a)') 'WARNING: Names beginning with "S" are ' - WRITE( 6, '(a)') 'assumed to be NOAA Surface observations. ' - WRITE( 6, '(a)') 'Vertical coordinates are assumed to be ' - WRITE( 6, '(a)') 'altitude and will be converted to pressure. ' - WRITE( 6, '(a)') 'In routine PLANEFLIGHT, L=1 is forced. ' - WRITE( 6, '(a)') 'If this is intended, you may comment out the ' - WRITE( 6, '(a)') 'call to GEOS_CHEM_STOP in routine ' - WRITE( 6, '(a)') 'READ_POINTS (planeflight_mod.F90). Otherwise,' - WRITE( 6, '(a)') 'remove "S" from the IF statement in the same ' - WRITE( 6, '(a)') 'location.' - WRITE( 6, '(a)') REPEAT( '=', 79 ) - CALL GEOS_CHEM_STOP + errMsg = 'WARNING: Names beginning with "S" are ' // & + 'assumed to be NOAA Surface observations. ' // & + 'Vertical coordinates are assumed to be ' // & + 'altitude and will be converted to pressure. ' // & + 'In routine PLANEFLIGHT, L=1 is forced. ' // & + 'If this is intended, you may comment out the ' // & + 'call to GC_Error in routine ' // & + 'READ_POINTS (planeflight_mod.F90). Otherwise,' // & + 'remove "S" from the IF statement in the same '// & + 'location.' + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF ! Change units @@ -1164,10 +1168,9 @@ SUBROUTINE RO2_SETUP( Input_Opt, State_Chm, RC ) ! !USES: ! USE ErrCode_Mod - USE ERROR_MOD, ONLY : GEOS_CHEM_STOP - USE Input_Opt_Mod, ONLY : OptInput - USE Species_Mod, ONLY : Species - USE State_Chm_Mod, ONLY : ChmState + USE Input_Opt_Mod, ONLY : OptInput + USE Species_Mod, ONLY : Species + USE State_Chm_Mod, ONLY : ChmState ! ! !INPUT PARAMETERS: ! @@ -1187,7 +1190,11 @@ SUBROUTINE RO2_SETUP( Input_Opt, State_Chm, RC ) ! ! !LOCAL VARIABLES: ! - INTEGER :: M + ! Scalars + INTEGER :: M + + ! Strings + CHARACTER(LEN=255) :: errMsg, thisLoc ! Objects TYPE(Species), POINTER :: SpcInfo @@ -1197,9 +1204,11 @@ SUBROUTINE RO2_SETUP( Input_Opt, State_Chm, RC ) !================================================================= ! Initialize + RC = GC_SUCCESS NPRO2 = 0 SpcInfo => NULL() - RC = GC_SUCCESS + errMsg = '' + thisLoc = ' -> at RO2_Setup (located in GeosCore/planeflight_mod.F90)' ! We only need to proceed for full-chemistry simulations IF ( .not. Input_Opt%ITS_A_FULLCHEM_SIM ) RETURN @@ -1247,10 +1256,8 @@ SUBROUTINE RO2_SETUP( Input_Opt, State_Chm, RC ) ! Error check IF ( NPRO2 > MAXRO2 ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, '(a)' ) 'NPRO2 exceeds maximum allowed value!' - WRITE( 6, '(a)' ) 'STOP in RO2_SETUP (planeflight_mod.F90)' - WRITE( 6, '(a)' ) REPEAT( '=', 79 ) - CALL GEOS_CHEM_STOP + errMsg = 'NPRO2 exceeds maximum allowed value!' + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF ENDIF @@ -1282,10 +1289,9 @@ SUBROUTINE NOY_SETUP( Input_Opt, State_Chm, RC ) ! !USES: ! USE ErrCode_Mod - USE ERROR_MOD, ONLY : GEOS_CHEM_STOP - USE Input_Opt_Mod, ONLY : OptInput - USE Species_Mod, ONLY : Species - USE State_Chm_Mod, ONLY : ChmState + USE Input_Opt_Mod, ONLY : OptInput + USE Species_Mod, ONLY : Species + USE State_Chm_Mod, ONLY : ChmState ! ! !INPUT PARAMETERS: ! @@ -1305,7 +1311,11 @@ SUBROUTINE NOY_SETUP( Input_Opt, State_Chm, RC ) ! ! !LOCAL VARIABLES: ! - INTEGER :: M + ! Scalars + INTEGER :: M + + ! Strings + CHARACTER(LEN=255) :: errMsg, thisLoc ! Objects TYPE(Species), POINTER :: SpcInfo @@ -1318,7 +1328,8 @@ SUBROUTINE NOY_SETUP( Input_Opt, State_Chm, RC ) NPNOY = 0 SpcInfo => NULL() RC = GC_SUCCESS - + errMsg = '' + thisLoc = ' -> at RO2_Setup (located in GeosCore/planeflight_mod.F90)' ! We only need to proceed for full-chemistry simulations IF ( .not. Input_Opt%ITS_A_FULLCHEM_SIM ) RETURN @@ -1359,10 +1370,8 @@ SUBROUTINE NOY_SETUP( Input_Opt, State_Chm, RC ) ! Error check IF ( NPNOY > MAXNOY ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, '(a)' ) 'NPNOY exceeds maximum allowed value!' - WRITE( 6, '(a)' ) 'STOP in NOY_SETUP (planeflight_mod.F90)' - WRITE( 6, '(a)' ) REPEAT( '=', 79 ) - CALL GEOS_CHEM_STOP + errMsg ='NPNOY exceeds maximum allowed value!' + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF ENDIF @@ -1394,10 +1403,9 @@ SUBROUTINE AN_SETUP( Input_Opt, State_Chm, RC ) ! !USES: ! USE ErrCode_Mod - USE ERROR_MOD, ONLY : GEOS_CHEM_STOP - USE Input_Opt_Mod, ONLY : OptInput - USE Species_Mod, ONLY : Species - USE State_Chm_Mod, ONLY : ChmState + USE Input_Opt_Mod, ONLY : OptInput + USE Species_Mod, ONLY : Species + USE State_Chm_Mod, ONLY : ChmState ! ! !INPUT PARAMETERS: ! @@ -1417,7 +1425,11 @@ SUBROUTINE AN_SETUP( Input_Opt, State_Chm, RC ) ! ! !LOCAL VARIABLES: ! - INTEGER :: M + ! Scalars + INTEGER :: M + + ! Strings + CHARACTER(LEN=255) :: errMsg, thisLoc ! Objects TYPE(Species), POINTER :: SpcInfo @@ -1427,9 +1439,11 @@ SUBROUTINE AN_SETUP( Input_Opt, State_Chm, RC ) !================================================================= ! Initialize + RC = GC_SUCCESS NPAN = 0 SpcInfo => NULL() - RC = GC_SUCCESS + errMsg = '' + thisLoc = ' -> at RO2_Setup (located in GeosCore/planeflight_mod.F90)' ! We only need to proceed for full-chemistry simulations IF ( .not. Input_Opt%ITS_A_FULLCHEM_SIM ) RETURN @@ -1467,10 +1481,8 @@ SUBROUTINE AN_SETUP( Input_Opt, State_Chm, RC ) ! Error check IF ( NPAN > MAXAN ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, '(a)' ) 'NPAN exceeds maximum allowed value!' - WRITE( 6, '(a)' ) 'STOP in AN_SETUP (planeflight_mod.F90)' - WRITE( 6, '(a)' ) REPEAT( '=', 79 ) - CALL GEOS_CHEM_STOP + errMsg = 'NPAN exceeds maximum allowed value!' + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF ENDIF @@ -1479,7 +1491,7 @@ SUBROUTINE AN_SETUP( Input_Opt, State_Chm, RC ) !================================================================= IF ( Input_Opt%amIRoot ) THEN WRITE( 6, 100 ) NPAN -100 FORMAT( 'Number of AN components : ', i6 ) +100 FORMAT( 'Number of AN components : ', i6 ) ENDIF END SUBROUTINE AN_SETUP @@ -1504,7 +1516,6 @@ SUBROUTINE PLANEFLIGHT( Input_Opt, State_Chm, State_Diag, & ! USE CMN_SIZE_MOD, ONLY : NDUST, NAER USE ErrCode_Mod - USE ERROR_MOD, ONLY : GEOS_CHEM_STOP USE Input_Opt_Mod, ONLY : OptInput USE Ncdf_Mod, ONLY : GET_TAU0 USE OCEAN_MERCURY_MOD, ONLY : Fg !eds 10/27/11 @@ -1566,6 +1577,7 @@ SUBROUTINE PLANEFLIGHT( Input_Opt, State_Chm, State_Diag, & REAL(fp) :: MW_g, MW_kg CHARACTER(LEN=63) :: OrigUnit CHARACTER(LEN=7) :: NAME + CHARACTER(LEN=255) :: errMsg, thisLoc ! Aerosol types: SULF, BLKC, ORGC, SALA, SALC INTEGER :: IND(5) = (/ 22, 29, 36, 43, 50 /) @@ -1596,7 +1608,7 @@ SUBROUTINE PLANEFLIGHT( Input_Opt, State_Chm, State_Diag, & ! PLANEFLIGHT begins here! !================================================================= - ! Assume success + ! Initialize RC = GC_SUCCESS ! Get fields from Input_Opt @@ -1605,6 +1617,10 @@ SUBROUTINE PLANEFLIGHT( Input_Opt, State_Chm, State_Diag, & ! Return if there is no flighttrack data for today IF ( .not. DO_PF ) RETURN + ! For error trapping + errMsg = '' + thisLoc = ' -> at Planeflight (located in GeosCore/planeflight_mod.F90' + ! Initialize pointers IWVSELECT => State_Chm%Phot%IWVSELECT ! Indexes of requested WLs ACOEF_WV => State_Chm%Phot%ACOEF_WV ! Coeffs for WL interpolation @@ -2285,12 +2301,11 @@ SUBROUTINE PLANEFLIGHT( Input_Opt, State_Chm, State_Diag, & ! Otherwise it's an error! !--------------------------------------------------------------- CASE DEFAULT - IF ( Input_Opt%amIRoot) THEN - WRITE( 6, '(a)' ) REPEAT( '=', 79 ) - WRITE( 6, '(a)' ) 'PLANEFLIGHT: Bad variable #!' - WRITE( 6, '(a)' ) 'STOP in PLANEFLIGHT!' - WRITE( 6, '(a)' ) REPEAT( '=', 79 ) - CALL GEOS_CHEM_STOP + IF ( Input_Opt%amIRoot ) THEN + WRITE( errMsg, '(i6)' ) PVAR(V) + errMsg = 'Bad variable: ' // TRIM( errMsg ) + CALL GC_Error( errMsg, RC, thisLoc ) + RETURN ENDIF END SELECT @@ -2547,20 +2562,23 @@ END SUBROUTINE SET_PLANEFLIGHT !\\ ! !INTERFACE: ! - SUBROUTINE INIT_PLANEFLIGHT( Input_Opt, State_Grid ) + SUBROUTINE INIT_PLANEFLIGHT( Input_Opt, State_Grid, RC ) ! ! !USES: ! - USE ERROR_MOD, ONLY : ALLOC_ERR - USE ERROR_MOD, ONLY : GEOS_CHEM_STOP + USE ErrCode_Mod USE FILE_MOD, ONLY : IOERROR USE Input_Opt_Mod, ONLY : OptInput USE State_Grid_Mod, ONLY : GrdState ! ! !INPUT PARAMETERS: ! - TYPE(OptInput), INTENT(IN) :: Input_Opt ! Input Options object - TYPE(GrdState), INTENT(IN) :: State_Grid ! Grid State object + TYPE(OptInput), INTENT(IN) :: Input_Opt ! Input Options object + TYPE(GrdState), INTENT(IN) :: State_Grid ! Grid State object +! +! !OUTPUT PARAMETERS: +! + INTEGER, INTENT(OUT) :: RC ! Success or failure? ! ! !REVISION HISTORY: ! 08 Jul 2002 - M. Evans - Initial version @@ -2571,9 +2589,10 @@ SUBROUTINE INIT_PLANEFLIGHT( Input_Opt, State_Grid ) ! ! !LOCAL VARIABLES: ! - LOGICAL :: IS_INIT = .FALSE. - INTEGER :: N, AS, IOS - CHARACTER(LEN=20) :: LINE + LOGICAL :: IS_INIT = .FALSE. + INTEGER :: N, IOS + CHARACTER(LEN=20) :: LINE + CHARACTER(LEN=255) :: errMsg, thisLoc !================================================================= ! INIT_PLANEFLIGHT begins here! @@ -2602,21 +2621,17 @@ SUBROUTINE INIT_PLANEFLIGHT( Input_Opt, State_Grid ) ! Make sure NPVAR is at least 1 IF ( NPVAR < 1 ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, '(a)') 'NPVAR cannot be zero or negative!' - WRITE( 6, '(a)') 'STOP in INIT_PLANEFLIGHT (planeflight_mod.F90)' - WRITE( 6, '(a)') REPEAT( '=', 79 ) + errMsg = 'NPVAR cannot be zero or negative!' + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF - CALL GEOS_CHEM_STOP ENDIF ! Make sure NPVAR is less than MAXVARS IF ( NPVAR > MAXVARS ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, '(a)') 'NPVAR exceeds maximum allowed value!' - WRITE( 6, '(a)') 'STOP in INIT_PLANEFLIGHT (planeflight_mod.F90)' - WRITE( 6, '(a)') REPEAT( '=', 79 ) + errMsg = 'NPVAR exceeds maximum allowed value!' + CALL GC_Error( errMsg, RC, thisLoc ) ENDIF - CALL GEOS_CHEM_STOP ENDIF ! Read in a separation line @@ -2685,11 +2700,10 @@ SUBROUTINE INIT_PLANEFLIGHT( Input_Opt, State_Grid ) ! Make sure NPOINTS is less than MAXPOINTS IF ( NPOINTS > MAXPOINTS ) THEN IF ( Input_Opt%amIRoot ) THEN - WRITE( 6, '(a)') 'NPOINTS exceeds maximum allowed value!' - WRITE( 6, '(a)') 'STOP in INIT_PLANEFLIGHT (planeflight_mod.F90)' - WRITE( 6, '(a)') REPEAT( '=', 79 ) + errMsg = 'NPOINTS exceeds maximum allowed value!' + CALL GC_Error( errMsg, RC, thisLoc ) + RETURN ENDIF - CALL GEOS_CHEM_STOP ENDIF !================================================================= @@ -2703,60 +2717,74 @@ SUBROUTINE INIT_PLANEFLIGHT( Input_Opt, State_Grid ) !------------------------- ! Arrays of size NPREAC !------------------------- - ALLOCATE( PREAC( MAX( NPREAC, 1 ) ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PREAC' ) + ALLOCATE( PREAC( MAX( NPREAC, 1 ) ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:PREAC', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN ALLOCATE( PRRATE( State_Grid%NX, State_Grid%NY, State_Grid%NZ, & - MAX( NPREAC, 1 ) ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PRRATE' ) + MAX( NPREAC, 1 ) ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:PRRATE', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN !------------------------- ! Arrays of size NJPREAC !------------------------- - ALLOCATE( JPREAC( MAX( NJPREAC, 1 ) ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PJREAC' ) + ALLOCATE( JPREAC( MAX( NJPREAC, 1 ) ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:JPREAC', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN ! --------------------- ! Arrays of size NPROD ! --------------------- - ALLOCATE( IPROD( MAX( NPROD, 1 ) ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'IPROD' ) + ALLOCATE( IPROD( MAX( NPROD, 1 ) ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:IPROD', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN !-------------------------- ! Arrays of size MAXVARS !-------------------------- - ALLOCATE( PVAR( MAXVARS ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PVAR' ) + ALLOCATE( PVAR( MAXVARS ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:PVAR', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN - ALLOCATE( PNAME( MAXVARS ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PNAMES' ) + ALLOCATE( PNAME( MAXVARS ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:PNAME', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN !--------------------------- ! Arrays of size MAXPOINTS !--------------------------- - ALLOCATE( PTYPE( MAXPOINTS ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PTYPE' ) + ALLOCATE( PTYPE( MAXPOINTS ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:PTYPE', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN - ALLOCATE( PDATE( MAXPOINTS ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PDATE' ) + ALLOCATE( PDATE( MAXPOINTS ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:PDATE', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN - ALLOCATE( PTIME( MAXPOINTS ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PTIME' ) + ALLOCATE( PTIME( MAXPOINTS ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:PTIME', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN - ALLOCATE( PTAU( MAXPOINTS ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PTAU' ) + ALLOCATE( PTAU( MAXPOINTS ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:PTAUC', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN - ALLOCATE( PLATTD( MAXPOINTS ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PLATTD' ) + ALLOCATE( PLATTD( MAXPOINTS ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:PLATTD', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN - ALLOCATE( PLONGTD( MAXPOINTS ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PLONGTD' ) + ALLOCATE( PLONGTD( MAXPOINTS ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:PLONGTD', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN - ALLOCATE( PPRESS( MAXPOINTS ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'PPRESS' ) + ALLOCATE( PPRESS( MAXPOINTS ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:PPRESS', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN - ALLOCATE( POBS( MAXPOINTS ), STAT=AS ) - IF ( AS /= 0 ) CALL ALLOC_ERR( 'POBS' ) + ALLOCATE( POBS( MAXPOINTS ), STAT=RC ) + CALL GC_CheckVar( 'planeflight_mod:POBS', 0, RC ) + IF ( RC /= GC_SUCCESS ) RETURN ! Reset IS_INIT flag IS_INIT = .TRUE. diff --git a/Headers/state_diag_mod.F90 b/Headers/state_diag_mod.F90 index 5ed1fc66e..384bca299 100644 --- a/Headers/state_diag_mod.F90 +++ b/Headers/state_diag_mod.F90 @@ -17134,6 +17134,7 @@ SUBROUTINE Get_UVFlux_Bin( tagName, bin, RC ) ! !USES: ! USE ErrCode_Mod + USE CharPak_Mod, ONLY : To_UpperCase ! ! !INPUT PARAMETERS: ! @@ -17168,11 +17169,11 @@ SUBROUTINE Get_UVFlux_Bin( tagName, bin, RC ) RC = GC_SUCCESS bin = -1 errMsg = '' - thisLoc = ' -> at Get_UVFlux_Index (in module Headers/state_diag_mod.F90)' + thisLoc = ' -> at Get_UVFlux_Bin (in module Headers/state_diag_mod.F90)' ! Get the index for the tagname DO N = 1, 18 - IF ( TRIM( tagName ) == TRIM( UVFlux_Tag_Names(N) ) ) THEN + IF ( TRIM( tagName ) == To_UpperCase( TRIM( UVFlux_Tag_Names(N))) ) THEN bin = N EXIT ENDIF diff --git a/Interfaces/GCHP/gchp_historyexports_mod.F90 b/Interfaces/GCHP/gchp_historyexports_mod.F90 index d3988d7d5..d707d2d19 100644 --- a/Interfaces/GCHP/gchp_historyexports_mod.F90 +++ b/Interfaces/GCHP/gchp_historyexports_mod.F90 @@ -371,7 +371,7 @@ SUBROUTINE Init_HistoryExportsList ( am_I_Root, HistoryConfig, RC ) HistoryConfig%ConfigFileRead = .TRUE. ELSE CALL GC_ERROR( ErrMsg, RC, Iam ) - _ASSERT(.FALSE., 'informative message here') + _ASSERT(.FALSE., 'Error in routine Init_HistoryExport! This could indicate an error or typo in HISTORY.rc.') RETURN ENDIF diff --git a/run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem b/run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem index db5264b46..5335cc182 100644 --- a/run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem +++ b/run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem @@ -394,7 +394,11 @@ COLLECTIONS: 'Restart', # # Available for all full-chemistry simulations with photolysis #============================================================================== - UVFlux.template: 'UVFluxDiffuse_?UVFLX? ', + UVFlux.template: '%y4%m2%d2_%h2%n2z.nc4', + UVFlux.frequency: ${RUNDIR_HIST_TIME_AVG_FREQ} + UVFlux.duration: ${RUNDIR_HIST_TIME_AVG_DUR} + UVFlux.mode: 'time-averaged' + UVFlux.fields: 'UVFluxDiffuse_?UVFLX? ', 'UVFluxDirect_?UVFLX? ', 'UVFluxNet_?UVFLX? ', :: @@ -835,8 +839,8 @@ COLLECTIONS: 'Restart', Tomas.format: 'CFIO', Tomas.timestampStart: .true. Tomas.monthly: 0 - Tomas.frequency: 010000 - Tomas.duration: 010000 + Tomas.frequency: 00000100 000000 + Tomas.duration: 00000100 000000 Tomas.mode: 'time-averaged' Tomas.fields: 'TomasH2SO4 ', 'TomasH2SO4mass_bin01 ', diff --git a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.CH4 b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.CH4 index 731590b20..1dc1e97d6 100644 --- a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.CH4 +++ b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.CH4 @@ -86,7 +86,7 @@ extra_diagnostics: obspack: activate: false quiet_logfile_output: false - input_file: ./obspack_co2_1_OCO2MIP_2018-11-28.YYYYMMDD.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - CH4 @@ -94,4 +94,4 @@ extra_diagnostics: planeflight: activate: false flight_track_file: Planeflight.dat.YYYYMMDD - output_file: plane.log.YYYYMMDD \ No newline at end of file + output_file: ./OutputDir/plane.log.YYYYMMDD \ No newline at end of file diff --git a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.CO2 b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.CO2 index dd43be87f..54e8554a8 100644 --- a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.CO2 +++ b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.CO2 @@ -87,7 +87,7 @@ extra_diagnostics: obspack: activate: false quiet_logfile_output: false - input_file: ./obspack_co2_1_OCO2MIP_2018-11-28.YYYYMMDD.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - CO @@ -97,4 +97,4 @@ extra_diagnostics: planeflight: activate: false flight_track_file: Planeflight.dat.YYYYMMDD - output_file: plane.log.YYYYMMDD \ No newline at end of file + output_file: ./OutputDir/plane.log.YYYYMMDD \ No newline at end of file diff --git a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.Hg b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.Hg index dca11fe35..fab5f2cca 100644 --- a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.Hg +++ b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.Hg @@ -136,7 +136,7 @@ extra_diagnostics: obspack: activate: false quiet_logfile_output: false - input_file: ./obspack_co2_1_OCO2MIP_2018-11-28.YYYYMMDD.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - Hg0 @@ -144,4 +144,4 @@ extra_diagnostics: planeflight: activate: false flight_track_file: Planeflight.dat.YYYYMMDD - output_file: plane.log.YYYYMMDD \ No newline at end of file + output_file: ./OutputDir/plane.log.YYYYMMDD \ No newline at end of file diff --git a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.POPs b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.POPs index 985d12dab..4ef22bdb0 100644 --- a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.POPs +++ b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.POPs @@ -102,7 +102,7 @@ extra_diagnostics: obspack: activate: false quiet_logfile_output: false - input_file: ./obspack_co2_1_OCO2MIP_2018-11-28.YYYYMMDD.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - POPG_${RUNDIR_POP_SPC} @@ -110,4 +110,4 @@ extra_diagnostics: planeflight: activate: false flight_track_file: Planeflight.dat.YYYYMMDD - output_file: plane.log.YYYYMMDD + output_file: ./OutputDir/plane.log.YYYYMMDD diff --git a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.TransportTracers b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.TransportTracers index 6e64ac15b..11cb67bae 100644 --- a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.TransportTracers +++ b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.TransportTracers @@ -101,7 +101,7 @@ extra_diagnostics: obspack: activate: false quiet_logfile_output: false - input_file: ./obspack_co2_1_OCO2MIP_2018-11-28.YYYYMMDD.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - Rn222 @@ -110,4 +110,4 @@ extra_diagnostics: planeflight: activate: false flight_track_file: Planeflight.dat.YYYYMMDD - output_file: plane.log.YYYYMMDD + output_file: ./OutputDir/plane.log.YYYYMMDD diff --git a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.aerosol b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.aerosol index 98286067c..a320c3955 100644 --- a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.aerosol +++ b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.aerosol @@ -144,7 +144,7 @@ extra_diagnostics: obspack: activate: false quiet_logfile_output: false - input_file: ./obspack_co2_1_OCO2MIP_2018-11-28.YYYYMMDD.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - BCPI @@ -152,4 +152,4 @@ extra_diagnostics: planeflight: activate: false flight_track_file: Planeflight.dat.YYYYMMDD - output_file: plane.log.YYYYMMDD \ No newline at end of file + output_file: ./OutputDir/plane.log.YYYYMMDD \ No newline at end of file diff --git a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.carbon b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.carbon index 0a2125d2f..c35423f8b 100644 --- a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.carbon +++ b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.carbon @@ -110,7 +110,7 @@ extra_diagnostics: obspack: activate: false quiet_logfile_output: false - input_file: ./obspack_co2_1_OCO2MIP_2018-11-28.YYYYMMDD.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - CH4 @@ -120,4 +120,4 @@ extra_diagnostics: planeflight: activate: false flight_track_file: Planeflight.dat.YYYYMMDD - output_file: plane.log.YYYYMMDD \ No newline at end of file + output_file: ./OutputDir/plane.log.YYYYMMDD \ No newline at end of file diff --git a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.fullchem b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.fullchem index f3c540df1..532ffdaca 100644 --- a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.fullchem +++ b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.fullchem @@ -397,7 +397,7 @@ extra_diagnostics: obspack: activate: false quiet_logfile_output: false - input_file: ./obspack_co2_1_OCO2MIP_2018-11-28.YYYYMMDD.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - CO @@ -407,4 +407,4 @@ extra_diagnostics: planeflight: activate: false flight_track_file: Planeflight.dat.YYYYMMDD - output_file: plane.log.YYYYMMDD + output_file: ./OutputDir/plane.log.YYYYMMDD diff --git a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.metals b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.metals index c00184f02..f297c3de8 100644 --- a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.metals +++ b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.metals @@ -108,7 +108,7 @@ extra_diagnostics: obspack: activate: false quiet_logfile_output: false - input_file: ./obspack_co2_1_OCO2MIP_2018-11-28.YYYYMMDD.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - AlF1 @@ -116,4 +116,4 @@ extra_diagnostics: planeflight: activate: false flight_track_file: Planeflight.dat.YYYYMMDD - output_file: plane.log.YYYYMMDD \ No newline at end of file + output_file: ./OutputDir/plane.log.YYYYMMDD \ No newline at end of file diff --git a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.tagCO b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.tagCO index 6c318d08d..6ac1a9500 100644 --- a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.tagCO +++ b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.tagCO @@ -95,7 +95,7 @@ extra_diagnostics: obspack: activate: false quiet_logfile_output: false - input_file: ./obspack_co2_1_OCO2MIP_2018-11-28.YYYYMMDD.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - CO @@ -105,4 +105,4 @@ extra_diagnostics: planeflight: activate: false flight_track_file: Planeflight.dat.YYYYMMDD - output_file: plane.log.YYYYMMDD \ No newline at end of file + output_file: ./OutputDir/plane.log.YYYYMMDD \ No newline at end of file diff --git a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.tagO3 b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.tagO3 index 7b8877272..cb4f71927 100644 --- a/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.tagO3 +++ b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.tagO3 @@ -91,7 +91,7 @@ extra_diagnostics: obspack: activate: false quiet_logfile_output: false - input_file: ./obspack_co2_1_OCO2MIP_2018-11-28.YYYYMMDD.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - O3 @@ -99,4 +99,4 @@ extra_diagnostics: planeflight: activate: false flight_track_file: Planeflight.dat.YYYYMMDD - output_file: plane.log.YYYYMMDD \ No newline at end of file + output_file: ./OutputDir/plane.log.YYYYMMDD \ No newline at end of file diff --git a/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem b/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem index 535a8fb2e..ab18dbc4d 100644 --- a/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem +++ b/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem @@ -241,10 +241,10 @@ COLLECTIONS: @#'DefaultCollection', 'EmisCH2O_BioBurn ', 'GCHPchem', 'EmisCH2O_Ship ', 'GCHPchem', 'EmisCH3I_Ocean ', 'GCHPchem', - ##'EmisCH4_Total ', 'GCHPchem', - ##'EmisCH4_Anthro ', 'GCHPchem', - ##'EmisCH4_BioBurn ', 'GCHPchem', - ##'EmisCH4_Ship ', 'GCHPchem', + ####'EmisCH4_Total ', 'GCHPchem', + ####'EmisCH4_Anthro ', 'GCHPchem', + ####'EmisCH4_BioBurn ', 'GCHPchem', + ####'EmisCH4_Ship ', 'GCHPchem', 'EmisCHBr3_Ocean ', 'GCHPchem', 'EmisCO_Total ', 'GCHPchem', 'EmisCO_Aircraft ', 'GCHPchem', @@ -356,7 +356,7 @@ COLLECTIONS: @#'DefaultCollection', 'EmisRCHO_Total ', 'GCHPchem', 'EmisRCHO_Aircraft ', 'GCHPchem', 'EmisRCHO_BioBurn ', 'GCHPchem', - ##'EmisSESQ_Biogenic ', 'GCHPchem', + ####'EmisSESQ_Biogenic ', 'GCHPchem', 'EmisSALA_Natural ', 'GCHPchem', 'EmisBrSALA_Natural ', 'GCHPchem', 'EmisSALAAL_Natural ', 'GCHPchem', @@ -401,7 +401,7 @@ COLLECTIONS: @#'DefaultCollection', #'InvCEDS_BCPO ', 'GCHPchem', #'InvCEDS_BENZ ', 'GCHPchem', #'InvCEDS_C2H2 ', 'GCHPchem', - #'InvCEDS_C2H4 ', 'GCHPchem', + ####'InvCEDS_C2H4 ', 'GCHPchem', #'InvCEDS_C2H6 ', 'GCHPchem', #'InvCEDS_C3H8 ', 'GCHPchem', #'InvCEDS_CH2O ', 'GCHPchem', @@ -504,14 +504,14 @@ COLLECTIONS: @#'DefaultCollection', #'InvSeaSalt_SALCAL ', 'GCHPchem', #'InvSeaSalt_SALCCL ', 'GCHPchem', #'InvMEGAN_ALD2 ', 'GCHPchem', - ##'InvMEGAN_C2H4 ', 'GCHPchem', + ####'InvMEGAN_C2H4 ', 'GCHPchem', #'InvMEGAN_EOH ', 'GCHPchem', #'InvMEGAN_ISOP ', 'GCHPchem', #'InvMEGAN_LIMO ', 'GCHPchem', #'InvMEGAN_MTPA ', 'GCHPchem', #'InvMEGAN_MTPO ', 'GCHPchem', #'InvMEGAN_PRPE ', 'GCHPchem', - ##'InvMEGAN_SESQ ', 'GCHPchem', + ####'InvMEGAN_SESQ ', 'GCHPchem', #'InvMEGAN_SOAP ', 'GCHPchem', #'InvMEGAN_SOAS ', 'GCHPchem', #'InvMEGAN_ACET ', 'GCHPchem', @@ -764,7 +764,7 @@ COLLECTIONS: @#'DefaultCollection', :: #============================================================================== # Budget defined as species kg/s in the column (full, troposphere, or PBL) -# due to a single component (e.g. chemistry); default = ozone only; add more +# due to a single component (e.g. chemistry); default = SO4 only; add more # species as needed (advected only) #============================================================================== Budget.template: '%y4%m2%d2_%h2%n2z.nc4', @@ -774,29 +774,29 @@ COLLECTIONS: @#'DefaultCollection', Budget.frequency: 010000 Budget.duration: 010000 Budget.mode: 'time-averaged' - Budget.fields: 'BudgetWetDepFull_O3 ', 'GCHPchem', - 'BudgetChemistryFull_O3 ', 'GCHPchem', - 'BudgetConvectionFull_O3 ', 'GCHPchem', - 'BudgetMixingFull_O3 ', 'GCHPchem', - 'BudgetEmisDryDepFull_O3 ', 'GCHPchem', + Budget.fields: 'BudgetWetDepFull_SO4 ', 'GCHPchem', + 'BudgetChemistryFull_SO4 ', 'GCHPchem', + 'BudgetConvectionFull_SO4 ', 'GCHPchem', + 'BudgetMixingFull_SO4 ', 'GCHPchem', + 'BudgetEmisDryDepFull_SO4 ', 'GCHPchem', # - 'BudgetWetDepLevs1to35_O3 ', 'GCHPchem', - 'BudgetChemistryLevs1to35_O3 ', 'GCHPchem', - 'BudgetConvectionLevs1to35_O3 ', 'GCHPchem', - 'BudgetMixingLevs1to35_O3 ', 'GCHPchem', - 'BudgetEmisDryDepLevs1to35_O3 ', 'GCHPchem', + 'BudgetWetDepLevs1to35_SO4 ', 'GCHPchem', + 'BudgetChemistryLevs1to35_SO4 ', 'GCHPchem', + 'BudgetConvectionLevs1to35_SO4', 'GCHPchem', + 'BudgetMixingLevs1to35_SO4 ', 'GCHPchem', + 'BudgetEmisDryDepLevs1to35_SO4', 'GCHPchem', # - 'BudgetWetDepTrop_O3 ', 'GCHPchem', - 'BudgetChemistryTrop_O3 ', 'GCHPchem', - 'BudgetConvectionTrop_O3 ', 'GCHPchem', - 'BudgetMixingTrop_O3 ', 'GCHPchem', - 'BudgetEmisDryDepTrop_O3 ', 'GCHPchem', + 'BudgetWetDepTrop_SO4 ', 'GCHPchem', + 'BudgetChemistryTrop_SO4 ', 'GCHPchem', + 'BudgetConvectionTrop_SO4 ', 'GCHPchem', + 'BudgetMixingTrop_SO4 ', 'GCHPchem', + 'BudgetEmisDryDepTrop_SO4 ', 'GCHPchem', # - 'BudgetWetDepPBL_O3 ', 'GCHPchem', - 'BudgetChemistryPBL_O3 ', 'GCHPchem', - 'BudgetConvectionPBL_O3 ', 'GCHPchem', - 'BudgetMixingPBL_O3 ', 'GCHPchem', - 'BudgetEmisDryDepPBL_O3 ', 'GCHPchem', + 'BudgetWetDepPBL_SO4 ', 'GCHPchem', + 'BudgetChemistryPBL_SO4 ', 'GCHPchem', + 'BudgetConvectionPBL_SO4 ', 'GCHPchem', + 'BudgetMixingPBL_SO4 ', 'GCHPchem', + 'BudgetEmisDryDepPBL_SO4 ', 'GCHPchem', :: #============================================================================= #%%%%% THE CloudConvFlux COLLECTION %%%%% @@ -1271,166 +1271,166 @@ COLLECTIONS: @#'DefaultCollection', #'DryDepVel_ASOA3 ', 'GCHPchem', #'DryDepVel_ASOA2 ', 'GCHPchem', #'DryDepVel_ASOA1 ', 'GCHPchem', - 'DryDepSOAS ', 'GCHPchem', - 'DryDepSOAIE ', 'GCHPchem', - 'DryDepSOAGX ', 'GCHPchem', - 'DryDepSO4s ', 'GCHPchem', - 'DryDepSO4 ', 'GCHPchem', - 'DryDepSO2 ', 'GCHPchem', - 'DryDepSALCCL ', 'GCHPchem', - 'DryDepSALCAL ', 'GCHPchem', - 'DryDepSALC ', 'GCHPchem', - 'DryDepSALACL ', 'GCHPchem', - 'DryDepSALAAL ', 'GCHPchem', - 'DryDepSALA ', 'GCHPchem', - 'DryDepRP ', 'GCHPchem', - 'DryDepRIPD ', 'GCHPchem', - 'DryDepRIPC ', 'GCHPchem', - 'DryDepRIPB ', 'GCHPchem', - 'DryDepRIPA ', 'GCHPchem', - 'DryDepRB3P ', 'GCHPchem', - 'DryDepRA3P ', 'GCHPchem', - 'DryDepR4P ', 'GCHPchem', - 'DryDepR4N2 ', 'GCHPchem', - 'DryDepPYAC ', 'GCHPchem', - 'DryDepPRPN ', 'GCHPchem', - 'DryDepPROPNN ', 'GCHPchem', - 'DryDepPPN ', 'GCHPchem', - 'DryDepPP ', 'GCHPchem', - 'DryDepPHEN ', 'GCHPchem', - 'DryDeppFe ', 'GCHPchem', - 'DryDepPAN ', 'GCHPchem', - 'DryDepOCPO ', 'GCHPchem', - 'DryDepOCPI ', 'GCHPchem', - 'DryDepO3 ', 'GCHPchem', - 'DryDepNPRNO3 ', 'GCHPchem', - 'DryDepNPHEN ', 'GCHPchem', - 'DryDepNO2 ', 'GCHPchem', - 'DryDepNITs ', 'GCHPchem', - 'DryDepNIT ', 'GCHPchem', - 'DryDepNH4 ', 'GCHPchem', - 'DryDepNH3 ', 'GCHPchem', - 'DryDepN2O5 ', 'GCHPchem', - 'DryDepMVKPC ', 'GCHPchem', - 'DryDepMVKN ', 'GCHPchem', - 'DryDepMVKHP ', 'GCHPchem', - 'DryDepMVKHCB ', 'GCHPchem', - 'DryDepMVKHC ', 'GCHPchem', - 'DryDepMVKDH ', 'GCHPchem', - 'DryDepMVK ', 'GCHPchem', - 'DryDepMTPO ', 'GCHPchem', - 'DryDepMTPA ', 'GCHPchem', - 'DryDepMSA ', 'GCHPchem', - 'DryDepMPAN ', 'GCHPchem', - 'DryDepMONITU ', 'GCHPchem', - 'DryDepMONITS ', 'GCHPchem', - 'DryDepMONITA ', 'GCHPchem', - 'DryDepMOH ', 'GCHPchem', - 'DryDepMGLY ', 'GCHPchem', - 'DryDepMENO3 ', 'GCHPchem', - 'DryDepMCT ', 'GCHPchem', - 'DryDepMCRHP ', 'GCHPchem', - 'DryDepMCRHNB ', 'GCHPchem', - 'DryDepMCRHN ', 'GCHPchem', - 'DryDepMCRENOL ', 'GCHPchem', - 'DryDepMCRDH ', 'GCHPchem', - 'DryDepMAP ', 'GCHPchem', - 'DryDepMACR1OOH ', 'GCHPchem', - 'DryDepMACR ', 'GCHPchem', - 'DryDepLVOCOA ', 'GCHPchem', - 'DryDepLVOC ', 'GCHPchem', - 'DryDepLIMO ', 'GCHPchem', - 'DryDepITHN ', 'GCHPchem', - 'DryDepITCN ', 'GCHPchem', - 'DryDepISALC ', 'GCHPchem', - 'DryDepISALA ', 'GCHPchem', - 'DryDepIPRNO3 ', 'GCHPchem', - 'DryDepIONO2 ', 'GCHPchem', - 'DryDepIONO ', 'GCHPchem', - 'DryDepIONITA ', 'GCHPchem', - 'DryDepINPD ', 'GCHPchem', - 'DryDepINPB ', 'GCHPchem', - 'DryDepINDIOL ', 'GCHPchem', - 'DryDepIHN4 ', 'GCHPchem', - 'DryDepIHN3 ', 'GCHPchem', - 'DryDepIHN2 ', 'GCHPchem', - 'DryDepIHN1 ', 'GCHPchem', - 'DryDepIEPOXD ', 'GCHPchem', - 'DryDepIEPOXB ', 'GCHPchem', - 'DryDepIEPOXA ', 'GCHPchem', - 'DryDepIDN ', 'GCHPchem', - 'DryDepIDHPE ', 'GCHPchem', - 'DryDepIDHDP ', 'GCHPchem', - 'DryDepIDCHP ', 'GCHPchem', - 'DryDepIDC ', 'GCHPchem', - 'DryDepICPDH ', 'GCHPchem', - 'DryDepICN ', 'GCHPchem', - 'DryDepICl ', 'GCHPchem', - 'DryDepICHE ', 'GCHPchem', - 'DryDepIBr ', 'GCHPchem', - 'DryDepI2O4 ', 'GCHPchem', - 'DryDepI2O3 ', 'GCHPchem', - 'DryDepI2O2 ', 'GCHPchem', - 'DryDepI2 ', 'GCHPchem', - 'DryDepHPETHNL ', 'GCHPchem', - 'DryDepHPALD4 ', 'GCHPchem', - 'DryDepHPALD3 ', 'GCHPchem', - 'DryDepHPALD2 ', 'GCHPchem', - 'DryDepHPALD1 ', 'GCHPchem', - 'DryDepHONIT ', 'GCHPchem', - 'DryDepHOI ', 'GCHPchem', - 'DryDepHOCl ', 'GCHPchem', - 'DryDepHOBr ', 'GCHPchem', - 'DryDepHNO3 ', 'GCHPchem', - 'DryDepHMS ', 'GCHPchem', - 'DryDepHMML ', 'GCHPchem', - 'DryDepHMHP ', 'GCHPchem', - 'DryDepHI ', 'GCHPchem', - 'DryDepHCOOH ', 'GCHPchem', - 'DryDepHCl ', 'GCHPchem', - 'DryDepHC5A ', 'GCHPchem', - 'DryDepHBr ', 'GCHPchem', - 'DryDepHAC ', 'GCHPchem', - 'DryDepH2O2 ', 'GCHPchem', - 'DryDepGLYX ', 'GCHPchem', - 'DryDepGLYC ', 'GCHPchem', - 'DryDepFURA ', 'GCHPchem', - 'DryDepETP ', 'GCHPchem', - 'DryDepETNO3 ', 'GCHPchem', - 'DryDepETHP ', 'GCHPchem', - 'DryDepETHN ', 'GCHPchem', - 'DryDepETHLN ', 'GCHPchem', - 'DryDepEOH ', 'GCHPchem', - 'DryDepDST4 ', 'GCHPchem', - 'DryDepDST3 ', 'GCHPchem', - 'DryDepDST2 ', 'GCHPchem', - 'DryDepDST1 ', 'GCHPchem', - 'DryDepCSL ', 'GCHPchem', - 'DryDepClOO ', 'GCHPchem', - 'DryDepClO ', 'GCHPchem', - 'DryDepClNO3 ', 'GCHPchem', - 'DryDepClNO2 ', 'GCHPchem', - 'DryDepCl2 ', 'GCHPchem', - 'DryDepCH2O ', 'GCHPchem', - 'DryDepBZPAN ', 'GCHPchem', - 'DryDepBZCO3H ', 'GCHPchem', - 'DryDepBrSALC ', 'GCHPchem', - 'DryDepBrSALA ', 'GCHPchem', - 'DryDepBrNO3 ', 'GCHPchem', - 'DryDepBrCl ', 'GCHPchem', - 'DryDepBr2 ', 'GCHPchem', - 'DryDepBENZP ', 'GCHPchem', - 'DryDepBCPO ', 'GCHPchem', - 'DryDepBCPI ', 'GCHPchem', - 'DryDepBALD ', 'GCHPchem', - 'DryDepATOOH ', 'GCHPchem', - 'DryDepAROMP5 ', 'GCHPchem', - 'DryDepAROMP4 ', 'GCHPchem', - 'DryDepAONITA ', 'GCHPchem', - 'DryDepALD2 ', 'GCHPchem', - 'DryDepAERI ', 'GCHPchem', - 'DryDepACTA ', 'GCHPchem', - 'DryDepACET ', 'GCHPchem', + 'DryDep_SOAS ', 'GCHPchem', + 'DryDep_SOAIE ', 'GCHPchem', + 'DryDep_SOAGX ', 'GCHPchem', + 'DryDep_SO4s ', 'GCHPchem', + 'DryDep_SO4 ', 'GCHPchem', + 'DryDep_SO2 ', 'GCHPchem', + 'DryDep_SALCCL ', 'GCHPchem', + 'DryDep_SALCAL ', 'GCHPchem', + 'DryDep_SALC ', 'GCHPchem', + 'DryDep_SALACL ', 'GCHPchem', + 'DryDep_SALAAL ', 'GCHPchem', + 'DryDep_SALA ', 'GCHPchem', + 'DryDep_RP ', 'GCHPchem', + 'DryDep_RIPD ', 'GCHPchem', + 'DryDep_RIPC ', 'GCHPchem', + 'DryDep_RIPB ', 'GCHPchem', + 'DryDep_RIPA ', 'GCHPchem', + 'DryDep_RB3P ', 'GCHPchem', + 'DryDep_RA3P ', 'GCHPchem', + 'DryDep_R4P ', 'GCHPchem', + 'DryDep_R4N2 ', 'GCHPchem', + 'DryDep_PYAC ', 'GCHPchem', + 'DryDep_PRPN ', 'GCHPchem', + 'DryDep_PROPNN ', 'GCHPchem', + 'DryDep_PPN ', 'GCHPchem', + 'DryDep_PP ', 'GCHPchem', + 'DryDep_PHEN ', 'GCHPchem', + 'DryDep_pFe ', 'GCHPchem', + 'DryDep_PAN ', 'GCHPchem', + 'DryDep_OCPO ', 'GCHPchem', + 'DryDep_OCPI ', 'GCHPchem', + 'DryDep_O3 ', 'GCHPchem', + 'DryDep_NPRNO3 ', 'GCHPchem', + 'DryDep_NPHEN ', 'GCHPchem', + 'DryDep_NO2 ', 'GCHPchem', + 'DryDep_NITs ', 'GCHPchem', + 'DryDep_NIT ', 'GCHPchem', + 'DryDep_NH4 ', 'GCHPchem', + 'DryDep_NH3 ', 'GCHPchem', + 'DryDep_N2O5 ', 'GCHPchem', + 'DryDep_MVKPC ', 'GCHPchem', + 'DryDep_MVKN ', 'GCHPchem', + 'DryDep_MVKHP ', 'GCHPchem', + 'DryDep_MVKHCB ', 'GCHPchem', + 'DryDep_MVKHC ', 'GCHPchem', + 'DryDep_MVKDH ', 'GCHPchem', + 'DryDep_MVK ', 'GCHPchem', + 'DryDep_MTPO ', 'GCHPchem', + 'DryDep_MTPA ', 'GCHPchem', + 'DryDep_MSA ', 'GCHPchem', + 'DryDep_MPAN ', 'GCHPchem', + 'DryDep_MONITU ', 'GCHPchem', + 'DryDep_MONITS ', 'GCHPchem', + 'DryDep_MONITA ', 'GCHPchem', + 'DryDep_MOH ', 'GCHPchem', + 'DryDep_MGLY ', 'GCHPchem', + 'DryDep_MENO3 ', 'GCHPchem', + 'DryDep_MCT ', 'GCHPchem', + 'DryDep_MCRHP ', 'GCHPchem', + 'DryDep_MCRHNB ', 'GCHPchem', + 'DryDep_MCRHN ', 'GCHPchem', + 'DryDep_MCRENOL ', 'GCHPchem', + 'DryDep_MCRDH ', 'GCHPchem', + 'DryDep_MAP ', 'GCHPchem', + 'DryDep_MACR1OOH ', 'GCHPchem', + 'DryDep_MACR ', 'GCHPchem', + 'DryDep_LVOCOA ', 'GCHPchem', + 'DryDep_LVOC ', 'GCHPchem', + 'DryDep_LIMO ', 'GCHPchem', + 'DryDep_ITHN ', 'GCHPchem', + 'DryDep_ITCN ', 'GCHPchem', + 'DryDep_ISALC ', 'GCHPchem', + 'DryDep_ISALA ', 'GCHPchem', + 'DryDep_IPRNO3 ', 'GCHPchem', + 'DryDep_IONO2 ', 'GCHPchem', + 'DryDep_IONO ', 'GCHPchem', + 'DryDep_IONITA ', 'GCHPchem', + 'DryDep_INPD ', 'GCHPchem', + 'DryDep_INPB ', 'GCHPchem', + 'DryDep_INDIOL ', 'GCHPchem', + 'DryDep_IHN4 ', 'GCHPchem', + 'DryDep_IHN3 ', 'GCHPchem', + 'DryDep_IHN2 ', 'GCHPchem', + 'DryDep_IHN1 ', 'GCHPchem', + 'DryDep_IEPOXD ', 'GCHPchem', + 'DryDep_IEPOXB ', 'GCHPchem', + 'DryDep_IEPOXA ', 'GCHPchem', + 'DryDep_IDN ', 'GCHPchem', + 'DryDep_IDHPE ', 'GCHPchem', + 'DryDep_IDHDP ', 'GCHPchem', + 'DryDep_IDCHP ', 'GCHPchem', + 'DryDep_IDC ', 'GCHPchem', + 'DryDep_ICPDH ', 'GCHPchem', + 'DryDep_ICN ', 'GCHPchem', + 'DryDep_ICl ', 'GCHPchem', + 'DryDep_ICHE ', 'GCHPchem', + 'DryDep_IBr ', 'GCHPchem', + 'DryDep_I2O4 ', 'GCHPchem', + 'DryDep_I2O3 ', 'GCHPchem', + 'DryDep_I2O2 ', 'GCHPchem', + 'DryDep_I2 ', 'GCHPchem', + 'DryDep_HPETHNL ', 'GCHPchem', + 'DryDep_HPALD4 ', 'GCHPchem', + 'DryDep_HPALD3 ', 'GCHPchem', + 'DryDep_HPALD2 ', 'GCHPchem', + 'DryDep_HPALD1 ', 'GCHPchem', + 'DryDep_HONIT ', 'GCHPchem', + 'DryDep_HOI ', 'GCHPchem', + 'DryDep_HOCl ', 'GCHPchem', + 'DryDep_HOBr ', 'GCHPchem', + 'DryDep_HNO3 ', 'GCHPchem', + 'DryDep_HMS ', 'GCHPchem', + 'DryDep_HMML ', 'GCHPchem', + 'DryDep_HMHP ', 'GCHPchem', + 'DryDep_HI ', 'GCHPchem', + 'DryDep_HCOOH ', 'GCHPchem', + 'DryDep_HCl ', 'GCHPchem', + 'DryDep_HC5A ', 'GCHPchem', + 'DryDep_HBr ', 'GCHPchem', + 'DryDep_HAC ', 'GCHPchem', + 'DryDep_H2O2 ', 'GCHPchem', + 'DryDep_GLYX ', 'GCHPchem', + 'DryDep_GLYC ', 'GCHPchem', + 'DryDep_FURA ', 'GCHPchem', + 'DryDep_ETP ', 'GCHPchem', + 'DryDep_ETNO3 ', 'GCHPchem', + 'DryDep_ETHP ', 'GCHPchem', + 'DryDep_ETHN ', 'GCHPchem', + 'DryDep_ETHLN ', 'GCHPchem', + 'DryDep_EOH ', 'GCHPchem', + 'DryDep_DST4 ', 'GCHPchem', + 'DryDep_DST3 ', 'GCHPchem', + 'DryDep_DST2 ', 'GCHPchem', + 'DryDep_DST1 ', 'GCHPchem', + 'DryDep_CSL ', 'GCHPchem', + 'DryDep_ClOO ', 'GCHPchem', + 'DryDep_ClO ', 'GCHPchem', + 'DryDep_ClNO3 ', 'GCHPchem', + 'DryDep_ClNO2 ', 'GCHPchem', + 'DryDep_Cl2 ', 'GCHPchem', + 'DryDep_CH2O ', 'GCHPchem', + 'DryDep_BZPAN ', 'GCHPchem', + 'DryDep_BZCO3H ', 'GCHPchem', + 'DryDep_BrSALC ', 'GCHPchem', + 'DryDep_BrSALA ', 'GCHPchem', + 'DryDep_BrNO3 ', 'GCHPchem', + 'DryDep_BrCl ', 'GCHPchem', + 'DryDep_Br2 ', 'GCHPchem', + 'DryDep_BENZP ', 'GCHPchem', + 'DryDep_BCPO ', 'GCHPchem', + 'DryDep_BCPI ', 'GCHPchem', + 'DryDep_BALD ', 'GCHPchem', + 'DryDep_ATOOH ', 'GCHPchem', + 'DryDep_AROMP5 ', 'GCHPchem', + 'DryDep_AROMP4 ', 'GCHPchem', + 'DryDep_AONITA ', 'GCHPchem', + 'DryDep_ALD2 ', 'GCHPchem', + 'DryDep_AERI ', 'GCHPchem', + 'DryDep_ACTA ', 'GCHPchem', + 'DryDep_ACET ', 'GCHPchem', #'DryDep_TSOG3 ', 'GCHPchem', #'DryDep_TSOG2 ', 'GCHPchem', #'DryDep_TSOG1 ', 'GCHPchem', @@ -2574,28 +2574,28 @@ COLLECTIONS: @#'DefaultCollection', #'Met_Z0 ', 'GCHPchem', #'FracOfTimeInTrop ', 'GCHPchem', :: -@#============================================================================== -@# %%%%% THE StratBM COLLECTION %%%%% -@# -@# Fields needed for GEOS-Chem 10-year stratospheric benchmarks -@# -@# Available for full-chemistry simulations -@#============================================================================== -@ StratBM.template: '%y4%m2%d2_%h2%n2z.nc4', -@ StratBM.format: 'CFIO', -@ StratBM.timestampStart: .true. -@ StratBM.monthly: 1 -@ StratBM.frequency: 010000 -@ StratBM.duration: 240000 -@ StratBM.mode: 'time-averaged' -@ StratBM.fields: 'SpeciesConcVV_NO2 ', 'GCHPchem', -@ 'SpeciesConcVV_O3 ', 'GCHPchem', -@ 'SpeciesConcVV_ClO ', 'GCHPchem', -@ 'Met_PSC2WET ', 'GCHPchem', -@ 'Met_BXHEIGHT ', 'GCHPchem', -@ 'Met_AIRDEN ', 'GCHPchem', -@ 'Met_AD ', 'GCHPchem', -@:: +#============================================================================== +# %%%%% THE StratBM COLLECTION %%%%% +# +# Fields needed for GEOS-Chem 10-year stratospheric benchmarks +# +# Available for full-chemistry simulations +#============================================================================== + StratBM.template: '%y4%m2%d2_%h2%n2z.nc4', + StratBM.format: 'CFIO', + StratBM.timestampStart: .true. + StratBM.monthly: 1 + StratBM.frequency: 010000 + StratBM.duration: 240000 + StratBM.mode: 'time-averaged' + StratBM.fields: 'SpeciesConcVV_NO2 ', 'GCHPchem', + 'SpeciesConcVV_O3 ', 'GCHPchem', + 'SpeciesConcVV_ClO ', 'GCHPchem', + 'Met_PSC2WET ', 'GCHPchem', + 'Met_BXHEIGHT ', 'GCHPchem', + 'Met_AIRDEN ', 'GCHPchem', + 'Met_AD ', 'GCHPchem', +:: #============================================================================== # %%%%% THE Tomas Microphysics Rate COLLECTION %%%%% # diff --git a/test/integration/GCClassic/integrationTestCompile.sh b/test/integration/GCClassic/integrationTestCompile.sh index 5fa7ca434..cbd688108 100755 --- a/test/integration/GCClassic/integrationTestCompile.sh +++ b/test/integration/GCClassic/integrationTestCompile.sh @@ -65,14 +65,6 @@ site=$(get_site_name) # All integration tests will use debugging features baseOptions="-DCMAKE_BUILD_TYPE=Debug -DRUNDIR='' -DINSTALLCOPY=${binDir}" -# Get the Git commit of the superproject and submodules -head_gcc=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}" log --oneline --no-decorate -1) -head_gc=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}/src/GEOS-Chem" log --oneline --no-decorate -1) -head_hco=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}/src/HEMCO" log --oneline --no-decorate -1) - # Site-specific settings if [[ "X${site}" == "XCANNON" && "X${SLURM_JOBID}" != "X" ]]; then @@ -133,9 +125,7 @@ rm -f ${results} print_to_log "${SEP_MAJOR}" "${results}" print_to_log "GEOS-Chem Classic: Compilation Test Results" "${results}" print_to_log "" "${results}" -print_to_log "GCClassic #${head_gcc}" "${results}" -print_to_log "GEOS-Chem #${head_gc}" "${results}" -print_to_log "HEMCO #${head_hco}" "${results}" +print_submodule_head_commits "10" "${codeDir}" "${results}" print_to_log "" "${results}" print_to_log "Using ${OMP_NUM_THREADS} OpenMP threads" "${results}" print_to_log "Number of compilation tests: ${numTests}" "${results}" diff --git a/test/integration/GCClassic/integrationTestCreate.sh b/test/integration/GCClassic/integrationTestCreate.sh index 48ccd518a..9c6c8b569 100755 --- a/test/integration/GCClassic/integrationTestCreate.sh +++ b/test/integration/GCClassic/integrationTestCreate.sh @@ -71,22 +71,11 @@ cd ${superProjectDir} # GEOS-Chem and HEMCO submodule directories geosChemDir="${superProjectDir}/src/GEOS-Chem" -hemcoDir="${superProjectDir}/src/HEMCO" - -# Get the Git commit of the superproject and submodules -head_gcc=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${superProjectDir}" log --oneline --no-decorate -1) -head_gc=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${geosChemDir}" log --oneline --no-decorate -1) -head_hco=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${hemcoDir}" log --oneline --no-decorate -1) # Echo header printf "${SEP_MAJOR}\n" printf "Creating GEOS-Chem Classic Integration Tests\n\n" -printf "GCClassic #${head_gcc}\n" -printf "GEOS-Chem #${head_gc}\n" -printf "HEMCO #${head_hco}\n" +print_submodule_head_commits "10" "${superProjectDir}" "" printf "${SEP_MAJOR}\n" #============================================================================= @@ -295,8 +284,43 @@ if [[ "X${testsToRun}" == "XALL" ]]; then # 05x0625 merra2 fullchem_47L_na create_rundir "1\n1\n1\n3\n4\n2\n${rundirsDir}\n\nn\n" "${log}" + #========================================================================= + # Simulation with all diagnostics on + #========================================================================== + + # Configuration files + allDiagsDir="gc_4x5_merra2_fullchem_alldiags" + extDataDir=$(grep "GC_DATA_ROOT" "${HOME}/.geoschem/config") + extDataDir=${extDataDir/export GC_DATA_ROOT\=/} + pfDat="${geosChemDir}/test/shared/alldiags/Planeflight.dat.20190701" + obsPk="${extDataDir}/Data_for_Int_Tests/obspack_input_for_testing.20190701.nc" + # Copy the fullchem_benchmark rundir to fullchem_alldiags + echo "... ${itRoot}/rundirs/${allDiagsDir}" + cd "${rundirsDir}" + cp -r "gc_4x5_merra2_fullchem_benchmark" "${allDiagsDir}" + cd "${allDiagsDir}" + + # Turn on all collections except RRTMG and Tomas collections (which + # Make sure to activate these in the RRTMG and TOMAS integration tests. + # Also note; there is a floating point error in the UVFlux diagnostic, + # so temporarily comment that out. + sed_ie "s|#'|'|" "HISTORY.rc" + sed_ie "s|'RRTMG'|#'RRTMG'|" "HISTORY.rc" + sed_ie "s|'Tomas'|#'Tomas'|" "HISTORY.rc" + sed_ie "s|'DynHeat|#'DynHeat|" "HISTORY.rc" + sed_ie "s|'UVFlux'|#'UVFlux'|" "HISTORY.rc" + + # Activate the planeflight diagnostic + cp -r "${pfDat}" . + toggle_geoschem_config_option "geoschem_config.yml" "planeflight" "true " + + # Activate the ObsPack diagnostic + cp -r "${obsPk}" . + toggle_geoschem_config_option "geoschem_config.yml" "obspack" "true " + # Switch back to the present directory cd "${thisDir}" + fi #============================================================================= @@ -304,15 +328,19 @@ fi #============================================================================= # Free local variables +unset allDiagsDir unset binDir unset buildDir unset commonFuncs unset dir unset envDir +unset extDataDir unset geosChemDir unset itRoot unset log unset logsDir +unset pfDat +unset obsPk unset rundirsDir unset superProjectDir unset scriptsDir diff --git a/test/integration/GCClassic/integrationTestExecute.sh b/test/integration/GCClassic/integrationTestExecute.sh index 8ef6260d3..54204114a 100755 --- a/test/integration/GCClassic/integrationTestExecute.sh +++ b/test/integration/GCClassic/integrationTestExecute.sh @@ -54,14 +54,6 @@ site=$(get_site_name) . ~/.bashrc > /dev/null 2>&1 [[ "X${site}" == "XCANNON" ]] && . ${envDir}/gcclassic.env > /dev/null 2>&1 -# Get the Git commit of the superproject and submodules -head_gcc=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}" log --oneline --no-decorate -1) -head_gc=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}/src/GEOS-Chem" log --oneline --no-decorate -1) -head_hco=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}/src/HEMCO" log --oneline --no-decorate -1) - # Site-specific settings if [[ "X${site}" == "XCANNON" && "X${SLURM_JOBID}" != "X" ]]; then @@ -117,9 +109,7 @@ rm -f "${results}" print_to_log "${SEP_MAJOR}" "${results}" print_to_log "GEOS-Chem Classic: Execution Test Results" "${results}" print_to_log "" "${results}" -print_to_log "GCClassic #${head_gcc}" "${results}" -print_to_log "GEOS-Chem #${head_gc}" "${results}" -print_to_log "HEMCO #${head_hco}" "${results}" +print_submodule_head_commits "10" "${codeDir}" "${results}" print_to_log "" "${results}" print_to_log "Using ${OMP_NUM_THREADS} OpenMP threads" "${results}" print_to_log "Number of execution tests: ${numTests}" "${results}" diff --git a/test/integration/GCHP/integrationTestCompile.sh b/test/integration/GCHP/integrationTestCompile.sh index b0bf58406..74ef3ddcd 100755 --- a/test/integration/GCHP/integrationTestCompile.sh +++ b/test/integration/GCHP/integrationTestCompile.sh @@ -65,16 +65,6 @@ site=$(get_site_name) # All integration tests will use debugging features baseOptions="-DCMAKE_BUILD_TYPE=Debug -DRUNDIR='' -DINSTALLCOPY=${binDir}" -# Get the Git commit of the superproject and submodules -head_gchp=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}" log --oneline --no-decorate -1) -head_gc=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}/src/GCHP_GridComp/GEOSChem_GridComp/geos-chem" \ - log --oneline --no-decorate -1) -head_hco=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}/src/GCHP_GridComp/HEMCO_GridComp/HEMCO" \ - log --oneline --no-decorate -1) - # Site-specific settings if [[ "X${site}" == "XCANNON" && "X${SLURM_JOBID}" != "X" ]]; then @@ -135,9 +125,7 @@ rm -f "${results}" print_to_log "${SEP_MAJOR}" "${results}" print_to_log "GCHP: Compilation Test Results" "${results}" print_to_log "" "${results}" -print_to_log "GCHP #${head_gchp}" "${results}" -print_to_log "GEOS-Chem #${head_gc}" "${results}" -print_to_log "HEMCO #${head_hco}" "${results}" +print_submodule_head_commits "14" "${codeDir}" "${results}" print_to_log "" "${results}" print_to_log "Number of compilation tests: ${numTests}" "${results}" print_to_log "" "${results}" diff --git a/test/integration/GCHP/integrationTestCreate.sh b/test/integration/GCHP/integrationTestCreate.sh index b5609f8de..863f7bb24 100755 --- a/test/integration/GCHP/integrationTestCreate.sh +++ b/test/integration/GCHP/integrationTestCreate.sh @@ -72,22 +72,11 @@ cd "${superProjectDir}" # GEOS-Chem and HEMCO submodule directories geosChemDir="${superProjectDir}/src/GCHP_GridComp/GEOSChem_GridComp/geos-chem" -hemcoDir="${superProjectDir}/src/GCHP_GridComp/HEMCO_GridComp/HEMCO" - -# Get the Git commit of the superproject and submodules -head_gchp=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${superProjectDir}" log --oneline --no-decorate -1) -head_gc=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${geosChemDir}" log --oneline --no-decorate -1) -head_hco=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${hemcoDir}" log --oneline --no-decorate -1) # Echo header printf "${SEP_MAJOR}\n" printf "Creating GCHP Integration Tests\n\n" -printf "GCHP #${head_gchp}\n" -printf "GEOS_Chem #${head_gc}\n" -printf "HEMCO #${head_hco}\n" +print_submodule_head_commits "14" "${superProjectDir}" "" printf "${SEP_MAJOR}\n" #============================================================================= @@ -235,6 +224,26 @@ if [[ "X${testsToRun}" == "XALL" ]]; then # c24 merra2 fullchem_TOMAS15 create_rundir "1\n6\n1\n1\n${rundirsDir}\n\nn\n" "${log}" + #========================================================================= + # Simulation with all diagnostics on + #========================================================================== + + # Copy the fullchem_benchmark rundir to fullchem_alldiags + echo "... ${itRoot}/rundirs/gchp_merra2_fullchem_alldiags" + cd "${rundirsDir}" + cp -r gchp_merra2_fullchem_benchmark gchp_merra2_fullchem_alldiags + + # Turn on all collections except RRTMG, DynHeat, Tomas. + # Make sure to activate these in the RRTMG and TOMAS integration tests. + # Also note; there is a floating point error in the UVFlux diagnostic, + # so temporarily comment that out. + sed_ie "s|#'|'|" gchp_merra2_fullchem_alldiags/HISTORY.rc + sed_ie "s|#'|'|" gchp_merra2_fullchem_alldiags/HISTORY.rc + sed_ie "s|'RRTMG'|#'RRTMG'|" gchp_merra2_fullchem_alldiags/HISTORY.rc + sed_ie "s|'Tomas'|#'Tomas'|" gchp_merra2_fullchem_alldiags/HISTORY.rc + sed_ie "s|'DynHeat|#'DynHeat|" gchp_merra2_fullchem_alldiags/HISTORY.rc + sed_ie "s|'UVFlux'|#'UVFlux'|" gchp_merra2_fullchem_alldiags/HISTORY.rc + # Switch back to the present directory cd "${thisDir}" fi diff --git a/test/integration/GCHP/integrationTestExecute.sh b/test/integration/GCHP/integrationTestExecute.sh index b105d217b..d80a952a3 100755 --- a/test/integration/GCHP/integrationTestExecute.sh +++ b/test/integration/GCHP/integrationTestExecute.sh @@ -55,16 +55,6 @@ site=$(get_site_name) . ~/.bashrc > /dev/null 2>&1 [[ "X${site}" == "XCANNON" ]] && . ${envDir}/gchp.env > /dev/null 2>&1 -# Get the Git commit of the superproject and submodules -head_gchp=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}" log --oneline --no-decorate -1) -head_gc=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}/src/GCHP_GridComp/GEOSChem_GridComp/geos-chem" \ - log --oneline --no-decorate -1) -head_hco=$(export GIT_DISCOVERY_ACROSS_FILESYSTEM=1; \ - git -C "${codeDir}/src/GCHP_GridComp/HEMCO_GridComp/HEMCO" \ - log --oneline --no-decorate -1) - # Site-specific settings if [[ "X${site}" == "XCANNON" && "X${SLURM_JOBID}" != "X" ]]; then @@ -128,9 +118,7 @@ rm -f "${results}" print_to_log "${SEP_MAJOR}" "${results}" print_to_log "GCHP: Execution Test Results" "${results}" print_to_log "" "${results}" -print_to_log "GCHP #${head_gchp}" "${results}" -print_to_log "GEOS-Chem #${head_gc}" "${results}" -print_to_log "HEMCO #${head_hco}" "${results}" +print_submodule_head_commits "14" "${codeDir}" "${results}" print_to_log "" "${results}" print_to_log "Number of execution tests: ${numTests}" "${results}" print_to_log "" "${results}" @@ -203,6 +191,10 @@ for runDir in *; do # Remove any leftover files in the run dir ./cleanRunDir.sh --no-interactive >> "${log}" 2>&1 + # Also reset cap_restart to 00:00:00 UTC, + # in case we are restarting the tests maually + sed_ie 's/ ....00/ 000000/g' cap_restart + # Link to the environment file ./setEnvironmentLink.sh "${envDir}/gchp.env" diff --git a/test/shared/alldiags/Planeflight.dat.20190701 b/test/shared/alldiags/Planeflight.dat.20190701 new file mode 100644 index 000000000..1edbeb928 --- /dev/null +++ b/test/shared/alldiags/Planeflight.dat.20190701 @@ -0,0 +1,50 @@ +Planeflight.dat -- Input file for planeflight diagnostic +GCST +29 Jul 2024 +----------------------------------------------------------- +14 <-- # of variables to be output (listed below) +----------------------------------------------------------- +TRA_001 +TRA_002 +O3 +OH +RO2 +AN +NOy +GMAO_TEMP +AODC_SULF +AODB_SULF +TIME_LT +AQAER_RAD +AQAER_SURF +JVL_001 +----------------------------------------------------------- + Now give the times and locations of the flight +----------------------------------------------------------- +POINT TYPE DD-MM-YYYY HH:MM LAT LON PRESS OBS + 1 DC-8 01-07-2019 00:05 34.39 -95.00 757.33 9999.000 + 2 DC-8 01-07-2019 00:07 34.53 -95.08 668.89 9999.000 + 3 DC-8 01-07-2019 00:09 34.70 -95.16 574.40 9999.000 + 4 DC-8 01-07-2019 00:10 34.86 -95.26 484.89 9999.000 + 5 DC-8 01-07-2019 00:12 35.03 -95.35 433.15 9999.000 + 6 DC-8 01-07-2019 00:14 35.21 -95.46 428.34 9999.000 + 7 DC-8 01-07-2019 00:16 35.39 -95.56 428.38 9999.000 + 8 DC-8 01-07-2019 00:17 35.57 -95.67 428.47 9999.000 + 9 DC-8 01-07-2019 00:19 35.75 -95.78 428.47 9999.000 + 10 DC-8 01-07-2019 00:24 36.34 -95.95 428.52 9999.000 + 11 DC-8 01-07-2019 00:26 36.53 -95.99 428.31 9999.000 + 12 DC-8 01-07-2019 00:28 36.73 -96.01 428.36 9999.000 + 13 DC-8 01-07-2019 00:30 36.93 -96.00 428.75 9999.000 + 14 DC-8 01-07-2019 00:31 37.09 -96.14 428.42 9999.000 + 15 DC-8 01-07-2019 00:33 37.25 -96.28 428.45 9999.000 + 16 DC-8 01-07-2019 00:35 37.41 -96.41 428.55 9999.000 + 17 DC-8 01-07-2019 00:37 37.57 -96.55 428.55 9999.000 + 18 DC-8 01-07-2019 00:38 37.72 -96.69 428.50 9999.000 + 19 DC-8 01-07-2019 00:40 37.88 -96.83 433.37 9999.000 + 20 DC-8 01-07-2019 00:42 38.02 -96.96 508.21 9999.000 + 21 DC-8 01-07-2019 00:44 38.16 -97.08 547.75 9999.000 + 22 DC-8 01-07-2019 00:45 38.29 -97.21 592.62 9999.000 + 23 DC-8 01-07-2019 00:47 38.38 -97.36 678.79 9999.000 + 24 DC-8 01-07-2019 00:49 38.46 -97.50 754.43 9999.000 + 25 DC-8 01-07-2019 00:51 38.53 -97.63 805.60 9999.000 +99999 END 00-00-0000 00:00 0.00 0.00 0.00 0.000 \ No newline at end of file diff --git a/test/shared/commonFunctionsForTests.sh b/test/shared/commonFunctionsForTests.sh index 6e28a9c41..e940759cd 100755 --- a/test/shared/commonFunctionsForTests.sh +++ b/test/shared/commonFunctionsForTests.sh @@ -39,8 +39,8 @@ SED_HEMCO_CONF_2='s/GEOS_0.5x0.625/GEOS_0.5x0.625_NA/' SED_HEMCO_CONF_3='s/DiagnFreq: Monthly/DiagnFreq: 00000000 010000/' SED_HEMCO_CONF_4='s/DiagnFreq: Monthly/DiagnFreq: 00000000 002000/' SED_HEMCO_CONF_N='s/\$RES.\$NC/\$RES.NA.\$NC/' -SED_HISTORY_RC_1='s/00000100 000000/00000000 010000/' -SED_HISTORY_RC_N='s/00000100 000000/00000000 002000/' +SED_HISTORY_RC_1='s/00000... 0..000/00000000 010000/' +SED_HISTORY_RC_N='s/00000... 0..000/00000000 002000/' CMP_PASS_STR='Configure & Build.....PASS' CMP_FAIL_STR='Configure & Build.....FAIL' EXE_PASS_STR='Execute Simulation....PASS' @@ -267,14 +267,17 @@ function update_config_files() { # Replace text in HISTORY.rc #------------------------------------------------------------------------ - # For nested-grid fullchem runs, change frequency and duration to 20 mins - # in order to reduce the run time of the whole set of integration tests. if grep -q "05x0625" <<< "${runPath}"; then - sed_ie "${SED_HISTORY_RC_N}" "${runPath}/HISTORY.rc" - fi - # Other text replacements - sed_ie "${SED_HISTORY_RC_1}" "${runPath}/HISTORY.rc" + # For nested-grid fullchem runs, change frequency and duration + # to 20 mins to reduce the run time of the whole set of tests. + sed_ie "${SED_HISTORY_RC_N}" "${runPath}/HISTORY.rc" + + else + + # Otherwise change frequency & duration to 1 hour + sed_ie "${SED_HISTORY_RC_1}" "${runPath}/HISTORY.rc" + fi } @@ -781,3 +784,72 @@ function get_default_gchp_env_file() { echo "$envFile" return 0 } + + +function print_submodule_head_commits() { + #======================================================================== + # Print the head commits for each Git submodule ##### + # + # 1st argument: Number of pad characters before commit line starts + # 2nd argument: Path to top-level code directory + # 3rd argument: Log file where output will be written + #======================================================================== + export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 + n_pad=${1} + baseDir=$(basename "${2}") + pad=" " + + # Get submodule names from .gitmodules in the superproject folder + submods=(.) + submods+=$(grep path "${2}/.gitmodules") + submods=${submods//path = /} + + # Loop over submodules + # Skip blank entries and geos-chem-shared-docs + for submod in ${submods[@]}; do + if [[ "X${submod}" != "X" ]]; then + if [[ ! "${submod}" =~ "geos-chem-shared-docs" ]]; then + + # Get the head commit for each submodule and create a + # display string to print either to log file or to stdout. + # For clarity, remove _GridComp from FVdycoreCubed_GridComp. + if [[ -d "${2}/$submod" ]]; then + head=$(git -C "${2}/$submod" log --oneline -1) + y=$(basename $submod) + y=${y/_GridComp/} + y=${y/\./${baseDir}} + if [[ "X${3}" == "X" ]]; then + echo "${y:0:n_pad}${pad:0:$((n_pad - ${#y}))}: $head" + else + echo "${y:0:n_pad}${pad:0:$((n_pad - ${#y}))}: $head" >> "${3}" + fi + + fi + fi + fi + done +} + + +function toggle_geoschem_config_option() { + + #=================================================================== + # Toggles the "activate " option in geoschem_config.yml + # for a given YAML tag to either "true " or "false". + # + # 1st argument: geoschem_config.yml file + # 2nd argument: YAML tag (e.g. "planeflight") + # 3rd argument: Replacement + #=================================================================== + + # Replace newlines with formfeed and save to a temporary file + cat "${1}" | tr '\n' '\t' > "tmp.${1}" + + # Replace the activate value (one line below the option name) + # to the value specified. Must have 5 characters! + sed -i -e "s/${2}:\t activate: ...../${2}:\t activate: ${3}/g" "tmp.${1}" + + # Replace form feed with new line and delete temporary file + cat "tmp.${1}" | tr '\t' '\n' > "${1}" + rm -f "tmp.${1}" +}