diff --git a/.circleci/config.yml b/.circleci/config.yml index dbd42c6d..c3925282 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 # Anchors to prevent forgetting to update a version baselibs_version: &baselibs_version v7.7.0 -bcs_version: &bcs_version v10.23.0 +bcs_version: &bcs_version v11.00.0 orbs: ci: geos-esm/circleci-tools@1 diff --git a/CHANGELOG.md b/CHANGELOG.md index ab78c7da..73c57d12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + ### Added +### Changed + +## [v2.2.0] - 2023-05-18 + ### Fixed +- Made needed code changes in `SS2G_GridCompMod.F90` and `CA2G_GridCompMod.F90` to permit data instances of of GOCART aerosols to run +- Added missing brown carbon (BR) climatology hooks to yaml and rc files for data driven instances +- Changed pointers to climatological deposition inputs in yaml and rc files to `/dev/null` since the files pointed to didn't provide them anyway, and in any case they are being used presently in the model +- Changed pointers to climatological nitrate inputs in yaml and rc files to `/dev/null` since pointing to FP files was inconsistent with MERRA-2 files used for other species +- Ensured zero-diff in performance of yaml vs. rc files for ExtData2G vs. ExtData1g for data driven aerosols +- To do: remove hooks to old (legacy) GOCART.data instances in CHEM and setup scripts +- Fixed rc file in legacy O3 component. +- Fixed issue #223 where Global dimension was being used for allocating a local array +- This fixes a long standing issue that one can not start and stop the model in anything less than 3 hour increments to test start/stop regression because of GOCART. +- Fix issue with scattering coefficient calculation with oc +- Fix a long standing issue that one can not start and stop the model in anything less than 3 hour increments to test start/stop regression because of GOCART. + +### Added + ### Changed -## [2.1.4] - 2023-05-04 +- Comment out ASSERT to allow `GOCART_DT` to not match the `HEARTBEAT_DT` +- Single-moment moist changes from Donifan +- Change names of microphysics schemes to match refactored physics +- Set `SS_SCALE` default to 0.0 +- Updates in CA2G for OpenMP +- Updates for CI + - Update BCs version + - Update components to match GEOSgcm v11.0.0 + +## [2.1.4] - 2023-05-12 ### Fixed @@ -23,10 +52,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - - Added `*` to CA State specs file to allow for ACG to substitute in the long name -- Changes were made so GOCART2G and its children can be run with component level -OpenMP threading. The key change is to create the data structure ThreadWorkspace +- Changes were made so GOCART2G and its children can be run with component level +OpenMP threading. The key change is to create the data structure ThreadWorkspace to hold variables that should be private to each thread to avoid race conditions. Additionally spatially distributed arrays that are not in any of the ESMF states were added to the ESMF internal state so they could be properly handled when @@ -36,8 +64,6 @@ option so they are not written to restart. - Aerosol single scattering backscatter coefficient for each instances and total at wavelengths_profile - Total (molecular + aerosols) attenuated backscatter coefficient from TOA and sfc at 532nm -### Fixed - ### Changed - Moved to use GitHub Action for label enforcement @@ -56,11 +82,6 @@ option so they are not written to restart. - Extinction/Scattering profile exports at model RH at wavelengths_profile - Extinction/Scattering profile exports with RH=20% and RH=80% at wavelengths_profile -### Fixed - -### Changed - - ## [2.1.1] - 2022-09-16 ### Fixed diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP.20C/CA2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP.20C/CA2G_GridComp_ExtData.rc index 14ff068e..736a0008 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP.20C/CA2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP.20C/CA2G_GridComp_ExtData.rc @@ -6,30 +6,42 @@ PrimaryExports%% #========== Data Instance ========================================================== -climBCphobic 'kg kg-1' Y N 0 0.0 1.0 BCphobic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climBCphilic 'kg kg-1' Y N 0 0.0 1.0 BCphilic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climOCphobic 'kg kg-1' Y N 0 0.0 1.0 OCphobic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climOCphilic 'kg kg-1' Y N 0 0.0 1.0 OCphilic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 - -climBCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climBCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCphobic 'kg kg-1' Y N 0 0.0 1.0 BCPHOBIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climBCphilic 'kg kg-1' Y N 0 0.0 1.0 BCPHILIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climOCphobic 'kg kg-1' Y N 0 0.0 1.0 OCPHOBIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climOCphilic 'kg kg-1' Y N 0 0.0 1.0 OCPHILIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climBRphobic 'kg kg-1' Y N 0 0.0 1.0 BRPHOBIC /dev/null +climBRphilic 'kg kg-1' Y N 0 0.0 1.0 BRPHILIC /dev/null + +climBCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP001 /dev/null +climBCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT001 /dev/null climBCSD001 'kg m-2 s-1' Y N 0 0.0 1.0 BCSD001 /dev/null -climBCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV001 /dev/null -climBCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climBCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP002 /dev/null +climBCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT002 /dev/null climBCSD002 'kg m-2 s-1' Y N 0 0.0 1.0 BCSD002 /dev/null -climBCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV002 /dev/null -climOCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climOCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP001 /dev/null +climOCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT001 /dev/null climOCSD001 'kg m-2 s-1' Y N 0 0.0 1.0 OCSD001 /dev/null -climOCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV001 /dev/null -climOCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climOCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP002 /dev/null +climOCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT002 /dev/null climOCSD002 'kg m-2 s-1' Y N 0 0.0 1.0 OCSD002 /dev/null -climOCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV002 /dev/null + +climBRDP001 'kg m-2 s-1' Y N 0 0.0 1.0 BRDP001 /dev/null +climBRWT001 'kg m-2 s-1' Y N 0 0.0 1.0 BRWT001 /dev/null +climBRSD001 'kg m-2 s-1' Y N 0 0.0 1.0 BRSD001 /dev/null +climBRSV001 'kg m-2 s-1' Y N 0 0.0 1.0 BRSV001 /dev/null + +climBRDP002 'kg m-2 s-1' Y N 0 0.0 1.0 BRDP002 /dev/null +climBRWT002 'kg m-2 s-1' Y N 0 0.0 1.0 BRWT002 /dev/null +climBRSD002 'kg m-2 s-1' Y N 0 0.0 1.0 BRSD002 /dev/null +climBRSV002 'kg m-2 s-1' Y N 0 0.0 1.0 BRSV002 /dev/null #=========== Carbonaceous aerosol sources =========================================== diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.rc index 9c8fabe2..43ed7284 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.rc @@ -6,30 +6,42 @@ PrimaryExports%% #========== Data Instance ========================================================== -climBCphobic 'kg kg-1' Y N 0 0.0 1.0 BCphobic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climBCphilic 'kg kg-1' Y N 0 0.0 1.0 BCphilic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climOCphobic 'kg kg-1' Y N 0 0.0 1.0 OCphobic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climOCphilic 'kg kg-1' Y N 0 0.0 1.0 OCphilic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 - -climBCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climBCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCphobic 'kg kg-1' Y N 0 0.0 1.0 BCPHOBIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climBCphilic 'kg kg-1' Y N 0 0.0 1.0 BCPHILIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climOCphobic 'kg kg-1' Y N 0 0.0 1.0 OCPHOBIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climOCphilic 'kg kg-1' Y N 0 0.0 1.0 OCPHILIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climBRphobic 'kg kg-1' Y N 0 0.0 1.0 BRPHOBIC /dev/null +climBRphilic 'kg kg-1' Y N 0 0.0 1.0 BRPHILIC /dev/null + +climBCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP001 /dev/null +climBCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT001 /dev/null climBCSD001 'kg m-2 s-1' Y N 0 0.0 1.0 BCSD001 /dev/null -climBCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV001 /dev/null -climBCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climBCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP002 /dev/null +climBCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT002 /dev/null climBCSD002 'kg m-2 s-1' Y N 0 0.0 1.0 BCSD002 /dev/null -climBCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV002 /dev/null -climOCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climOCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP001 /dev/null +climOCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT001 /dev/null climOCSD001 'kg m-2 s-1' Y N 0 0.0 1.0 OCSD001 /dev/null -climOCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV001 /dev/null -climOCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climOCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP002 /dev/null +climOCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT002 /dev/null climOCSD002 'kg m-2 s-1' Y N 0 0.0 1.0 OCSD002 /dev/null -climOCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV002 /dev/null + +climBRDP001 'kg m-2 s-1' Y N 0 0.0 1.0 BRDP001 /dev/null +climBRWT001 'kg m-2 s-1' Y N 0 0.0 1.0 BRWT001 /dev/null +climBRSD001 'kg m-2 s-1' Y N 0 0.0 1.0 BRSD001 /dev/null +climBRSV001 'kg m-2 s-1' Y N 0 0.0 1.0 BRSV001 /dev/null + +climBRDP002 'kg m-2 s-1' Y N 0 0.0 1.0 BRDP002 /dev/null +climBRWT002 'kg m-2 s-1' Y N 0 0.0 1.0 BRWT002 /dev/null +climBRSD002 'kg m-2 s-1' Y N 0 0.0 1.0 BRSD002 /dev/null +climBRSV002 'kg m-2 s-1' Y N 0 0.0 1.0 BRSV002 /dev/null #=========== Carbonaceous aerosol sources =========================================== diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.yaml index 4813b4d1..c25be12c 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.yaml @@ -17,8 +17,7 @@ Collections: template: ExtData/chemistry/CEDS/v2021-04-21/sfc/OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 CA2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4: template: ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 - CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4: - template: ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" CA2G_qfed2.emis_bc.061.%y4%m2%d2.nc4: template: ExtData/chemistry/QFED/v2.6r1/sfc/0.1/Y%y4/M%m2/qfed2.emis_bc.061.%y4%m2%d2.nc4 valid_range: "2000-02-29T12:00/2025-01-01" @@ -186,85 +185,73 @@ Exports: sample: CA2G_sample_1 variable: oc_shipping climBCDP001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCDP001 + collection: /dev/null climBCDP002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCDP002 + collection: /dev/null climBCSD001: collection: /dev/null - sample: CA2G_sample_0 - variable: BCSD001 climBCSD002: collection: /dev/null - sample: CA2G_sample_0 - variable: BCSD002 climBCSV001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCSV001 + collection: /dev/null climBCSV002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCSV002 + collection: /dev/null climBCWT001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCWT001 + collection: /dev/null climBCWT002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCWT002 + collection: /dev/null climBCphilic: collection: CA2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: CA2G_sample_0 - variable: BCphilic + variable: BCPHILIC climBCphobic: collection: CA2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: CA2G_sample_0 - variable: BCphobic + variable: BCPHOBIC + climBRDP001: + collection: /dev/null + climBRDP002: + collection: /dev/null + climBRSD001: + collection: /dev/null + climBRSD002: + collection: /dev/null + climBRSV001: + collection: /dev/null + climBRSV002: + collection: /dev/null + climBRWT001: + collection: /dev/null + climBRWT002: + collection: /dev/null + climBRphilic: + collection: /dev/null + climBRphobic: + collection: /dev/null climOCDP001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCDP001 + collection: /dev/null climOCDP002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCDP002 + collection: /dev/null climOCSD001: collection: /dev/null - sample: CA2G_sample_0 - variable: OCSD001 climOCSD002: collection: /dev/null - sample: CA2G_sample_0 - variable: OCSD002 climOCSV001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCSV001 + collection: /dev/null climOCSV002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCSV002 + collection: /dev/null climOCWT001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCWT001 + collection: /dev/null climOCWT002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCWT002 + collection: /dev/null climOCphilic: collection: CA2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: CA2G_sample_0 - variable: OCphilic + variable: OCPHILIC climOCphobic: collection: CA2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: CA2G_sample_0 - variable: OCphobic + variable: OCPHOBIC pSOA_ANTHRO_VOC: collection: /dev/null regrid: CONSERVE diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 index 61f8c689..9e66db2b 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 @@ -3,7 +3,7 @@ !============================================================================= !BOP -! !MODULE: CA2G_GridCompMod - GOCART Carbonaceous Aerosol gridded component +! !MODULE: CA2G_GridCompMod - GOCART Carbonaceous Aerosol gridded component ! !INTERFACE: module CA2G_GridCompMod @@ -11,7 +11,7 @@ module CA2G_GridCompMod ! !USES: use ESMF use MAPL - use GOCART2G_MieMod + use GOCART2G_MieMod use Chem_AeroGeneric use iso_c_binding, only: c_loc, c_f_pointer, c_ptr @@ -61,7 +61,14 @@ module CA2G_GridCompMod logical :: doing_point_emissions = .false. character(len=255) :: point_emissions_srcfilen ! filename for pointwise emissions type(ThreadWorkspace), allocatable :: workspaces(:) - end type CA2G_GridComp + integer :: nPts = -1 + integer, allocatable, dimension(:) :: pstart, pend + real, allocatable, dimension(:) :: pLat, & + pLon, & + pBase, & + pTop, & + pEmis + end type CA2G_GridComp type wrap_ type (CA2G_GridComp), pointer :: PTR !=> null() @@ -72,7 +79,7 @@ module CA2G_GridCompMod !============================================================================ !BOP -! !IROUTINE: SetServices +! !IROUTINE: SetServices ! !INTERFACE: subroutine SetServices (GC, RC) @@ -83,11 +90,11 @@ subroutine SetServices (GC, RC) ! !DESCRIPTION: This version uses MAPL_GenericSetServices, which sets ! the Initialize and Finalize services to generic versions. It also -! allocates our instance of a generic state and puts it in the +! allocates our instance of a generic state and puts it in the ! gridded component (GC). Here we only set the two-stage run method ! and declare the data services. -! !REVISION HISTORY: +! !REVISION HISTORY: ! june2019 E.Sherman, A.Da Silva, A.Darmenov, T.Clune First attempt at refactoring !EOP @@ -105,6 +112,7 @@ subroutine SetServices (GC, RC) integer :: i, nbins real :: DEFVAL logical :: data_driven = .true. + logical :: file_exists integer :: num_threads __Iam__('SetServices') @@ -132,14 +140,16 @@ subroutine SetServices (GC, RC) num_threads = MAPL_get_num_threads() allocate(self%workspaces(0:num_threads-1), __STAT__) -! Load resource file +! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'CA2G_instance_'//trim(comp_name)//'.rc', rc=status) - if (status /= 0) then - if (mapl_am_i_root()) print*,'CA2G_instance_'//trim(comp_name)//'.rc does not exist! & - Loading CA2G_instance_'//trim(comp_name)//'.rc instead' - call ESMF_ConfigLoadFile (cfg, 'CA2G_instance_'//trim(comp_name)//'.rc', __RC__) + inquire(file='CA2G_instance_'//trim(comp_name)//'.rc', exist=file_exists) + if (file_exists) then + call ESMF_ConfigLoadFile (cfg, 'CA2G_instance_'//trim(comp_name)//'.rc', __RC__) + else + if (mapl_am_i_root()) print*,'CA2G_instance_'//trim(comp_name)//'.rc does not exist! & + Loading CA2G_instance_'//trim(comp_name(1:5))//'.rc instead' + call ESMF_ConfigLoadFile (cfg, 'CA2G_instance_'//trim(comp_name(1:5))//'.rc', __RC__) end if ! process generic config items @@ -215,7 +225,7 @@ subroutine SetServices (GC, RC) units = 'kg kg-1', & restart = MAPL_RestartOptional, & dims = MAPL_DimsHorzVert, & - vlocation = MAPL_VLocationCenter, __RC__) + vlocation = MAPL_VLocationCenter, __RC__) call MAPL_AddInternalSpec(GC, & short_name = trim(comp_name)//'philic', & @@ -223,7 +233,7 @@ subroutine SetServices (GC, RC) units = 'kg kg-1', & restart = MAPL_RestartOptional, & dims = MAPL_DimsHorzVert, & - vlocation = MAPL_VLocationCenter, __RC__) + vlocation = MAPL_VLocationCenter, __RC__) call MAPL_AddImportSpec(GC, & short_name = 'clim'//trim(GCsuffix)//'phobic', & @@ -231,7 +241,7 @@ subroutine SetServices (GC, RC) units = 'kg kg-1', & restart = MAPL_RestartOptional, & dims = MAPL_DimsHorzVert, & - vlocation = MAPL_VLocationCenter, __RC__) + vlocation = MAPL_VLocationCenter, __RC__) call MAPL_AddImportSpec(GC, & short_name = 'clim'//trim(GCsuffix)//'philic', & @@ -252,7 +262,7 @@ subroutine SetServices (GC, RC) vlocation = MAPL_VLocationCenter, & restart = MAPL_RestartSkip, __RC__) -! !wet deposition +! !wet deposition call MAPL_AddImportSpec(GC, & short_name = 'clim'//trim(GCsuffix)//'WT'//trim(field_name), & long_name = 'Organic Carbon Mixing Ratio (bin '//trim(field_name)//')', & @@ -328,22 +338,22 @@ end subroutine SetServices !============================================================================ !BOP -! !IROUTINE: Initialize +! !IROUTINE: Initialize ! !INTERFACE: subroutine Initialize (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock integer, optional, intent( out) :: RC ! Error code -! !DESCRIPTION: This initializes CA's Grid Component. It primaryily fills -! GOCART's AERO states with its carbonaceous aerosol fields. +! !DESCRIPTION: This initializes CA's Grid Component. It primaryily fills +! GOCART's AERO states with its carbonaceous aerosol fields. -! !REVISION HISTORY: +! !REVISION HISTORY: ! june2019 E.Sherman First attempt at refactoring !EOP @@ -375,11 +385,12 @@ subroutine Initialize (GC, import, export, clock, RC) integer, allocatable, dimension(:) :: channels_ integer :: nmom_ character(len=ESMF_MAXSTR) :: file_ + logical :: file_exists __Iam__('Initialize') !**************************************************************************** -! Begin... +! Begin... ! Get the target components name and set-up traceback handle. ! ----------------------------------------------------------- @@ -406,7 +417,7 @@ subroutine Initialize (GC, import, export, clock, RC) ! Get dimensions ! --------------- - call MAPL_GridGet (grid, globalCellCountPerDim=dims, __RC__ ) + call MAPL_GridGet (grid, localCellCountPerDim=dims, __RC__ ) km = dims(3) self%km = km @@ -427,16 +438,19 @@ subroutine Initialize (GC, import, export, clock, RC) self%diurnal_bb = .false. end if -! Load resource file +! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'CA2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) - if (status /= 0) then - if (mapl_am_i_root()) print*,'ERROR: CA2G_instance_'//trim(COMP_NAME)//'.rc does not exist!' - return + inquire(file='CA2G_instance_'//trim(comp_name)//'.rc', exist=file_exists) + if (file_exists) then + call ESMF_ConfigLoadFile (cfg, 'CA2G_instance_'//trim(comp_name)//'.rc', __RC__) + else + if (mapl_am_i_root()) print*,'CA2G_instance_'//trim(comp_name)//'.rc does not exist! & + Loading CA2G_instance_'//trim(comp_name(1:5))//'.rc instead' + call ESMF_ConfigLoadFile (cfg, 'CA2G_instance_'//trim(comp_name(1:5))//'.rc', __RC__) end if -! Call Generic Initialize +! Call Generic Initialize ! ------------------------ call MAPL_GenericInitialize (GC, import, export, clock, __RC__) @@ -450,7 +464,7 @@ subroutine Initialize (GC, import, export, clock, RC) ! If this is a data component, the data is provided in the import ! state via ExtData instead of the actual GOCART children -! ---------------------------------------------------------------- +! ---------------------------------------------------------------- if ( data_driven ) then providerState = import prefix = 'clim' @@ -583,13 +597,13 @@ end subroutine Initialize !============================================================================ !BOP -! !IROUTINE: Run +! !IROUTINE: Run ! !INTERFACE: subroutine Run (GC, import, export, clock, rc) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -610,7 +624,7 @@ subroutine Run (GC, import, export, clock, rc) __Iam__('Run') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -624,7 +638,7 @@ subroutine Run (GC, import, export, clock, rc) ! ----------------------------------- call MAPL_Get (MAPL, INTERNAL_ESMF_STATE=internal, __RC__) -! Is SS data driven? +! Is CA data driven? ! ------------------ call determine_data_driven (COMP_NAME, data_driven, __RC__) @@ -643,19 +657,19 @@ end subroutine Run !============================================================================ !BOP -! !IROUTINE: Run1 +! !IROUTINE: Run1 ! !INTERFACE: subroutine Run1 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock integer, optional, intent( out) :: RC ! Error code: -! !DESCRIPTION: Computes emissions/sources for Sea Salt +! !DESCRIPTION: Computes emissions/sources for Carbon !EOP !============================================================================ @@ -692,7 +706,7 @@ subroutine Run1 (GC, import, export, clock, RC) __Iam__('Run1') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -707,7 +721,7 @@ subroutine Run1 (GC, import, export, clock, RC) ! Get parameters from generic state. ! ----------------------------------- - call MAPL_Get (mapl, INTERNAL_ESMF_STATE=internal, & + call MAPL_Get (mapl, INTERNAL_ESMF_STATE=internal, & LONS = LONS, & LATS = LATS, __RC__ ) @@ -718,7 +732,7 @@ subroutine Run1 (GC, import, export, clock, RC) else if (comp_name(1:5) == 'CA.bc') then GCsuffix = 'BC' else if (comp_name(1:5) == 'CA.br') then - GCsuffix = 'BR' + GCsuffix = 'BR' end if call MAPL_GetPointer (internal, intPtr_phobic, trim(comp_name)//'phobic', __RC__) @@ -779,7 +793,7 @@ subroutine Run1 (GC, import, export, clock, RC) aviation_cds_src = BC_AVIATION_CDS aviation_crs_src = BC_AVIATION_CRS allocate(biogvoc_src, mold=BC_BIOMASS, __STAT__) -! Black carbon has no biogvoc_src, so we set it to zero. +! Black carbon has no biogvoc_src, so we set it to zero. ! biogvoc_src is still needed for the call to CAEmissions, however it ! effectivly does nothing since we set all its values to zero. biogvoc_src = 0.0 @@ -882,14 +896,14 @@ end subroutine Run1 !============================================================================ !BOP -! !IROUTINE: Run2 +! !IROUTINE: Run2 ! !INTERFACE: subroutine Run2 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -926,7 +940,7 @@ subroutine Run2 (GC, import, export, clock, RC) __Iam__('Run2') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -973,7 +987,7 @@ subroutine Run2 (GC, import, export, clock, RC) end if if (trim(comp_name) == 'CA.br') then - pSOA_VOC = pSOA_BIOB_VOC + pSOA_VOC = pSOA_BIOB_VOC where (1.01 * pSOA_VOC > MAPL_UNDEF) pSOA_VOC = 0.0 intPtr_philic = intPtr_philic + self%cdt * pSOA_VOC/airdens @@ -1074,7 +1088,7 @@ end subroutine Run2 !============================================================================ !BOP -! !IROUTINE: Run_data -- ExtData Sea Salt Grid Component +! !IROUTINE: Run_data -- ExtData Carbon Grid Component ! !INTERFACE: @@ -1082,13 +1096,13 @@ subroutine Run_data (GC, IMPORT, EXPORT, INTERNAL, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: IMPORT ! Import state type (ESMF_State), intent(inout) :: EXPORT ! Export state type (ESMF_State), intent(inout) :: INTERNAL ! Interal state integer, optional, intent( out) :: RC ! Error code: -! !DESCRIPTION: Updates pointers in Internal state with fields from ExtData. +! !DESCRIPTION: Updates pointers in Internal state with fields from ExtData. !EOP !============================================================================ @@ -1105,7 +1119,7 @@ subroutine Run_data (GC, IMPORT, EXPORT, INTERNAL, RC) __Iam__('Run_data') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -1175,7 +1189,7 @@ subroutine aerosol_optics(state, rc) __Iam__('CA2G::aerosol_optics') -! Begin... +! Begin... ! Mie Table instance/index ! ------------------------ @@ -1192,7 +1206,7 @@ subroutine aerosol_optics(state, rc) band = 0 call ESMF_AttributeGet(state, name='band_for_aerosol_optics', value=band, __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, ple, trim(fld_name), __RC__) @@ -1295,7 +1309,7 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) bext_s = bext_s + bext ! extinction bssa_s = bssa_s + (bssa*bext) ! scattering extinction - basym_s = basym_s + gasym*(bssa*bext) ! asymetry parameter multiplied by scatering extiction + basym_s = basym_s + gasym*(bssa*bext) ! asymetry parameter multiplied by scatering extiction end do @@ -1337,7 +1351,7 @@ subroutine monochromatic_aerosol_optics(state, rc) __Iam__('CA2G::monochromatic_aerosol_optics') -! Begin... +! Begin... ! Mie Table instance/index ! ------------------------ diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc index 972bddf1..cd44f28d 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc @@ -6,30 +6,42 @@ PrimaryExports%% #========== Data Instance ========================================================== -climBCphobic 'kg kg-1' Y N 0 0.0 1.0 BCphobic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climBCphilic 'kg kg-1' Y N 0 0.0 1.0 BCphilic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climOCphobic 'kg kg-1' Y N 0 0.0 1.0 OCphobic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climOCphilic 'kg kg-1' Y N 0 0.0 1.0 OCphilic ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 - -climBCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climBCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCphobic 'kg kg-1' Y N 0 0.0 1.0 BCPHOBIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climBCphilic 'kg kg-1' Y N 0 0.0 1.0 BCPHILIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climOCphobic 'kg kg-1' Y N 0 0.0 1.0 OCPHOBIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climOCphilic 'kg kg-1' Y N 0 0.0 1.0 OCPHILIC ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climBRphobic 'kg kg-1' Y N 0 0.0 1.0 BRPHOBIC /dev/null +climBRphilic 'kg kg-1' Y N 0 0.0 1.0 BRPHILIC /dev/null + +climBCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP001 /dev/null +climBCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT001 /dev/null climBCSD001 'kg m-2 s-1' Y N 0 0.0 1.0 BCSD001 /dev/null -climBCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV001 /dev/null -climBCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climBCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 BCDP002 /dev/null +climBCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 BCWT002 /dev/null climBCSD002 'kg m-2 s-1' Y N 0 0.0 1.0 BCSD002 /dev/null -climBCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climBCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 BCSV002 /dev/null -climOCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climOCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCDP001 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP001 /dev/null +climOCWT001 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT001 /dev/null climOCSD001 'kg m-2 s-1' Y N 0 0.0 1.0 OCSD001 /dev/null -climOCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCSV001 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV001 /dev/null -climOCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climOCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCDP002 'kg m-2 s-1' Y N 0 0.0 1.0 OCDP002 /dev/null +climOCWT002 'kg m-2 s-1' Y N 0 0.0 1.0 OCWT002 /dev/null climOCSD002 'kg m-2 s-1' Y N 0 0.0 1.0 OCSD002 /dev/null -climOCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climOCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 OCSV002 /dev/null + +climBRDP001 'kg m-2 s-1' Y N 0 0.0 1.0 BRDP001 /dev/null +climBRWT001 'kg m-2 s-1' Y N 0 0.0 1.0 BRWT001 /dev/null +climBRSD001 'kg m-2 s-1' Y N 0 0.0 1.0 BRSD001 /dev/null +climBRSV001 'kg m-2 s-1' Y N 0 0.0 1.0 BRSV001 /dev/null + +climBRDP002 'kg m-2 s-1' Y N 0 0.0 1.0 BRDP002 /dev/null +climBRWT002 'kg m-2 s-1' Y N 0 0.0 1.0 BRWT002 /dev/null +climBRSD002 'kg m-2 s-1' Y N 0 0.0 1.0 BRSD002 /dev/null +climBRSV002 'kg m-2 s-1' Y N 0 0.0 1.0 BRSV002 /dev/null #=========== Carbonaceous aerosol sources =========================================== diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.yaml index 0ee57bb4..24c7a8e3 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.yaml @@ -17,8 +17,7 @@ Collections: template: ExtData/chemistry/CEDS/v2021-04-21/sfc/OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 CA2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4: template: ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 - CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4: - template: ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" CA2G_qfed2.emis_bc.006.%y4%m2%d2.nc4: template: ExtData/chemistry/QFED/v2.5r1-nrt/sfc/0.1/Y%y4/M%m2/qfed2.emis_bc.006.%y4%m2%d2.nc4 valid_range: "2014-12-01T12:00/2021-11-01T12:00" @@ -186,85 +185,73 @@ Exports: sample: CA2G_sample_1 variable: oc_shipping climBCDP001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCDP001 + collection: /dev/null climBCDP002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCDP002 + collection: /dev/null climBCSD001: collection: /dev/null - sample: CA2G_sample_0 - variable: BCSD001 climBCSD002: collection: /dev/null - sample: CA2G_sample_0 - variable: BCSD002 climBCSV001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCSV001 + collection: /dev/null climBCSV002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCSV002 + collection: /dev/null climBCWT001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCWT001 + collection: /dev/null climBCWT002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: BCWT002 + collection: /dev/null climBCphilic: collection: CA2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: CA2G_sample_0 - variable: BCphilic + variable: BCPHILIC climBCphobic: collection: CA2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: CA2G_sample_0 - variable: BCphobic + variable: BCPHOBIC + climBRDP001: + collection: /dev/null + climBRDP002: + collection: /dev/null + climBRSD001: + collection: /dev/null + climBRSD002: + collection: /dev/null + climBRSV001: + collection: /dev/null + climBRSV002: + collection: /dev/null + climBRWT001: + collection: /dev/null + climBRWT002: + collection: /dev/null + climBRphilic: + collection: /dev/null + climBRphobic: + collection: /dev/null climOCDP001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCDP001 + collection: /dev/null climOCDP002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCDP002 + collection: /dev/null climOCSD001: collection: /dev/null - sample: CA2G_sample_0 - variable: OCSD001 climOCSD002: collection: /dev/null - sample: CA2G_sample_0 - variable: OCSD002 climOCSV001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCSV001 + collection: /dev/null climOCSV002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCSV002 + collection: /dev/null climOCWT001: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCWT001 + collection: /dev/null climOCWT002: - collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: CA2G_sample_0 - variable: OCWT002 + collection: /dev/null climOCphilic: collection: CA2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: CA2G_sample_0 - variable: OCphilic + variable: OCPHILIC climOCphobic: collection: CA2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: CA2G_sample_0 - variable: OCphobic + variable: OCPHOBIC pSOA_ANTHRO_VOC: collection: /dev/null regrid: CONSERVE diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP/DU2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP/DU2G_GridComp_ExtData.yaml index a851a547..69df0e8f 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP/DU2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP/DU2G_GridComp_ExtData.yaml @@ -5,12 +5,11 @@ Collections: template: ExtData/chemistry/DUST/v0.0.0/sfc/_gldas-fao.soil_texture.x1152_y721_t1.nc4 DU2G_arlems-roughness.x1151_y720_t1.nc4: template: ExtData/chemistry/DUST/v0.0.0/sfc/arlems-roughness.x1151_y720_t1.nc4 - DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4: - template: ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 - DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4: - template: ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 DU2G_gocart.dust_source.v5a.x1152_y721.nc: template: ExtData/chemistry/DUST/v0.0.0/sfc/gocart.dust_source.v5a.x1152_y721.nc + DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4: + template: ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 + valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" DU2G_qvi.006.%y4.nc4: template: ExtData/chemistry/NDVI/v1.0.r3/sfc/qvi.006.%y4.nc4 DU2G_veg20.x1152_y721_t1.nc4: @@ -68,103 +67,64 @@ Exports: sample: DU2G_sample_0 variable: roughness climDUDP001: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUDP001 + collection: /dev/null climDUDP002: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUDP002 + collection: /dev/null climDUDP003: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUDP003 + collection: /dev/null climDUDP004: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUDP004 + collection: /dev/null climDUDP005: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUDP005 + collection: /dev/null climDUSD001: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSD001 + collection: /dev/null climDUSD002: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSD002 + collection: /dev/null climDUSD003: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSD003 + collection: /dev/null climDUSD004: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSD004 + collection: /dev/null climDUSD005: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSD005 + collection: /dev/null climDUSV001: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSV001 + collection: /dev/null climDUSV002: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSV002 + collection: /dev/null climDUSV003: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSV003 + collection: /dev/null climDUSV004: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSV004 + collection: /dev/null climDUSV005: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSV005 + collection: /dev/null climDUWT001: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUWT001 + collection: /dev/null climDUWT002: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUWT002 + collection: /dev/null climDUWT003: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUWT003 + collection: /dev/null climDUWT004: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUWT004 + collection: /dev/null climDUWT005: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUWT005 + collection: /dev/null climdu001: collection: DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: DU2G_sample_2 - variable: du001 + variable: DU001 climdu002: collection: DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: DU2G_sample_2 - variable: du002 + variable: DU002 climdu003: collection: DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: DU2G_sample_2 - variable: du003 + variable: DU003 climdu004: collection: DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: DU2G_sample_2 - variable: du004 + variable: DU004 climdu005: collection: DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: DU2G_sample_2 - variable: du005 + variable: DU005 + diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 index b442198b..72f925d5 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 @@ -3,7 +3,7 @@ !============================================================================= !BOP -! !MODULE: DU2G_GridCompMod - GOCART refactoring of the DU gridded component +! !MODULE: DU2G_GridCompMod - GOCART refactoring of the DU gridded component ! !INTERFACE: module DU2G_GridCompMod @@ -11,7 +11,7 @@ module DU2G_GridCompMod ! !USES: use ESMF use MAPL - use GOCART2G_MieMod + use GOCART2G_MieMod use Chem_AeroGeneric use iso_c_binding, only: c_loc, c_f_pointer, c_ptr @@ -19,7 +19,7 @@ module DU2G_GridCompMod use GA_EnvironmentMod use MAPL_StringTemplate, only: StrTemplate !$ use omp_lib - + implicit none private @@ -62,7 +62,7 @@ module DU2G_GridCompMod real :: Ch_DU_res(NHRES) ! resolutions used for Ch_DU real :: Ch_DU ! dust emission tuning coefficient [kg s2 m-5]. logical :: maringFlag=.false. ! maring settling velocity correction - integer :: day_save = -1 + integer :: day_save = -1 character(len=:), allocatable :: emission_scheme ! emission scheme selector integer :: clayFlag ! clay and silt term in K14 real :: f_swc ! soil mosture scaling factor @@ -83,7 +83,7 @@ module DU2G_GridCompMod !============================================================================ !BOP -! !IROUTINE: SetServices +! !IROUTINE: SetServices ! !INTERFACE: subroutine SetServices (GC, RC) @@ -94,11 +94,11 @@ subroutine SetServices (GC, RC) ! !DESCRIPTION: This version uses MAPL_GenericSetServices, which sets ! the Initialize and Finalize services to generic versions. It also -! allocates our instance of a generic state and puts it in the +! allocates our instance of a generic state and puts it in the ! gridded component (GC). Here we only set the two-stage run method ! and declare the data services. -! !REVISION HISTORY: +! !REVISION HISTORY: ! 16oct2019 E.Sherman, A.Da Silva, A.Darmenov, T.Clune First attempt at refactoring !EOP @@ -117,6 +117,7 @@ subroutine SetServices (GC, RC) integer :: i real :: DEFVAL logical :: data_driven = .true. + logical :: file_exists integer :: num_threads __Iam__('SetServices') @@ -137,14 +138,15 @@ subroutine SetServices (GC, RC) num_threads = MAPL_get_num_threads() allocate(self%workspaces(0:num_threads-1), __STAT__) -! Load resource file +! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) - - if (status /= 0) then - if (mapl_am_i_root()) print*,'DU2G_instance_'//trim(COMP_NAME)//'.rc does not exist! Loading DU2G_GridComp_DU.rc instead' - call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_DU.rc', __RC__) + inquire(file='DU2G_instance_'//trim(COMP_NAME)//'.rc', exist=file_exists) + if (file_exists) then + call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_'//trim(COMP_NAME)//'.rc', __RC__) + else + if (mapl_am_i_root()) print*,'DU2G_instance_'//trim(COMP_NAME)//'.rc does not exist! Loading DU2G_GridComp_DU.rc instead' + call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_DU.rc', __RC__) end if ! process generic config items @@ -243,7 +245,7 @@ subroutine SetServices (GC, RC) VLOCATION = MAPL_VLocationCenter, & RESTART = MAPL_RestartSkip, __RC__) - do i = 1, self%nbins + do i = 1, self%nbins write (field_name, '(A, I0.3)') '', i call MAPL_AddImportSpec(GC, & short_name = 'climdu'//trim(field_name), & @@ -262,7 +264,7 @@ subroutine SetServices (GC, RC) vlocation = MAPL_VLocationCenter, & restart = MAPL_RestartSkip, __RC__) -! !wet deposition +! !wet deposition call MAPL_AddImportSpec(GC, & short_name = 'climDUWT'//trim(field_name), & long_name = 'Dust Mixing Ratio (bin '//trim(field_name)//')', & @@ -338,22 +340,22 @@ end subroutine SetServices !============================================================================ !BOP -! !IROUTINE: Initialize +! !IROUTINE: Initialize ! !INTERFACE: subroutine Initialize (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock integer, optional, intent( out) :: RC ! Error code -! !DESCRIPTION: This initializes DU's Grid Component. It primaryily fills -! GOCART's AERO states with its dust fields. +! !DESCRIPTION: This initializes DU's Grid Component. It primaryily fills +! GOCART's AERO states with its dust fields. -! !REVISION HISTORY: +! !REVISION HISTORY: ! 16oct2019 E.Sherman, A.da Silva, T.Clune, A.Darmenov - First attempt at refactoring !EOP @@ -386,10 +388,11 @@ subroutine Initialize (GC, import, export, clock, RC) integer, allocatable, dimension(:) :: channels_ integer :: nmom_ character(len=ESMF_MAXSTR) :: file_ + logical :: file_exists __Iam__('Initialize') !**************************************************************************** -! Begin... +! Begin... ! Get the target components name and set-up traceback handle. ! ----------------------------------------------------------- @@ -406,7 +409,7 @@ subroutine Initialize (GC, import, export, clock, RC) VERIFY_(STATUS) self => wrap%ptr - call MAPL_GridGet ( grid, globalCellCountPerDim=dims, __RC__ ) + call MAPL_GridGet (grid, localCellCountPerDim=dims, __RC__ ) ! Dust emission tuning coefficient [kg s2 m-5]. NOT bin specific. ! --------------------------------------------------------------- @@ -427,21 +430,22 @@ subroutine Initialize (GC, import, export, clock, RC) ! Get DTs ! ------- - call MAPL_GetResource(mapl, HDT, Label='RUN_DT:', __RC__) + call MAPL_GetResource(mapl, HDT, Label='RUN_DT:', __RC__) call MAPL_GetResource(mapl, CDT, Label='GOCART_DT:', default=real(HDT), __RC__) self%CDT = CDT -! Load resource file +! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_'//trim(COMP_NAME)//'.rc', RC=STATUS) - if (status /= 0) then - if (mapl_am_i_root()) print*,'DU2G_instance_'//trim(COMP_NAME)//'.rc does not exist! & - loading DU2G_instance_DU.rc instead' - call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_DU.rc', __RC__) + inquire(file='DU2G_instance_'//trim(COMP_NAME)//'.rc', exist=file_exists) + if (file_exists) then + call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_'//trim(COMP_NAME)//'.rc', __RC__) + else + if (mapl_am_i_root()) print*,'DU2G_instance_'//trim(COMP_NAME)//'.rc does not exist! Loading DU2G_GridComp_DU.rc instead' + call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_DU.rc', __RC__) end if -! Call Generic Initialize +! Call Generic Initialize ! ------------------------ call MAPL_GenericInitialize (GC, import, export, clock, __RC__) @@ -455,7 +459,7 @@ subroutine Initialize (GC, import, export, clock, RC) ! If this is a data component, the data is provided in the import ! state via ExtData instead of the actual GOCART children -! ---------------------------------------------------------------- +! ---------------------------------------------------------------- if ( data_driven ) then providerState = import prefix = 'clim' @@ -583,13 +587,13 @@ end subroutine Initialize !============================================================================ !BOP -! !IROUTINE: Run +! !IROUTINE: Run ! !INTERFACE: subroutine Run (GC, import, export, clock, rc) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -610,7 +614,7 @@ subroutine Run (GC, import, export, clock, rc) __Iam__('Run') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -643,13 +647,13 @@ end subroutine Run !============================================================================ !BOP -! !IROUTINE: Run1 +! !IROUTINE: Run1 ! !INTERFACE: subroutine Run1 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -694,7 +698,7 @@ subroutine Run1 (GC, import, export, clock, RC) __Iam__('Run1') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -867,14 +871,14 @@ end subroutine Run1 !============================================================================ !BOP -! !IROUTINE: Run2 +! !IROUTINE: Run2 ! !INTERFACE: subroutine Run2 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -904,7 +908,7 @@ subroutine Run2 (GC, import, export, clock, RC) __Iam__('Run2') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -998,8 +1002,8 @@ subroutine Run2 (GC, import, export, clock, RC) wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=DU, & grav=MAPL_GRAV, tmpu=t, rhoa=airdens, & rh=rh20, u=u, v=v, delp=delp, ple=ple,tropp=tropp, & - extcoef = DUEXTCOEFRH20, scacoef = DUSCACOEFRH20, NO3nFlag=.False., __RC__) - + extcoef = DUEXTCOEFRH20, scacoef = DUSCACOEFRH20, NO3nFlag=.False., __RC__) + RH80(:,:,:) = 0.80 call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, & @@ -1008,8 +1012,8 @@ subroutine Run2 (GC, import, export, clock, RC) wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=DU, & grav=MAPL_GRAV, tmpu=t, rhoa=airdens, & rh=rh80, u=u, v=v, delp=delp, ple=ple,tropp=tropp, & - extcoef = DUEXTCOEFRH80, scacoef = DUSCACOEFRH80, NO3nFlag=.False., __RC__) - + extcoef = DUEXTCOEFRH80, scacoef = DUSCACOEFRH80, NO3nFlag=.False., __RC__) + deallocate(RH20,RH80) RETURN_(ESMF_SUCCESS) @@ -1023,13 +1027,13 @@ end subroutine Run2 subroutine Run_data (GC, import, export, internal, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_State), intent(inout) :: internal ! Interal state integer, optional, intent( out) :: RC ! Error code: -! !DESCRIPTION: Updates pointers in Internal state with fields from ExtData. +! !DESCRIPTION: Updates pointers in Internal state with fields from ExtData. ! Locals character (len=ESMF_MAXSTR) :: COMP_NAME @@ -1046,7 +1050,7 @@ subroutine Run_data (GC, import, export, internal, RC) !EOP !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -1106,7 +1110,7 @@ subroutine aerosol_optics(state, rc) __Iam__('DU2G::aerosol_optics') -! Begin... +! Begin... ! Mie Table instance/index ! ------------------------ @@ -1117,7 +1121,7 @@ subroutine aerosol_optics(state, rc) band = 0 call ESMF_AttributeGet (state, name='band_for_aerosol_optics', value=band, __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet (state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer (state, ple, trim(fld_name), __RC__) @@ -1191,7 +1195,7 @@ subroutine aerosol_optics(state, rc) subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) implicit none - + type(GOCART2G_Mie), intent(inout) :: mie ! mie table integer, intent(in ) :: nbins ! number of bins integer, intent(in ) :: band ! channel @@ -1256,7 +1260,7 @@ subroutine monochromatic_aerosol_optics(state, rc) __Iam__('DU2G::monochromatic_aerosol_optics') -! Begin... +! Begin... ! Mie Table instance/index ! ------------------------ @@ -1267,7 +1271,7 @@ subroutine monochromatic_aerosol_optics(state, rc) wavelength = 0. call ESMF_AttributeGet (state, name='wavelength_for_aerosol_optics', value=wavelength, __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet (state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer (state, ple, trim(fld_name), __RC__) diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc index 0a5e62ae..4293cbc3 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc @@ -15,37 +15,37 @@ DU_Z0 NA N Y - none none roughness ExtData/chemistry/DUST/v0.0.0/sfc/a DU_GVF NA N Y %y4-%m2-%d2t12:00:00 none none gvf ExtData/chemistry/NDVI/v1.0.r3/sfc/qvi.006.%y4.nc4 # DU data - 3D -climdu001 'kg kg-1' Y N 0 0.0 1.0 du001 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climdu002 'kg kg-1' Y N 0 0.0 1.0 du002 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climdu003 'kg kg-1' Y N 0 0.0 1.0 du003 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climdu004 'kg kg-1' Y N 0 0.0 1.0 du004 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climdu005 'kg kg-1' Y N 0 0.0 1.0 du005 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climdu001 'kg kg-1' Y N 0 0.0 1.0 DU001 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climdu002 'kg kg-1' Y N 0 0.0 1.0 DU002 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climdu003 'kg kg-1' Y N 0 0.0 1.0 DU003 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climdu004 'kg kg-1' Y N 0 0.0 1.0 DU004 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climdu005 'kg kg-1' Y N 0 0.0 1.0 DU005 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 # DU data - 2D -climDUDP001 'kg m-2 s-1' Y N 0 0.0 1.0 DUDP001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUWT001 'kg m-2 s-1' Y N 0 0.0 1.0 DUWT001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUSD001 'kg m-2 s-1' Y N 0 0.0 1.0 DUSD001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUSV001 'kg m-2 s-1' Y N 0 0.0 1.0 DUSV001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - -climDUDP002 'kg m-2 s-1' Y N 0 0.0 1.0 DUDP002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUWT002 'kg m-2 s-1' Y N 0 0.0 1.0 DUWT002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUSD002 'kg m-2 s-1' Y N 0 0.0 1.0 DUSD002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUSV002 'kg m-2 s-1' Y N 0 0.0 1.0 DUSV002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - -climDUDP003 'kg m-2 s-1' Y N 0 0.0 1.0 DUDP003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUWT003 'kg m-2 s-1' Y N 0 0.0 1.0 DUWT003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUSD003 'kg m-2 s-1' Y N 0 0.0 1.0 DUSD003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUSV003 'kg m-2 s-1' Y N 0 0.0 1.0 DUSV003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - -climDUDP004 'kg m-2 s-1' Y N 0 0.0 1.0 DUDP004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUWT004 'kg m-2 s-1' Y N 0 0.0 1.0 DUWT004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUSD004 'kg m-2 s-1' Y N 0 0.0 1.0 DUSD004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUSV004 'kg m-2 s-1' Y N 0 0.0 1.0 DUSV004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - -climDUDP005 'kg m-2 s-1' Y N 0 0.0 1.0 DUDP005 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUWT005 'kg m-2 s-1' Y N 0 0.0 1.0 DUWT005 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUSD005 'kg m-2 s-1' Y N 0 0.0 1.0 DUSD005 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climDUSV005 'kg m-2 s-1' Y N 0 0.0 1.0 DUSV005 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climDUDP001 'kg m-2 s-1' Y N 0 0.0 1.0 DUDP001 /dev/null +climDUWT001 'kg m-2 s-1' Y N 0 0.0 1.0 DUWT001 /dev/null +climDUSD001 'kg m-2 s-1' Y N 0 0.0 1.0 DUSD001 /dev/null +climDUSV001 'kg m-2 s-1' Y N 0 0.0 1.0 DUSV001 /dev/null + +climDUDP002 'kg m-2 s-1' Y N 0 0.0 1.0 DUDP002 /dev/null +climDUWT002 'kg m-2 s-1' Y N 0 0.0 1.0 DUWT002 /dev/null +climDUSD002 'kg m-2 s-1' Y N 0 0.0 1.0 DUSD002 /dev/null +climDUSV002 'kg m-2 s-1' Y N 0 0.0 1.0 DUSV002 /dev/null + +climDUDP003 'kg m-2 s-1' Y N 0 0.0 1.0 DUDP003 /dev/null +climDUWT003 'kg m-2 s-1' Y N 0 0.0 1.0 DUWT003 /dev/null +climDUSD003 'kg m-2 s-1' Y N 0 0.0 1.0 DUSD003 /dev/null +climDUSV003 'kg m-2 s-1' Y N 0 0.0 1.0 DUSV003 /dev/null + +climDUDP004 'kg m-2 s-1' Y N 0 0.0 1.0 DUDP004 /dev/null +climDUWT004 'kg m-2 s-1' Y N 0 0.0 1.0 DUWT004 /dev/null +climDUSD004 'kg m-2 s-1' Y N 0 0.0 1.0 DUSD004 /dev/null +climDUSV004 'kg m-2 s-1' Y N 0 0.0 1.0 DUSV004 /dev/null + +climDUDP005 'kg m-2 s-1' Y N 0 0.0 1.0 DUDP005 /dev/null +climDUWT005 'kg m-2 s-1' Y N 0 0.0 1.0 DUWT005 /dev/null +climDUSD005 'kg m-2 s-1' Y N 0 0.0 1.0 DUSD005 /dev/null +climDUSV005 'kg m-2 s-1' Y N 0 0.0 1.0 DUSV005 /dev/null %% diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.yaml index a851a547..69df0e8f 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.yaml @@ -5,12 +5,11 @@ Collections: template: ExtData/chemistry/DUST/v0.0.0/sfc/_gldas-fao.soil_texture.x1152_y721_t1.nc4 DU2G_arlems-roughness.x1151_y720_t1.nc4: template: ExtData/chemistry/DUST/v0.0.0/sfc/arlems-roughness.x1151_y720_t1.nc4 - DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4: - template: ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 - DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4: - template: ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 DU2G_gocart.dust_source.v5a.x1152_y721.nc: template: ExtData/chemistry/DUST/v0.0.0/sfc/gocart.dust_source.v5a.x1152_y721.nc + DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4: + template: ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 + valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" DU2G_qvi.006.%y4.nc4: template: ExtData/chemistry/NDVI/v1.0.r3/sfc/qvi.006.%y4.nc4 DU2G_veg20.x1152_y721_t1.nc4: @@ -68,103 +67,64 @@ Exports: sample: DU2G_sample_0 variable: roughness climDUDP001: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUDP001 + collection: /dev/null climDUDP002: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUDP002 + collection: /dev/null climDUDP003: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUDP003 + collection: /dev/null climDUDP004: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUDP004 + collection: /dev/null climDUDP005: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUDP005 + collection: /dev/null climDUSD001: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSD001 + collection: /dev/null climDUSD002: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSD002 + collection: /dev/null climDUSD003: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSD003 + collection: /dev/null climDUSD004: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSD004 + collection: /dev/null climDUSD005: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSD005 + collection: /dev/null climDUSV001: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSV001 + collection: /dev/null climDUSV002: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSV002 + collection: /dev/null climDUSV003: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSV003 + collection: /dev/null climDUSV004: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSV004 + collection: /dev/null climDUSV005: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUSV005 + collection: /dev/null climDUWT001: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUWT001 + collection: /dev/null climDUWT002: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUWT002 + collection: /dev/null climDUWT003: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUWT003 + collection: /dev/null climDUWT004: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUWT004 + collection: /dev/null climDUWT005: - collection: DU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: DU2G_sample_2 - variable: DUWT005 + collection: /dev/null climdu001: collection: DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: DU2G_sample_2 - variable: du001 + variable: DU001 climdu002: collection: DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: DU2G_sample_2 - variable: du002 + variable: DU002 climdu003: collection: DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: DU2G_sample_2 - variable: du003 + variable: DU003 climdu004: collection: DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: DU2G_sample_2 - variable: du004 + variable: DU004 climdu005: collection: DU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: DU2G_sample_2 - variable: du005 + variable: DU005 + diff --git a/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 index 79baa616..58fce249 100644 --- a/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 @@ -58,8 +58,8 @@ module GOCART2G_GridCompMod ! !DESCRIPTION: ! -! {\tt GOCART} is a gridded component from the GOCART model and includes -! dust, sea salt, sulfates, nitrate, organic and black carbon. +! {\tt GOCART} is a gridded component from the GOCART model and includes +! dust, sea salt, sulfates, nitrate, organic and black carbon. ! ! @@ -67,7 +67,7 @@ module GOCART2G_GridCompMod ! ! 25feb2005 da Silva First crack. ! 19jul2006 da Silva First separate GOCART component. -! 14Oct2019 E.Sherman, A.Darmenov, A. da Silva, T. Clune First attempt at refactoring. +! 14Oct2019 E.Sherman, A.Darmenov, A. da Silva, T. Clune First attempt at refactoring. ! !EOP !============================================================================ @@ -89,11 +89,11 @@ subroutine SetServices (GC, RC) ! !DESCRIPTION: This version uses MAPL_GenericSetServices, which sets ! the Initialize and Finalize services to generic versions. It also -! allocates our instance of a generic state and puts it in the +! allocates our instance of a generic state and puts it in the ! gridded component (GC). Here we only set the two-stage run method and ! declare the data services. -! !REVISION HISTORY: +! !REVISION HISTORY: ! 14oct2019 Sherman, da Silva, Darmenov, Clune - First attempt at refactoring for ESMF compatibility @@ -102,7 +102,7 @@ subroutine SetServices (GC, RC) !============================================================================ ! ! Locals - character (len=ESMF_MAXSTR) :: COMP_NAME + character (len=ESMF_MAXSTR) :: COMP_NAME type (ESMF_Config) :: myCF ! GOCART2G_GridComp.rc type (ESMF_Config) :: cf ! universal config type (GOCART_State), pointer :: self @@ -189,7 +189,7 @@ subroutine SetServices (GC, RC) ! Define EXPORT states -! This state is needed by radiation and moist. It contains +! This state is needed by radiation and moist. It contains ! aerosols and callback methods ! -------------------------------------------------------- call MAPL_AddExportSpec(GC, & @@ -215,7 +215,7 @@ subroutine SetServices (GC, RC) #include "GOCART2G_Import___.h" ! Add connectivities for Nitrate component -! Nitrate currently only supports one Nitrate component. Nitrate only +! Nitrate currently only supports one Nitrate component. Nitrate only ! uses the first active dust and sea salt instance. if (size(self%NI%instances) > 0) then if ((self%DU%instances(1)%is_active)) then @@ -255,7 +255,7 @@ end subroutine SetServices subroutine Initialize (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -264,13 +264,13 @@ subroutine Initialize (GC, import, export, clock, RC) ! !DESCRIPTION: This initializes the GOCART Grid Component. It primarily creates ! its exports and births its children. -! !REVISION HISTORY: +! !REVISION HISTORY: ! 14oct2019 E.Sherman First attempt at refactoring !EOP !============================================================================ -! Locals +! Locals character (len=ESMF_MAXSTR) :: COMP_NAME type (MAPL_MetaComp), pointer :: MAPL @@ -286,7 +286,7 @@ subroutine Initialize (GC, import, export, clock, RC) type (wrap_) :: wrap integer :: n_modes - integer, parameter :: n_gocart_modes = 14 + integer, parameter :: n_gocart_modes = 14 integer :: dims(3) character(len=ESMF_MAXSTR) :: aero_aci_modes(n_gocart_modes) @@ -296,7 +296,7 @@ subroutine Initialize (GC, import, export, clock, RC) __Iam__('Initialize') !**************************************************************************** -! Begin... +! Begin... ! Get the target components name and set-up traceback handle. ! ----------------------------------------------------------- @@ -399,8 +399,8 @@ subroutine Initialize (GC, import, export, clock, RC) ! Attach the aerosol optics method. Used in Radiation. call ESMF_MethodAdd (aero, label='run_aerosol_optics', userRoutine=run_aerosol_optics, __RC__) - ! This attribute indicates if the aerosol optics method is implemented or not. - ! Radiation will not call the aerosol optics method unless this attribute is + ! This attribute indicates if the aerosol optics method is implemented or not. + ! Radiation will not call the aerosol optics method unless this attribute is ! explicitly set to true. call ESMF_AttributeSet(aero, name='implements_aerosol_optics_method', value=.true., __RC__) @@ -408,7 +408,7 @@ subroutine Initialize (GC, import, export, clock, RC) ! ------------------------------------------------------------ aero_aci_modes = (/'du001 ', 'du002 ', 'du003 ', & 'du004 ', 'du005 ', & - 'ss001 ', 'ss002 ', 'ss003 ', & + 'ss001 ', 'ss002 ', 'ss003 ', & 'sulforg01', 'sulforg02', 'sulforg03', & 'bcphilic ', 'ocphilic ', 'brcphilic'/) @@ -424,18 +424,9 @@ subroutine Initialize (GC, import, export, clock, RC) call ESMF_ConfigGetAttribute(CF, CCNtuning, default=1.8, label='CCNTUNING:', __RC__) call ESMF_AttributeSet(aero, name='ccn_tuning', value=CCNtuning, __RC__) - call ESMF_ConfigGetAttribute( CF, CLDMICRO, Label='CLDMICRO:', default="1MOMENT", RC=STATUS) + call ESMF_ConfigGetAttribute( CF, CLDMICRO, Label='CLDMICR_OPTION:', default="BACM_1M", RC=STATUS) call ESMF_AttributeSet(aero, name='cldmicro', value=CLDMICRO, __RC__) - ! scaling factor for sea salt - if(adjustl(CLDMICRO)=="2MOMENT") then - call ESMF_ConfigGetAttribute(CF, f_aci_seasalt, default=4.0, label='SS_SCALE:', __RC__) - call ESMF_AttributeSet(aero, name='seasalt_scaling_factor', value=f_aci_seasalt, __RC__) - else - call ESMF_ConfigGetAttribute(CF, f_aci_seasalt, default=14.0, label='SS_SCALE:', __RC__) - call ESMF_AttributeSet(aero, name='seasalt_scaling_factor', value=f_aci_seasalt, __RC__) - endif - ! Add variables to AERO state call add_aero (aero, label='air_temperature', label2='T', grid=grid, typekind=MAPL_R4, __RC__) call add_aero (aero, label='fraction_of_land_type', label2='FRLAND', grid=grid, typekind=MAPL_R4, __RC__) @@ -456,24 +447,24 @@ subroutine Initialize (GC, import, export, clock, RC) contains subroutine add_aero_states_(instances) - type(Instance), intent(in) :: instances(:) + type(Instance), intent(in) :: instances(:) type (ESMF_State) :: child_state type (ESMF_FieldBundle) :: child_bundle type (ESMF_Field), allocatable :: fieldList(:) - + integer :: i integer :: id integer :: fieldCount __Iam__('Initialize::add_aero_states_') - + do i = 1, size(instances) if (.not. instances(i)%is_active) cycle id = instances(i)%id - + call ESMF_GridCompGet (gcs(id), __RC__ ) call ESMF_StateGet (gex(id), trim(instances(i)%name)//'_AERO', child_state, __RC__) call ESMF_StateAdd (aero, [child_state], __RC__) - + if (instances(i)%name(1:2) /= 'NI') then call ESMF_StateGet (gex(id), trim(instances(i)%name)//'_AERO_DP', child_bundle, __RC__) call ESMF_FieldBundleGet (child_bundle, fieldCount=fieldCount, __RC__) @@ -490,7 +481,7 @@ end subroutine Initialize !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !BOP -! !IROUTINE: RUN -- Run method for GOCART2G +! !IROUTINE: RUN -- Run method for GOCART2G ! !INTERFACE: @@ -498,13 +489,13 @@ end subroutine Initialize subroutine Run1 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock integer, optional, intent( out) :: RC ! Error code: -! !DESCRIPTION: Run method +! !DESCRIPTION: Run method !EOP !============================================================================ @@ -522,7 +513,7 @@ subroutine Run1 (GC, import, export, clock, RC) __Iam__('Run1') !**************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle @@ -558,7 +549,7 @@ end subroutine Run1 subroutine Run2 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -623,7 +614,7 @@ subroutine Run2 (GC, import, export, clock, RC) real, pointer, dimension(:,:,:,:) :: suscacoefrh20, suscacoefrh80 real, pointer, dimension(:,:,:,:) :: subckcoef real, pointer, dimension(:,:) :: suangstr, so4smass - real, pointer, dimension(:,:,:) :: bcexttau, bcstexttau, bcscatau, bcstscatau + real, pointer, dimension(:,:,:) :: bcexttau, bcstexttau, bcscatau, bcstscatau real, pointer, dimension(:,:,:,:) :: bcextcoef, bcscacoef real, pointer, dimension(:,:,:,:) :: bcextcoefrh20, bcextcoefrh80 real, pointer, dimension(:,:,:,:) :: bcscacoefrh20, bcscacoefrh80 @@ -649,7 +640,7 @@ subroutine Run2 (GC, import, export, clock, RC) real, allocatable :: tau_mol(:,:), tau_aer(:,:) real :: c1, c2, c3 real :: nifactor - real, parameter :: pi = 3.141529265 + real, parameter :: pi = 3.141529265 integer :: ind550, ind532 integer :: i1, i2, j1, j2, km, k,kk @@ -658,7 +649,7 @@ subroutine Run2 (GC, import, export, clock, RC) __Iam__('Run2') !**************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -731,7 +722,7 @@ subroutine Run2 (GC, import, export, clock, RC) if (ind550 == 0) then !$omp critical (G2G_1) - print*,trim(Iam),' : 550nm wavelengths is not present in GOCART2G_GridComp.rc.',& + print*,trim(Iam),' : 550nm wavelengths is not present in GOCART2G_GridComp.rc.',& ' Cannot produce TOTANGSTR variable without 550nm wavelength.' !$omp end critical (G2G_1) VERIFY_(100) @@ -780,7 +771,7 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totexttfm) .and. associated(duexttfm)) totexttfm(:,:,w) = totexttfm(:,:,w)+duexttfm(:,:,w) if(associated(totscatfm) .and. associated(duscatfm)) totscatfm(:,:,w) = totscatfm(:,:,w)+duscatfm(:,:,w) end do - + do w = 1, size(self%wavelengths_profile) if(associated(totextcoef) .and. associated(duextcoef)) totextcoef(:,:,:,w) = totextcoef(:,:,:,w)+duextcoef(:,:,:,w) if(associated(totextcoefrh20) .and. associated(duextcoefrh20)) totextcoefrh20(:,:,:,w) = totextcoefrh20(:,:,:,w)+duextcoefrh20(:,:,:,w) @@ -790,7 +781,7 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totscacoefrh80) .and. associated(duscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+duscacoefrh80(:,:,:,w) if(associated(totbckcoef) .and. associated(dubckcoef)) totbckcoef(:,:,:,w) = totbckcoef(:,:,:,w)+dubckcoef(:,:,:,w) end do - + call MAPL_GetPointer (gex(self%DU%instances(n)%id), dusmass, 'DUSMASS', __RC__) call MAPL_GetPointer (gex(self%DU%instances(n)%id), dusmass25, 'DUSMASS25', __RC__) if(associated(pm) .and. associated(dusmass)) pm = pm + dusmass @@ -804,7 +795,7 @@ subroutine Run2 (GC, import, export, clock, RC) tau1 = tau1 + duexttau(:,:,ind550)*exp(c1*duangstr) tau2 = tau2 + duexttau(:,:,ind550)*exp(c2*duangstr) end if - end if + end if end do ! Sea Salt @@ -848,7 +839,7 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totscacoefrh80) .and. associated(ssscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+ssscacoefrh80(:,:,:,w) if(associated(totbckcoef) .and. associated(ssbckcoef)) totbckcoef(:,:,:,w) = totbckcoef(:,:,:,w)+ssbckcoef(:,:,:,w) enddo - + call MAPL_GetPointer (gex(self%SS%instances(n)%id), sssmass, 'SSSMASS', __RC__) call MAPL_GetPointer (gex(self%SS%instances(n)%id), sssmass25, 'SSSMASS25', __RC__) if(associated(pm) .and. associated(sssmass)) pm = pm + sssmass @@ -906,7 +897,7 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totscacoefrh80) .and. associated(niscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+niscacoefrh80(:,:,:,w) if(associated(totbckcoef) .and. associated(nibckcoef)) totbckcoef(:,:,:,w) = totbckcoef(:,:,:,w)+nibckcoef(:,:,:,w) end do - + call MAPL_GetPointer (gex(self%NI%instances(n)%id), nismass, 'NISMASS', __RC__) call MAPL_GetPointer (gex(self%NI%instances(n)%id), nismass25, 'NISMASS25', __RC__) call MAPL_GetPointer (gex(self%NI%instances(n)%id), nh4smass, 'NH4SMASS', __RC__) @@ -966,7 +957,7 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totscacoefrh80) .and. associated(suscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+suscacoefrh80(:,:,:,w) if(associated(totbckcoef) .and. associated(subckcoef)) totbckcoef(:,:,:,w) = totbckcoef(:,:,:,w)+subckcoef(:,:,:,w) end do - + call MAPL_GetPointer (gex(self%SU%instances(n)%id), pso4, 'PSO4', __RC__) if(associated(pso4tot) .and. associated(pso4)) pso4tot = pso4tot + pso4 @@ -1067,22 +1058,22 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totexttfm) .and. associated(ocexttau)) totexttfm(:,:,w) = totexttfm(:,:,w)+ocexttau(:,:,w) if(associated(totscatfm) .and. associated(ocscatau)) totscatfm(:,:,w) = totscatfm(:,:,w)+ocscatau(:,:,w) end do - + do w = 1, size(self%wavelengths_profile) if(associated(totextcoef) .and. associated(ocextcoef)) totextcoef(:,:,:,w) = totextcoef(:,:,:,w)+ocextcoef(:,:,:,w) if(associated(totextcoefrh20) .and. associated(ocextcoefrh20)) totextcoefrh20(:,:,:,w) = totextcoefrh20(:,:,:,w)+ocextcoefrh20(:,:,:,w) if(associated(totextcoefrh80) .and. associated(ocextcoefrh80)) totextcoefrh80(:,:,:,w) = totextcoefrh80(:,:,:,w)+ocextcoefrh80(:,:,:,w) if(associated(totscacoef) .and. associated(ocscacoef)) totscacoef(:,:,:,w) = totscacoef(:,:,:,w)+ocscacoef(:,:,:,w) if(associated(totscacoefrh20) .and. associated(ocscacoefrh20)) totscacoefrh20(:,:,:,w) = totscacoefrh20(:,:,:,w)+ocscacoefrh20(:,:,:,w) - if(associated(totscacoefrh20) .and. associated(ocscacoefrh20)) totscacoefrh20(:,:,:,w) = totscacoefrh20(:,:,:,w)+ocscacoefrh20(:,:,:,w) + if(associated(totscacoefrh80) .and. associated(ocscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+ocscacoefrh80(:,:,:,w) if(associated(totbckcoef) .and. associated(ocbckcoef)) totbckcoef(:,:,:,w) = totbckcoef(:,:,:,w)+ocbckcoef(:,:,:,w) end do - + call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocsmass, 'CA.ocSMASS', __RC__) if(associated(pm) .and. associated(ocsmass)) pm = pm + ocsmass if(associated(pm25) .and. associated(ocsmass)) pm25 = pm25 + ocsmass if(associated(pm_rh35) .and. associated(ocsmass)) pm_rh35 = pm_rh35 + 1.16*ocsmass ! needs to be revisited: OCpho + 1.16 OCphi - if(associated(pm25_rh35) .and. associated(ocsmass)) pm25_rh35 = pm25_rh35 + 1.16*ocsmass ! + if(associated(pm25_rh35) .and. associated(ocsmass)) pm25_rh35 = pm25_rh35 + 1.16*ocsmass ! if(associated(pm_rh50) .and. associated(ocsmass)) pm_rh50 = pm_rh50 + 1.24*ocsmass ! needs to be revisited: OCpho + 1.24 OCphi if(associated(pm25_rh50) .and. associated(ocsmass)) pm25_rh50 = pm25_rh50 + 1.24*ocsmass ! @@ -1127,12 +1118,12 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totscacoefrh80) .and. associated(brscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+brscacoefrh80(:,:,:,w) if(associated(totbckcoef) .and. associated(brbckcoef)) totbckcoef(:,:,:,w) = totbckcoef(:,:,:,w)+brbckcoef(:,:,:,w) end do - + call MAPL_GetPointer (gex(self%CA%instances(n)%id), brsmass, 'CA.brSMASS', __RC__) if(associated(pm) .and. associated(brsmass)) pm = pm + brsmass if(associated(pm25) .and. associated(brsmass)) pm25 = pm25 + brsmass if(associated(pm_rh35) .and. associated(brsmass)) pm_rh35 = pm_rh35 + 1.16*brsmass ! needs to be revisited: OCpho + 1.16 OCphi - if(associated(pm25_rh35) .and. associated(brsmass)) pm25_rh35 = pm25_rh35 + 1.16*brsmass ! + if(associated(pm25_rh35) .and. associated(brsmass)) pm25_rh35 = pm25_rh35 + 1.16*brsmass ! if(associated(pm_rh50) .and. associated(brsmass)) pm_rh50 = pm_rh50 + 1.24*brsmass ! needs to be revisited: OCpho + 1.24 OCphi if(associated(pm25_rh50) .and. associated(brsmass)) pm25_rh50 = pm25_rh50 + 1.24*brsmass ! @@ -1144,7 +1135,7 @@ subroutine Run2 (GC, import, export, clock, RC) end do ! Finish calculating totangstr - if(associated(totangstr)) then + if(associated(totangstr)) then totangstr = log(tau1/tau2)/c3 end if @@ -1171,11 +1162,11 @@ subroutine Run2 (GC, import, export, clock, RC) VERIFY_(100) end if - ! Pressure at layer edges (ple shape (im,jm, km+1) on the edge + ! Pressure at layer edges (ple shape (im,jm, km+1) on the edge i1 = lbound(ple, 1); i2 = ubound(ple, 1) j1 = lbound(ple, 2); j2 = ubound(ple, 2) - km = ubound(ple, 3) ! km =72 index starts at 0 + km = ubound(ple, 3) ! km =72 index starts at 0 ! Pressure for each layer allocate(P(i1:i2,j1:j2,km), __STAT__) do k = 1, km @@ -1189,7 +1180,7 @@ subroutine Run2 (GC, import, export, clock, RC) ! tau mol for each layer allocate(tau_mol_layer(i1:i2,j1:j2,km), delz(i1:i2,j1:j2,km),__STAT__) delz = delp / (MAPL_GRAV * airdens) - tau_mol_layer = backscat_mol * 8.* pi /3. * delz + tau_mol_layer = backscat_mol * 8.* pi /3. * delz ! tau aer for each layer allocate(tau_aer_layer(i1:i2,j1:j2,km), __STAT__) @@ -1197,25 +1188,25 @@ subroutine Run2 (GC, import, export, clock, RC) allocate(tau_aer(i1:i2,j1:j2), __STAT__) allocate(tau_mol(i1:i2,j1:j2), __STAT__) - - ! TOTAL ABCK TOA - ! top layer + + ! TOTAL ABCK TOA + ! top layer totabcktoa(:,:,1) = (totbckcoef(:,:,1,ind532) + backscat_mol(:,:,1)) * exp(-tau_aer_layer(:,:,1)) * exp(-tau_mol_layer(:,:,1)) ! layer 2 to the layer at the surface(km) do k = 2, km tau_aer = 0. tau_mol = 0. ! for each layer - do kk = 1, k - tau_aer = tau_aer + tau_aer_layer(:,:,kk) - tau_mol = tau_mol + tau_mol_layer(:,:,kk) + do kk = 1, k + tau_aer = tau_aer + tau_aer_layer(:,:,kk) + tau_mol = tau_mol + tau_mol_layer(:,:,kk) enddo tau_aer = tau_aer + 0.5 * tau_aer_layer(:,:,k) tau_mol = tau_mol + 0.5 * tau_mol_layer(:,:,k) totabcktoa(:,:,k) = (totbckcoef(:,:,k,ind532) + backscat_mol(:,:,k)) * exp(-tau_aer) * exp(-tau_mol) enddo - - ! TOTAL ABCK SFC - ! bottom layer + + ! TOTAL ABCK SFC + ! bottom layer totabcksfc(:,:,km) = (totbckcoef(:,:,km,ind532) + backscat_mol(:,:,km)) * exp(-tau_aer_layer(:,:,km)) * exp(-tau_mol_layer(:,:,km)) ! layer 2nd from the surface to the top of the atmoshere (km) do k = km-1, 1, -1 @@ -1325,9 +1316,9 @@ subroutine createInstances_ (self, GC, rc) RETURN_(ESMF_SUCCESS) contains - + subroutine addChildren__ (gc, species, setServices, rc) - + type (ESMF_GridComp), intent(inout) :: gc type(Constituent), intent(inout) :: species external :: setServices @@ -1377,7 +1368,7 @@ subroutine serialize_bundle (state, rc) __Iam__('GOCART2G::serialize_bundle') -! !Description: Callback for AERO_RAD state used in GAAS module to provide a +! !Description: Callback for AERO_RAD state used in GAAS module to provide a ! serialized ESMF_Bundle of aerosol fields. !----------------------------------------------------------------------------------- ! Begin... @@ -1460,7 +1451,7 @@ subroutine run_aerosol_optics (state, rc) ! Description: Used in Radiation gridded components to provide aerosol properties !----------------------------------------------------------------------------------- -! Begin... +! Begin... ! Radiation band ! -------------- @@ -1471,7 +1462,7 @@ subroutine run_aerosol_optics (state, rc) call ESMF_AttributeGet(state, name='relative_humidity_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, RH, trim(fld_name), __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, PLE, trim(fld_name), __RC__) @@ -1605,7 +1596,7 @@ subroutine aerosol_activation_properties(state, rc) ! Local ! --------- character(len=ESMF_MAXSTR) :: mode ! mode name - character(len=ESMF_MAXSTR) :: mode_ ! lowercase mode name + character(len=ESMF_MAXSTR) :: mode_ ! lowercase mode name type(ESMF_State) :: child_state @@ -1619,16 +1610,15 @@ subroutine aerosol_activation_properties(state, rc) real, dimension(:,:,:,:), pointer :: ptr_4d ! aerosol mass mixing ratio (temporary) real, dimension(:,:,:), pointer :: ptr_3d ! aerosol mass mixing ratio (temporary) - real, dimension(:,:,:), pointer :: num ! number concentration of aerosol particles + real, dimension(:,:,:), pointer :: num ! number concentration of aerosol particles real, dimension(:,:,:), pointer :: diameter ! dry size of aerosol real, dimension(:,:,:), pointer :: sigma ! width of aerosol mode real, dimension(:,:,:), pointer :: density ! density of aerosol - real, dimension(:,:,:), pointer :: hygroscopicity ! hygroscopicity of aerosol + real, dimension(:,:,:), pointer :: hygroscopicity ! hygroscopicity of aerosol real, dimension(:,:,:), pointer :: f_dust ! fraction of dust aerosol - real, dimension(:,:,:), pointer :: f_soot ! fraction of soot aerosol + real, dimension(:,:,:), pointer :: f_soot ! fraction of soot aerosol real, dimension(:,:,:), pointer :: f_organic ! fraction of organic aerosol - real :: ss_scale ! sea salt scaling factor real :: max_clean ! max mixing ratio before considered polluted real :: ccn_tuning ! tunes conversion factors for sulfate character(LEN=ESMF_MAXSTR) :: cld_micro @@ -1664,7 +1654,7 @@ subroutine aerosol_activation_properties(state, rc) __Iam__('GOCART2G::aerosol_activation_properties') -! Begin... +! Begin... ! Get list of child states within state and add to aeroList ! --------------------------------------------------------- @@ -1694,12 +1684,12 @@ subroutine aerosol_activation_properties(state, rc) ! ------------ call ESMF_AttributeGet(state, name='aerosol_mode', value=mode, __RC__) -! Land fraction +! Land fraction ! ------------- call ESMF_AttributeGet(state, name='fraction_of_land_type', value=fld_name, __RC__) call MAPL_GetPointer(state, f_land, trim(fld_name), __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, ple, trim(fld_name), __RC__) @@ -1741,7 +1731,6 @@ subroutine aerosol_activation_properties(state, rc) ! Sea salt scaling fctor ! ---------------------- - call ESMF_AttributeGet(state, name='seasalt_scaling_factor', value=ss_scale, __RC__) call ESMF_AttributeGet(state, name='max_q_clean', value=max_clean, __RC__) call ESMF_AttributeGet(state, name='cldmicro', value=cld_micro, __RC__) call ESMF_AttributeGet(state, name='ccn_tuning', value=ccn_tuning, __RC__) @@ -1772,7 +1761,7 @@ subroutine aerosol_activation_properties(state, rc) else if (index(mode_, 'ss00') > 0) then ! Sea Salt ! compute the total mass mixing ratio and impose a tri-modal size distribution do i = 1, size(aeroList) - if (index(aeroList(i), 'SS') > 0) then + if (index(aeroList(i), 'SS') > 0) then call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) call MAPL_GetPointer(child_state, ptr_4d, 'SS', __RC__) do j = 1, ubound(ptr_4d, 4) @@ -1780,14 +1769,6 @@ subroutine aerosol_activation_properties(state, rc) ptr_3d => ptr_4d(:,:,:,j) end do - ! temperature correction over the ocean - allocate(f(i2,j2, km), __STAT__) - call ocean_correction_(f, f_land, temperature(1:i2,1:j2,km), ss_scale, 1, i2, 1, j2, km) - - ! apply the correction factor - q = f * q - deallocate(f, __STAT__) - hygroscopicity = k_SS density = densSS end if @@ -1817,11 +1798,6 @@ subroutine aerosol_activation_properties(state, rc) density = densORG * ptr_3d + density end if - ! required by the aap_(...) - if((adjustl(cld_micro)/="2MOMENT") .and. (index(aeroList(i), 'SU') > 0)) then ! maintained for compatibility with the single moment - call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) - call MAPL_GetPointer(child_state, ptr_3d, 'SO4', __RC__) - end if end do where (q > 2.0e-12 .and. hygroscopicity > tiny(0.0)) @@ -1914,11 +1890,11 @@ subroutine aap_(mode, q, num, diameter, sigma, f_dust, f_soot, f_organic, dens_, real, intent(in), dimension(i1:i2,j1:j2,km) :: q_ ! auxiliary mass real, intent(in), dimension(i1:i2,j1:j2,km) :: dens_ ! density - real, intent(out), dimension(i1:i2,j1:j2,km) :: num ! number concentration of aerosol particles + real, intent(out), dimension(i1:i2,j1:j2,km) :: num ! number concentration of aerosol particles real, intent(out), dimension(i1:i2,j1:j2,km) :: diameter ! dry size of aerosol - real, intent(out), dimension(i1:i2,j1:j2,km) :: sigma ! width of aerosol mode + real, intent(out), dimension(i1:i2,j1:j2,km) :: sigma ! width of aerosol mode real, intent(out), dimension(i1:i2,j1:j2,km) :: f_dust ! fraction of dust aerosol - real, intent(out), dimension(i1:i2,j1:j2,km) :: f_soot ! fraction of soot aerosol + real, intent(out), dimension(i1:i2,j1:j2,km) :: f_soot ! fraction of soot aerosol real, intent(out), dimension(i1:i2,j1:j2,km) :: f_organic ! fraction of organic aerosol integer, intent(out) :: rc ! return code @@ -1947,22 +1923,10 @@ subroutine aap_(mode, q, num, diameter, sigma, f_dust, f_soot, f_organic, dens_, f_soot = 0.0 f_organic = 0.0 - if(adjustl(cld_micro)=="2MOMENT") then - qaux=q !this corrects a bug - else - qaux = q_ !keep it to get zero diff with the single moment - max_clean = 5.0e-7 - ccn_tuning = 1.0 - end if - + qaux=q !this corrects a bug if (index(mode_, 'ss00') > 0) then - if(adjustl(cld_micro)=="2MOMENT") then - TPI (1) = 230e6 ! num fraction (reduced 091015) - else - TPI (1) = 100e6 ! num fraction (reduced 091015) - end if - + TPI (1) = 230e6 ! num fraction (reduced 091015) DPGI (1) = 0.02e-6 ! modal diameter (m) SIGI (1) = log(1.6) ! geometric dispersion (sigma_g) ! accumulation @@ -2003,11 +1967,11 @@ subroutine aap_(mode, q, num, diameter, sigma, f_dust, f_soot, f_organic, dens_, ! fine TPIclean (1) = 1.0e9 ! total concentration (# m-3) DPGIclean (1) = 0.016e-6 ! modal diameter (m) - SIGIclean (1) = log(1.6) ! geometric dispersion (sigma_g) + SIGIclean (1) = log(1.6) ! geometric dispersion (sigma_g) ! accumulation TPIclean (2) = 8.0e8 ! total concentration (# m-3) DPGIclean (2) = 0.067e-6 ! modal diameter (m) - SIGIclean (2) = log(2.1) ! geometric dispersion (sigma_g) + SIGIclean (2) = log(2.1) ! geometric dispersion (sigma_g) !Coarse TPIclean (3) = 2.0e6 ! total concentration (# m-3) DPGIclean (3) = 0.93e-6 ! modal diameter (m) @@ -2074,7 +2038,7 @@ subroutine aap_(mode, q, num, diameter, sigma, f_dust, f_soot, f_organic, dens_, elsewhere sigma = SIGIclean(1) diameter = DPGIclean(1) - num = TPIclean(1) * qaux*ccn_tuning / (dens_*fmassclean) ! only sulfate + num = TPIclean(1) * qaux*ccn_tuning / (dens_*fmassclean) ! only sulfate end where case ('sulforg02') @@ -2127,44 +2091,6 @@ subroutine aap_(mode, q, num, diameter, sigma, f_dust, f_soot, f_organic, dens_, end subroutine aap_ - subroutine ocean_correction_(f, f_land, t_air_sfc, ss_scale, i1, i2, j1, j2, km) - - implicit none - - integer, intent(in) :: i1, i2 ! dimension bounds - integer, intent(in) :: j1, j2 ! ... // .. - integer, intent(in) :: km ! ... // .. - - real, intent(in ), dimension(i1:i2,j1:j2) :: f_land ! fraction of land - real, intent(in ), dimension(i1:i2,j1:j2) :: t_air_sfc ! air temperature in the surface model layer - real, intent(in ) :: ss_scale ! scaling factor for sea salt at low T - - real, intent(out), dimension(i1:i2,j1:j2, km) :: f ! correction factor - - ! local - integer :: i, j - real :: usurf - - f = 1.0 - - do j = j1, j2 - do i = i1, i2 - if (f_land(i,j) < 0.1) then !ocean - - if(adjustl(cld_micro) .ne."2MOMENT") then - usurf = max(min((t_air_sfc(i,j) - 285.0) / 2.0, 10.0), -10.0) !smooth transition around some T value - else - usurf = max(min((t_air_sfc(i,j) - 285.0) / 2.0, 30.0), -30.0) !smooth transition around some T value - end if - usurf = min(ss_scale / (1.0 + exp(usurf)), 20.0) - - f(i,j,:) = (1.0 + usurf) - end if - end do - end do - - end subroutine ocean_correction_ - end subroutine aerosol_activation_properties @@ -2201,7 +2127,7 @@ subroutine get_monochromatic_aop (state, rc) ! Description: Used in GAAS gridded component to provide aerosol properties !----------------------------------------------------------------------------------- -! Begin... +! Begin... ! Radiation band ! -------------- @@ -2212,7 +2138,7 @@ subroutine get_monochromatic_aop (state, rc) call ESMF_AttributeGet(state, name='relative_humidity_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, RH, trim(fld_name), __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, PLE, trim(fld_name), __RC__) @@ -2322,7 +2248,7 @@ subroutine get_mixRatioSum (state, rc) ! Description: Used in GAAS gridded component to provide sum of aerosol mixing ratio !-------------------------------------------------------------------------------------- -! Begin... +! Begin... call ESMF_AttributeGet(state, name='aerosolName', value=aeroName, __RC__) call ESMF_AttributeGet(state, name='im', value=im, __RC__) @@ -2450,7 +2376,7 @@ subroutine getAerosolSum (aeroToken, state, aeroList, aeroOut, rc) ! Begin... endInd = len_trim(aeroToken) - + aeroOut = 0.0 do i = 1, size(aeroList) if (trim(aeroList(i)(1:endInd)) == trim(aeroToken)) then diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP.20C/NI2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP.20C/NI2G_GridComp_ExtData.rc index 366cb441..d09decb3 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP.20C/NI2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP.20C/NI2G_GridComp_ExtData.rc @@ -5,9 +5,9 @@ PrimaryExports%% # -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|----------- # ======= Nitrate Data Instance ========== -climNO3an1 'kg kg-1' N Y F0 none none NO3AN1 /discover/nobackup/projects/gmao/gmao_ops/pub/fp/das/Y%y4/M%m2/D%d2/GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 2017-02-01T00:00:00P03:00 -climNO3an2 'kg kg-1' N Y F0 none none NO3AN2 /discover/nobackup/projects/gmao/gmao_ops/pub/fp/das/Y%y4/M%m2/D%d2/GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 2017-02-01T00:00:00P03:00 -climNO3an3 'kg kg-1' N Y F0 none none NO3AN3 /discover/nobackup/projects/gmao/gmao_ops/pub/fp/das/Y%y4/M%m2/D%d2/GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 2017-02-01T00:00:00P03:00 +climNO3an1 'kg kg-1' N Y F0 none none NO3AN1 /dev/null +climNO3an2 'kg kg-1' N Y F0 none none NO3AN2 /dev/null +climNO3an3 'kg kg-1' N Y F0 none none NO3AN3 /dev/null # ======= Nitrate Sources ======== EMI_NH3_BB 'kg m-2 s-1' N Y %y4-%m2-%d2T12:00:00 none 0.778 biomass ExtData/chemistry/HFED/v1.0/Y%y4/hfed.emis_nh3.x576_y361_t14.%y4.nc4 diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.rc index de55d3c5..549bdca2 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.rc @@ -5,9 +5,9 @@ PrimaryExports%% # -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|----------- # ======= Nitrate Data Instance ========== -climNO3an1 'kg kg-1' N Y F0 none none NO3AN1 /discover/nobackup/projects/gmao/gmao_ops/pub/fp/das/Y%y4/M%m2/D%d2/GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 2017-02-01T00:00:00P03:00 -climNO3an2 'kg kg-1' N Y F0 none none NO3AN2 /discover/nobackup/projects/gmao/gmao_ops/pub/fp/das/Y%y4/M%m2/D%d2/GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 2017-02-01T00:00:00P03:00 -climNO3an3 'kg kg-1' N Y F0 none none NO3AN3 /discover/nobackup/projects/gmao/gmao_ops/pub/fp/das/Y%y4/M%m2/D%d2/GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 2017-02-01T00:00:00P03:00 +climNO3an1 'kg kg-1' N Y F0 none none NO3AN1 /dev/null +climNO3an2 'kg kg-1' N Y F0 none none NO3AN2 /dev/null +climNO3an3 'kg kg-1' N Y F0 none none NO3AN3 /dev/null # ======= Nitrate Sources ======== EMI_NH3_BB 'kg m-2 s-1' N Y %y4-%m2-%d2T12:00:00 none 0.778 biomass ExtData/chemistry/QFED/v2.6r1/sfc/0.1/Y%y4/M%m2/qfed2.emis_nh3.061.%y4%m2%d2.nc4 diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.yaml index 3018b116..e7596eed 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.yaml @@ -3,8 +3,6 @@ Collections: template: ExtData/chemistry/Masks/v0.0.0/sfc/ARCTAS.region_mask.x540_y361.2008.nc NI2G_GEIA.emis_NH3.ocean.x576_y361.t12.20080715_12z.nc4: template: ExtData/chemistry/GEIA/v0.0.0/sfc/GEIA.emis_NH3.ocean.x576_y361.t12.20080715_12z.nc4 - NI2G_GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4: - template: /discover/nobackup/projects/gmao/gmao_ops/pub/fp/das/Y%y4/M%m2/D%d2/GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 NI2G_MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4: template: ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 NI2G_NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4: @@ -78,18 +76,10 @@ Exports: sample: NI2G_sample_3 variable: REGION_MASK climNO3an1: - collection: NI2G_GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 - regrid: CONSERVE - sample: NI2G_sample_0 - variable: NO3AN1 + collection: /dev/null climNO3an2: - collection: NI2G_GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 - regrid: CONSERVE - sample: NI2G_sample_0 - variable: NO3AN2 + collection: /dev/null climNO3an3: - collection: NI2G_GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 - regrid: CONSERVE - sample: NI2G_sample_0 - variable: NO3AN3 + collection: /dev/null + diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 index 0305c43c..448ae57a 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 @@ -3,7 +3,7 @@ !============================================================================= !BOP -! !MODULE: NI2G_GridCompMod - GOCART Nitrate gridded component +! !MODULE: NI2G_GridCompMod - GOCART Nitrate gridded component ! !INTERFACE: module NI2G_GridCompMod @@ -11,7 +11,7 @@ module NI2G_GridCompMod ! !USES: use ESMF use MAPL - use GOCART2G_MieMod + use GOCART2G_MieMod use Chem_AeroGeneric use iso_c_binding, only: c_loc, c_f_pointer, c_ptr @@ -55,7 +55,6 @@ module NI2G_GridCompMod type, extends(GA_Environment) :: NI2G_GridComp !logical :: first logical :: recycle_HNO3 = .false. - !real, allocatable :: xhno3(:,:,:) ! buffer for NITRATE_HNO3 [kg/(m^2 sec)]; moved to ESMF internal state real, allocatable :: rmedDU(:), rmedSS(:) ! DU and SS radius real, allocatable :: fnumDU(:), fnumSS(:) ! DU and SS particles per kg mass type(ThreadWorkspace), allocatable :: workspaces(:) @@ -70,7 +69,7 @@ module NI2G_GridCompMod !============================================================================ !BOP -! !IROUTINE: SetServices +! !IROUTINE: SetServices ! !INTERFACE: subroutine SetServices ( GC, RC ) @@ -81,7 +80,7 @@ subroutine SetServices ( GC, RC ) ! DESCRIPTION: This version uses MAPL_GenericSetServices, which sets ! the Initialize and Finalize services to generic versions. It also -! allocates our instance of a generic state and puts it in the +! allocates our instance of a generic state and puts it in the ! gridded component (GC). Here we only set the two-stage run method ! and declare the data services. @@ -101,6 +100,7 @@ subroutine SetServices ( GC, RC ) real :: DEFVAL logical :: data_driven=.true. + logical :: file_exists integer :: num_threads __Iam__('SetServices') @@ -121,11 +121,13 @@ subroutine SetServices ( GC, RC ) num_threads = MAPL_get_num_threads() allocate(self%workspaces(0:num_threads-1), __STAT__) -! Load resource file +! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'NI2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) - if (status /= 0) then + inquire(file='NI2G_instance_'//trim(COMP_NAME)//'.rc', exist=file_exists) + if (file_exists) then + call ESMF_ConfigLoadFile (cfg, 'NI2G_instance_'//trim(COMP_NAME)//'.rc', __RC__) + else if (mapl_am_i_root()) print*,'NI2G_instance_'//trim(COMP_NAME)//'.rc does not exist! Loading NI2G_instance_NI.rc instead' call ESMF_ConfigLoadFile (cfg, 'NI2G_instance_NI.rc', __RC__) end if @@ -147,7 +149,7 @@ subroutine SetServices ( GC, RC ) DEFVAL = 0.0 -! Import and Internal states if data instance +! Import and Internal states if data instance ! ------------------------------------------- if (data_driven) then @@ -227,7 +229,7 @@ subroutine SetServices ( GC, RC ) end if ! (data_driven) -! Import, Export, Internal states for computational instance +! Import, Export, Internal states for computational instance ! ---------------------------------------------------------- if (.not. data_driven) then #include "NI2G_Export___.h" @@ -263,27 +265,27 @@ end subroutine SetServices !============================================================================ !BOP -! !IROUTINE: Initialize +! !IROUTINE: Initialize ! !INTERFACE: subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: IMPORT ! Import state type (ESMF_State), intent(inout) :: EXPORT ! Export state type (ESMF_Clock), intent(inout) :: CLOCK ! The clock integer, optional, intent( out) :: RC ! Error code -! !DESCRIPTION: This initializes the Nitrate gridded component. It primaryily -! fills GOCART's AERO states with its nitrate fields. +! !DESCRIPTION: This initializes the Nitrate gridded component. It primaryily +! fills GOCART's AERO states with its nitrate fields. -! !REVISION HISTORY: +! !REVISION HISTORY: ! 30June2020 E.Sherman First attempt at refactoring !EOP !============================================================================ -! !Locals +! !Locals character (len=ESMF_MAXSTR) :: COMP_NAME type (MAPL_MetaComp), pointer :: MAPL type (ESMF_Config) :: universal_cfg @@ -312,7 +314,6 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) type(ESMF_Calendar) :: calendar type(ESMF_Time) :: currentTime - type(ESMF_Alarm) :: alarm_HNO3 type(ESMF_Time) :: ringTime type(ESMF_TimeInterval) :: ringInterval integer :: year, month, day, hh, mm, ss @@ -323,10 +324,11 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) integer, allocatable, dimension(:) :: channels_ integer :: nmom_ character(len=ESMF_MAXSTR) :: file_ + logical :: file_exists __Iam__('Initialize') !**************************************************************************** -! Begin... +! Begin... ! Get the target components name and set-up traceback handle. ! ----------------------------------------------------------- @@ -334,10 +336,10 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) Iam = trim(COMP_NAME) // '::' //trim(Iam) ! Get my internal MAPL_Generic state -! ----------------------------------- +! ----------------------------------- call MAPL_GetObjectFromGC (GC, MAPL, __RC__) - -! Get my internal private state + +! Get my internal private state ! ----------------------------- call ESMF_UserCompGetInternalState(GC, 'NI2G_GridComp', wrap, STATUS) VERIFY_(STATUS) @@ -345,32 +347,30 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! Get dimensions ! --------------- - !call MAPL_GridGet (grid, globalCellCountPerDim=dims, __RC__ ) call MAPL_GridGet (grid, localCellCountPerDim=dims, __RC__ ) km = dims(3) self%km = km - !allocate(self%xhno3(dims(1),dims(2),dims(3)), __STAT__) - ! Get DTs ! ------- call MAPL_GetResource(mapl, HDT, Label='RUN_DT:', __RC__) call MAPL_GetResource(mapl, CDT, Label='GOCART_DT:', default=real(HDT), __RC__) self%CDT = CDT -! Load resource file and get number of bins +! Load resource file and get number of bins ! ------------------------------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'NI2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) - if (status /= 0) then - if (mapl_am_i_root()) print*,'NI2G_instance_'//trim(COMP_NAME)//'.rc does not exist! & - loading NI2G_instance_NI.rc instead' - call ESMF_ConfigLoadFile( cfg, 'NI2G_instance_NI.rc', __RC__) + inquire(file='NI2G_instance_'//trim(COMP_NAME)//'.rc', exist=file_exists) + if (file_exists) then + call ESMF_ConfigLoadFile (cfg, 'NI2G_instance_'//trim(COMP_NAME)//'.rc', __RC__) + else + if (mapl_am_i_root()) print*,'NI2G_instance_'//trim(COMP_NAME)//'.rc does not exist! Loading NI2G_instance_NI.rc instead' + call ESMF_ConfigLoadFile (cfg, 'NI2G_instance_NI.rc', __RC__) end if !self%first = .true. -! Call Generic Initialize +! Call Generic Initialize ! ---------------------------------------- call MAPL_GenericInitialize (GC, import, export, clock, __RC__) @@ -378,9 +378,6 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! ----------------------------------- call MAPL_Get ( mapl, INTERNAL_ESMF_STATE = internal, __RC__) -! xhno3 is moved to ESMF internal state -! call MAPL_GetPointer(internal, NAME='XHNO3', ptr=xhno3, __RC__) - ! Is NI data driven? ! ------------------ call determine_data_driven (COMP_NAME, data_driven, __RC__) @@ -402,25 +399,6 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) call ESMF_AttributeGet(field, name='fnum', valueList=self%fnumSS, __RC__) end if -! Se HNO3 recycle alarm - if (.not. data_driven) then - call ESMF_ClockGet(clock, calendar=calendar, currTime=currentTime, __RC__) - call ESMF_TimeGet(currentTime, YY=year, MM=month, DD=day, H=hh, M=mm, S=ss, __RC__) - call ESMF_TimeSet(ringTime, YY=year, MM=month, DD=day, H=0, M=0, S=0, __RC__) - call ESMF_TimeIntervalSet(ringInterval, H=3, calendar=calendar, __RC__) - - do while (ringTime < currentTime)! DO WE NEED THIS? - ringTime = currentTime + ringInterval - end do - - alarm_HNO3 = ESMF_AlarmCreate(Clock = clock, & - Name = 'HNO3_RECYCLE_ALARM', & - RingInterval = ringInterval, & - RingTime = currentTime, & - Enabled = .true. , & - Sticky = .false. , __RC__) - end if - ! If this is a data component, the data is provided in the import ! state via ExtData instead of the actual GOCART children ! ---------------------------------------------------------------- @@ -491,7 +469,7 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) end if self%instance = instance - + ! Create Radiation Mie Table ! -------------------------- call ESMF_ConfigGetAttribute (cfg, file_, label="aerosol_radBands_optics_file:", __RC__ ) @@ -552,13 +530,13 @@ end subroutine Initialize !============================================================================ !BOP -! !IROUTINE: Run +! !IROUTINE: Run ! !INTERFACE: subroutine Run (GC, import, export, clock, rc) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -579,7 +557,7 @@ subroutine Run (GC, import, export, clock, rc) __Iam__('Run') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -612,13 +590,13 @@ end subroutine Run !============================================================================ !BOP -! !IROUTINE: Run1 +! !IROUTINE: Run1 ! !INTERFACE: subroutine Run1 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -641,7 +619,7 @@ subroutine Run1 (GC, import, export, clock, RC) __Iam__('Run1') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -701,14 +679,14 @@ end subroutine Run1 !============================================================================ !BOP -! !IROUTINE: Run2 +! !IROUTINE: Run2 ! !INTERFACE: subroutine Run2 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -733,7 +711,6 @@ subroutine Run2 (GC, import, export, clock, RC) real, pointer, dimension(:,:) :: flux_ptr real, pointer, dimension(:,:,:) :: fluxWT_ptr - type (ESMF_ALARM) :: alarm logical :: alarm_is_ringing integer :: i1, j1, i2, j2, km real, target,allocatable, dimension(:,:,:) :: RH20,RH80 @@ -747,7 +724,7 @@ subroutine Run2 (GC, import, export, clock, RC) __Iam__('Run2') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -773,23 +750,20 @@ subroutine Run2 (GC, import, export, clock, RC) allocate(dqa, mold=lwi, __STAT__) allocate(drydepositionfrequency, mold=lwi, __STAT__) -! check hno3 alarm - call ESMF_ClockGetAlarm(clock, 'HNO3_RECYCLE_ALARM', alarm, __RC__) - alarm_is_ringing = ESMF_AlarmIsRinging(alarm, __RC__) + alarm_is_ringing = daily_alarm(clock,30000,_RC) ! Save local copy of HNO3 for first pass through run method regardless thread = MAPL_get_current_thread() workspace => self%workspaces(thread) - if (workspace%first) then - xhno3 = MAPL_UNDEF - workspace%first = .false. - end if + !if (workspace%first) then + !xhno3 = MAPL_UNDEF + !workspace%first = .false. + !end if ! Recycle HNO3 every 3 hours if (alarm_is_ringing) then xhno3 = NITRATE_HNO3 - !call ESMF_AlarmRingerOff(alarm, __RC__) end if if (associated(NIPNO3AQ)) NIPNO3AQ(:,:) = 0. @@ -805,8 +779,9 @@ subroutine Run2 (GC, import, export, clock, RC) MAPL_PI, MAPL_RUNIV/1000., airdens, t, rh2, delp, DU, & SS, self%rmedDU*1.e-6, self%rmedSS*1.e-6, & self%fnumDU, self%fnumSS, self%km, self%klid, & - self%cdt, MAPL_GRAV, fMassHNO3, fMassNO3, NO3an1, NO3an2, & + self%cdt, MAPL_GRAV, fMassHNO3, fMassNO3, NO3an1, NO3an2, & NO3an3, HNO3CONC, HNO3SMASS, HNO3CMASS, __RC__) +! Save local copy of HNO3 for first pass through run method regardless ! NI Settling @@ -822,6 +797,7 @@ subroutine Run2 (GC, import, export, clock, RC) call Chem_SettlingSimple (self%km, self%klid, rhFlag, self%cdt, MAPL_GRAV, & self%radius(nNH4a)*1.e-6, self%rhop(nNH4a), NH4a, t, & airdens, rh2, zle, delp, NH4SD, __RC__) +! Save local copy of HNO3 for first pass through run method regardless ! Nitrate bin 1 - settles like ammonium sulfate (rhflag = 3) rhflag = 3 @@ -833,6 +809,7 @@ subroutine Run2 (GC, import, export, clock, RC) call Chem_SettlingSimple (self%km, self%klid, rhFlag, self%cdt, MAPL_GRAV, & self%radius(nNO3an1)*1.e-6, self%rhop(nNO3an1), NO3an1, & t, airdens, rh2, zle, delp, flux_ptr, __RC__) +! Save local copy of HNO3 for first pass through run method regardless ! Nitrate bin 2 - settles like sea salt (rhflag = 2) rhflag = 2 @@ -844,6 +821,7 @@ subroutine Run2 (GC, import, export, clock, RC) call Chem_SettlingSimple (self%km, self%klid, rhFlag, self%cdt, MAPL_GRAV, & self%radius(nNO3an2)*1.e-6, self%rhop(nNO3an2), NO3an2, & t, airdens, rh2, zle, delp, flux_ptr, __RC__) +! Save local copy of HNO3 for first pass through run method regardless ! Nitrate bin 1 - settles like dust (rhflag = 0) rhflag = 0 @@ -855,6 +833,7 @@ subroutine Run2 (GC, import, export, clock, RC) call Chem_SettlingSimple (self%km, self%klid, rhFlag, self%cdt, MAPL_GRAV, & self%radius(nNO3an3)*1.e-6, self%rhop(nNO3an3), NO3an3, & t, airdens, rh2, zle, delp, flux_ptr, __RC__) +! Save local copy of HNO3 for first pass through run method regardless ! NI Deposition ! ----------- @@ -862,6 +841,7 @@ subroutine Run2 (GC, import, export, clock, RC) call DryDeposition(self%km, t, airdens, zle, lwi, ustar, zpbl, sh,& MAPL_KARMAN, cpd, MAPL_GRAV, z0h, drydepositionfrequency, __RC__ ) +! Save local copy of HNO3 for first pass through run method regardless ! NH3 dqa = 0. do i=1,ubound(lwi,1) @@ -873,6 +853,7 @@ subroutine Run2 (GC, import, export, clock, RC) end if end do end do +! Save local copy of HNO3 for first pass through run method regardless NH3(:,:,self%km) = NH3(:,:,self%km) - dqa if( associated(NH3DP) ) NH3DP = dqa*delp(:,:,self%km)/MAPL_GRAV/self%cdt @@ -912,6 +893,7 @@ subroutine Run2 (GC, import, export, clock, RC) call WetRemovalGOCART2G (self%km, self%klid, self%nbins, self%nbins, 1, self%cdt, 'NH3', & KIN, MAPL_GRAV, fwet, NH3, ple, t, airdens, & pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, fluxWT_ptr, __RC__) +! Save local copy of HNO3 for first pass through run method regardless if (associated(NH3WT)) NH3WT = fluxWT_ptr(:,:,1) ! NH4a @@ -946,6 +928,7 @@ subroutine Run2 (GC, import, export, clock, RC) KIN, MAPL_GRAV, fwet, NO3an3, ple, t, airdens, & pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, NIWT, __RC__) +! Save local copy of HNO3 for first pass through run method regardless ! Compute desired output diagnostics ! ---------------------------------- ! Certain variables are multiplied by 1.0e-9 to convert from nanometers to meters @@ -959,6 +942,7 @@ subroutine Run2 (GC, import, export, clock, RC) aerosol=aerosol, grav=MAPL_GRAV, tmpu=t, rhoa=airdens, rh=rh2, u=u, v=v, & delp=delp, ple=ple, tropp=tropp,& sfcmass=NH4SMASS, colmass=NH4CMASS, mass=NH4MASS, conc=NH4CONC, __RC__) +! Save local copy of HNO3 for first pass through run method regardless aerosol(:,:,:,1) = NH3 call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, & @@ -968,6 +952,7 @@ subroutine Run2 (GC, import, export, clock, RC) aerosol=aerosol, grav=MAPL_GRAV, tmpu=t, rhoa=airdens, rh=rh2, u=u, v=v, & delp=delp, ple=ple, tropp=tropp,& sfcmass=NH3SMASS, colmass=NH3CMASS, mass=NH3MASS, conc=NH3CONC, __RC__) +! Save local copy of HNO3 for first pass through run method regardless aerosol(:,:,:,1) = NO3an1 call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, & @@ -979,6 +964,7 @@ subroutine Run2 (GC, import, export, clock, RC) sfcmass=NISMASS25, colmass=NICMASS25, mass=NIMASS25, conc=NICONC25, & exttau25=NIEXTT25, scatau25=NISCAT25, exttaufm=NIEXTTFM, scataufm=NISCATFM, & NO3nFlag=.true., __RC__) +! Save local copy of HNO3 for first pass through run method regardless aerosol(:,:,:,1) = NO3an1 aerosol(:,:,:,2) = NO3an2 @@ -1008,8 +994,9 @@ subroutine Run2 (GC, import, export, clock, RC) wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=aerosol, & grav=MAPL_GRAV, tmpu=t, rhoa=airdens, & rh=rh20,u=u, v=v, delp=delp, ple=ple,tropp=tropp, & - extcoef = NIEXTCOEFRH20, scacoef=NISCACOEFRH20, __RC__) - + extcoef = NIEXTCOEFRH20, scacoef=NISCACOEFRH20, __RC__) +! Save local copy of HNO3 for first pass through run method regardless + RH80(:,:,:) = 0.80 call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, & nbins=3, & @@ -1017,11 +1004,14 @@ subroutine Run2 (GC, import, export, clock, RC) wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=aerosol, & grav=MAPL_GRAV, tmpu=t, rhoa=airdens, & rh=rh80,u=u, v=v, delp=delp, ple=ple,tropp=tropp, & - extcoef = NIEXTCOEFRH80, scacoef=NISCACOEFRH80,__RC__) - - deallocate(RH20,RH80) + + extcoef = NIEXTCOEFRH80, scacoef=NISCACOEFRH80,__RC__) +! Save local copy of HNO3 for first pass through run method regardless + + deallocate(RH20,RH80) + RETURN_(ESMF_SUCCESS) - + end subroutine Run2 @@ -1035,13 +1025,13 @@ subroutine Run_data (GC, IMPORT, EXPORT, INTERNAL, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: IMPORT ! Import state type (ESMF_State), intent(inout) :: EXPORT ! Export state type (ESMF_State), intent(inout) :: INTERNAL ! Interal state integer, optional, intent( out) :: RC ! Error code: -! !DESCRIPTION: Updates pointers in Internal state with fields from ExtData. +! !DESCRIPTION: Updates pointers in Internal state with fields from ExtData. !EOP !============================================================================ @@ -1055,7 +1045,7 @@ subroutine Run_data (GC, IMPORT, EXPORT, INTERNAL, RC) __Iam__('Run_data') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -1119,7 +1109,7 @@ subroutine aerosol_optics(state, rc) __Iam__('NI2G::aerosol_optics') -! Begin... +! Begin... ! Mie Table instance/index ! ------------------------ @@ -1136,7 +1126,7 @@ subroutine aerosol_optics(state, rc) band = 0 call ESMF_AttributeGet(state, name='band_for_aerosol_optics', value=band, __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, ple, trim(fld_name), __RC__) @@ -1240,7 +1230,7 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) bext_s = bext_s + bext ! extinction bssa_s = bssa_s + (bssa*bext) ! scattering extinction - basym_s = basym_s + gasym*(bssa*bext) ! asymetry parameter multiplied by scatering extiction + basym_s = basym_s + gasym*(bssa*bext) ! asymetry parameter multiplied by scatering extiction end do @@ -1283,7 +1273,7 @@ subroutine monochromatic_aerosol_optics(state, rc) __Iam__('NI2G:: monochromatic_aerosol_optics') -! Begin... +! Begin... ! Mie Table instance/index ! ------------------------ @@ -1300,7 +1290,7 @@ subroutine monochromatic_aerosol_optics(state, rc) call ESMF_AttributeGet(state, name='wavelength_for_aerosol_optics', value=wavelength, __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, ple, trim(fld_name), __RC__) @@ -1361,5 +1351,38 @@ subroutine monochromatic_aerosol_optics(state, rc) end subroutine monochromatic_aerosol_optics + function daily_alarm(clock,freq,rc) result(is_ringing) + logical :: is_ringing + type(ESMF_Clock), intent(in) :: clock + integer, intent(in) :: freq + integer, optional, intent(out) :: rc + + type(ESMF_Time) :: current_time + integer :: status,year,month,day,hour,minute,second,initial_time,int_seconds + integer :: nhh,nmm,nss,freq_sec + + type(ESMF_TimeInterval) :: new_diff,esmf_freq + type(ESMF_Time) :: reff_time,new_esmf_time + + call ESMF_ClockGet(clock,currTIme=current_time,_RC) + call ESMF_TimeGet(current_time,yy=year,mm=month,dd=day,h=hour,m=minute,s=second,_RC) + + int_seconds = 0 + call MAPL_UnpackTIme(freq,nhh,nmm,nss) + is_ringing = .false. + call ESMF_TimeSet(reff_time,yy=year,mm=month,dd=day,h=0,m=0,s=0,_RC) + new_esmf_time = reff_time + call ESMF_TimeIntervalSet(esmf_freq,h=nhh,m=nmm,s=nss ,_RC) + do while (int_seconds < 86400) + if ( new_esmf_time == current_time) then + is_ringing = .true. + exit + end if + new_esmf_time = new_esmf_time + esmf_freq + new_diff = new_esmf_time - reff_time + call ESMF_TimeIntervalGet(new_diff,s=int_seconds,_RC) + enddo + _RETURN(_SUCCESS) + end function end module NI2G_GridCompMod diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc index 8a84b024..2b571336 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc @@ -5,9 +5,9 @@ PrimaryExports%% # -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|----------- # ======= Nitrate Data Instance ========== -climNO3an1 'kg kg-1' N Y F0 none none NO3AN1 /discover/nobackup/projects/gmao/gmao_ops/pub/fp/das/Y%y4/M%m2/D%d2/GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 2017-02-01T00:00:00P03:00 -climNO3an2 'kg kg-1' N Y F0 none none NO3AN2 /discover/nobackup/projects/gmao/gmao_ops/pub/fp/das/Y%y4/M%m2/D%d2/GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 2017-02-01T00:00:00P03:00 -climNO3an3 'kg kg-1' N Y F0 none none NO3AN3 /discover/nobackup/projects/gmao/gmao_ops/pub/fp/das/Y%y4/M%m2/D%d2/GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 2017-02-01T00:00:00P03:00 +climNO3an1 'kg kg-1' N Y F0 none none NO3AN1 /dev/null +climNO3an2 'kg kg-1' N Y F0 none none NO3AN2 /dev/null +climNO3an3 'kg kg-1' N Y F0 none none NO3AN3 /dev/null # ======= Nitrate Sources ======== EMI_NH3_BB 'kg m-2 s-1' N Y %y4-%m2-%d2T12:00:00 none 0.778 biomass ExtData/chemistry/QFED/v2.5r1-nrt/sfc/0.1/Y%y4/M%m2/qfed2.emis_nh3.006.%y4%m2%d2.nc4 diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.yaml index 97baa848..9a05461a 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.yaml @@ -3,8 +3,6 @@ Collections: template: ExtData/chemistry/Masks/v0.0.0/sfc/ARCTAS.region_mask.x540_y361.2008.nc NI2G_GEIA.emis_NH3.ocean.x576_y361.t12.20080715_12z.nc4: template: ExtData/chemistry/GEIA/v0.0.0/sfc/GEIA.emis_NH3.ocean.x576_y361.t12.20080715_12z.nc4 - NI2G_GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4: - template: /discover/nobackup/projects/gmao/gmao_ops/pub/fp/das/Y%y4/M%m2/D%d2/GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 NI2G_MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4: template: ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 NI2G_NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4: @@ -78,18 +76,10 @@ Exports: sample: NI2G_sample_3 variable: REGION_MASK climNO3an1: - collection: NI2G_GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 - regrid: CONSERVE - sample: NI2G_sample_0 - variable: NO3AN1 + collection: /dev/null climNO3an2: - collection: NI2G_GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 - regrid: CONSERVE - sample: NI2G_sample_0 - variable: NO3AN2 + collection: /dev/null climNO3an3: - collection: NI2G_GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 - regrid: CONSERVE - sample: NI2G_sample_0 - variable: NO3AN3 + collection: /dev/null + diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc index 039fa4c7..cf42893a 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc @@ -112,7 +112,7 @@ category: INTERNAL NO3an1 |kg kg-1 | xyz | C | MAPL_RestartOptional | T | DYNAMICS:TURBULENCE:MOIST | Nitrate size bin 001 NO3an2 |kg kg-1 | xyz | C | MAPL_RestartOptional | T | DYNAMICS:TURBULENCE:MOIST | Nitrate size bin 002 NO3an3 |kg kg-1 | xyz | C | MAPL_RestartOptional | T | DYNAMICS:TURBULENCE:MOIST | Nitrate size bin 003 - XHNO3 |kg m-2 s-1| xyz | C | MAPL_RestartSkip | F | | buffer for NITRATE_HNO3 + XHNO3 |kg m-2 s-1| xyz | C | | F | | buffer for NITRATE_HNO3 #******************************************************** # diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/AMIP/SS2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/SS2G_GridComp/AMIP/SS2G_GridComp_ExtData.yaml index 251e1063..ffc5b17a 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/AMIP/SS2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/AMIP/SS2G_GridComp_ExtData.yaml @@ -1,8 +1,7 @@ Collections: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4: template: ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 - SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4: - template: ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" Samplings: SS2G_sample_0: @@ -10,103 +9,64 @@ Samplings: Exports: climSSDP001: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSDP001 + collection: /dev/null climSSDP002: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSDP002 + collection: /dev/null climSSDP003: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSDP003 + collection: /dev/null climSSDP004: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSDP004 + collection: /dev/null climSSDP005: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSDP005 + collection: /dev/null climSSSD001: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSD001 + collection: /dev/null climSSSD002: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSD002 + collection: /dev/null climSSSD003: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSD003 + collection: /dev/null climSSSD004: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSD004 + collection: /dev/null climSSSD005: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSD005 + collection: /dev/null climSSSV001: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSV001 + collection: /dev/null climSSSV002: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSV002 + collection: /dev/null climSSSV003: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSV003 + collection: /dev/null climSSSV004: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSV004 + collection: /dev/null climSSSV005: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSV005 + collection: /dev/null climSSWT001: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSWT001 + collection: /dev/null climSSWT002: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSWT002 + collection: /dev/null climSSWT003: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSWT003 + collection: /dev/null climSSWT004: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSWT004 + collection: /dev/null climSSWT005: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSWT005 + collection: /dev/null climss001: collection: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SS2G_sample_0 - variable: ss001 + variable: SS001 climss002: collection: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SS2G_sample_0 - variable: ss002 + variable: SS002 climss003: collection: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SS2G_sample_0 - variable: ss003 + variable: SS003 climss004: collection: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SS2G_sample_0 - variable: ss004 + variable: SS004 climss005: collection: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SS2G_sample_0 - variable: ss005 + variable: SS005 + diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 index c65a0407..a4d0adf6 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 @@ -3,7 +3,7 @@ !============================================================================= !BOP -! !MODULE: SS2G_GridCompMod - GOCART refactoring of the SS gridded component +! !MODULE: SS2G_GridCompMod - GOCART refactoring of the SS gridded component ! !INTERFACE: module SS2G_GridCompMod @@ -11,7 +11,7 @@ module SS2G_GridCompMod ! !USES: use ESMF use MAPL - use GOCART2G_MieMod + use GOCART2G_MieMod use Chem_AeroGeneric use iso_c_binding, only: c_loc, c_f_pointer, c_ptr @@ -45,7 +45,7 @@ module SS2G_GridCompMod real, allocatable :: rlow(:) ! particle effective radius lower bound [um] real, allocatable :: rup(:) ! particle effective radius upper bound [um] real, allocatable :: rmed(:) ! number median radius [um] - integer :: sstEmisFlag ! Choice of SST correction to emissions: + integer :: sstEmisFlag ! Choice of SST correction to emissions: ! 0 - none; 1 - Jaegle et al. 2011; 2 - GEOS5 logical :: hoppelFlag ! Apply the Hoppel correction to emissions (Fan and Toon, 2011) logical :: weibullFlag ! Apply the Weibull distribution to wind speed for emissions (Fan and Toon, 2011) @@ -64,7 +64,7 @@ module SS2G_GridCompMod !============================================================================ !BOP -! !IROUTINE: SetServices +! !IROUTINE: SetServices ! !INTERFACE: subroutine SetServices ( GC, RC ) @@ -75,7 +75,7 @@ subroutine SetServices ( GC, RC ) ! DESCRIPTION: This version uses MAPL_GenericSetServices, which sets ! the Initialize and Finalize services to generic versions. It also -! allocates our instance of a generic state and puts it in the +! allocates our instance of a generic state and puts it in the ! gridded component (GC). Here we only set the two-stage run method ! and declare the data services. @@ -96,6 +96,7 @@ subroutine SetServices ( GC, RC ) integer :: i real :: DEFVAL logical :: data_driven=.true. + logical :: file_exists __Iam__('SetServices') @@ -112,11 +113,13 @@ subroutine SetServices ( GC, RC ) allocate (self, __STAT__) wrap%ptr => self -! Load resource file +! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'SS2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) - if (status /= 0) then + inquire(file='SS2G_instance_'//trim(COMP_NAME)//'.rc', exist=file_exists) + if (file_exists) then + call ESMF_ConfigLoadFile (cfg, 'SS2G_instance_'//trim(COMP_NAME)//'.rc', __RC__) + else if (mapl_am_i_root()) print*,'SS2G_instance_'//trim(COMP_NAME)//'.rc does not exist! loading SS2G_instance_SS.rc instead' call ESMF_ConfigLoadFile (cfg, 'SS2G_instance_SS.rc', __RC__) end if @@ -151,7 +154,7 @@ subroutine SetServices ( GC, RC ) DEFVAL = 0.0 -! Import and Internal states if data instance +! Import and Internal states if data instance ! ------------------------------------------- if (data_driven) then @@ -167,6 +170,16 @@ subroutine SetServices ( GC, RC ) add2export=.true., __RC__) + call MAPL_AddInternalSpec(gc,& + & short_name='DEEP_LAKES_MASK', & + & units='1', & + & dims=MAPL_DimsHorzOnly, & + & vlocation=MAPL_VlocationNone, & + & add2export=.false., & + & long_name='Deep Lakes Mask', & + & _RC) + + ! Pressure at layer edges ! ----------------------- call MAPL_AddImportSpec(GC, & @@ -206,7 +219,7 @@ subroutine SetServices ( GC, RC ) VLOCATION = MAPL_VLocationCenter, & RESTART = MAPL_RestartSkip, __RC__) -! ! wet deposition +! ! wet deposition call MAPL_AddImportSpec(GC, & SHORT_NAME = 'climSSWT'//trim(field_name), & LONG_NAME = 'Sea Salt wet removal (bin '//trim(field_name)//')', & @@ -236,7 +249,7 @@ subroutine SetServices ( GC, RC ) end if ! (data_driven) -! Import, Export, Internal states for computational instance +! Import, Export, Internal states for computational instance ! ---------------------------------------------------------- if (.not. data_driven) then #include "SS2G_Export___.h" @@ -282,27 +295,27 @@ end subroutine SetServices !============================================================================ !BOP -! !IROUTINE: Initialize +! !IROUTINE: Initialize ! !INTERFACE: subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: IMPORT ! Import state type (ESMF_State), intent(inout) :: EXPORT ! Export state type (ESMF_Clock), intent(inout) :: CLOCK ! The clock integer, optional, intent( out) :: RC ! Error code -! !DESCRIPTION: This initializes SS' Grid Component. It primaryily fills -! GOCART's AERO states with its sea salt fields. +! !DESCRIPTION: This initializes SS' Grid Component. It primaryily fills +! GOCART's AERO states with its sea salt fields. -! !REVISION HISTORY: +! !REVISION HISTORY: ! 24oct2019 E.Sherman First attempt at refactoring !EOP !============================================================================ -! !Locals +! !Locals character (len=ESMF_MAXSTR) :: COMP_NAME type (MAPL_MetaComp), pointer :: MAPL type (ESMF_Grid) :: grid @@ -319,7 +332,7 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) integer :: instance type (ESMF_Field) :: field, fld character (len=ESMF_MAXSTR) :: prefix, bin_index - real, pointer, dimension(:,:) :: lats + real, pointer, dimension(:,:) :: lats real, pointer, dimension(:,:) :: lons real :: CDT ! chemistry timestep (secs) integer :: HDT ! model timestep (secs) @@ -333,10 +346,11 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) integer, allocatable, dimension(:) :: channels_ integer :: nmom_ character(len=ESMF_MAXSTR) :: file_ + logical :: file_exists __Iam__('Initialize') !**************************************************************************** -! Begin... +! Begin... ! Get the target components name and set-up traceback handle. ! ----------------------------------------------------------- @@ -355,7 +369,7 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! Get dimensions ! --------------- - call MAPL_GridGet (grid, globalCellCountPerDim=dims, __RC__ ) + call MAPL_GridGet (grid, localCellCountPerDim=dims, __RC__ ) km = dims(3) self%km = km @@ -370,17 +384,18 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) call MAPL_GetResource(mapl, CDT, Label='GOCART_DT:', default=real(HDT), __RC__) self%CDT = CDT -! Load resource file and get number of bins +! Load resource file and get number of bins ! ------------------------------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'SS2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) - if (status /= 0) then - if (mapl_am_i_root()) print*,'SS2G_instance_'//trim(COMP_NAME)//'.rc does not exist! & - loading SS2G_instance_SS.rc instead' - call ESMF_ConfigLoadFile( cfg, 'SS2G_instance_SS.rc', __RC__) + inquire(file='SS2G_instance_'//trim(COMP_NAME)//'.rc', exist=file_exists) + if (file_exists) then + call ESMF_ConfigLoadFile (cfg, 'SS2G_instance_'//trim(COMP_NAME)//'.rc', __RC__) + else + if (mapl_am_i_root()) print*,'SS2G_instance_'//trim(COMP_NAME)//'.rc does not exist! loading SS2G_instance_SS.rc instead' + call ESMF_ConfigLoadFile (cfg, 'SS2G_instance_SS.rc', __RC__) end if -! Call Generic Initialize +! Call Generic Initialize ! ---------------------------------------- call MAPL_GenericInitialize (GC, import, export, clock, __RC__) @@ -416,7 +431,7 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO_DP' , Bundle_DP, __RC__) call ESMF_StateGet (internal, 'SS', field, __RC__) - call ESMF_AttributeSet(field, NAME='klid', value=self%klid, __RC__) +! call ESMF_AttributeSet(field, NAME='klid', value=self%klid, __RC__) fld = MAPL_FieldCreate (field, 'SS', __RC__) call MAPL_StateAdd (aero, fld, __RC__) @@ -493,22 +508,17 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! call MAPL_StateAdd (aero, field, __RC__) ! call ESMF_StateGet (import, 'RH2', field, __RC__) ! call MAPL_StateAdd (aero, field, __RC__) - call add_aero (aero, label='extinction_in_air_due_to_ambient_aerosol', label2='EXT', grid=grid, typekind=MAPL_R8,__RC__) call add_aero (aero, label='single_scattering_albedo_of_ambient_aerosol', label2='SSA', grid=grid, typekind=MAPL_R8,__RC__) call add_aero (aero, label='asymmetry_parameter_of_ambient_aerosol', label2='ASY', grid=grid, typekind=MAPL_R8,__RC__) call add_aero (aero, label='monochromatic_extinction_in_air_due_to_ambient_aerosol', & label2='monochromatic_EXT', grid=grid, typekind=MAPL_R4,__RC__) call add_aero (aero, label='sum_of_internalState_aerosol', label2='aerosolSum', grid=grid, typekind=MAPL_R4, __RC__) - call ESMF_AttributeSet (aero, name='band_for_aerosol_optics', value=0, __RC__) call ESMF_AttributeSet (aero, name='wavelength_for_aerosol_optics', value=0., __RC__) - mieTable_pointer = transfer(c_loc(self), [1]) call ESMF_AttributeSet (aero, name='mieTable_pointer', valueList=mieTable_pointer, itemCount=size(mieTable_pointer), __RC__) - call ESMF_AttributeSet (aero, name='internal_variable_name', value='SS', __RC__) - call ESMF_MethodAdd (aero, label='aerosol_optics', userRoutine=aerosol_optics, __RC__) call ESMF_MethodAdd (aero, label='monochromatic_aerosol_optics', userRoutine=monochromatic_aerosol_optics, __RC__) call ESMF_MethodAdd (aero, label='get_mixR', userRoutine=get_mixR, __RC__) @@ -520,7 +530,6 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) call MAPL_GetPointer (internal, NAME='DEEP_LAKES_MASK', ptr=deep_lakes_mask, __RC__) call deepLakesMask (lons, lats, real(MAPL_RADIANS_TO_DEGREES), deep_lakes_mask, __RC__) - RETURN_(ESMF_SUCCESS) end subroutine Initialize @@ -528,13 +537,13 @@ end subroutine Initialize !============================================================================ !BOP -! !IROUTINE: Run +! !IROUTINE: Run ! !INTERFACE: subroutine Run (GC, import, export, clock, rc) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -555,7 +564,7 @@ subroutine Run (GC, import, export, clock, rc) __Iam__('Run') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -588,13 +597,13 @@ end subroutine Run !============================================================================ !BOP -! !IROUTINE: Run1 +! !IROUTINE: Run1 ! !INTERFACE: subroutine Run1 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -619,14 +628,14 @@ subroutine Run1 (GC, import, export, clock, RC) real(kind=DP), allocatable, dimension(:,:) :: gweibull - integer :: n + integer :: n #include "SS2G_DeclarePointer___.h" __Iam__('Run1') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -663,7 +672,7 @@ subroutine Run1 (GC, import, export, clock, RC) call jeagleSSTcorrection(self%sstEmisFlag, fsstemis, ts, __RC__) ! Apply a Weibull distribution to emissions wind speeds -! ----------------------------------------------------- +! ----------------------------------------------------- allocate(gweibull(ubound(u10m,1), ubound(u10m,2)), __STAT__ ) call weibullDistribution (gweibull, self%weibullFlag, u10m, v10m, __RC__) @@ -692,7 +701,7 @@ subroutine Run1 (GC, import, export, clock, RC) dz, ustar, self%rhFlag, airdens(:,:,self%km), t(:,:,self%km), & MAPL_GRAV, MAPL_KARMAN, fhoppel, __RC__) end if - + memissions = self%emission_scale * fgridefficiency * fsstemis * fhoppel * gweibull * memissions dqa = memissions * self%cdt * MAPL_GRAV / delp(:,:,self%km) SS(:,:,self%km,n) = SS(:,:,self%km,n) + dqa @@ -707,18 +716,18 @@ subroutine Run1 (GC, import, export, clock, RC) RETURN_(ESMF_SUCCESS) - end subroutine Run1 + end subroutine Run1 !============================================================================ !BOP -! !IROUTINE: Run2 +! !IROUTINE: Run2 ! !INTERFACE: subroutine Run2 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -747,7 +756,7 @@ subroutine Run2 (GC, import, export, clock, RC) __Iam__('Run2') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -829,7 +838,7 @@ subroutine Run2 (GC, import, export, clock, RC) allocate(RH20(i1:i2,j1:j2,km), __STAT__) allocate(RH80(i1:i2,j1:j2,km), __STAT__) - RH20(:,:,:) = 0.20 + RH20(:,:,:) = 0.20 call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, & nbins=self%nbins, rlow=self%rlow, & rup=self%rup, wavelengths_profile=self%wavelengths_profile*1.0e-9, & @@ -837,7 +846,7 @@ subroutine Run2 (GC, import, export, clock, RC) grav=MAPL_GRAV, tmpu=t, rhoa=airdens, & rh=rh20,u=u, v=v, delp=delp, ple=ple,tropp=tropp, & extcoef = SSEXTCOEFRH20, scacoef = SSSCACOEFRH20, NO3nFlag=.False., __RC__) - + RH80(:,:,:) = 0.80 call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, & nbins=self%nbins, rlow=self%rlow, & @@ -847,7 +856,7 @@ subroutine Run2 (GC, import, export, clock, RC) rh=rh80,u=u, v=v, delp=delp, ple=ple,tropp=tropp, & extcoef = SSEXTCOEFRH80, scacoef = SSSCACOEFRH80, NO3nFlag=.False., __RC__) - deallocate(RH20,RH80) + deallocate(RH20,RH80) RETURN_(ESMF_SUCCESS) end subroutine Run2 @@ -862,13 +871,13 @@ subroutine Run_data (GC, IMPORT, EXPORT, INTERNAL, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: IMPORT ! Import state type (ESMF_State), intent(inout) :: EXPORT ! Export state type (ESMF_State), intent(inout) :: INTERNAL ! Interal state integer, optional, intent( out) :: RC ! Error code: -! !DESCRIPTION: Updates pointers in Internal state with fields from ExtData. +! !DESCRIPTION: Updates pointers in Internal state with fields from ExtData. !EOP !============================================================================ @@ -886,7 +895,7 @@ subroutine Run_data (GC, IMPORT, EXPORT, INTERNAL, RC) __Iam__('Run_data') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -946,7 +955,7 @@ subroutine aerosol_optics(state, rc) __Iam__('SS2G::aerosol_optics') -! Begin... +! Begin... ! Mie Table instance/index ! ------------------------ @@ -957,7 +966,7 @@ subroutine aerosol_optics(state, rc) band = 0 call ESMF_AttributeGet(state, name='band_for_aerosol_optics', value=band, __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, ple, trim(fld_name), __RC__) @@ -1061,7 +1070,7 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) bext_s = bext_s + bext ! extinction bssa_s = bssa_s + (bssa*bext) ! scattering extinction - basym_s = basym_s + gasym*(bssa*bext) ! asymetry parameter multiplied by scatering extiction + basym_s = basym_s + gasym*(bssa*bext) ! asymetry parameter multiplied by scatering extiction end do RETURN_(ESMF_SUCCESS) @@ -1098,7 +1107,7 @@ subroutine monochromatic_aerosol_optics(state, rc) __Iam__('SS2G::monochromatic_aerosol_optics') -! Begin... +! Begin... ! Mie Table instance/index ! ------------------------ @@ -1109,7 +1118,7 @@ subroutine monochromatic_aerosol_optics(state, rc) wavelength = 0. call ESMF_AttributeGet (state, name='wavelength_for_aerosol_optics', value=wavelength, __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet (state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer (state, ple, trim(fld_name), __RC__) diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.rc index 94f1390f..f237f121 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.rc @@ -5,40 +5,40 @@ PrimaryExports%% # -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| # SS.data - 3D -climss001 'kg kg-1' Y N 0 0.0 1.0 ss001 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climss002 'kg kg-1' Y N 0 0.0 1.0 ss002 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climss003 'kg kg-1' Y N 0 0.0 1.0 ss003 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climss004 'kg kg-1' Y N 0 0.0 1.0 ss004 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -climss005 'kg kg-1' Y N 0 0.0 1.0 ss005 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climss001 'kg kg-1' Y N 0 0.0 1.0 SS001 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climss002 'kg kg-1' Y N 0 0.0 1.0 SS002 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climss003 'kg kg-1' Y N 0 0.0 1.0 SS003 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climss004 'kg kg-1' Y N 0 0.0 1.0 SS004 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 +climss005 'kg kg-1' Y N 0 0.0 1.0 SS005 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 # SS.data - 2D -climSSDP001 'kg m-2 s-1' Y N 0 0.0 1.0 SSDP001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSWT001 'kg m-2 s-1' Y N 0 0.0 1.0 SSWT001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSSD001 'kg m-2 s-1' Y N 0 0.0 1.0 SSSD001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSSV001 'kg m-2 s-1' Y N 0 0.0 1.0 SSSV001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSSDP001 'kg m-2 s-1' Y N 0 0.0 1.0 SSDP001 /dev/null +climSSWT001 'kg m-2 s-1' Y N 0 0.0 1.0 SSWT001 /dev/null +climSSSD001 'kg m-2 s-1' Y N 0 0.0 1.0 SSSD001 /dev/null +climSSSV001 'kg m-2 s-1' Y N 0 0.0 1.0 SSSV001 /dev/null -climSSDP002 'kg m-2 s-1' Y N 0 0.0 1.0 SSDP002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSWT002 'kg m-2 s-1' Y N 0 0.0 1.0 SSWT002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSSD002 'kg m-2 s-1' Y N 0 0.0 1.0 SSSD002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSSV002 'kg m-2 s-1' Y N 0 0.0 1.0 SSSV002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSSDP002 'kg m-2 s-1' Y N 0 0.0 1.0 SSDP002 /dev/null +climSSWT002 'kg m-2 s-1' Y N 0 0.0 1.0 SSWT002 /dev/null +climSSSD002 'kg m-2 s-1' Y N 0 0.0 1.0 SSSD002 /dev/null +climSSSV002 'kg m-2 s-1' Y N 0 0.0 1.0 SSSV002 /dev/null -climSSDP003 'kg m-2 s-1' Y N 0 0.0 1.0 SSDP003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSWT003 'kg m-2 s-1' Y N 0 0.0 1.0 SSWT003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSSD003 'kg m-2 s-1' Y N 0 0.0 1.0 SSSD003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSSV003 'kg m-2 s-1' Y N 0 0.0 1.0 SSSV003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSSDP003 'kg m-2 s-1' Y N 0 0.0 1.0 SSDP003 /dev/null +climSSWT003 'kg m-2 s-1' Y N 0 0.0 1.0 SSWT003 /dev/null +climSSSD003 'kg m-2 s-1' Y N 0 0.0 1.0 SSSD003 /dev/null +climSSSV003 'kg m-2 s-1' Y N 0 0.0 1.0 SSSV003 /dev/null -climSSDP004 'kg m-2 s-1' Y N 0 0.0 1.0 SSDP004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSWT004 'kg m-2 s-1' Y N 0 0.0 1.0 SSWT004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSSD004 'kg m-2 s-1' Y N 0 0.0 1.0 SSSD004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSSV004 'kg m-2 s-1' Y N 0 0.0 1.0 SSSV004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSSDP004 'kg m-2 s-1' Y N 0 0.0 1.0 SSDP004 /dev/null +climSSWT004 'kg m-2 s-1' Y N 0 0.0 1.0 SSWT004 /dev/null +climSSSD004 'kg m-2 s-1' Y N 0 0.0 1.0 SSSD004 /dev/null +climSSSV004 'kg m-2 s-1' Y N 0 0.0 1.0 SSSV004 /dev/null -climSSDP005 'kg m-2 s-1' Y N 0 0.0 1.0 SSDP005 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSWT005 'kg m-2 s-1' Y N 0 0.0 1.0 SSWT005 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSSD005 'kg m-2 s-1' Y N 0 0.0 1.0 SSSD005 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSSSV005 'kg m-2 s-1' Y N 0 0.0 1.0 SSSV005 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSSDP005 'kg m-2 s-1' Y N 0 0.0 1.0 SSDP005 /dev/null +climSSWT005 'kg m-2 s-1' Y N 0 0.0 1.0 SSWT005 /dev/null +climSSSD005 'kg m-2 s-1' Y N 0 0.0 1.0 SSSD005 /dev/null +climSSSV005 'kg m-2 s-1' Y N 0 0.0 1.0 SSSV005 /dev/null %% diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.yaml index 251e1063..ffc5b17a 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.yaml @@ -1,8 +1,7 @@ Collections: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4: template: ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 - SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4: - template: ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" Samplings: SS2G_sample_0: @@ -10,103 +9,64 @@ Samplings: Exports: climSSDP001: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSDP001 + collection: /dev/null climSSDP002: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSDP002 + collection: /dev/null climSSDP003: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSDP003 + collection: /dev/null climSSDP004: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSDP004 + collection: /dev/null climSSDP005: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSDP005 + collection: /dev/null climSSSD001: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSD001 + collection: /dev/null climSSSD002: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSD002 + collection: /dev/null climSSSD003: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSD003 + collection: /dev/null climSSSD004: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSD004 + collection: /dev/null climSSSD005: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSD005 + collection: /dev/null climSSSV001: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSV001 + collection: /dev/null climSSSV002: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSV002 + collection: /dev/null climSSSV003: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSV003 + collection: /dev/null climSSSV004: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSV004 + collection: /dev/null climSSSV005: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSSV005 + collection: /dev/null climSSWT001: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSWT001 + collection: /dev/null climSSWT002: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSWT002 + collection: /dev/null climSSWT003: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSWT003 + collection: /dev/null climSSWT004: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSWT004 + collection: /dev/null climSSWT005: - collection: SS2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SS2G_sample_0 - variable: SSWT005 + collection: /dev/null climss001: collection: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SS2G_sample_0 - variable: ss001 + variable: SS001 climss002: collection: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SS2G_sample_0 - variable: ss002 + variable: SS002 climss003: collection: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SS2G_sample_0 - variable: ss003 + variable: SS003 climss004: collection: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SS2G_sample_0 - variable: ss004 + variable: SS004 climss005: collection: SS2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SS2G_sample_0 - variable: ss005 + variable: SS005 + diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP.20C/SU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP.20C/SU2G_GridComp_ExtData.rc index 400a635a..ea89f3a1 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP.20C/SU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP.20C/SU2G_GridComp_ExtData.rc @@ -10,25 +10,25 @@ climSO4 'kg kg-1' Y N 0 0.0 1.0 #climMSA 'kg kg-1' Y N - 0.0 1.0 none /dev/null #climSO2 'kg kg-1' Y N - 0.0 1.0 none /dev/null -climSUDP001 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT001 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP001 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP001 /dev/null +climSUWT001 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT001 /dev/null climSUSD001 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD001 /dev/null -climSUSV001 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV001 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV001 /dev/null -climSUDP002 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT002 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP002 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP002 /dev/null +climSUWT002 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT002 /dev/null climSUSD002 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD002 /dev/null -climSUSV002 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV002 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV002 /dev/null -climSUDP003 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT003 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP003 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP003 /dev/null +climSUWT003 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT003 /dev/null climSUSD003 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD003 /dev/null -climSUSV003 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV003 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV003 /dev/null -climSUDP004 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT004 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP004 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP004 /dev/null +climSUWT004 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT004 /dev/null climSUSD004 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD004 /dev/null -climSUSV004 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV004 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV004 /dev/null #====== Sulfate Sources ================================================= diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.rc index 9bfe1831..7f5a9e02 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.rc @@ -10,25 +10,25 @@ climSO4 'kg kg-1' Y N 0 0.0 1.0 #climMSA 'kg kg-1' Y N - 0.0 1.0 none /dev/null #climSO2 'kg kg-1' Y N - 0.0 1.0 none /dev/null -climSUDP001 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT001 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP001 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP001 /dev/null +climSUWT001 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT001 /dev/null climSUSD001 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD001 /dev/null -climSUSV001 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV001 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV001 /dev/null -climSUDP002 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT002 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP002 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP002 /dev/null +climSUWT002 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT002 /dev/null climSUSD002 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD002 /dev/null -climSUSV002 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV002 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV002 /dev/null -climSUDP003 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT003 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP003 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP003 /dev/null +climSUWT003 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT003 /dev/null climSUSD003 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD003 /dev/null -climSUSV003 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV003 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV003 /dev/null -climSUDP004 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT004 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP004 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP004 /dev/null +climSUWT004 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT004 /dev/null climSUSD004 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD004 /dev/null -climSUSV004 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV004 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV004 /dev/null #====== Sulfate Sources ================================================= diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.yaml index 0df14b74..bdeb7e32 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.yaml @@ -15,8 +15,7 @@ Collections: template: ExtData/chemistry/CEDS/v2021-04-21/sfc/SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 SU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4: template: ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 - SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4: - template: ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" SU2G_qfed2.emis_so2.061.%y4%m2%d2.nc4: template: ExtData/chemistry/QFED/v2.6r1/sfc/0.1/Y%y4/M%m2/qfed2.emis_so2.061.%y4%m2%d2.nc4 valid_range: "2000-02-29T12:00/2025-01-01" @@ -106,69 +105,37 @@ Exports: sample: SU2G_sample_0 variable: SO4 climSUDP001: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUDP001 + collection: /dev/null climSUDP002: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUDP002 + collection: /dev/null climSUDP003: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUDP003 + collection: /dev/null climSUDP004: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUDP004 + collection: /dev/null climSUSD001: collection: /dev/null - sample: SU2G_sample_0 - variable: SUSD001 climSUSD002: collection: /dev/null - sample: SU2G_sample_0 - variable: SUSD002 climSUSD003: collection: /dev/null - sample: SU2G_sample_0 - variable: SUSD003 climSUSD004: collection: /dev/null - sample: SU2G_sample_0 - variable: SUSD004 climSUSV001: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUSV001 + collection: /dev/null climSUSV002: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUSV002 + collection: /dev/null climSUSV003: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUSV003 + collection: /dev/null climSUSV004: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUSV004 + collection: /dev/null climSUWT001: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUWT001 + collection: /dev/null climSUWT002: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUWT002 + collection: /dev/null climSUWT003: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUWT003 + collection: /dev/null climSUWT004: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUWT004 + collection: /dev/null pSO2_OCS: collection: /dev/null regrid: CONSERVE diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 index 430cf08c..6c4abc37 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 @@ -3,7 +3,7 @@ !============================================================================= !BOP -! !MODULE: SU2G_GridCompMod - GOCART refactoring of the SU gridded component +! !MODULE: SU2G_GridCompMod - GOCART refactoring of the SU gridded component ! !INTERFACE: module SU2G_GridCompMod @@ -11,7 +11,7 @@ module SU2G_GridCompMod ! !USES: use ESMF use MAPL - use GOCART2G_MieMod + use GOCART2G_MieMod use Chem_AeroGeneric use iso_c_binding, only: c_loc, c_f_pointer, c_ptr @@ -102,7 +102,7 @@ module SU2G_GridCompMod !============================================================================ !BOP -! !IROUTINE: SetServices +! !IROUTINE: SetServices ! !INTERFACE: subroutine SetServices ( GC, RC ) @@ -113,7 +113,7 @@ subroutine SetServices ( GC, RC ) ! DESCRIPTION: This version uses MAPL_GenericSetServices, which sets ! the Initialize and Finalize services to generic versions. It also -! allocates our instance of a generic state and puts it in the +! allocates our instance of a generic state and puts it in the ! gridded component (GC). Here we only set the two-stage run method ! and declare the data services. @@ -136,6 +136,7 @@ subroutine SetServices ( GC, RC ) integer :: i real :: DEFVAL logical :: data_driven=.true. + logical :: file_exists integer :: num_threads __Iam__('SetServices') @@ -156,11 +157,13 @@ subroutine SetServices ( GC, RC ) num_threads = MAPL_get_num_threads() allocate(self%workspaces(0:num_threads-1), __STAT__) -! Load resource file +! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'SU2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) - if (status /= 0) then + inquire(file='SU2G_instance_'//trim(COMP_NAME)//'.rc', exist=file_exists) + if (file_exists) then + call ESMF_ConfigLoadFile (cfg, 'SU2G_instance_'//trim(COMP_NAME)//'.rc', __RC__) + else if (mapl_am_i_root()) print*,'SU2G_instance_'//trim(COMP_NAME)//'.rc does not exist! loading SU2G_instance_SU.rc instead' call ESMF_ConfigLoadFile (cfg, 'SU2G_instance_SU.rc', __RC__) end if @@ -202,7 +205,7 @@ subroutine SetServices ( GC, RC ) DEFVAL = 0.0 -! Import and Internal states if data instance +! Import and Internal states if data instance ! ------------------------------------------- if (data_driven) then @@ -242,7 +245,7 @@ subroutine SetServices ( GC, RC ) units='kg kg-1', & dims=MAPL_DimsHorzVert, & vlocation=MAPL_VlocationCenter, & - restart=MAPL_RestartOptional, __RC__) + restart=MAPL_RestartOptional, __RC__) do i = 1, self%nbins write(field_name, '(A, I0.3)') '', i @@ -255,7 +258,7 @@ subroutine SetServices ( GC, RC ) VLOCATION = MAPL_VLocationCenter, & RESTART = MAPL_RestartSkip, __RC__) -! ! wet deposition +! ! wet deposition call MAPL_AddImportSpec(GC, & SHORT_NAME = 'climSUWT'//trim(field_name), & LONG_NAME = 'Sulfate wet deposition (bin '//trim(field_name)//')', & @@ -292,7 +295,7 @@ subroutine SetServices ( GC, RC ) UNITS = '1', & DIMS = MAPL_DimsHorzVert, & VLOCATION = MAPL_VLocationCenter, & - RESTART = MAPL_RestartSkip, __RC__) + RESTART = MAPL_RestartSkip, __RC__) call MAPL_AddImportSpec(GC, & SHORT_NAME = 'SU_OH', & @@ -300,7 +303,7 @@ subroutine SetServices ( GC, RC ) UNITS = '1', & DIMS = MAPL_DimsHorzVert, & VLOCATION = MAPL_VLocationCenter, & - RESTART = MAPL_RestartSkip, __RC__) + RESTART = MAPL_RestartSkip, __RC__) call MAPL_AddImportSpec(GC, & SHORT_NAME = 'SU_NO3', & @@ -311,7 +314,7 @@ subroutine SetServices ( GC, RC ) RESTART = MAPL_RestartSkip, __RC__) end if -! Import, Export, Internal states for computational instance +! Import, Export, Internal states for computational instance ! ---------------------------------------------------------- if (.not. data_driven) then #include "SU2G_Export___.h" @@ -356,26 +359,26 @@ end subroutine SetServices !============================================================================ !BOP -! !IROUTINE: Initialize +! !IROUTINE: Initialize ! !INTERFACE: subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: IMPORT ! Import state type (ESMF_State), intent(inout) :: EXPORT ! Export state type (ESMF_Clock), intent(inout) :: CLOCK ! The clock integer, optional, intent( out) :: RC ! Error code -! !DESCRIPTION: This initializes SU Grid Component. +! !DESCRIPTION: This initializes SU Grid Component. -! !REVISION HISTORY: +! !REVISION HISTORY: ! 08July2019 E.Sherman First attempt at refactoring !EOP !============================================================================ -! !Locals +! !Locals character (len=ESMF_MAXSTR) :: COMP_NAME type (MAPL_MetaComp), pointer :: MAPL type (ESMF_Grid) :: grid @@ -386,7 +389,6 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) type (ESMF_FieldBundle) :: Bundle_DP type (wrap_) :: wrap type (SU2G_GridComp), pointer :: self - type (ESMF_Alarm) :: alarm_H2O2 integer, allocatable :: mieTable_pointer(:) integer :: i, dims(3), km @@ -413,10 +415,11 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) integer, allocatable, dimension(:) :: channels_ integer :: nmom_ character(len=ESMF_MAXSTR) :: file_ + logical :: file_exists __Iam__('Initialize') !**************************************************************************** -! Begin... +! Begin... ! Get the target components name and set-up traceback handle. ! ----------------------------------------------------------- @@ -435,7 +438,7 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! Get dimensions ! --------------- - call MAPL_GridGet (grid, globalCellCountPerDim=dims, __RC__ ) + call MAPL_GridGet (grid, localCellCountPerDim=dims, __RC__ ) km = dims(3) self%km = km @@ -456,17 +459,18 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) self%diurnal_bb = .false. end if -! Load resource file and get number of bins +! Load resource file and get number of bins ! ------------------------------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'SU2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) - if (status /= 0) then - if (mapl_am_i_root()) print*,'SU2G_instance_'//trim(COMP_NAME)//'.rc does not exist! & - loading SU2G_instance_SU.rc instead' - call ESMF_ConfigLoadFile( cfg, 'SU2G_instance_SU.rc', __RC__) + inquire(file='SU2G_instance_'//trim(COMP_NAME)//'.rc', exist=file_exists) + if (file_exists) then + call ESMF_ConfigLoadFile (cfg, 'SU2G_instance_'//trim(COMP_NAME)//'.rc', __RC__) + else + if (mapl_am_i_root()) print*,'SU2G_instance_'//trim(COMP_NAME)//'.rc does not exist! loading SU2G_instance_SU.rc instead' + call ESMF_ConfigLoadFile (cfg, 'SU2G_instance_SU.rc', __RC__) end if -! Call Generic Initialize +! Call Generic Initialize ! ---------------------------------------- call MAPL_GenericInitialize (GC, import, export, clock, __RC__) @@ -482,26 +486,6 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! ------------------ call determine_data_driven (COMP_NAME, data_driven, __RC__) -! Set H2O2 recycle alarm -! ---------------------- - if (.not. data_driven) then - call ESMF_ClockGet(clock, calendar=calendar, currTime=currentTime, __RC__) - call ESMF_TimeGet(currentTime, YY=year, MM=month, DD=day, H=hh, M=mm, S=ss, __RC__) - call ESMF_TimeSet(ringTime, YY=year, MM=month, DD=day, H=0, M=0, S=0, __RC__) - call ESMF_TimeIntervalSet(ringInterval, H=3, calendar=calendar, __RC__) - - do while (ringTime < currentTime)! DO WE NEED THIS? - ringTime = currentTime + ringInterval - end do - - alarm_H2O2 = ESMF_AlarmCreate(Clock = clock, & - Name = 'H2O2_RECYCLE_ALARM', & - RingInterval = ringInterval, & - RingTime = currentTime, & - Enabled = .true. , & - Sticky = .false. , __RC__) - end if - ! If this is a data component, the data is provided in the import ! state via ExtData instead of the actual GOCART children ! ---------------------------------------------------------------- @@ -640,13 +624,13 @@ end subroutine Initialize !============================================================================ !BOP -! !IROUTINE: Run +! !IROUTINE: Run ! !INTERFACE: subroutine Run (GC, import, export, clock, rc) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -667,7 +651,7 @@ subroutine Run (GC, import, export, clock, rc) __Iam__('Run') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -700,13 +684,13 @@ end subroutine Run !============================================================================ !BOP -! !IROUTINE: Run1 +! !IROUTINE: Run1 ! !INTERFACE: subroutine Run1 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -748,7 +732,7 @@ subroutine Run1 (GC, import, export, clock, RC) __Iam__('Run1') !***************************************************************************** -! Begin... +! Begin... nullify(dummyMSA) @@ -895,9 +879,9 @@ subroutine Run1 (GC, import, export, clock, RC) self%aviation_layers, & aviation_lto_src, & aviation_cds_src, & - aviation_crs_src, __RC__) + aviation_crs_src, __RC__) - if (associated(dms)) then + if (associated(dms)) then call DMSemission (self%km, self%cdt, MAPL_GRAV, t, u10m, v10m, lwi, delp, & fMassDMS, SU_DMSO, dms, SUEM, nDMS, __RC__) end if @@ -941,7 +925,7 @@ subroutine Run1 (GC, import, export, clock, RC) call updatePointwiseEmissions (self%km, workspace%pBase, workspace%pTop, workspace%pEmis, workspace%nPts, & workspace%pStart, workspace%pEnd, zle, & area, iPoint, jPoint, nhms, emissions_point, __RC__) - + SO4 = SO4 + self%cdt * MAPL_GRAV / delp * emissions_point end if @@ -951,14 +935,14 @@ end subroutine Run1 !============================================================================ !BOP -! !IROUTINE: Run2 +! !IROUTINE: Run2 ! !INTERFACE: subroutine Run2 (GC, import, export, clock, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: import ! Import state type (ESMF_State), intent(inout) :: export ! Export state type (ESMF_Clock), intent(inout) :: clock ! The clock @@ -975,7 +959,6 @@ subroutine Run2 (GC, import, export, clock, RC) type (wrap_) :: wrap type (SU2G_GridComp), pointer :: self type (ESMF_Time) :: time - type (ESMF_Alarm) :: ALARM type(MAPL_VarSpec), pointer :: InternalSpec(:) integer :: nymd, nhms, iyr, imm, idd, ihr, imn, isc @@ -989,8 +972,9 @@ subroutine Run2 (GC, import, export, clock, RC) real, dimension(:,:,:), allocatable :: xoh, xno3, xh2o2 real, dimension(:,:), allocatable :: drydepositionf + real, pointer, dimension(:,:,:) :: dummyMSA !=> null() ! this is so the model can run without MSA enabled - logical :: alarm_is_ringing + logical :: alarm_is_ringing type(ThreadWorkspace), pointer :: workspace integer :: thread integer :: i1, j1, i2, j2, km @@ -1001,7 +985,7 @@ subroutine Run2 (GC, import, export, clock, RC) __Iam__('Run2') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -1020,9 +1004,9 @@ subroutine Run2 (GC, import, export, clock, RC) LATS = LATS, __RC__ ) #include "SU2G_GetPointer___.h" - + call MAPL_GetPointer(internal, dummyMSA, 'MSA', rc=status) - + ! Extract nymd(yyyymmdd) from clock ! --------------------------------- call ESMF_ClockGet (clock, currTime=time, __RC__) @@ -1039,12 +1023,10 @@ subroutine Run2 (GC, import, export, clock, RC) thread = MAPL_get_current_thread() workspace => self%workspaces(thread) - call ESMF_ClockGetAlarm(clock, 'H2O2_RECYCLE_ALARM', alarm, __RC__) - alarm_is_ringing = ESMF_AlarmIsRinging(alarm, __RC__) + alarm_is_ringing = daily_alarm(clock,30000,_RC) ! recycle H2O2 every 3 hours if (alarm_is_ringing) then - workspace%recycle_h2o2 = ESMF_AlarmIsRinging(alarm, __RC__) - !call ESMF_AlarmRingerOff(alarm, __RC__) + workspace%recycle_h2o2 = .true. end if allocate(xoh, mold=airdens, __STAT__) @@ -1053,13 +1035,13 @@ subroutine Run2 (GC, import, export, clock, RC) xoh = 0.0 xno3 = 0.0 - if (workspace%firstRun) then - xh2o2 = MAPL_UNDEF - h2o2_init = MAPL_UNDEF - workspace%firstRun = .false. - end if + !if (workspace%firstRun) then + !xh2o2 = MAPL_UNDEF + !h2o2_init = MAPL_UNDEF + !workspace%firstRun = .false. + !end if - xh2o2 = h2o2_init + xh2o2 = h2o2_init call SulfateUpdateOxidants (nymd, nhms, LONS, LATS, airdens, self%km, self%cdt, & workspace%nymd_oxidants, MAPL_UNDEF, real(MAPL_RADIANS_TO_DEGREES), & @@ -1126,7 +1108,7 @@ subroutine Run2 (GC, import, export, clock, RC) allocate(RH80(i1:i2,j1:j2,km), __STAT__) RH20(:,:,:) = 0.20 - call SU_Compute_Diags ( km=self%km, klid=self%klid, rmed=self%radius(nSO4), sigma=self%sigma(nSO4),& + call SU_Compute_Diags ( km=self%km, klid=self%klid, rmed=self%radius(nSO4), sigma=self%sigma(nSO4),& rhop=self%rhop(nSO4), & grav=MAPL_GRAV, pi=MAPL_PI, nSO4=nSO4, mie=self%diag_Mie, & wavelengths_profile=self%wavelengths_profile*1.0e-9, & @@ -1136,7 +1118,7 @@ subroutine Run2 (GC, import, export, clock, RC) scacoef = SUSCACOEFRH20, __RC__) RH80(:,:,:) = 0.80 - call SU_Compute_Diags ( km=self%km, klid=self%klid, rmed=self%radius(nSO4), sigma=self%sigma(nSO4),& + call SU_Compute_Diags ( km=self%km, klid=self%klid, rmed=self%radius(nSO4), sigma=self%sigma(nSO4),& rhop=self%rhop(nSO4), & grav=MAPL_GRAV, pi=MAPL_PI, nSO4=nSO4, mie=self%diag_Mie, & wavelengths_profile=self%wavelengths_profile*1.0e-9, & @@ -1160,13 +1142,13 @@ subroutine Run_data (GC, IMPORT, EXPORT, INTERNAL, RC) ! !ARGUMENTS: - type (ESMF_GridComp), intent(inout) :: GC ! Gridded component + type (ESMF_GridComp), intent(inout) :: GC ! Gridded component type (ESMF_State), intent(inout) :: IMPORT ! Import state type (ESMF_State), intent(inout) :: EXPORT ! Export state type (ESMF_State), intent(inout) :: INTERNAL ! Interal state integer, optional, intent( out) :: RC ! Error code: -! !DESCRIPTION: Updates pointers in Internal state with fields from ExtData. +! !DESCRIPTION: Updates pointers in Internal state with fields from ExtData. !EOP !============================================================================ @@ -1180,7 +1162,7 @@ subroutine Run_data (GC, IMPORT, EXPORT, INTERNAL, RC) __Iam__('Run_data') !***************************************************************************** -! Begin... +! Begin... ! Get my name and set-up traceback handle ! --------------------------------------- @@ -1238,7 +1220,7 @@ subroutine aerosol_optics(state, rc) __Iam__('SU2G::aerosol_optics') -! Begin... +! Begin... ! Mie Table instance/index ! ------------------------ @@ -1255,7 +1237,7 @@ subroutine aerosol_optics(state, rc) band = 0 call ESMF_AttributeGet(state, name='band_for_aerosol_optics', value=band, __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, ple, trim(fld_name), __RC__) @@ -1359,7 +1341,7 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) bext_s = bext_s + bext ! extinction bssa_s = bssa_s + (bssa*bext) ! scattering extinction - basym_s = basym_s + gasym*(bssa*bext) ! asymetry parameter multiplied by scatering extiction + basym_s = basym_s + gasym*(bssa*bext) ! asymetry parameter multiplied by scatering extiction end do @@ -1401,7 +1383,7 @@ subroutine monochromatic_aerosol_optics(state, rc) __Iam__('SU2G::monochromatic_aerosol_optics') -! Begin... +! Begin... ! Mie Table instance/index ! ------------------------ @@ -1418,7 +1400,7 @@ subroutine monochromatic_aerosol_optics(state, rc) call ESMF_AttributeGet(state, name='wavelength_for_aerosol_optics', value=wavelength, __RC__) -! Pressure at layer edges +! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, ple, trim(fld_name), __RC__) @@ -1479,6 +1461,38 @@ subroutine monochromatic_aerosol_optics(state, rc) end subroutine monochromatic_aerosol_optics + function daily_alarm(clock,freq,rc) result(is_ringing) + logical :: is_ringing + type(ESMF_Clock), intent(in) :: clock + integer, intent(in) :: freq + integer, optional, intent(out) :: rc + + type(ESMF_Time) :: current_time + integer :: status,year,month,day,hour,minute,second,initial_time,int_seconds + integer :: nhh,nmm,nss,freq_sec + + type(ESMF_TimeInterval) :: new_diff,esmf_freq + type(ESMF_Time) :: reff_time,new_esmf_time + + call ESMF_ClockGet(clock,currTIme=current_time,_RC) + call ESMF_TimeGet(current_time,yy=year,mm=month,dd=day,h=hour,m=minute,s=second,_RC) + + int_seconds = 0 + call MAPL_UnpackTIme(freq,nhh,nmm,nss) + is_ringing = .false. + call ESMF_TimeSet(reff_time,yy=year,mm=month,dd=day,h=0,m=0,s=0,_RC) + new_esmf_time = reff_time + call ESMF_TimeIntervalSet(esmf_freq,h=nhh,m=nmm,s=nss ,_RC) + do while (int_seconds < 86400) + if ( new_esmf_time == current_time) then + is_ringing = .true. + exit + end if + new_esmf_time = new_esmf_time + esmf_freq + new_diff = new_esmf_time - reff_time + call ESMF_TimeIntervalGet(new_diff,s=int_seconds,_RC) + enddo + _RETURN(_SUCCESS) + end function end module SU2G_GridCompMod - diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc index cbcedb56..d5ef60c0 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc @@ -10,25 +10,25 @@ climSO4 'kg kg-1' Y N 0 0.0 1.0 #climMSA 'kg kg-1' Y N - 0.0 1.0 none /dev/null #climSO2 'kg kg-1' Y N - 0.0 1.0 none /dev/null -climSUDP001 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT001 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP001 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP001 /dev/null +climSUWT001 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT001 /dev/null climSUSD001 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD001 /dev/null -climSUSV001 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV001 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV001 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV001 /dev/null -climSUDP002 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT002 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP002 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP002 /dev/null +climSUWT002 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT002 /dev/null climSUSD002 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD002 /dev/null -climSUSV002 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV002 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV002 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV002 /dev/null -climSUDP003 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT003 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP003 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP003 /dev/null +climSUWT003 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT003 /dev/null climSUSD003 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD003 /dev/null -climSUSV003 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV003 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV003 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV003 /dev/null -climSUDP004 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 -climSUWT004 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUDP004 'kg m-2 s-1' Y N 0 0.0 1.0 SUDP004 /dev/null +climSUWT004 'kg m-2 s-1' Y N 0 0.0 1.0 SUWT004 /dev/null climSUSD004 'kg m-2 s-1' Y N 0 0.0 1.0 SUSD004 /dev/null -climSUSV004 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV004 ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 +climSUSV004 'kg m-2 s-1' Y N 0 0.0 1.0 SUSV004 /dev/null #====== Sulfate Sources ================================================= diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.yaml index fcef1bf0..dbb6c462 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.yaml @@ -15,8 +15,7 @@ Collections: template: ExtData/chemistry/CEDS/v2021-04-21/sfc/SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 SU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4: template: ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 - SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4: - template: ExtData/chemistry/MERRA2/v0.0.0/sfc/merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" SU2G_qfed2.emis_so2.006.%y4%m2%d2.nc4: template: ExtData/chemistry/QFED/v2.5r1-nrt/sfc/0.1/Y%y4/M%m2/qfed2.emis_so2.006.%y4%m2%d2.nc4 valid_range: "2014-12-01T12:00/2021-11-01T12:00" @@ -106,69 +105,37 @@ Exports: sample: SU2G_sample_0 variable: SO4 climSUDP001: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUDP001 + collection: /dev/null climSUDP002: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUDP002 + collection: /dev/null climSUDP003: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUDP003 + collection: /dev/null climSUDP004: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUDP004 + collection: /dev/null climSUSD001: collection: /dev/null - sample: SU2G_sample_0 - variable: SUSD001 climSUSD002: collection: /dev/null - sample: SU2G_sample_0 - variable: SUSD002 climSUSD003: collection: /dev/null - sample: SU2G_sample_0 - variable: SUSD003 climSUSD004: collection: /dev/null - sample: SU2G_sample_0 - variable: SUSD004 climSUSV001: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUSV001 + collection: /dev/null climSUSV002: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUSV002 + collection: /dev/null climSUSV003: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUSV003 + collection: /dev/null climSUSV004: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUSV004 + collection: /dev/null climSUWT001: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUWT001 + collection: /dev/null climSUWT002: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUWT002 + collection: /dev/null climSUWT003: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUWT003 + collection: /dev/null climSUWT004: - collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 - sample: SU2G_sample_0 - variable: SUWT004 + collection: /dev/null pSO2_OCS: collection: /dev/null regrid: CONSERVE diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc index 89756c6f..b8f051b4 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc @@ -112,7 +112,7 @@ category: INTERNAL SO2 |kg kg-1| xyz | C | MAPL_RestartOptional | T | DYNAMICS:TURBULENCE:MOIST | Sulphur dioxide SO4 |kg kg-1| xyz | C | MAPL_RestartOptional | T | DYNAMICS:TURBULENCE:MOIST | Sulphate aerosol MSA |kg kg-1| xyz | C | MAPL_RestartOptional | T | DYNAMICS:TURBULENCE:MOIST | Methanesulphonic acid - H2O2_INIT |kg kg-1| xyz | C | MAPL_RestartSkip | F | | private H2O2 that is saved and used to initialize + H2O2_INIT |kg kg-1| xyz | C | | F | | private H2O2 that is saved and used to initialize #******************************************************** diff --git a/ESMF/GOCART_GridComp/GOCART_GridCompMod.F90 b/ESMF/GOCART_GridComp/GOCART_GridCompMod.F90 index 7d872e15..f24add8e 100644 --- a/ESMF/GOCART_GridComp/GOCART_GridCompMod.F90 +++ b/ESMF/GOCART_GridComp/GOCART_GridCompMod.F90 @@ -1162,7 +1162,7 @@ subroutine Run1_ ( gc, impChem, expChem, clock, rc ) ! ---------------------------------------------------------------------------------------- ! Assume that DT is always an integral number of seconds ! Add a fraction to both (and then truncate to int), to avoid cases like 900 /= 899.999999 - _ASSERT(abs(cdt-hdt) < 0.1, 'Implementation of GOCART_DT is problematic; set GOCART_DT = HEARTBEAT_DT') +!! _ASSERT(abs(cdt-hdt) < 0.1, 'Implementation of GOCART_DT is problematic; set GOCART_DT = HEARTBEAT_DT') allocate(r4ZTH(SIZE(LATS,1), SIZE(LATS,2)), __STAT__) allocate( ZTH(SIZE(LATS,1), SIZE(LATS,2)), __STAT__) diff --git a/ESMF/GOCART_GridComp/O3_GridComp/AMIP.20C/O3_GridComp.rc b/ESMF/GOCART_GridComp/O3_GridComp/AMIP.20C/O3_GridComp.rc index 2a5d767d..9c2e9e0d 100644 --- a/ESMF/GOCART_GridComp/O3_GridComp/AMIP.20C/O3_GridComp.rc +++ b/ESMF/GOCART_GridComp/O3_GridComp/AMIP.20C/O3_GridComp.rc @@ -3,7 +3,7 @@ # # Parameterized chemistry # ----------------------- -PCHEMs_file_name: /discover/nobackup/ltakacs/bcs/Ganymed-2_0_M/Shared/pchem.species.Clim_Prod_Loss.z_721x72.nc4 +PCHEMs_file_name: /discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Ganymed-2_0_M/Shared/pchem.species.Clim_Prod_Loss.z_721x72.nc4 pchem_clim_years: 1 # GMI chemistry diff --git a/ESMF/GOCART_GridComp/O3_GridComp/AMIP/O3_GridComp.rc b/ESMF/GOCART_GridComp/O3_GridComp/AMIP/O3_GridComp.rc index 2a5d767d..9c2e9e0d 100644 --- a/ESMF/GOCART_GridComp/O3_GridComp/AMIP/O3_GridComp.rc +++ b/ESMF/GOCART_GridComp/O3_GridComp/AMIP/O3_GridComp.rc @@ -3,7 +3,7 @@ # # Parameterized chemistry # ----------------------- -PCHEMs_file_name: /discover/nobackup/ltakacs/bcs/Ganymed-2_0_M/Shared/pchem.species.Clim_Prod_Loss.z_721x72.nc4 +PCHEMs_file_name: /discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Ganymed-2_0_M/Shared/pchem.species.Clim_Prod_Loss.z_721x72.nc4 pchem_clim_years: 1 # GMI chemistry diff --git a/ESMF/GOCART_GridComp/O3_GridComp/O3_GridComp.rc b/ESMF/GOCART_GridComp/O3_GridComp/O3_GridComp.rc index 2a5d767d..9c2e9e0d 100755 --- a/ESMF/GOCART_GridComp/O3_GridComp/O3_GridComp.rc +++ b/ESMF/GOCART_GridComp/O3_GridComp/O3_GridComp.rc @@ -3,7 +3,7 @@ # # Parameterized chemistry # ----------------------- -PCHEMs_file_name: /discover/nobackup/ltakacs/bcs/Ganymed-2_0_M/Shared/pchem.species.Clim_Prod_Loss.z_721x72.nc4 +PCHEMs_file_name: /discover/nobackup/projects/gmao/bcs_shared/legacy_bcs/Ganymed-2_0_M/Shared/pchem.species.Clim_Prod_Loss.z_721x72.nc4 pchem_clim_years: 1 # GMI chemistry diff --git a/components.yaml b/components.yaml index 715bcea1..81aa3128 100644 --- a/components.yaml +++ b/components.yaml @@ -5,13 +5,13 @@ GOCART: env: local: ./env@ remote: ../ESMA_env.git - tag: v4.8.0 + tag: v4.9.1 develop: main cmake: local: ./cmake@ remote: ../ESMA_cmake.git - tag: v3.24.0 + tag: v3.28.0 develop: develop ecbuild: @@ -22,17 +22,18 @@ ecbuild: HEMCO: local: ./ESMF/HEMCO_GridComp@ remote: ../HEMCO.git - branch: geos/v2.2.3 + tag: geos/v2.2.3 + develop: geos/develop GMAO_Shared: local: ./ESMF/Shared/GMAO_Shared@ remote: ../GMAO_Shared.git - tag: v1.6.3 + tag: v1.9.0 sparse: ./config/GMAO_Shared.sparse develop: main MAPL: local: ./ESMF/Shared/MAPL@ remote: ../MAPL.git - tag: v2.34.0 + tag: v2.38.1 develop: develop