From 2c8910869728a58fdc5786dbdf08d1c145077fbc Mon Sep 17 00:00:00 2001 From: Melissa Sulprizio Date: Fri, 19 Jul 2024 11:39:50 -0400 Subject: [PATCH 01/33] Add ModelE2.1 (GCAP 2.0) simulation to GCClassic integration tests We now run a 2x2.5 ModelE2.1 (aka GCAP 2.0) full-chemistry simulation in the GCClassic integration tests. Only one scenario (SSP2-4.5) is evaluated here simply to ensure these future scenario simulations compile and run for 1 hour successfully. I will defer to @ltmurray for guidance on whether additional simulations are needed. The GCAP 2.0 integration test is passing off of 14.4.1, confirming that the fixes in https://github.com/geoschem/geos-chem/pull/2342 should have resolved the issues of GCAP 2.0 not working in 14.0.0 (as reported by Lee Murray at IGC11). Sample integration test output: ``` ============================================================================== GEOS-Chem Classic: Execution Test Results GCClassic #c49fcec Submod updates: Merge GEOS-Chem PR #2353 and Cloud-J PR #19 GEOS-Chem #7e4001658 Merge PR #2369 (Fix several issues with satellite diagnostics) HEMCO #2192e0e HEMCO 3.9.1 release Using 24 OpenMP threads Number of execution tests: 29 Submitted as SLURM job: 40462513 ============================================================================== Execution tests: ------------------------------------------------------------------------------ gc_05x0625_NA_47L_merra2_CH4........................Execute Simulation....PASS gc_05x0625_NA_47L_merra2_fullchem...................Execute Simulation....PASS gc_2x25_ModelE2.1_fullchem..........................Execute Simulation....PASS ``` Signed-off-by: Melissa Sulprizio --- CHANGELOG.md | 1 + test/integration/GCClassic/integrationTestCreate.sh | 7 +++++++ test/shared/commonFunctionsForTests.sh | 2 ++ 3 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e2446547..1692b2571 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ 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 ModelEe.2 (GCAP 2.0) simulation to integration tests for GCClassic ### Changed - Now reset `State_Diag%SatDiagnCount` to zero in routine`History_Write` (instead of in `History_Netcdf_Write`) diff --git a/test/integration/GCClassic/integrationTestCreate.sh b/test/integration/GCClassic/integrationTestCreate.sh index 48ccd518a..3c4e21a2e 100755 --- a/test/integration/GCClassic/integrationTestCreate.sh +++ b/test/integration/GCClassic/integrationTestCreate.sh @@ -285,6 +285,13 @@ if [[ "X${testsToRun}" == "XALL" ]]; then # 4x5 merra2 fullchem_47L create_rundir "1\n1\n1\n1\n2\n${rundirsDir}\n\nn\n" "${log}" + #========================================================================= + # GCAP 2.0 simulations + #========================================================================= + + # 2x2.5 ModelE2.1 fullchem (scenario SSP2-4.5, option 6) + create_rundir "1\n1\n4\n6\n2\n1\n${rundirsDir}\n\nn\n" "${log}" + #========================================================================= # Nested-grid simulations #========================================================================= diff --git a/test/shared/commonFunctionsForTests.sh b/test/shared/commonFunctionsForTests.sh index 6e28a9c41..bae5681ee 100755 --- a/test/shared/commonFunctionsForTests.sh +++ b/test/shared/commonFunctionsForTests.sh @@ -32,6 +32,7 @@ SED_CONFIG_3='s/end_date: \[20160201, 000000\]/end_date: \[20190101, 010000\]/' SED_CONFIG_4='s/end_date: \[20160101, 000000\]/end_date: \[20190101, 010000\]/' SED_CONFIG_5='s/end_date: \[20190201, 000000\]/end_date: \[20190101, 010000\]/' SED_CONFIG_6='s/end_date: \[20190801, 000000\]/end_date: \[20190701, 010000\]/' +SED_CONFIG_7='s/end_date: \[20900801, 000000\]/end_date: \[20900701, 010000\]/' SED_CONFIG_N1='s/end_date: \[20190201, 000000\]/end_date: \[20190101, 002000\]/' SED_CONFIG_N2='s/end_date: \[20190801, 000000\]/end_date: \[20190701, 002000\]/' SED_HEMCO_CONF_1='s/GEOS_0.25x0.3125/GEOS_0.25x0.3125_NA/' @@ -229,6 +230,7 @@ function update_config_files() { sed_ie "${SED_CONFIG_4}" "${runPath}/geoschem_config.yml" sed_ie "${SED_CONFIG_5}" "${runPath}/geoschem_config.yml" sed_ie "${SED_CONFIG_6}" "${runPath}/geoschem_config.yml" + sed_ie "${SED_CONFIG_7}" "${runPath}/geoschem_config.yml" #------------------------------------------------------------------------ # Replace text in HEMCO_Config.rc From 2f52b06eee3d0937bf0646ce2721ed6bac96dc1a Mon Sep 17 00:00:00 2001 From: Lizzie Lundgren Date: Mon, 17 Jun 2024 12:20:34 -0400 Subject: [PATCH 02/33] Add half-degree global simulation option for GEOS-IT with transport tracers Signed-off-by: Lizzie Lundgren --- CHANGELOG.md | 1 + run/GCClassic/createRunDir.sh | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e2446547..76f314721 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ 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 transport tracer run directory option for global half-degree GC-Classic run with GEOS-IT 0.5x0.625 fields ### Changed - Now reset `State_Diag%SatDiagnCount` to zero in routine`History_Write` (instead of in `History_Netcdf_Write`) diff --git a/run/GCClassic/createRunDir.sh b/run/GCClassic/createRunDir.sh index f7f364e52..39d34e84b 100755 --- a/run/GCClassic/createRunDir.sh +++ b/run/GCClassic/createRunDir.sh @@ -504,6 +504,9 @@ if [[ "x${met}" == "xModelE2.1" || "x${met}" == "xModelE2.2" ]]; then elif [[ ${met} = "geosit" ]]; then printf " 1. 4.0 x 5.0\n" printf " 2. 2.0 x 2.5\n" + if [[ "${sim_name}" = "TransportTracers" ]]; then + printf " 3. 0.5 x 0.625\n" + fi else printf " 1. 4.0 x 5.0\n" printf " 2. 2.0 x 2.5\n" @@ -543,7 +546,7 @@ while [ "${valid_res}" -eq 0 ]; do fi done -if [[ ${grid_res} = "05x0625" ]] || [[ ${grid_res} = "025x03125" ]]; then +if [[ "${met}" != "geosit" ]] && [[ "${grid_res}" = "05x0625" || "${grid_res}" = "025x03125" ]]; then printf "${thinline}Choose horizontal grid domain:${thinline}" printf " 1. Global\n" printf " 2. Asia\n" From dcc1afe659931f28bc7659e2a21329dc99927cf1 Mon Sep 17 00:00:00 2001 From: Melissa Sulprizio Date: Wed, 24 Jul 2024 08:37:55 -0400 Subject: [PATCH 03/33] Shorten ModelE2.1 simulation in GCClassic integration tests from 1 hour to 20 minutes To speed up integration tests, we now run the ModelE2.1 (GCAP 2.0) simulation for 20 minutes instead of 1 hour since these simulations run at 2x2.5 resolution. Signed-off-by: Melissa Sulprizio --- test/shared/commonFunctionsForTests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/shared/commonFunctionsForTests.sh b/test/shared/commonFunctionsForTests.sh index bae5681ee..f86b107e2 100755 --- a/test/shared/commonFunctionsForTests.sh +++ b/test/shared/commonFunctionsForTests.sh @@ -32,7 +32,7 @@ SED_CONFIG_3='s/end_date: \[20160201, 000000\]/end_date: \[20190101, 010000\]/' SED_CONFIG_4='s/end_date: \[20160101, 000000\]/end_date: \[20190101, 010000\]/' SED_CONFIG_5='s/end_date: \[20190201, 000000\]/end_date: \[20190101, 010000\]/' SED_CONFIG_6='s/end_date: \[20190801, 000000\]/end_date: \[20190701, 010000\]/' -SED_CONFIG_7='s/end_date: \[20900801, 000000\]/end_date: \[20900701, 010000\]/' +SED_CONFIG_7='s/end_date: \[20900801, 000000\]/end_date: \[20900701, 002000\]/' SED_CONFIG_N1='s/end_date: \[20190201, 000000\]/end_date: \[20190101, 002000\]/' SED_CONFIG_N2='s/end_date: \[20190801, 000000\]/end_date: \[20190701, 002000\]/' SED_HEMCO_CONF_1='s/GEOS_0.25x0.3125/GEOS_0.25x0.3125_NA/' From f6dc4004b1199bf901e115adfb77246a818e7c07 Mon Sep 17 00:00:00 2001 From: Melissa Sulprizio Date: Wed, 24 Jul 2024 08:14:16 -0400 Subject: [PATCH 04/33] Add full-chemistry simulation with all diagnostics turned on in HISTORY.rc to GCClassic integration tests In order to evaluate all diagnostic collections, we now include a simulation with all collections activated in HISTORY.rc. This is a copy of the gc_4x5_merra2_fullchem_benchmark simulation with the comment character removed from all collection names at the top of HISTORY.rc. Signed-off-by: Melissa Sulprizio --- CHANGELOG.md | 1 + test/integration/GCClassic/integrationTestCreate.sh | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e2446547..dae208e5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ 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 ### Changed - Now reset `State_Diag%SatDiagnCount` to zero in routine`History_Write` (instead of in `History_Netcdf_Write`) diff --git a/test/integration/GCClassic/integrationTestCreate.sh b/test/integration/GCClassic/integrationTestCreate.sh index 48ccd518a..a243f1fe7 100755 --- a/test/integration/GCClassic/integrationTestCreate.sh +++ b/test/integration/GCClassic/integrationTestCreate.sh @@ -295,8 +295,17 @@ 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 + #========================================================================== + + cd ${rundirsDir}/ + cp -r gc_4x5_merra2_fullchem_benchmark gc_4x5_merra2_fullchem_alldiags + sed_ie "s|#'|'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc + # Switch back to the present directory cd "${thisDir}" + fi #============================================================================= From 39df8a63ac587e00b822e8863a734b005a231bbc Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Thu, 25 Jul 2024 14:48:54 -0400 Subject: [PATCH 05/33] Change HISTORY.rc duration to 20mins for ModelE2.1 int tests test/shared/commonFunctionsForTests.sh - Also apply the sed command to change "00000100 000000" to "00000000 002000" for the GCAP2 ModelE2.1 int tests. This makes the frequency & duration consistent with the simulation length. Signed-off-by: Bob Yantosca --- test/shared/commonFunctionsForTests.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/shared/commonFunctionsForTests.sh b/test/shared/commonFunctionsForTests.sh index f86b107e2..75db0dd12 100755 --- a/test/shared/commonFunctionsForTests.sh +++ b/test/shared/commonFunctionsForTests.sh @@ -275,6 +275,12 @@ function update_config_files() { sed_ie "${SED_HISTORY_RC_N}" "${runPath}/HISTORY.rc" fi + # For ModelE2.1 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 "ModelE2.1" <<< "${runPath}"; then + sed_ie "${SED_HISTORY_RC_N}" "${runPath}/HISTORY.rc" + fi + # Other text replacements sed_ie "${SED_HISTORY_RC_1}" "${runPath}/HISTORY.rc" } From 1fe1decbc3eaa8cb6f93252fd98e1558822aea09 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Fri, 26 Jul 2024 10:19:30 -0400 Subject: [PATCH 06/33] Add missing fields for UVFlux collection in HISTORY.rc.fullchem run/GCClassic/HISTORY.rc.fullchem - Added missing fields for the UVFlux collection (frequency, duration, mode, fields). CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca --- CHANGELOG.md | 2 +- run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dae208e5f..65fc537bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,11 +21,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - 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` ### 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/run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem b/run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem index db5264b46..637d1c2ef 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? ', :: From d67ff08424f078de28bfede6eb95f2d90a02a8ca Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Fri, 26 Jul 2024 13:55:05 -0400 Subject: [PATCH 07/33] Update logic to reset of frequency & declaration in HISTORY.rc files test/shared/commonFunctionsForTests.sh - Update SED_HISTORY_RC_1 and SED_HISTORY_RC_N to use regex wildcard characters for certain digits - Update logic so that we first test on the resolution name before changing frequency & duration values to 20 mins (for nested-grid tests) or 1-hr (for other tests) run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem - Update frequency and duration of the TOMAS collection from "010000" to "00000100 000000", to be consistent with other collections Signed-off-by: Bob Yantosca --- .../HISTORY.rc.templates/HISTORY.rc.fullchem | 4 +- test/shared/commonFunctionsForTests.sh | 52 ++++++++++++++++--- 2 files changed, 46 insertions(+), 10 deletions(-) diff --git a/run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem b/run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem index 637d1c2ef..5335cc182 100644 --- a/run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem +++ b/run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem @@ -839,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/test/shared/commonFunctionsForTests.sh b/test/shared/commonFunctionsForTests.sh index 6e28a9c41..f90d877a0 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,36 @@ 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} + pad=" " + submods=$(grep path "${2}/.gitmodules") + submods=${submods//path = /} + for submod in ${submods[@]}; do + if [[ "X${submod}" != "X" ]]; then + # Skip the geos-chem-shared-docs output + if [[ ! "${submod}" =~ "geos-chem-shared-docs" ]]; then + if [[ -d "${2}/$submod" ]]; then + head=$(git -C "${2}/$submod" log --oneline -1) + y=$(basename $submod) + 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 +} From 866a7c0a345e654e09470c5b6967b7734efc25d8 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Fri, 26 Jul 2024 14:07:12 -0400 Subject: [PATCH 08/33] Use a function to print submodule hashes in integration tests test/shared/commonFunctionsForTests.sh - Add "print_submodule_head_commits" function to print the commit hash & description at the head of each submodule test/integration/GCClassic/integrationTestCreate.sh test/integration/GCClassic/integrationTestCompile.sh test/integration/GCClassic/integrationTestExecute.sh test/integration/GCHP/integrationTestCreate.sh test/integration/GCHP/integrationTestCompile.sh test/integration/GCHP/integrationTestExecute.sh - Now call print_submodule_head_commits instead of using inlined code Signed-off-by: Bob Yantosca --- .../GCClassic/integrationTestCompile.sh | 12 +---------- .../GCClassic/integrationTestCreate.sh | 21 +++++++------------ .../GCClassic/integrationTestExecute.sh | 12 +---------- .../GCHP/integrationTestCompile.sh | 14 +------------ .../integration/GCHP/integrationTestCreate.sh | 13 +----------- .../GCHP/integrationTestExecute.sh | 14 +------------ test/shared/commonFunctionsForTests.sh | 2 +- 7 files changed, 14 insertions(+), 74 deletions(-) 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 a243f1fe7..92daf0714 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" #============================================================================= @@ -299,9 +288,15 @@ if [[ "X${testsToRun}" == "XALL" ]]; then # Simulation with all diagnostics on #========================================================================== + # Copy the fullchem_benchmark rundir to fullchem_alldiags cd ${rundirsDir}/ cp -r gc_4x5_merra2_fullchem_benchmark gc_4x5_merra2_fullchem_alldiags - sed_ie "s|#'|'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc + + # Turn on all collections except RRTMG and Tomas collections (which + # Make sure to activate these in the RRTMG and TOMAS integration tests. + sed_ie "s|#'|'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc + sed_ie "s|'RRTMG'|#'RRTMG'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc + sed_ie "s|'Tomas'|#'Tomas'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc # Switch back to the present directory cd "${thisDir}" 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..cdd0c142c 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 "15" "${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..f323c68db 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 "10" "${superProjectDir}" "" printf "${SEP_MAJOR}\n" #============================================================================= diff --git a/test/integration/GCHP/integrationTestExecute.sh b/test/integration/GCHP/integrationTestExecute.sh index b105d217b..c0cab9990 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 "10" "${codeDir}" "${results}" print_to_log "" "${results}" print_to_log "Number of execution tests: ${numTests}" "${results}" print_to_log "" "${results}" diff --git a/test/shared/commonFunctionsForTests.sh b/test/shared/commonFunctionsForTests.sh index f90d877a0..d7adca63b 100755 --- a/test/shared/commonFunctionsForTests.sh +++ b/test/shared/commonFunctionsForTests.sh @@ -811,7 +811,7 @@ function print_submodule_head_commits() { else echo "${y:0:n_pad}${pad:0:$((n_pad - ${#y}))}: $head" >> "${3}" fi - + fi fi fi From 1f97c9e46ac385ab9b224a44f63b66a58bd2b9c7 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Fri, 26 Jul 2024 14:33:09 -0400 Subject: [PATCH 09/33] Tweak the display of submod head commits for GCHP int tests test/shared/commonFunctionsForTests.sh - Remove "_GridComp" from the "FVdycoreCubed" submodule display name in function print_submodule_head_commits test/integration/GCHP/integrationTestCompile.sh test/integration/GCHP/integrationTestCreate.sh test/integration/GCHP/integrationTestExecute.sh - Now use an offset of 14 characters for print_submodule_head_commits Signed-off-by: Bob Yantosca --- test/integration/GCHP/integrationTestCompile.sh | 2 +- test/integration/GCHP/integrationTestCreate.sh | 4 ++-- test/integration/GCHP/integrationTestExecute.sh | 2 +- test/shared/commonFunctionsForTests.sh | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/integration/GCHP/integrationTestCompile.sh b/test/integration/GCHP/integrationTestCompile.sh index cdd0c142c..74ef3ddcd 100755 --- a/test/integration/GCHP/integrationTestCompile.sh +++ b/test/integration/GCHP/integrationTestCompile.sh @@ -125,7 +125,7 @@ rm -f "${results}" print_to_log "${SEP_MAJOR}" "${results}" print_to_log "GCHP: Compilation Test Results" "${results}" print_to_log "" "${results}" -print_submodule_head_commits "15" "${codeDir}" "${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 f323c68db..e2da1133f 100755 --- a/test/integration/GCHP/integrationTestCreate.sh +++ b/test/integration/GCHP/integrationTestCreate.sh @@ -76,9 +76,9 @@ geosChemDir="${superProjectDir}/src/GCHP_GridComp/GEOSChem_GridComp/geos-chem" # Echo header printf "${SEP_MAJOR}\n" printf "Creating GCHP Integration Tests\n\n" -print_submodule_head_commits "10" "${superProjectDir}" "" +print_submodule_head_commits "14" "${superProjectDir}" "" printf "${SEP_MAJOR}\n" - +exit 1 #============================================================================= # Create integration test folder and subdirectories #============================================================================= diff --git a/test/integration/GCHP/integrationTestExecute.sh b/test/integration/GCHP/integrationTestExecute.sh index c0cab9990..c91ca574a 100755 --- a/test/integration/GCHP/integrationTestExecute.sh +++ b/test/integration/GCHP/integrationTestExecute.sh @@ -118,7 +118,7 @@ rm -f "${results}" print_to_log "${SEP_MAJOR}" "${results}" print_to_log "GCHP: Execution Test Results" "${results}" print_to_log "" "${results}" -print_submodule_head_commits "10" "${codeDir}" "${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}" diff --git a/test/shared/commonFunctionsForTests.sh b/test/shared/commonFunctionsForTests.sh index d7adca63b..a1cd5902c 100755 --- a/test/shared/commonFunctionsForTests.sh +++ b/test/shared/commonFunctionsForTests.sh @@ -801,11 +801,11 @@ function print_submodule_head_commits() { submods=${submods//path = /} for submod in ${submods[@]}; do if [[ "X${submod}" != "X" ]]; then - # Skip the geos-chem-shared-docs output if [[ ! "${submod}" =~ "geos-chem-shared-docs" ]]; then if [[ -d "${2}/$submod" ]]; then head=$(git -C "${2}/$submod" log --oneline -1) y=$(basename $submod) + y=${y/_GridComp/} if [[ "X${3}" == "X" ]]; then echo "${y:0:n_pad}${pad:0:$((n_pad - ${#y}))}: $head" else From 0f3997db853a94a822ee362aaaa378d616aa4fc6 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Fri, 26 Jul 2024 14:34:35 -0400 Subject: [PATCH 10/33] Remove debug exit statement from GCHP integrationTestCreate.sh test/integration/GCHP/integrationTestCreate.sh - Removed "exit 1" statement that was leftover from debugging. Signed-off-by: Bob Yantosca --- test/integration/GCHP/integrationTestCreate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/GCHP/integrationTestCreate.sh b/test/integration/GCHP/integrationTestCreate.sh index e2da1133f..6d5c6176c 100755 --- a/test/integration/GCHP/integrationTestCreate.sh +++ b/test/integration/GCHP/integrationTestCreate.sh @@ -78,7 +78,7 @@ printf "${SEP_MAJOR}\n" printf "Creating GCHP Integration Tests\n\n" print_submodule_head_commits "14" "${superProjectDir}" "" printf "${SEP_MAJOR}\n" -exit 1 + #============================================================================= # Create integration test folder and subdirectories #============================================================================= From 53568d1075f26dd48af82cf15718231e24dd5ba5 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Fri, 26 Jul 2024 14:50:49 -0400 Subject: [PATCH 11/33] Hotfix: Fix invalid YAML syntax in .github/workflows/stale.yml .github/workflows/stale.yml - Add brackets around the list for `exempt-issue-labels`. Verified this syntax with the YAML linter yamllint.com. CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca --- .github/workflows/stale.yml | 2 +- CHANGELOG.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index c4ba4f38f..c5b8f3e1e 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -22,7 +22,7 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-label: 'stale' - exempt-issue-labels: 'category: Discussion','category: Feature Request','deferred','help needed: Open Research Problem','help needed: Request Input from Community','never stale','TODO: Documentation' + exempt-issue-labels: ['category: Discussion','category: Feature Request','deferred','help needed: Open Research Problem','help needed: Request Input from Community','never stale','TODO: Documentation'] days-before-issue-stale: 30 days-before-issue-close: 7 stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. If there are no updates within 7 days it will be closed. You can add the "never stale" tag to prevent the issue from closing this issue.' diff --git a/CHANGELOG.md b/CHANGELOG.md index d8a6b5f45..2d3fe7db1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ This file documents all notable changes to the GEOS-Chem repository starting in The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] - TBD +### Fixed +- Added brackets around `exempt-issue-labels` list in `.github/workflows/stale.yml` + ## [14.4.2] - 2024-07-24 ### Added - Added number of levels with clouds for photolysis to geoschem_config.yml and Input_Opt to pass to Cloud-J From 368177766d04b3af87eccf7221beb2c2da8bb0c3 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Fri, 26 Jul 2024 15:49:28 -0400 Subject: [PATCH 12/33] Add gchp_merra2_fullchem_alldiags integration test test/integration/GCHP/integrationTestCreate.sh - Create a gchp_merra2_fullchem_alldiags by copying the gchp_merra2_fullchem_benchmark run directory and: - Disable RRTMG, Tomas, and DynHeating collections, as these are not enabled for fullchem_benchmark - Print the path of the gchp_merra2_fullchem_alldiags directory test/integration/GCClassic/integrationTestCreate.sh - Print the path of the gc_4x5_merra2_fullchem_alldiags directory - Also disable the DynHeating collection (if present) Signed-off-by: Bob Yantosca --- .../GCClassic/integrationTestCreate.sh | 10 ++++++---- test/integration/GCHP/integrationTestCreate.sh | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/test/integration/GCClassic/integrationTestCreate.sh b/test/integration/GCClassic/integrationTestCreate.sh index 92daf0714..951dcb45c 100755 --- a/test/integration/GCClassic/integrationTestCreate.sh +++ b/test/integration/GCClassic/integrationTestCreate.sh @@ -289,14 +289,16 @@ if [[ "X${testsToRun}" == "XALL" ]]; then #========================================================================== # Copy the fullchem_benchmark rundir to fullchem_alldiags - cd ${rundirsDir}/ + echo "... ${itRoot}/rundirs/gc_4x5_merra2_fullchem_alldiags" + cd "${rundirsDir}" cp -r gc_4x5_merra2_fullchem_benchmark gc_4x5_merra2_fullchem_alldiags # Turn on all collections except RRTMG and Tomas collections (which # Make sure to activate these in the RRTMG and TOMAS integration tests. - sed_ie "s|#'|'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc - sed_ie "s|'RRTMG'|#'RRTMG'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc - sed_ie "s|'Tomas'|#'Tomas'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc + sed_ie "s|#'|'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc + sed_ie "s|'RRTMG'|#'RRTMG'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc + sed_ie "s|'Tomas'|#'Tomas'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc + sed_ie "s|'DynHeat|#'DynHeat|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc # Switch back to the present directory cd "${thisDir}" diff --git a/test/integration/GCHP/integrationTestCreate.sh b/test/integration/GCHP/integrationTestCreate.sh index 6d5c6176c..aed39efe6 100755 --- a/test/integration/GCHP/integrationTestCreate.sh +++ b/test/integration/GCHP/integrationTestCreate.sh @@ -224,6 +224,23 @@ 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 and Tomas collections. + # Make sure to activate these in the RRTMG and TOMAS integration tests. + 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 + # Switch back to the present directory cd "${thisDir}" fi From f6091716a3b3b70822a73e622c9b81442082e5b5 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Mon, 29 Jul 2024 15:42:42 -0400 Subject: [PATCH 13/33] Enable planeflight output in gc_4x5_merra2_fullchem_alldiags tests GeosCore/planeflight_mod.F90 - Replace calls to GEOS_CHEM_STOP (which stops the run upon error) with calls to GC_Error + RETURN (to pass the error back to the main program). run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.* - Send planeflight diagnostic "plane.log" output to OutputDir - Now use dummy input file for ObsPack -- facilitates testing test/integration/GCClassic/integrationTestCreate.sh - Define bash variables to hold paths to configuration files (and unset them at the end of the script) - Navigate into the alldiags run directory to simplify bash commands - Copy the dummy planeflight and obspack input files to the run directory for the "alldiags" integration test - Call "toggle_geoschem_config_option" to turn on the planeflight and obspack diagnostics test/shared/alldiags/Planeflight.dat.20190701 - Dummy input file for the planeflight diagnostic used in the "alldiags" integration tests test/shared/commonFunctionsForTests.sh - Add comments to "print_submodule_head_commits" function - Add new function "toggle_geoschem_config_option" to toggle the "activate" value in the planeflight and obspack diagnostic menus in geoschem_config.yml CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca --- CHANGELOG.md | 3 +- GeosCore/planeflight_mod.F90 | 344 ++++++++++-------- .../geoschem_config.yml.CH4 | 4 +- .../geoschem_config.yml.CO2 | 4 +- .../geoschem_config.yml.Hg | 4 +- .../geoschem_config.yml.POPs | 4 +- .../geoschem_config.yml.TransportTracers | 4 +- .../geoschem_config.yml.aerosol | 4 +- .../geoschem_config.yml.carbon | 4 +- .../geoschem_config.yml.fullchem | 4 +- .../geoschem_config.yml.metals | 4 +- .../geoschem_config.yml.tagCO | 4 +- .../geoschem_config.yml.tagO3 | 4 +- .../GCClassic/integrationTestCreate.sh | 33 +- test/shared/alldiags/Planeflight.dat.20190701 | 50 +++ test/shared/commonFunctionsForTests.sh | 33 ++ 16 files changed, 320 insertions(+), 187 deletions(-) create mode 100644 test/shared/alldiags/Planeflight.dat.20190701 diff --git a/CHANGELOG.md b/CHANGELOG.md index 65fc537bd..fb60f9612 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,13 +8,14 @@ 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 +- Added simulation with all diagnostics on in HISTORY.rc to integration tests for GCClassic (including Planeflight + ObsPack) ### 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` ### Fixed - Typo in `setCommonRunSettings.sh` that made GCHP always choose mass fluxes for meteorology 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/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.CH4 b/run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.CH4 index 731590b20..12c9e9233 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_dummy_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..f63f93ae4 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_dummy_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..a802436da 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_dummy_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..799ea4330 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_dummy_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..e7bedb7a0 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_dummy_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..aa5c11563 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_dummy_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..c86526893 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_dummy_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..cc03493dd 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_dummy_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..7ce8ba569 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_dummy_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..b515b1f2d 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_dummy_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..009251a66 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_dummy_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/test/integration/GCClassic/integrationTestCreate.sh b/test/integration/GCClassic/integrationTestCreate.sh index 951dcb45c..e63159ec8 100755 --- a/test/integration/GCClassic/integrationTestCreate.sh +++ b/test/integration/GCClassic/integrationTestCreate.sh @@ -288,17 +288,34 @@ if [[ "X${testsToRun}" == "XALL" ]]; then # Simulation with all diagnostics on #========================================================================== + # Configuration files + allDiagsDir="gc_4x5_merra2_fullchem_alldiags" + extDataDir=$(grep "GC_DATA_ROOT" "~/.geoschem/config") + extDataDir=${extDataDir/export GC_DATA_ROOT\=/} + pfDat="${geosChemDir}/test/shared/alldiags/Planeflight.dat.20190701" + obsPk=\ + "${extDataDir}/Data_for_Int_Tests/obspack_dummy_input_for_testing.20190701.nc" + # Copy the fullchem_benchmark rundir to fullchem_alldiags - echo "... ${itRoot}/rundirs/gc_4x5_merra2_fullchem_alldiags" + echo "... ${itRoot}/rundirs/${allDiagsDir}" cd "${rundirsDir}" - cp -r gc_4x5_merra2_fullchem_benchmark gc_4x5_merra2_fullchem_alldiags + 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. - sed_ie "s|#'|'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc - sed_ie "s|'RRTMG'|#'RRTMG'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc - sed_ie "s|'Tomas'|#'Tomas'|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc - sed_ie "s|'DynHeat|#'DynHeat|" gc_4x5_merra2_fullchem_alldiags/HISTORY.rc + 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" + + # 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}" @@ -310,15 +327,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/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 a1cd5902c..f22e3e1ea 100755 --- a/test/shared/commonFunctionsForTests.sh +++ b/test/shared/commonFunctionsForTests.sh @@ -797,11 +797,20 @@ function print_submodule_head_commits() { export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 n_pad=${1} pad=" " + + # Get submodule names from .gitmodules in the superproject folder 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) @@ -817,3 +826,27 @@ function print_submodule_head_commits() { 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}" +} From 3efd4d5e77f9969b45f8c0610321f94864145947 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Mon, 29 Jul 2024 17:05:43 -0400 Subject: [PATCH 14/33] Rename ObsPack input file name in geoschem_config.yml templates run/GCClassic/geoschem_config.yml.templates/geoschem_config.yml.* - Change "obspack_dummy_input_for_testing.20190701.nc" to "obspack_input_for_testing.20190701.nc" in all GEOS-Chem Classic geoschem_config.yml templates. This will avoid an issue where "mm" is confused with minutes. Fix this issue later. Signed-off-by: Bob Yantosca --- .../geoschem_config.yml.templates/geoschem_config.yml.CH4 | 2 +- .../geoschem_config.yml.templates/geoschem_config.yml.CO2 | 2 +- .../geoschem_config.yml.templates/geoschem_config.yml.Hg | 2 +- .../geoschem_config.yml.templates/geoschem_config.yml.POPs | 2 +- .../geoschem_config.yml.TransportTracers | 2 +- .../geoschem_config.yml.templates/geoschem_config.yml.aerosol | 2 +- .../geoschem_config.yml.templates/geoschem_config.yml.carbon | 2 +- .../geoschem_config.yml.templates/geoschem_config.yml.fullchem | 2 +- .../geoschem_config.yml.templates/geoschem_config.yml.metals | 2 +- .../geoschem_config.yml.templates/geoschem_config.yml.tagCO | 2 +- .../geoschem_config.yml.templates/geoschem_config.yml.tagO3 | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) 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 12c9e9233..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_dummy_input_for_testing.20190701.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - CH4 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 f63f93ae4..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_dummy_input_for_testing.20190701.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - CO 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 a802436da..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_dummy_input_for_testing.20190701.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - Hg0 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 799ea4330..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_dummy_input_for_testing.20190701.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - POPG_${RUNDIR_POP_SPC} 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 e7bedb7a0..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_dummy_input_for_testing.20190701.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - Rn222 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 aa5c11563..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_dummy_input_for_testing.20190701.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - BCPI 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 c86526893..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_dummy_input_for_testing.20190701.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - CH4 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 cc03493dd..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_dummy_input_for_testing.20190701.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - CO 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 7ce8ba569..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_dummy_input_for_testing.20190701.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - AlF1 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 b515b1f2d..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_dummy_input_for_testing.20190701.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - CO 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 009251a66..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_dummy_input_for_testing.20190701.nc + input_file: ./obspack_input_for_testing.20190701.nc output_file: ./OutputDir/GEOSChem.ObsPack.YYYYMMDD_hhmmz.nc4 output_species: - O3 From 3a90c77b93251dd88c20f5bc3aa7e6e284948057 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Mon, 29 Jul 2024 17:26:43 -0400 Subject: [PATCH 15/33] Also print superproject hash to integration test logs test/shared/commonFunctionsForTests.sh - Add the current directory (.) to the list of submodules for which we will obtain Git commit hashes - In the display name (y), replace "." with the basename of argument ${2}. This is the name of the superproject. Signed-off-by: Bob Yantosca --- test/shared/commonFunctionsForTests.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/shared/commonFunctionsForTests.sh b/test/shared/commonFunctionsForTests.sh index f22e3e1ea..e940759cd 100755 --- a/test/shared/commonFunctionsForTests.sh +++ b/test/shared/commonFunctionsForTests.sh @@ -796,10 +796,12 @@ function print_submodule_head_commits() { #======================================================================== export GIT_DISCOVERY_ACROSS_FILESYSTEM=1 n_pad=${1} + baseDir=$(basename "${2}") pad=" " # Get submodule names from .gitmodules in the superproject folder - submods=$(grep path "${2}/.gitmodules") + submods=(.) + submods+=$(grep path "${2}/.gitmodules") submods=${submods//path = /} # Loop over submodules @@ -815,6 +817,7 @@ function print_submodule_head_commits() { 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 From 3735779721e73e1c9bb93cf0ef4ecf111f280877 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Mon, 29 Jul 2024 17:30:58 -0400 Subject: [PATCH 16/33] Bug fix: Copy proper obspack file to alldiags test directory test/integration/GCClassic/integrationTestCreate.sh - Bug fix: We forgot to adjust the name of the sample ObsPack data file stored in the $obsPk variable. This has now been corrected. Signed-off-by: Bob Yantosca --- test/integration/GCClassic/integrationTestCreate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/GCClassic/integrationTestCreate.sh b/test/integration/GCClassic/integrationTestCreate.sh index e63159ec8..a46fea363 100755 --- a/test/integration/GCClassic/integrationTestCreate.sh +++ b/test/integration/GCClassic/integrationTestCreate.sh @@ -294,7 +294,7 @@ if [[ "X${testsToRun}" == "XALL" ]]; then extDataDir=${extDataDir/export GC_DATA_ROOT\=/} pfDat="${geosChemDir}/test/shared/alldiags/Planeflight.dat.20190701" obsPk=\ - "${extDataDir}/Data_for_Int_Tests/obspack_dummy_input_for_testing.20190701.nc" + "${extDataDir}/Data_for_Int_Tests/obspack_input_for_testing.20190701.nc" # Copy the fullchem_benchmark rundir to fullchem_alldiags echo "... ${itRoot}/rundirs/${allDiagsDir}" From 03a25c37d9694de63870d31e34694f16ec4b7d28 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Mon, 29 Jul 2024 17:37:54 -0400 Subject: [PATCH 17/33] Bug fix: Use ${HOME} instead of ~ in grep command test/integration/GCClassic/integrationTestCreate.sh - In the grep command used to define the extDataDir variable, we must use ${HOME} instead of ~. Otherwise the grep fails. This was causing the sample ObsPack data file not to be copied to the alldiags test folder. Signed-off-by: Bob Yantosca --- test/integration/GCClassic/integrationTestCreate.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/integration/GCClassic/integrationTestCreate.sh b/test/integration/GCClassic/integrationTestCreate.sh index a46fea363..0e21acd84 100755 --- a/test/integration/GCClassic/integrationTestCreate.sh +++ b/test/integration/GCClassic/integrationTestCreate.sh @@ -290,12 +290,10 @@ if [[ "X${testsToRun}" == "XALL" ]]; then # Configuration files allDiagsDir="gc_4x5_merra2_fullchem_alldiags" - extDataDir=$(grep "GC_DATA_ROOT" "~/.geoschem/config") + 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" - + 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}" From dc61470a676fae841eb3a48367e38e27920055d0 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Tue, 30 Jul 2024 10:51:47 -0400 Subject: [PATCH 18/33] Bug fix: GCHP budget diagnostic now uses SO4 instead of O3 run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem - Now use SO4 instead of O3 for the Budget collection diagnostic fields. This will allow us to test The BudgetWetDep diagnostic, as SO4 is soluble and O3 is not. Using O3 caused a runtime error, which should now be fixed. CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca --- CHANGELOG.md | 1 + .../HISTORY.rc.templates/HISTORY.rc.fullchem | 42 +++++++++---------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb60f9612..354f422f9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - 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` +- Now use SO4 instead of O3 in the GCHP fullchem budget diagnostic (SO4 is soluble, O3 is not) ### Removed - Entry `SatDiagnPEDGE` from the `SatDiagn` collection; This needs to go into the `SatDiagnEdge` collection. diff --git a/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem b/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem index 535a8fb2e..7d0ac72c0 100644 --- a/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem +++ b/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem @@ -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 %%%%% From 5ab023707559f5a3f13f30cf5bdc2cc06450e6ee Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Tue, 30 Jul 2024 11:03:35 -0400 Subject: [PATCH 19/33] GCHP integration tests now reset cap_restart time to 000000 UTC test/integration/GCHP/integrationTestExecute.sh - Add an sed command to reset the cap_restart time to 000000 UTC. This will make sure that we restart the run from 0h UTC when we manually restart tests with utils/redoIntegrationTestExecute.sh. CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca --- CHANGELOG.md | 1 + test/integration/GCHP/integrationTestExecute.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 354f422f9..25b885a77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - 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 for manual restart ### Fixed - Typo in `setCommonRunSettings.sh` that made GCHP always choose mass fluxes for meteorology diff --git a/test/integration/GCHP/integrationTestExecute.sh b/test/integration/GCHP/integrationTestExecute.sh index c91ca574a..d80a952a3 100755 --- a/test/integration/GCHP/integrationTestExecute.sh +++ b/test/integration/GCHP/integrationTestExecute.sh @@ -191,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" From 023508a3ac484e69f60ae03fe64d2db4f7852ecd Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Tue, 30 Jul 2024 13:32:57 -0400 Subject: [PATCH 20/33] Compare tag names in uppercase in routine Get_UVFlux_Bin Headers/state_diag_mod.F90 - In routine "Get_UVFLux_Bin", make sure that tagName and UVFlux_Tag_Names(N) are both in uppercase before comparing them for equality. CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca --- CHANGELOG.md | 1 + Headers/state_diag_mod.F90 | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25b885a77..b8bb92563 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - The `SatDiagnOH` diagnostic now works for the carbon simulation - Restored missing fields for `UVFlux` collection in `run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem` - 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`) ### Removed - Entry `SatDiagnPEDGE` from the `SatDiagn` collection; This needs to go into the `SatDiagnEdge` collection. 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 From 3f3929f479a7e9faf66ff52465f121c2836866f2 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Tue, 30 Jul 2024 16:22:20 -0400 Subject: [PATCH 21/33] Disable the StratBM collection for the GCHP alldiags test Interfaces/GCHP/gchp_historyexportsmod.F90 - Replace "informative message here" with a detailed error message. run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem - Uncomment the StratBM diagnostic entries test/integration/GCHP/integrationTestExecute.sh - Add a sed command to comment out the StratBM collection in the collections list of HISTORY.rc for the GCHP "alldiags" test CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca --- CHANGELOG.md | 4 +- Interfaces/GCHP/gchp_historyexports_mod.F90 | 2 +- .../HISTORY.rc.templates/HISTORY.rc.fullchem | 44 +++++++++---------- .../integration/GCHP/integrationTestCreate.sh | 14 +++--- 4 files changed, 34 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8bb92563..0f7098aa2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - 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) +- 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`) @@ -16,7 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - 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 for manual restart +- 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 @@ -26,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Restored missing fields for `UVFlux` collection in `run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem` - 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`) +- Uncomment diagnostic entries for the GCHP `StratBM` collection ### Removed - Entry `SatDiagnPEDGE` from the `SatDiagn` collection; This needs to go into the `SatDiagnEdge` collection. 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/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem b/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem index 7d0ac72c0..c0f5b580d 100644 --- a/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem +++ b/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem @@ -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/GCHP/integrationTestCreate.sh b/test/integration/GCHP/integrationTestCreate.sh index aed39efe6..9587a38f6 100755 --- a/test/integration/GCHP/integrationTestCreate.sh +++ b/test/integration/GCHP/integrationTestCreate.sh @@ -233,13 +233,15 @@ if [[ "X${testsToRun}" == "XALL" ]]; then cd "${rundirsDir}" cp -r gchp_merra2_fullchem_benchmark gchp_merra2_fullchem_alldiags - # Turn on all collections except RRTMG and Tomas collections. + # Turn on all collections except RRTMG, DynHeat, Tomas, and StratBM. # Make sure to activate these in the RRTMG and TOMAS integration tests. - 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 + # StratBM is only needed for 10-year benchmarks, so we can skip here. + 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|'StratBM'|#'StratBM'|" gchp_merra2_fullchem_alldiags/HISTORY.rc # Switch back to the present directory cd "${thisDir}" From dcc88099c16ea61c7a3624af9862a15ecfc1578f Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Tue, 30 Jul 2024 17:57:38 -0400 Subject: [PATCH 22/33] Add missing "_" to GCHP DryDep collection entries run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem - Fix typo (i.e. "DryDepACET" -> "DryDep_ACET") in the DryDep collection entries. This was causing a GCHP runtime error. test/integration/GCHP/integrationTestCreate.sh - Reactivate the StratBM collection, this should be OK. CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca --- CHANGELOG.md | 2 +- .../HISTORY.rc.templates/HISTORY.rc.fullchem | 320 +++++++++--------- .../integration/GCHP/integrationTestCreate.sh | 4 +- 3 files changed, 162 insertions(+), 164 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f7098aa2..d13977258 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,7 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Restored missing fields for `UVFlux` collection in `run/GCClassic/HISTORY.rc.templates/HISTORY.rc.fullchem` - 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`) -- Uncomment diagnostic entries for the GCHP `StratBM` collection +- Fixed typo (missing `_` character) in GCHP `DryDep` collection diagnostic entries ### Removed - Entry `SatDiagnPEDGE` from the `SatDiagn` collection; This needs to go into the `SatDiagnEdge` collection. diff --git a/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem b/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem index c0f5b580d..93cbb71a1 100644 --- a/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem +++ b/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem @@ -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', diff --git a/test/integration/GCHP/integrationTestCreate.sh b/test/integration/GCHP/integrationTestCreate.sh index 9587a38f6..2a1074203 100755 --- a/test/integration/GCHP/integrationTestCreate.sh +++ b/test/integration/GCHP/integrationTestCreate.sh @@ -233,15 +233,13 @@ if [[ "X${testsToRun}" == "XALL" ]]; then cd "${rundirsDir}" cp -r gchp_merra2_fullchem_benchmark gchp_merra2_fullchem_alldiags - # Turn on all collections except RRTMG, DynHeat, Tomas, and StratBM. + # Turn on all collections except RRTMG, DynHeat, Tomas. # Make sure to activate these in the RRTMG and TOMAS integration tests. - # StratBM is only needed for 10-year benchmarks, so we can skip here. 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|'StratBM'|#'StratBM'|" gchp_merra2_fullchem_alldiags/HISTORY.rc # Switch back to the present directory cd "${thisDir}" From 9d766c47cd37393cb2bf94158ba9ed2dc445e316 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Wed, 31 Jul 2024 11:09:30 -0400 Subject: [PATCH 23/33] Fix issues in GCHP emissions collection; disable UVFlux in alldiags test run/GCHP/HISTORY.rc.fullchem - Comment out (with `###` the Emissions diagnostic entries that are are also commented out in the corresponding HEMCO_Diagn.rc.fullchem template. This will disable them in the GCHP "alldiags" test. test/integration/GCClassic/integrationTestCreate.sh test/integration/GCHP/integrationTestCreate.sh - Disable the UVFlux collection in the "alldiags" integration test, as this is currently problematic. Look to fix this later. CHANGELOG.md - Updated accordingly Signed-off-by: Bob Yantosca --- CHANGELOG.md | 2 ++ .../HISTORY.rc.templates/HISTORY.rc.fullchem | 16 ++++++++-------- .../GCClassic/integrationTestCreate.sh | 3 +++ test/integration/GCHP/integrationTestCreate.sh | 3 +++ 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d13977258..4987b6ab2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,9 +25,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - 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. diff --git a/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem b/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem index 93cbb71a1..cd13c00d7 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', diff --git a/test/integration/GCClassic/integrationTestCreate.sh b/test/integration/GCClassic/integrationTestCreate.sh index 0e21acd84..9c6c8b569 100755 --- a/test/integration/GCClassic/integrationTestCreate.sh +++ b/test/integration/GCClassic/integrationTestCreate.sh @@ -302,10 +302,13 @@ if [[ "X${testsToRun}" == "XALL" ]]; then # 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}" . diff --git a/test/integration/GCHP/integrationTestCreate.sh b/test/integration/GCHP/integrationTestCreate.sh index 2a1074203..863f7bb24 100755 --- a/test/integration/GCHP/integrationTestCreate.sh +++ b/test/integration/GCHP/integrationTestCreate.sh @@ -235,11 +235,14 @@ if [[ "X${testsToRun}" == "XALL" ]]; then # 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}" From ee5a477e6d75969c0b17a8fd8e0939be9eb91d34 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Wed, 31 Jul 2024 13:40:12 -0400 Subject: [PATCH 24/33] Add an extra "#" to commented-out emission diagnostics run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem - Added an extra # (now '####') when commenting out the unused diagnostic entries in the Emissions collection. This is needed for the "alldiags" test, which strips the first 3 '###' chars. Signed-off-by: Bob Yantosca --- .../HISTORY.rc.templates/HISTORY.rc.fullchem | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem b/run/GCHP/HISTORY.rc.templates/HISTORY.rc.fullchem index cd13c00d7..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', From dae49564af05fac3953e07e149e309a69677d9af Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Thu, 1 Aug 2024 10:18:09 -0400 Subject: [PATCH 25/33] Edit CHANGELOG.md to mention that GCHP "alldiags" test were added CHANGELOG.md - Added "and GCHP" to the "Added simulation with all diagnostics..." sentence. Signed-off-by: Bob Yantosca --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4987b6ab2..6399bd803 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ 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) +- 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 From 0c36abc6f884ef2d8a85f7957d25d54be1e97d59 Mon Sep 17 00:00:00 2001 From: ucfaea1 Date: Fri, 2 Aug 2024 10:39:32 +0100 Subject: [PATCH 26/33] Rebase "feature/trop-prs-in-satdiagn" atop PR #2399 This rebase brings the "feature/trop-prs-in-satdiagn" branch (which contains an update by @eamarais to add tropopause pressure to the SatDiagn collection) into the "dev/no-diff-to-benchmark" branch atop PR #2399. The original update was based off version 14.1.0. This merge brings PR # ( , by @) into Signed-off-by: Bob Yantosca --- GeosCore/diagnostics_mod.F90 | 7 ++++++ Headers/state_diag_mod.F90 | 44 ++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/GeosCore/diagnostics_mod.F90 b/GeosCore/diagnostics_mod.F90 index 6ea561f4b..5dbf805b4 100644 --- a/GeosCore/diagnostics_mod.F90 +++ b/GeosCore/diagnostics_mod.F90 @@ -1518,6 +1518,13 @@ SUBROUTINE Do_Archive_SatDiagn( Input_Opt, State_Chm, State_Diag, & State_Diag%SatDiagnTROPP(I,:) = State_Met%TROPP(I,:) * good ENDIF + !--------------------------------------------------------------------- + ! Tropopause level [unitless]: + !--------------------------------------------------------------------- + IF ( State_Diag%Archive_SatDiagnTropLev ) THEN + State_Diag%SatDiagnTropLev(I,:) = State_Met%TropLev(I,:) * good + ENDIF + !--------------------------------------------------------------------- ! PBL Height [m]: !--------------------------------------------------------------------- diff --git a/Headers/state_diag_mod.F90 b/Headers/state_diag_mod.F90 index 5ed1fc66e..83cbe1192 100644 --- a/Headers/state_diag_mod.F90 +++ b/Headers/state_diag_mod.F90 @@ -945,6 +945,9 @@ MODULE State_Diag_Mod REAL(f8), POINTER :: SatDiagnTROPP(:,:) LOGICAL :: Archive_SatDiagnTROPP + REAL(f8), POINTER :: SatDiagnTropLev(:,:) + LOGICAL :: Archive_SatDiagnTropLev + REAL(f8), POINTER :: SatDiagnPBLHeight(:,:) LOGICAL :: Archive_SatDiagnPBLHeight @@ -2409,6 +2412,9 @@ SUBROUTINE Zero_State_Diag( State_Diag, RC ) State_Diag%SatDiagnTROPP => NULL() State_Diag%Archive_SatDiagnTROPP = .FALSE. + State_Diag%SatDiagnTropLev => NULL() + State_Diag%Archive_SatDiagnTropLev = .FALSE. + State_Diag%SatDiagnPBLHeight => NULL() State_Diag%Archive_SatDiagnPBLHeight = .FALSE. @@ -4893,6 +4899,28 @@ SUBROUTINE Init_State_Diag( Input_Opt, State_Chm, State_Grid, & RETURN ENDIF + !------------------------------------------------------------------------ + ! Satellite diagnostic: Tropopause level (TropLev) + !------------------------------------------------------------------------ + diagId = 'SatDiagnTropLev' + CALL Init_and_Register( & + Input_Opt = Input_Opt, & + State_Chm = State_Chm, & + State_Diag = State_Diag, & + State_Grid = State_Grid, & + DiagList = Diag_List, & + TaggedDiagList = TaggedDiag_List, & + Ptr2Data = State_Diag%SatDiagnTropLev, & + archiveData = State_Diag%Archive_SatDiagnTropLev, & + diagId = diagId, & + RC = RC ) + + IF ( RC /= GC_SUCCESS ) THEN + errMsg = TRIM( errMsg_ir ) // TRIM( diagId ) + CALL GC_Error( errMsg, RC, thisLoc ) + RETURN + ENDIF + !------------------------------------------------------------------------ ! Satellite diagnostic: PBL Height (m) !------------------------------------------------------------------------ @@ -5190,6 +5218,12 @@ SUBROUTINE Init_State_Diag( Input_Opt, State_Chm, State_Grid, & State_Diag%Archive_SatDiagnConc .or. & State_Diag%Archive_SatDiagnDryDep .or. & State_Diag%Archive_SatDiagnDryDepVel .or. & + State_Diag%Archive_SatDiagnPEdge .or. & + State_Diag%Archive_SatDiagnTROPP .or. & + State_Diag%Archive_SatDiagnTropLev .or. & + State_Diag%Archive_SatDiagnPBLHeight .or. & + State_Diag%Archive_SatDiagnPBLTop .or. & + State_Diag%Archive_SatDiagnTAir .or. & State_Diag%Archive_SatDiagnGWETROOT .or. & State_Diag%Archive_SatDiagnGWETTOP .or. & State_Diag%Archive_SatDiagnJval .or. & @@ -12999,6 +13033,11 @@ SUBROUTINE Cleanup_State_Diag( State_Diag, RC ) RC = RC ) IF ( RC /= GC_SUCCESS ) RETURN + CALL Finalize( diagId = 'SatDiagnTropLev', & + Ptr2Data = State_Diag%SatDiagnTropLev, & + RC = RC ) + IF ( RC /= GC_SUCCESS ) RETURN + CALL Finalize( diagId = 'SatDiagnPBLHeight', & Ptr2Data = State_Diag%SatDiagnPBLHeight, & RC = RC ) @@ -15146,6 +15185,11 @@ SUBROUTINE Get_Metadata_State_Diag( am_I_Root, metadataID, Found, & IF ( isUnits ) Units = 'hPa' IF ( isRank ) Rank = 2 + ELSE IF ( TRIM( Name_AllCaps ) == 'SATDIAGNTROPLEV' ) THEN + IF ( isDesc ) Desc = 'Tropopause level' + IF ( isUnits ) Units = 'unitless' + IF ( isRank ) Rank = 2 + ELSE IF ( TRIM( Name_AllCaps ) == 'SATDIAGNPBLHEIGHT' ) THEN IF ( isDesc ) Desc = 'PBL Height' IF ( isUnits ) Units = 'm' From afeb19774e39982765044b37f93e452899f2671d Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Mon, 5 Aug 2024 10:28:27 -0400 Subject: [PATCH 27/33] Update CHANGELOG.md: Tropopause pressure in satdiagn CHANGELOG.md - Added an note that we have added tropopause pressure to the satellite diagnostics (update from @eamarais) Signed-off-by: Bob Yantosca --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4daa20f32..5cd31880e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -378,6 +378,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Removed State_Met%LWI and input meteorology LWI from carbon simulation run config files - Removed function `CLEANUP_UCX`; deallocations are now done in `state_chm_mod.F90` +## [Unreleased] - TBD +### Added +- Tropopause pressure field in the satellite diagnostic (by @eamarais) + ## [14.1.0] - 2023-02-01 ### Added - Added dry deposition updates to Hg0 from Feinberg22 ESPI publication + AMAP emissions From d288a95151625f0cd16dd5a5f995c41f23a94c72 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Tue, 6 Aug 2024 17:15:49 -0400 Subject: [PATCH 28/33] Fix unit conversion error in CHEM_H2O2 for aerosol-only simulation GeosCore/sulfate_mod.F90 - Remove XNUMOL_H2O2 / CMPERM3 from the equation for DH2O2. This used to convert PH2O2 to molec/cm3/s, but with KPP, PH2O2 is already in molec/cm3/s. - Add !$OMP COLLAPSE( 3 ) for efficiency - Add !$OMP SCHEDULE( DYNAMIC, 8 ) for better load balancing - Change e.g. 0.0e+0_fp to 0.0_fp for clarity Signed-off-by: Bob Yantosca --- CHANGELOG.md | 3 +++ GeosCore/sulfate_mod.F90 | 38 ++++++++++++++++---------------------- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e9e499d8..c75d67fd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ### Fixed - Added brackets around `exempt-issue-labels` list in `.github/workflows/stale.yml` +### Removed +- Removed `XNUMOL_H2O2 / CM3PERM3` in routine `Chem_H2O2`, which removes an unnecessary unit conversion for the aerosol-only simulation + ## [14.4.2] - 2024-07-24 ### Added - Added number of levels with clouds for photolysis to geoschem_config.yml and Input_Opt to pass to Cloud-J diff --git a/GeosCore/sulfate_mod.F90 b/GeosCore/sulfate_mod.F90 index 12931ac31..d330e3b36 100644 --- a/GeosCore/sulfate_mod.F90 +++ b/GeosCore/sulfate_mod.F90 @@ -2255,7 +2255,7 @@ SUBROUTINE CHEM_H2O2( Input_Opt, State_Chm, State_Diag, State_Grid, & ! Factor to convert AIRDEN from kgair/m3 to molecules/cm3: F = 1000.e+0_fp / AIRMW * AVO * 1.e-6_fp - ! Evaluate offline fields from HEMCO for P(H2O2) + ! Evaluate offline fields from HEMCO for P(H2O2) [molec/cm3/s] CALL HCO_GC_EvalFld( Input_Opt, State_Grid, 'PH2O2', PH2O2m, RC ) IF ( RC /= GC_SUCCESS ) THEN ErrMsg = 'Cannot get data for PH2O2 from HEMCO!' @@ -2263,7 +2263,7 @@ SUBROUTINE CHEM_H2O2( Input_Opt, State_Chm, State_Diag, State_Grid, & RETURN ENDIF - ! Evaluate offline fields from HEMCO for J(H2O2) + ! Evaluate offline fields from HEMCO for J(H2O2) [1/s] CALL HCO_GC_EvalFld( Input_Opt, State_Grid, 'JH2O2', JH2O2, RC ) IF ( RC /= GC_SUCCESS ) THEN ErrMsg = 'Cannot get data for JH2O2 from HEMCO!' @@ -2274,55 +2274,49 @@ SUBROUTINE CHEM_H2O2( Input_Opt, State_Chm, State_Diag, State_Grid, & !================================================================= ! Loop over tropopsheric grid boxes and do chemistry !================================================================= - !$OMP PARALLEL DO & - !$OMP DEFAULT( SHARED ) & - !$OMP PRIVATE( I, J, L, M, H2O20, KOH, FREQ, ALPHA, DH2O2, H2O2 ) & - !$OMP PRIVATE( PHOTJ ) & - !$OMP SCHEDULE( DYNAMIC ) + !$OMP PARALLEL DO & + !$OMP DEFAULT( SHARED )& + !$OMP PRIVATE( I, J, L, M, H2O20, KOH, FREQ, ALPHA, DH2O2, H2O2, PHOTJ )& + !$OMP SCHEUDLE( DYNAMIC, 8 )& + !$OMP COLLAPSE( 3 ) DO L = 1, State_Grid%NZ DO J = 1, State_Grid%NY DO I = 1, State_Grid%NX ! Initialize for safety's sake - FREQ = 0e+0_fp + FREQ = 0.0_fp + PHOTJ = 0.0_fp ! Skip non-chemistry boxes IF ( .not. State_Met%InChemGrid(I,J,L) ) CYCLE ! Density of air [molec/cm3] - M = State_Met%AIRDEN(I,J,L) * f + M = State_Met%AIRDEN(I,J,L) * F ! Initial H2O2 [v/v] H2O20 = Spc(id_H2O2)%Conc(I,J,L) ! Loss frequenty due to OH oxidation [s-1] - KOH = A * EXP( -160.e+0_fp / State_Met%T(I,J,L) ) * & + KOH = A * EXP( -160.0_fp / State_Met%T(I,J,L) ) * & GET_OH( I, J, L, Input_Opt, State_Chm, State_Met ) - ! Now do all dry deposition in mixing_mod.F90 (ckeller, 3/5/15) - FREQ = 0.e+0_fp - ! Impose a diurnal variation of jH2O2 by multiplying COS of ! solar zenith angle normalized by maximum solar zenith angle ! because the archived JH2O2 is for local noon time - IF ( COSZM(I,J) > 0.e+0_fp ) THEN + IF ( COSZM(I,J) > 0.0_fp ) THEN PHOTJ = JH2O2(I,J,L) * State_Met%SUNCOS(I,J) / COSZM(I,J) - PHOTJ = MAX( PHOTJ, 0e+0_fp ) - ELSE - PHOTJ = 0e+0_fp + PHOTJ = MAX( PHOTJ, 0.0_fp ) ENDIF ! Compute loss fraction from OH, photolysis, drydep [unitless]. - ALPHA = 1.e+0_fp + ( KOH + PHOTJ + FREQ ) * DT + ALPHA = 1.0_fp + ( KOH + PHOTJ + FREQ ) * DT ! Delta H2O2 [v/v] - ! PH2O2m is in kg/m3 (from HEMCO), convert to molec/cm3/s (mps,9/18/14) - DH2O2 = ( PH2O2m(I,J,L) / TS_EMIS * XNUMOL_H2O2 / CM3PERM3 ) & - * DT / ( ALPHA * M ) + DH2O2 = ( PH2O2m(I,J,L) / TS_EMIS ) * DT / ( ALPHA * M ) ! Final H2O2 [v/v] H2O2 = ( H2O20 / ALPHA + DH2O2 ) - IF ( H2O2 < SMALLNUM ) H2O2 = 0e+0_fp + IF ( H2O2 < SMALLNUM ) H2O2 = 0.0_fp ! Store final H2O2 in Spc Spc(id_H2O2)%Conc(I,J,L) = H2O2 From 6987c2a260be3bee951bcb0687abcf7b918d9d00 Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Tue, 6 Aug 2024 17:36:26 -0400 Subject: [PATCH 29/33] Fix typo in !$OMP PARALLEL loop in Chem_H2O2 routine GeosCore/sulfate_mod.F90 - Fix typo "SCHEUDLE" -> "SCHEDULE" Signed-off-by: Bob Yantosca --- GeosCore/sulfate_mod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GeosCore/sulfate_mod.F90 b/GeosCore/sulfate_mod.F90 index d330e3b36..56a8fda54 100644 --- a/GeosCore/sulfate_mod.F90 +++ b/GeosCore/sulfate_mod.F90 @@ -2277,7 +2277,7 @@ SUBROUTINE CHEM_H2O2( Input_Opt, State_Chm, State_Diag, State_Grid, & !$OMP PARALLEL DO & !$OMP DEFAULT( SHARED )& !$OMP PRIVATE( I, J, L, M, H2O20, KOH, FREQ, ALPHA, DH2O2, H2O2, PHOTJ )& - !$OMP SCHEUDLE( DYNAMIC, 8 )& + !$OMP SCHEDULE( DYNAMIC, 8 )& !$OMP COLLAPSE( 3 ) DO L = 1, State_Grid%NZ DO J = 1, State_Grid%NY From ce46f08eccf47617ba1a7fefa92ba61429dd407a Mon Sep 17 00:00:00 2001 From: Lizzie Lundgren Date: Tue, 30 Jul 2024 15:31:21 -0400 Subject: [PATCH 30/33] Update HEMCO_Diagn.rc templates to use offline MOH biogenic emissions Previously the run directory was configured to always use online biogenic MOH values for the EmisMOH_Biogenic variable in HEMCO emissions. Signed-off-by: Lizzie Lundgren --- run/GCClassic/HEMCO_Diagn.rc.templates/HEMCO_Diagn.rc.fullchem | 2 +- run/GCHP/HEMCO_Diagn.rc.templates/HEMCO_Diagn.rc.fullchem | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/run/GCClassic/HEMCO_Diagn.rc.templates/HEMCO_Diagn.rc.fullchem b/run/GCClassic/HEMCO_Diagn.rc.templates/HEMCO_Diagn.rc.fullchem index 4826f5a0b..9c845f463 100644 --- a/run/GCClassic/HEMCO_Diagn.rc.templates/HEMCO_Diagn.rc.fullchem +++ b/run/GCClassic/HEMCO_Diagn.rc.templates/HEMCO_Diagn.rc.fullchem @@ -297,7 +297,7 @@ EmisMGLY_BioBurn MGLY 111 -1 -1 2 kg/m2/s MGLY_emission_flux_from_b EmisMOH_Total MOH -1 -1 -1 3 kg/m2/s MOH_emission_flux_from_all_sectors EmisMOH_Anthro MOH 0 1 -1 3 kg/m2/s MOH_emission_flux_from_anthropogenic EmisMOH_BioBurn MOH 111 -1 -1 2 kg/m2/s MOH_emission_flux_from_biomass_burning -EmisMOH_Biogenic MOH 108 -1 -1 2 kg/m2/s MOH_emission_flux_from_biogenic_sources +EmisMOH_Biogenic MOH 0 4 -1 2 kg/m2/s MOH_emission_flux_from_biogenic_sources EmisMOH_Ocean MOH 101 -1 -1 2 kg/m2/s MOH_emission_flux_from_ocean EmisMOH_Ship MOH 0 10 -1 2 kg/m2/s MOH_emission_flux_from_ships diff --git a/run/GCHP/HEMCO_Diagn.rc.templates/HEMCO_Diagn.rc.fullchem b/run/GCHP/HEMCO_Diagn.rc.templates/HEMCO_Diagn.rc.fullchem index 4826f5a0b..9c845f463 100644 --- a/run/GCHP/HEMCO_Diagn.rc.templates/HEMCO_Diagn.rc.fullchem +++ b/run/GCHP/HEMCO_Diagn.rc.templates/HEMCO_Diagn.rc.fullchem @@ -297,7 +297,7 @@ EmisMGLY_BioBurn MGLY 111 -1 -1 2 kg/m2/s MGLY_emission_flux_from_b EmisMOH_Total MOH -1 -1 -1 3 kg/m2/s MOH_emission_flux_from_all_sectors EmisMOH_Anthro MOH 0 1 -1 3 kg/m2/s MOH_emission_flux_from_anthropogenic EmisMOH_BioBurn MOH 111 -1 -1 2 kg/m2/s MOH_emission_flux_from_biomass_burning -EmisMOH_Biogenic MOH 108 -1 -1 2 kg/m2/s MOH_emission_flux_from_biogenic_sources +EmisMOH_Biogenic MOH 0 4 -1 2 kg/m2/s MOH_emission_flux_from_biogenic_sources EmisMOH_Ocean MOH 101 -1 -1 2 kg/m2/s MOH_emission_flux_from_ocean EmisMOH_Ship MOH 0 10 -1 2 kg/m2/s MOH_emission_flux_from_ships From cc374fd170b49f43357385809a2ef19dbac98f0c Mon Sep 17 00:00:00 2001 From: Lizzie Lundgren Date: Tue, 30 Jul 2024 15:34:17 -0400 Subject: [PATCH 31/33] Auto-set GCHP emissions sources in HEMCO_Diagn.rc based on HEMCO_Config.rc This update impacts only GCHP emissions for which we have both online and offline sources, namely seasalt, soil NOx, biogenic, and dust emissions. Previously HEMCO_Diagn.rc always specified offline emissions for use in emissions diagnostic unless using the benchmark simulation. Now the file is automatically updated at run-time to use online values instead if the extension is turned on within HEMCO_Config.rc. Signed-off-by: Lizzie Lundgren --- run/GCHP/setCommonRunSettings.sh.template | 56 +++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/run/GCHP/setCommonRunSettings.sh.template b/run/GCHP/setCommonRunSettings.sh.template index 9a610e116..bcf7987db 100644 --- a/run/GCHP/setCommonRunSettings.sh.template +++ b/run/GCHP/setCommonRunSettings.sh.template @@ -773,6 +773,62 @@ if [[ ${lightningClimEntry} != "missing" ]]; then fi fi +#### Auto-update offline/online emissions settings in HEMCO_Diagn.rc based on HEMCO_Config.rc +# NOTES: +# - Includes seasalt, soilNOx, dust, and biogenic emissions only +# - Sets Emis* diagnostics to extension emissions if extension is on in HEMCO_Config.rc +# - Sets Emis* diagnostics to base emissions (offline) if extension is off in HEMCO_Config.rc + +# Dust +dustExt=$(grep "105.*DustDead" HEMCO_Config.rc || echo "missing") +if [[ ${dustExt} != "missing" ]]; then + dustSetting=(${dustExt// / }) + if [[ ${dustSetting[3]} = "on" ]]; then + sed -i -e 's|0 3 |105 -1|' HEMCO_Diagn.rc + else + sed -i -e 's|105 -1|0 3 |' HEMCO_Diagn.rc + fi +fi + +# Sea salt +seasExt=$(grep "107.*SeaSalt" HEMCO_Config.rc || echo "missing") +if [[ ${seasExt} != "missing" ]]; then + seasSetting=(${seasExt// / }) + if [[ ${seasSetting[3]} = "on" ]]; then + sed -i -e 's|SALA 0 3 |SALA 107 -1|' HEMCO_Diagn.rc + sed -i -e 's|SALC 0 3 |SALC 107 -1|' HEMCO_Diagn.rc + sed -i -e 's|AL 0 3 |AL 107 -1|' HEMCO_Diagn.rc + sed -i -e 's|CL 0 3 |CL 107 -1|' HEMCO_Diagn.rc + else + sed -i -e 's|SALA 107 -1|SALA 0 3 |' HEMCO_Diagn.rc + sed -i -e 's|SALC 107 -1|SALC 0 3 |' HEMCO_Diagn.rc + sed -i -e 's|AL 107 -1|AL 0 3 |' HEMCO_Diagn.rc + sed -i -e 's|CL 107 -1|CL 0 3 |' HEMCO_Diagn.rc + fi +fi + +# Biogenic +biogExt=$(grep "108.*MEGAN" HEMCO_Config.rc || echo "missing") +if [[ ${biogExt} != "missing" ]]; then + biogSetting=(${biogExt// / }) + if [[ ${biogSetting[3]} = "on" ]]; then + sed -i -e 's|0 4 |108 -1|' HEMCO_Diagn.rc + else + sed -i -e 's|108 -1|0 4 |' HEMCO_Diagn.rc + fi +fi + +# SoilNOx +soilExt=$(grep "104.*SoilNOx" HEMCO_Config.rc || echo "missing") +if [[ ${soilExt} != "missing" ]]; then + soilSetting=(${soilExt// / }) + if [[ ${soilSetting[3]} = "on" ]]; then + sed -i -e 's|NO 0 3 |NO 104 -1|' HEMCO_Diagn.rc + else + sed -i -e 's|NO 104 -1|NO 0 3 |' HEMCO_Diagn.rc + fi +fi + #### Done print_msg " " print_msg "setCommonRunSettings.sh done" From ee4b30dd9a58953b8a6384132422809382689f3b Mon Sep 17 00:00:00 2001 From: Lizzie Lundgren Date: Fri, 9 Aug 2024 17:06:06 -0400 Subject: [PATCH 32/33] Update changelog Signed-off-by: Lizzie Lundgren --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e9e499d8..21f99c609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Added ModelEe.2 (GCAP 2.0) simulation to integration tests for GCClassic - 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` +- Auto-update GCHP HEMCO_Diagn.rc settings at run-time to ensure seasalt, dust, soil NOx, and biogenic emissions match settings in HEMCO_Config.rc ### Fixed - Added brackets around `exempt-issue-labels` list in `.github/workflows/stale.yml` From bef56c605e018eecbd91646a51ce82c7cd77f56a Mon Sep 17 00:00:00 2001 From: Bob Yantosca Date: Tue, 13 Aug 2024 14:06:54 -0400 Subject: [PATCH 33/33] GEOS-Chem (science codebase) 14.4.3 release Updated version numbers in: - CHANGELOG.md Signed-off-by: Bob Yantosca --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8a512982..860e97617 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ This file documents all notable changes to the GEOS-Chem repository starting in The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] - TBD +## [14.4.3] - 2024-08-13 ### Added - Added ModelEe.2 (GCAP 2.0) simulation to integration tests for GCClassic - Added simulation with all diagnostics on in HISTORY.rc to integration tests for GCClassic (including Planeflight + ObsPack) and GCHP @@ -449,7 +449,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Removed State_Met%LWI and input meteorology LWI from carbon simulation run config files - Removed function `CLEANUP_UCX`; deallocations are now done in `state_chm_mod.F90` -## [Unreleased] - TBD +## [14.4.3] - 2024-08-13 ### Added - Tropopause pressure field in the satellite diagnostic (by @eamarais)