diff --git a/.circleci/config.yml b/.circleci/config.yml index 6fe732b7..b7409002 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,7 +1,7 @@ version: 2.1 # Anchors in case we need to override the defaults from the orb -#baselibs_version: &baselibs_version v7.27.0 +#baselibs_version: &baselibs_version v7.33.0 #bcs_version: &bcs_version v11.6.0 orbs: diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 67d9db28..0a2c1eca 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -7,12 +7,12 @@ * @GEOS-ESM/aerosol-team # NOAA Extras are Tom, Weiyuan for now -/CCPP/ @GEOS-ESM/mapl-team @amdasilva -/ESMF/Aerosol_GridComp/ @GEOS-ESM/mapl-team @amdasilva -/ESMF/NUOPC/ @GEOS-ESM/mapl-team @amdasilva -/ESMF/UFS/ @GEOS-ESM/mapl-team @amdasilva +/CCPP/ @GEOS-ESM/mapl-team @GEOS-ESM/aerosol-team +/ESMF/Aerosol_GridComp/ @GEOS-ESM/mapl-team @GEOS-ESM/aerosol-team +/ESMF/NUOPC/ @GEOS-ESM/mapl-team @GEOS-ESM/aerosol-team +/ESMF/UFS/ @GEOS-ESM/mapl-team @GEOS-ESM/aerosol-team # The CMake Team should know/approve these -/.github/ @GEOS-ESM/cmake-team @amdasilva -/.circleci/ @GEOS-ESM/cmake-team @amdasilva -/.codebuild/ @GEOS-ESM/cmake-team @amdasilva +/.github/ @GEOS-ESM/cmake-team @GEOS-ESM/aerosol-team +/.circleci/ @GEOS-ESM/cmake-team @GEOS-ESM/aerosol-team +/.codebuild/ @GEOS-ESM/cmake-team @GEOS-ESM/aerosol-team diff --git a/.github/workflows/spack-ci.yml b/.github/workflows/spack-ci.yml new file mode 100644 index 00000000..8392d9ff --- /dev/null +++ b/.github/workflows/spack-ci.yml @@ -0,0 +1,215 @@ +name: Spack CI GCC Build + +on: + pull_request: + types: [opened, synchronize, reopened] + # Do not run if the only files changed cannot affect the build + paths-ignore: + - "**.md" + - "**.pro" + - "**.sh" + - "**.perl" + - ".github/CODEOWNERS" + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + build_gcm: + name: Spack CI GCC Build GCM + runs-on: ubuntu-24.04 + steps: + + - name: Checkout GCM + uses: actions/checkout@v4 + with: + fetch-depth: 1 + filter: blob:none + repository: GEOS-ESM/GEOSgcm + + - name: Set all directories as git safe + run: | + git config --global --add safe.directory '*' + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + + - name: Pip install mepo + run: | + python -m pip install --upgrade pip + pip install mepo + mepo --version + + - name: Mepo clone external repos + run: | + ls + mepo clone --partial blobless + mepo status + + - name: Mepo develop usual suspects + run: | + ls + mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared GEOS_Util + mepo status + + - name: Update other branches + if: + "!contains('refs/heads/main,refs/heads/develop', github.ref)" + run: | + mepo checkout-if-exists ${GITHUB_HEAD_REF} + mepo status + + - name: Set up Spack + uses: spack/setup-spack@v2 + with: + ref: develop # Spack version (examples: develop, releases/v0.21) + color: true # Force color output (SPACK_COLOR=always) + path: spack # Where to clone Spack + buildcache: false # Do not use the spack buildcache + + - name: Find compilers + shell: spack-bash {0} + run: | + spack compiler find + + - name: Set default compiler and target + shell: spack-bash {0} + run: | + spack config add 'packages:all:require:target=x86_64_v3' + + - name: Create Spack environment + shell: spack-bash {0} + run: | + spack env create spack-env + spack env activate spack-env + + - name: Login + shell: spack-bash {0} + run: | + spack -e spack-env mirror add geos-buildcache oci://ghcr.io/GEOS-ESM/geos-buildcache + spack -e spack-env mirror set --oci-username-variable "${{ secrets.BUILDCACHE_USERNAME }}" --oci-password-variable "${{ secrets.BUILDCACHE_TOKEN }}" geos-buildcache + spack -e spack-env mirror list + spack -e spack-env buildcache list --allarch + + - name: Concretize + shell: spack-bash {0} + run: | + spack -e spack-env concretize + + - name: Install + shell: spack-bash {0} + run: | + spack clean -m + spack -e spack-env install --add --no-check-signature --use-buildcache only \ + esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas + + - name: Build with Cmake + shell: spack-bash {0} + run: | + spack env activate spack-env + spack load \ + esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas + spack find --loaded + FC=gfortran-14 CC=gcc-14 CXX=g++-14 + cmake -B build -S . -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_BUILD_TYPE=Debug -DUSE_F2PY=OFF -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} + cmake --build build --parallel 4 + cmake --install build + + build_gocart: + name: Spack CI GCC Build GOCART + runs-on: ubuntu-24.04 + steps: + + - name: Checkout GOCART + uses: actions/checkout@v4 + with: + fetch-depth: 1 + filter: blob:none + + - name: Set all directories as git safe + run: | + git config --global --add safe.directory '*' + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.13' + + - name: Pip install mepo + run: | + python -m pip install --upgrade pip + pip install mepo + mepo --version + + - name: Mepo clone external repos + run: | + ls + mepo clone --partial blobless + mepo status + + - name: Update other branches + if: + "!contains('refs/heads/main,refs/heads/develop', github.ref)" + run: | + mepo checkout-if-exists ${GITHUB_HEAD_REF} + mepo status + + - name: Set up Spack + uses: spack/setup-spack@v2 + with: + ref: develop # Spack version (examples: develop, releases/v0.21) + color: true # Force color output (SPACK_COLOR=always) + path: spack # Where to clone Spack + buildcache: false # Do not use the spack buildcache + + - name: Find compilers + shell: spack-bash {0} + run: | + spack compiler find + + - name: Set default compiler and target + shell: spack-bash {0} + run: | + spack config add 'packages:all:require:target=x86_64_v3' + + - name: Create Spack environment + shell: spack-bash {0} + run: | + spack env create spack-env + spack env activate spack-env + + - name: Login + shell: spack-bash {0} + run: | + spack -e spack-env mirror add geos-buildcache oci://ghcr.io/GEOS-ESM/geos-buildcache + spack -e spack-env mirror set --oci-username-variable "${{ secrets.BUILDCACHE_USERNAME }}" --oci-password-variable "${{ secrets.BUILDCACHE_TOKEN }}" geos-buildcache + spack -e spack-env mirror list + spack -e spack-env buildcache list --allarch + + - name: Concretize + shell: spack-bash {0} + run: | + spack -e spack-env concretize + + - name: Install + shell: spack-bash {0} + run: | + spack clean -m + spack -e spack-env install --add --no-check-signature --use-buildcache only \ + esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas + + - name: Build with Cmake + shell: spack-bash {0} + run: | + spack env activate spack-env + spack load \ + esmf gftl gftl-shared fargparse pflogger pfunit yafyaml ecbuild udunits openblas + spack find --loaded + FC=gfortran-14 CC=gcc-14 CXX=g++-14 + cmake -B build -S . -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_BUILD_TYPE=Debug -DUSE_F2PY=OFF -DCMAKE_Fortran_COMPILER=${FC} -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} + cmake --build build --target GOCART2G_GridComp --parallel 4 + diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 00000000..fb0f9663 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,140 @@ +name: Build Tests + +on: + pull_request: + types: [opened, synchronize, reopened] + # Do not run if the only files changed cannot affect the build + paths-ignore: + - "**.md" + - "**.pro" + - "**.sh" + - "**.perl" + - ".github/CODEOWNERS" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} + +jobs: + build_gcm: + name: Build GEOSgcm + if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')" + runs-on: ubuntu-24.04 + container: + image: gmao/ubuntu24-geos-env:v7.33.0-intelmpi_2021.13-ifort_2021.13 + # Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 + # It seems like we might not need secrets on GitHub Actions which is good for forked + # pull requests + #credentials: + #username: ${{ secrets.DOCKERHUB_USERNAME }} + #password: ${{ secrets.DOCKERHUB_TOKEN }} + + env: + OMPI_ALLOW_RUN_AS_ROOT: 1 + OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 + OMPI_MCA_btl_vader_single_copy_mechanism: none + + steps: + # https://github.com/orgs/community/discussions/25678#discussioncomment-5242449 + - name: Delete huge unnecessary tools folder + run: rm -rf /opt/hostedtoolcache + + - name: Checkout GCM + uses: actions/checkout@v4 + with: + fetch-depth: 1 + filter: blob:none + repository: GEOS-ESM/GEOSgcm + + - name: Set all directories as git safe + run: | + git config --global --add safe.directory '*' + + - name: Versions etc. + run: | + ifort --version + mpirun --version + echo $BASEDIR + + - name: Mepo clone external repos + run: | + mepo clone --partial blobless + mepo status + + - name: Mepo develop usual suspects + run: | + mepo develop GEOSgcm_GridComp GEOSgcm_App GMAO_Shared GEOS_Util + mepo status + + - name: Update other branches + if: ${{ github.event.pull_request.head.ref != 'main' && github.event.pull_request.head.ref != 'develop' }} + run: | + mepo checkout-if-exists ${GITHUB_HEAD_REF} + mepo status + + - name: CMake + run: | + cmake -B build -S . --install-prefix=${pwd}/install -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF + + - name: Build + run: | + cmake --build build --parallel 4 + cmake --install build + + build_gocart: + name: Build GOCART + if: "!contains(github.event.pull_request.labels.*.name, '0 diff trivial')" + runs-on: ubuntu-24.04 + container: + image: gmao/ubuntu24-geos-env:v7.33.0-intelmpi_2021.13-ifort_2021.13 + # Per https://github.com/actions/virtual-environments/issues/1445#issuecomment-713861495 + # It seems like we might not need secrets on GitHub Actions which is good for forked + # pull requests + #credentials: + #username: ${{ secrets.DOCKERHUB_USERNAME }} + #password: ${{ secrets.DOCKERHUB_TOKEN }} + + env: + OMPI_ALLOW_RUN_AS_ROOT: 1 + OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1 + OMPI_MCA_btl_vader_single_copy_mechanism: none + + steps: + # https://github.com/orgs/community/discussions/25678#discussioncomment-5242449 + - name: Delete huge unnecessary tools folder + run: rm -rf /opt/hostedtoolcache + + - name: Checkout GOCART + uses: actions/checkout@v4 + with: + fetch-depth: 1 + filter: blob:none + + - name: Set all directories as git safe + run: | + git config --global --add safe.directory '*' + + - name: Versions etc. + run: | + ifort --version + mpirun --version + echo $BASEDIR + + - name: Mepo clone external repos + run: | + mepo clone --partial blobless + mepo status + + - name: Update other branches + if: ${{ github.event.pull_request.head.ref != 'main' && github.event.pull_request.head.ref != 'develop' }} + run: | + mepo checkout-if-exists ${GITHUB_HEAD_REF} + mepo status + + - name: CMake + run: | + cmake -B build -S . --install-prefix=${pwd}/install -DCMAKE_Fortran_COMPILER=ifort -DCMAKE_BUILD_TYPE=Debug -DMPIEXEC_PREFLAGS='--oversubscribe' -DUSE_F2PY=OFF + + - name: Build + run: | + cmake --build build --target GOCART2G_GridComp --parallel 4 diff --git a/CHANGELOG.md b/CHANGELOG.md index af3dd0d3..e0351be1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,158 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Removed + +### Changed + +- Calculation of surface area density and effective radius for connection to chemistry + now comes from optics tables +- Changed effective radius in MieQuery.H to remove in place units scaling; made + corresponding change in Chem_SettlingSimple +- Updated optics lookup tables to accommodate area and effective radius calculation +- Check userRC in ESMF_GridCompRun in GOCART2G gridcomp +- The pressure lid change associated with the introduction of run0 to set 0 above the lid +- Fwet value in dust modified from 0.8 to 1.0 +- Dust and Sea salt Emission scale factors updated for L181 +- Several changes in the DT alarm logic + - GOCART reference time removed in `GOCART2G_GridCompMod.F90` + - Heartbeat time step removed and `timeToWork` logical added +- Modified filepaths for the optics files to no longer link to a personal nobackup directory +- Added logic to ensure the alarm accounts for skipping heartbeat in `NI` and `SU` components +- fwet removed from children GridCompMod and placed in respective instance RC files +- Updated settling routine and calls to allow settling velocity diagnostics in output field + ### Fixed +- In SU an incorrect (older) optics table was specified in AMIP/AMIP.20C sub-directories. + This is corrected from v1_3 to v1_6 +- In DU2G_GridCompMod.F90 remove unnecessary "if(associated())" check for DU_SRC + to future proof for application of new MAPL filtering +- Units error in sulfate surface area density calculation in Process Library corrected +- Removed erroneous/extraneous friendly attributes to internal state for DU and NI + when in data_driven mode +- typo in filepath for BR optics file + ### Added +- Added effective radius and surface area density to aerosol states for use in chemistry +- Added logic in SU2G_GridCompMod.F90 through SU2G_instance_SU.rc to allow one-way + coupling of GMI OH, NO3, H2O2 to sulfur chemistry mechanism +- Added a callback to allow a chemistry module to call for optical properties needed + for photolysis calculation; currently used for GMI with CloudJ + +## [v2.4.3] - 2025-07-21 + ### Changed -Filepath for CEDS has been updated in the ExtData yaml and rc files. Note the old version had an incorrect seasonal cycle. +- Added new SettlingSolver scheme `SettlingSolverUFS` and rolled back the previous `SettlingSolver` + +### Fixed + +- fix UFS settling solver for numerical instability under certain convective conditions + +### Added + + - Added option for choosing SettlingSolver + - `gocart' - Default GOCART Settling scheme | 'ufs' - New Settling scheme + +## [v2.4.2] - 2025-06-12 + +### Fixed + +- fix SettlingSolver + - ensuring no division by zero + - ensuring mass conservation through pressure weighted mass transfer + - avoid negative concentrations + +## [v2.4.1] - 2025-05-28 + +### Changed + +- Update `components.yaml` to match that of GEOSgcm v11.7.1 + - ESMA_env v4.35.0 + - GMAO_Shared v2.0.0 + - MAPL v2.54.1 + - HEMCO geos/v2.3.0 +- Updates to couple GOCART to the NOAA/UFS system after the ESMF 8.8.0 and MAPL 2.53.0 update + +### Fixed + +- fixed a bug that avoids dividing nSubsteps = 0 + +### Added + +- Added GitHub Action CI tests +- Added new drag partition options for FENGSHA to use modeled GVF or LAI for drag partition following Darmenova (2011) and Martecorena (2005) (see https://github.com/GEOS-ESM/GOCART/pull/305) + +## [v2.4.0] - 2025-03-26 + +### Removed + +- Removed all ExtData.rc files + +### Changed + +- Modified the file paths in carbon, sulfate, and nitrate ExtData.yaml files to used the revised version of the CEDS anthropogenic emissions. Note the previous version has an incorrect seasonal cycle. +- Sulfate surface area density calculation in SU_Compute_Diags was incorrectly being passed the effective radius used for settling along with the sigma width of the number distribution. + Properly it should be passed the number median radius, also present in the RC file. Added a hook to read that field from the RC file ("particle_radius_number"), store in SU grid comp, and pass to SU_Compute_Diags. + This change is zero-diff to the SU internal state. It changes value of export SO4AREA. +- Changed DMS concentration data holder from ExtData provided (SU_DMSO) to local copy (dmso_conc). + This is relevant since if we run source tagged instances where we don't want DMS emissions we would zero out dmso_conc and that is what should be passed to DMSemission subroutine. This is zero diff except in that case. +- Changed SU2G_instance_SU.rc to now have separate filename inputs for explosive and degassing volcanoes +- It changes the formulation of the hydrophobic to hydrophilic conversion for carbon species, now defined by a time scale specified in the instance RC file. + This is now specified by providing an e-folding time in days. This moves the time constant from outside the fortran to the run-time configurable RC file. + This is not quite zero-diff with original code because of the precision of the specification, but testing shows nearly zero-diff result. +- Also now present in the carbon instance RC files is a run-time configurable optional parameterized loss rate (e-folding time in days) per species and per mode. + Default value for all is set to "-1" which means no use of this function. + +### Fixed + +- Use 'CA' component name to identify carbonaceous contributions to PM in UFS diagnostic calculations. These contributions were missing due to changes in field names. +- Add replay import patch for ozone. +- corrected reading variable 'rhod' from files ( it was mispelled as 'rhop') - it is reverted now +- Silenced unwarranted error messages from wavelength/channel retrieval functions occurring when 470nm and/or 870nm channels are not included in GOCART resource file. +- Add explicit `find_package()` calls for missing dependencies for MAPL for builds with spack-stack. Will eventually be fixed in MAPL in later versions +- Corrected the units of the gravimetric soil moisture to percent instead of fractional in the FENGSHA dust scheme. +- Fix issue of GOCART/GEOSgcm circular CMake dependencies when used as external project +- Fix UFS/Standalone CMake issue +- Fix type of `k` in `SUvolcanicEmissions` + +### Added + +- Additional tuning parameters for the soil moisture and drylimit calculations for application specific tuning. +- Required attributes for the 2D GOCART export fields in AERO_DP bundle have been set in subroutine append_to_bundle in Chem_AeroGeneric.F90. + These export fields are imported by OBIO via Surface GC, and the missing of the attributes was causing the writing of surface import checkpoint to fail. + The issue has been explained in detail on https://github.com/GEOS-ESM/GOCART/issues/258 +- Added export line to GOCART2G_GridCompMod to couple allow use of GOCART + SU sulfate production tendency elsewhere in Chemistry, specifically for + CARMA +- Update ESMF CMake target to `ESMF::ESMF` +- Moved present volcanic emission inventories to one or the other line for these new entries; set other + line /dev/null; this is stop gap until next time we update volcanic emission inventories, at which + point will provide (for AMIP and AMIP.20C) separate explosive and degassing emissions +- Made accommodating changes for above in SU2G_GridCompMod.F90 and in the Process Library +- Verified zero diff in current configuration (this is true of tracers and restarts, but not diagnostics: + until an actual split is made in the input emissions then the volcanic emissions are being assigned to + one or the other emission diagnostics (explosive or degassing). +- Changed Chem_SettlingSimple in the process library to call Mie Query for radius and rhop inputs to the settling velocity calculation. + The calls to Chem_SettlingSimple were then changed accordingly in each of the species' grid comps. + Since the RH flag is no longer needed, it was removed from GA_EnvironmentMod.F90 and each of the instance RC files. +- State Spec RC files for GOCART2G, CA, DU, NI, SU, and SS were updated such that the long names for AOD are more intuitive +- Modified ExtData.yaml files to persist as climatological anthropogenic emissions after the end of the CEDS dataset in 2019. + Analogous rc files removed as this capability is only available with ExtData2G +- Update `components.yaml` to match that of GEOSgcm v11.6.1 + - ESMA_env v4.29.0 (Baselibs 7.24.0, Updates for SLES15 at NCCS, various fixes) + - ESMA_cmake v3.48.0 (Fixes for NAS, debug flags, Updates for SLES15 at NCCS, MPI detection, ESMF and MPI CMake fixes for Spack) + - GMAO_Shared v1.9.8 (Bug fix for MITgcm, CI fixes, SLES15 Updates) + - MAPL 2.47.1 (Various fixes and features, support for Spack) +- Update CI to use Baselibs by default from CircleCI Orb +- Correct soil moisture parameterization in FENGSHA +- Add `soil_moisture_factor` to the DU2G_instance_DU.rc (same name used in the K14 scheme) and DU2G_GridCompMod.F90 files for FENGSHA +- Add `soil_drylimit_factor` to the DU2G_instance_DU.rc and DU2G_GridCompMod.F90 files for FENGSHA +- Moved process library macros to header file. + ## [v2.3.0] - 2025-01-16 ### Changed @@ -45,8 +190,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - 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 - Comment out ASSERT to allow `GOCART_DT` to not match the `HEARTBEAT_DT` diff --git a/CMakeLists.txt b/CMakeLists.txt index 48670f7a..219563aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,7 @@ endif() if (GOCART_STANDALONE) project ( GOCART - VERSION 2.3.0 + VERSION 2.4.3 LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF if ("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}") @@ -57,6 +57,7 @@ if (UFS_GOCART) message ("Force 32-bit build for GOCART") if (CMAKE_Fortran_COMPILER_ID MATCHES "Intel") string (REPLACE "-real-size 64" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}") + set(CMAKE_Fortran_FLAGS_DEBUG "${CMAKE_Fortran_FLAGS_DEBUG} -check -check noarg_temp_created -ftrapuv") elseif (CMAKE_Fortran_COMPILER_ID MATCHES "GNU") string (REPLACE "-fdefault-real-8" "" CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS}") endif() diff --git a/ESMF/Aerosol_GridComp/CMakeLists.txt b/ESMF/Aerosol_GridComp/CMakeLists.txt index 99628ce9..2c3f31b0 100644 --- a/ESMF/Aerosol_GridComp/CMakeLists.txt +++ b/ESMF/Aerosol_GridComp/CMakeLists.txt @@ -4,7 +4,7 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/Aerosol_GridComp.F90) esma_add_library (${this} SRCS Aerosol_GridComp.F90 - DEPENDENCIES GOCART2G_GridComp MAPL esmf) + DEPENDENCIES GOCART2G_GridComp MAPL ESMF::ESMF) mapl_acg (${this} Aerosol_StateSpecs.rc IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS diff --git a/ESMF/Apps/CMakeLists.txt b/ESMF/Apps/CMakeLists.txt index a2f3c10d..7a26c151 100644 --- a/ESMF/Apps/CMakeLists.txt +++ b/ESMF/Apps/CMakeLists.txt @@ -1,7 +1,7 @@ esma_set_this () set (srcs - GOCART2G_SimpleBundleMod.F90 + GOCART2G_SimpleBundleMod.F90 aop_calculator.F90 GOCART2G_AopMod.F90 ) @@ -18,10 +18,10 @@ endforeach () set (resource_files aop_calculator.rc ) -install( FILES ${resource_files} +install( FILES ${resource_files} DESTINATION etc ) -esma_add_library(${this} - SRCS ${srcs} - DEPENDENCIES MAPL Process_Library esmf NetCDF::NetCDF_Fortran +esma_add_library(${this} + SRCS ${srcs} + DEPENDENCIES MAPL Process_Library ESMF::ESMF NetCDF::NetCDF_Fortran ) 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 deleted file mode 100644 index b11995c1..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP.20C/CA2G_GridComp_ExtData.rc +++ /dev/null @@ -1,128 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| - -#========== 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 -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 /dev/null - -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 /dev/null - -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 /dev/null - -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 /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 =========================================== -# ORGANIC CARBON -# --------------- -# Biomass burning -OC_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.778 biomass /dev/null - -# Biofuel Source -- Included in AeroCom anthropogenic emissions -OC_BIOFUEL NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -OC_ANTEOC1 NA N Y %y4-%m2-%d2t12:00:00 none none oc_nonenergy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 -OC_ANTEOC2 NA N Y %y4-%m2-%d2t12:00:00 none none oc_energy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - -# EDGAR based ship emissions -OC_SHIP NA N Y %y4-%m2-%d2t12:00:00 none none oc_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - -# Aircraft fuel consumption -OC_AIRCRAFT NA N Y %y4-%m2-%d2t12:00:00 none none oc_aviation ExtData/chemistry/CEDS/v2021-04-21-revised/L72/OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - -# Aviation emissions during the three phases of flight -OC_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -OC_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -OC_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null - -# SOA production -pSOA_ANTHRO_VOC NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -#============================================================================================================ -# BLACK CARBON -# ------------ -# -BC_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.778 biomass ExtData/chemistry/HFED/v1.0/Y%y4/hfed.emis_bc.x576_y361_t14.%y4.nc4 - -# Biofuel Source -- Included in AeroCom anthropogenic emissions -BC_BIOFUEL NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -BC_ANTEBC1 NA N Y %y4-%m2-%d2t12:00:00 none none bc_nonenergy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 -BC_ANTEBC2 NA N Y %y4-%m2-%d2t12:00:00 none none bc_energy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - -# EDGAR based ship emissions -BC_SHIP NA N Y %y4-%m2-%d2t12:00:00 none none bc_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - -# Aircraft fuel consumption -BC_AIRCRAFT NA N Y %y4-%m2-%d2t12:00:00 none none bc_aviation ExtData/chemistry/CEDS/v2021-04-21-revised/L72/BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - -# Aviation emissions during the LTO, SDC and CRS phases of flight -BC_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none bc_aviation /dev/null -BC_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none bc_aviation /dev/null -BC_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none bc_aviation /dev/null - -#============================================================================================================ -# BROWN CARBON -# ------------ -# Biomass burning -BRC_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.778 biomass ExtData/chemistry/HFED/v1.0/Y%y4/hfed.emis_oc.x576_y361_t14.%y4.nc4 - -# Terpene emission -BRC_TERPENE NA Y Y %y4-%m2-%d2t12:00:00 none none terpene /dev/null - -# Biofuel Source -- Included in AeroCom anthropogenic emissions -BRC_BIOFUEL NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -BRC_ANTEBRC1 NA Y Y %y4-%m2-%d2t12:00:00 none none anteoc1 /dev/null -BRC_ANTEBRC2 NA Y Y %y4-%m2-%d2t12:00:00 none none anteoc2 /dev/null - -# EDGAR based ship emissions -BRC_SHIP NA Y Y %y4-%m2-%d2t12:00:00 none none oc_ship /dev/null - -# Aircraft fuel consumption -BRC_AIRCRAFT NA Y Y %y4-%m2-%d2t12:00:00 none none none /dev/null - -# Aviation emissions during the three phases of flight -BRC_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -BRC_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -BRC_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null - -# SOA production -pSOA_BIOB_VOC NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -%% diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.rc deleted file mode 100644 index 84426bd3..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.rc +++ /dev/null @@ -1,128 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| - -#========== 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 -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 /dev/null - -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 /dev/null - -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 /dev/null - -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 /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 =========================================== -# ORGANIC CARBON -# --------------- -# Biomass burning -- QFED-v2.x -OC_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.778 biomass /dev/null - -# Biofuel Source -- Included in AeroCom anthropogenic emissions -OC_BIOFUEL NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -OC_ANTEOC1 NA N Y %y4-%m2-%d2t12:00:00 none none oc_nonenergy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 -OC_ANTEOC2 NA N Y %y4-%m2-%d2t12:00:00 none none oc_energy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - -# EDGAR based ship emissions -OC_SHIP NA N Y %y4-%m2-%d2t12:00:00 none none oc_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - -# Aircraft fuel consumption -OC_AIRCRAFT NA N Y %y4-%m2-%d2t12:00:00 none none oc_aviation ExtData/chemistry/CEDS/v2021-04-21-revised/L72/OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - -# Aviation emissions during the three phases of flight -OC_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -OC_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -OC_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null - -# SOA production -pSOA_ANTHRO_VOC NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -#============================================================================================================ -# BLACK CARBON -# ------------ -# QFED v2.x -BC_BIOMASS NA 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_bc.061.%y4%m2%d2.nc4 - -# Biofuel Source -- Included in AeroCom anthropogenic emissions -BC_BIOFUEL NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -BC_ANTEBC1 NA N Y %y4-%m2-%d2t12:00:00 none none bc_nonenergy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 -BC_ANTEBC2 NA N Y %y4-%m2-%d2t12:00:00 none none bc_energy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - -# EDGAR based ship emissions -BC_SHIP NA N Y %y4-%m2-%d2t12:00:00 none none bc_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - -# Aircraft fuel consumption -BC_AIRCRAFT NA N Y %y4-%m2-%d2t12:00:00 none none bc_aviation ExtData/chemistry/CEDS/v2021-04-21-revised/L72/BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - -# Aviation emissions during the LTO, SDC and CRS phases of flight -BC_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none bc_aviation /dev/null -BC_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none bc_aviation /dev/null -BC_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none bc_aviation /dev/null - -#============================================================================================================ -# BROWN CARBON -# ------------ -# Biomass burning -- QFED-v2.x -BRC_BIOMASS NA 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_oc.061.%y4%m2%d2.nc4 - -# Terpene emission -BRC_TERPENE NA Y Y %y4-%m2-%d2t12:00:00 none none terpene /dev/null - -# Biofuel Source -- Included in AeroCom anthropogenic emissions -BRC_BIOFUEL NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -BRC_ANTEBRC1 NA Y Y %y4-%m2-%d2t12:00:00 none none anteoc1 /dev/null -BRC_ANTEBRC2 NA Y Y %y4-%m2-%d2t12:00:00 none none anteoc2 /dev/null - -# EDGAR based ship emissions -BRC_SHIP NA Y Y %y4-%m2-%d2t12:00:00 none none oc_ship /dev/null - -# Aircraft fuel consumption -BRC_AIRCRAFT NA Y Y %y4-%m2-%d2t12:00:00 none none none /dev/null - -# Aviation emissions during the three phases of flight -BRC_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -BRC_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -BRC_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null - -# SOA production -pSOA_BIOB_VOC NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -%% 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 6b4637dd..3a2b9589 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/AMIP/CA2G_GridComp_ExtData.yaml @@ -1,20 +1,28 @@ Collections: CA2G_BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/L72/BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/L72/OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" 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 valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" @@ -43,23 +51,23 @@ Samplings: update_frequency: PT24H update_offset: PT12H update_reference_time: '0' + CA2G_sample_3: + extrapolation: clim + update_frequency: PT24H + update_offset: PT12H + update_reference_time: '0' + source_time: "2019-01-15T12:00/2019-12-15T00:00:00" Exports: BC_AIRCRAFT: - collection: CA2G_BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: bc_aviation + - {starting: "1979-01-15T12:00", collection: CA2G_BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: bc_aviation} + - {starting: "2019-12-15T12:00", collection: CA2G_BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: bc_aviation} BC_ANTEBC1: - collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: bc_nonenergy + - {starting: "1979-01-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: bc_nonenergy} + - {starting: "2019-12-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: bc_nonenergy} BC_ANTEBC2: - collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: bc_energy + - {starting: "1979-01-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: bc_energy} + - {starting: "2019-12-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: bc_energy} BC_AVIATION_CDS: collection: /dev/null regrid: CONSERVE @@ -84,10 +92,8 @@ Exports: - {starting: "1960-01-16T12:00", collection: CA2G_hfed.emis_bc.x576_y361.%y4%m2.nc4, linear_transformation: [0.0, 0.778], regrid: CONSERVE, sample: CA2G_sample_1, variable: biomass} - {starting: "2000-03-01T00:00", collection: CA2G_qfed2.emis_bc.061.%y4%m2%d2.nc4, linear_transformation: [0.0, 0.778], regrid: CONSERVE, sample: CA2G_sample_1, variable: biomass} BC_SHIP: - collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: bc_shipping + - {starting: "1979-01-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: bc_shipping} + - {starting: "2019-12-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: bc_shipping} BRC_AIRCRAFT: collection: /dev/null regrid: CONSERVE @@ -137,20 +143,14 @@ Exports: sample: CA2G_sample_2 variable: terpene OC_AIRCRAFT: - collection: CA2G_OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: oc_aviation + - {starting: "1979-01-15T12:00", collection: CA2G_OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: oc_aviation} + - {starting: "2019-12-15T12:00", collection: CA2G_OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: oc_aviation} OC_ANTEOC1: - collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: oc_nonenergy + - {starting: "1979-01-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: oc_nonenergy} + - {starting: "2019-12-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: oc_nonenergy} OC_ANTEOC2: - collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: oc_energy + - {starting: "1979-01-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: oc_energy} + - {starting: "2019-12-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: oc_energy} OC_AVIATION_CDS: collection: /dev/null regrid: CONSERVE @@ -180,10 +180,8 @@ Exports: sample: CA2G_sample_1 variable: biomass OC_SHIP: - collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: oc_shipping + - {starting: "1979-01-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: oc_shipping} + - {starting: "2019-12-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: oc_shipping} climBCDP001: collection: /dev/null climBCDP002: diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 index 841fe89b..17e7cd55 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 @@ -33,6 +33,7 @@ module CA2G_GridCompMod ! !DESCRIPTION: This module implements GOCART2G's Carbonaceous Aerosol (CA) Gridded Component. ! !REVISION HISTORY: +! 4January2024 Collow - Updated call for ChemSettling ! 15June2020 Sherman, da Silva, Darmenov, Clune - First attempt at refactoring. !EOP @@ -54,10 +55,12 @@ module CA2G_GridCompMod real :: fMonoterpenes = 0.0 ! Fraction of monoterpene emissions -> aerosol real :: fIsoprene = 0.0 ! Franction of isoprene emissions -> aerosol real :: fHydrophobic ! Initially hydrophobic portion - logical :: diurnal_bb ! diurnal biomass burning + real :: tConvPhobicToPhilic ! e-folding time [days] hydrophobic to hydrophilic + real :: tChemLoss(2) ! e-folding time [days] for parameterized chemistry loss + logical :: diurnal_bb ! diurnal biomass burning real :: eAircraftfuel ! Aircraft emission factor: go from kg fuel to kg C real :: aviation_layers(4) ! heights of the LTO, CDS and CRS layers -! !Workspae for point emissions +! !Workspace for point emissions logical :: doing_point_emissions = .false. character(len=255) :: point_emissions_srcfilen ! filename for pointwise emissions type(ThreadWorkspace), allocatable :: workspaces(:) @@ -162,6 +165,12 @@ subroutine SetServices (GC, RC) ! ---------------------------------------------- call ESMF_ConfigGetAttribute (cfg, self%myDOW, label='my_day_of_week:', default=-1, __RC__) call ESMF_ConfigGetAttribute (cfg, self%fhydrophobic, label='hydrophobic_fraction:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%tConvPhobicToPhilic, & + label='time_days_hydrophobic_to_hydrophilic:', default=2.5, __RC__) + call ESMF_ConfigFindLabel (cfg, 'time_days_chemical_destruction:', __RC__) + do i=1,size(self%tChemLoss) + call ESMF_ConfigGetAttribute (cfg, self%tChemLoss(i), default=-1., __RC__) + end do call ESMF_ConfigGetAttribute (cfg, self%ratPOM, label='pom_ca_ratio:', default=1.0, __RC__) call ESMF_ConfigGetAttribute (cfg, self%fMonoterpenes, label='monoterpenes_emission_fraction:', default=0.0, __RC__) call ESMF_ConfigGetAttribute (cfg, self%fIsoprene, label='isoprene_emission_fraction:', default=0.0, __RC__) @@ -515,9 +524,15 @@ subroutine Initialize (GC, import, export, clock, RC) ! Wet deposition call append_to_bundle(trim(comp_name)//'WT', providerState, prefix, Bundle_DP, __RC__) + if (MAPL_AM_I_ROOT()) then + write (*,*) trim(Iam)//": Wet removal scheme is "//trim(self%wet_removal_scheme) + end if ! Gravitational Settling call append_to_bundle(trim(comp_name)//'SD', providerState, prefix, Bundle_DP, __RC__) + if (MAPL_AM_I_ROOT()) then + write (*,*) trim(Iam)//": Settling scheme is "//trim(self%settling_scheme) + end if end if self%instance = instance @@ -527,6 +542,23 @@ subroutine Initialize (GC, import, export, clock, RC) call ESMF_ConfigGetAttribute (cfg, file_, label="aerosol_radBands_optics_file:", __RC__ ) self%rad_Mie = GOCART2G_Mie(trim(file_), __RC__) +! Trigger for photolysis calculations +! ----------------------------------- + call ESMF_AttributeSet (aero, name="use_photolysis_table", value=0, __RC__) + +! Create Photolysis Mie Table +! --------------------------- +! Get file names for the optical tables + call ESMF_ConfigGetAttribute (cfg, file_, & + label="aerosol_monochromatic_optics_file:", __RC__ ) + call ESMF_ConfigGetAttribute (universal_cfg, nmom_, label="n_phase_function_moments_photolysis:", default=0, __RC__) + i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_photolysis_wavelength_in_nm_from_LUT:', __RC__) + allocate (channels_(i), __STAT__ ) + call ESMF_ConfigGetAttribute (universal_cfg, channels_, & + label= "aerosol_photolysis_wavelength_in_nm_from_LUT:", __RC__) + self%phot_Mie = GOCART2G_Mie(trim(file_), channels_*1.e-9, nmom=nmom_, __RC__) + deallocate(channels_) + ! Create Diagnostics Mie Table ! ----------------------------- ! Get file names for the optical tables @@ -553,9 +585,20 @@ subroutine Initialize (GC, import, export, clock, RC) ! call ESMF_StateGet (import, 'RH2', field, __RC__) ! call MAPL_StateAdd (aero, field, __RC__) +!+++PRC + ! Add variables to CA instance aero state for chemistry + call add_aero (aero, label='effective_radius_in_microns', label2='REFF', grid=grid, typekind=MAPL_R4,__RC__) + call add_aero (aero, label='surface_area_density', label2='SAREA', grid=grid, typekind=MAPL_R4,__RC__) +!---PRC + 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 ESMF_ConfigGetAttribute (universal_cfg, nmom_, label='n_phase_function_moments_photolysis:', default=0, __RC__) + if(nmom_ > 0) then + call add_aero (aero, label='legendre_coefficients_of_p11_for_photolysis', label2='MOM', & + grid=grid, typekind=MAPL_R8, ungrid=nmom_, __RC__) + endif 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__) @@ -605,7 +648,7 @@ subroutine Run0 (GC, import, export, clock, RC) type (wrap_) :: wrap type (CA2G_GridComp), pointer :: self real, pointer, dimension(:,:,:) :: intPtr_phobic, intPtr_philic - real, pointer, dimension(:,:,:) :: ple + real, pointer, dimension(:,:,:) :: ple __Iam__('Run0') @@ -967,24 +1010,29 @@ subroutine Run2 (GC, import, export, clock, RC) character (len=ESMF_MAXSTR) :: COMP_NAME type (MAPL_MetaComp), pointer :: MAPL type (ESMF_State) :: internal + type (ESMF_State) :: aero type (wrap_) :: wrap type (CA2G_GridComp), pointer :: self type(MAPL_VarSpec), pointer :: InternalSpec(:) integer :: n real, allocatable, dimension(:,:) :: drydepositionfrequency, dqa - real :: fwet + real, pointer, dimension(:,:,:) :: casd_vel + real, dimension(3) :: rainout_eff logical :: KIN real, allocatable, dimension(:,:,:) :: pSOA_VOC real, pointer, dimension(:,:,:) :: int_ptr real, allocatable, dimension(:,:,:,:) :: int_arr character(len=2) :: GCsuffix - character(len=ESMF_MAXSTR) :: short_name + character(len=ESMF_MAXSTR) :: short_name, fld_name real, pointer, dimension(:,:,:) :: intPtr_phobic, intPtr_philic + real, pointer, dimension(:,:) :: flux_ptr real, parameter :: cpd = 1004.16 integer :: i1, j1, i2, j2, km real, target, allocatable, dimension(:,:,:) :: RH20,RH80 + integer :: settling_opt + #include "CA2G_DeclarePointer___.h" __Iam__('Run2') @@ -1009,6 +1057,9 @@ subroutine Run2 (GC, import, export, clock, RC) call MAPL_GetPointer (internal, intPtr_phobic, trim(comp_name)//'phobic', __RC__) call MAPL_GetPointer (internal, intPtr_philic, trim(comp_name)//'philic', __RC__) +! Get the aero state + call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO' , aero , __RC__) + #include "CA2G_GetPointer___.h" if (comp_name(1:5) == 'CA.oc') then @@ -1052,21 +1103,45 @@ subroutine Run2 (GC, import, export, clock, RC) end if ! Ad Hoc transfer of hydrophobic to hydrophilic aerosols -! Following Chin's parameterization, the rate constant is -! k = 4.63e-6 s-1 (.4 day-1; e-folding time = 2.5 days) - call phobicTophilic (intPtr_phobic, intPtr_philic, HYPHIL, self%km, self%cdt, MAPL_GRAV, delp, __RC__) - -! CA Settling -! ----------- +! Rate controlled in RC file; tConvPhobicToPhilic < 0 means no transfer + call phobicToPhilic (intPtr_phobic, intPtr_philic, HYPHIL, & + self%tConvPhobicToPhilic, self%km, self%cdt, MAPL_GRAV, delp, __RC__) + +! Ad Hoc chemical destruction of carbon +! This applies a simple exponential decay to both hydrophobic and +! hydrophilic modes with the time constant tChemLoss (e-folding +! time in days) do n = 1, self%nbins call MAPL_VarSpecGet(InternalSpec(n), SHORT_NAME=short_name, __RC__) call MAPL_GetPointer(internal, NAME=short_name, ptr=int_ptr, __RC__) + call carbonChemLoss (self%km, self%klid, n, self%cdt, MAPL_GRAV, delp, & + self%tChemLoss(n), int_ptr, CH, __RC__) + end do + +! CA Settling +! ----------- + select case (self%settling_scheme) + case ('gocart') + settling_opt = 1 + case ('ufs') + settling_opt = 2 + case default + _ASSERT_RC(.false.,'Unsupported settling scheme: '//trim(self%settling_scheme),ESMF_RC_NOT_IMPL) + end select - call Chem_Settling (self%km, self%klid, n, self%rhFlag, self%cdt, MAPL_GRAV, & - self%radius(n)*1.e-6, self%rhop(n), int_ptr, t, airdens, & - rh2, zle, delp, SD, __RC__) + do n = 1, self%nbins + call MAPL_VarSpecGet(InternalSpec(n), SHORT_NAME=short_name, __RC__) + call MAPL_GetPointer(internal, NAME=short_name, ptr=int_ptr, __RC__) + nullify(flux_ptr) + flux_ptr => SD(:,:,n) + nullify(casd_vel) + if (associated(SD_V)) casd_vel => SD_V(:,:,:,n) + call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, n, self%cdt, MAPL_GRAV, & + int_ptr, t, airdens, & + rh2, zle, delp, flux_ptr, casd_vel, settling_scheme=settling_opt, __RC__) end do + ! CA Deposition ! ----------- allocate(dqa, mold=lwi, __STAT__) @@ -1089,14 +1164,35 @@ subroutine Run2 (GC, import, export, clock, RC) ! Large-scale Wet Removal ! ------------------------------- -! Hydrophobic mode (first tracer) is not removed - if (associated(WT)) WT(:,:,1)=0.0 KIN = .true. -! Hydrophilic mode (second tracer) is removed - fwet = 1. - call WetRemovalGOCART2G (self%km, self%klid, self%nbins, self%nbins, 2, self%cdt, GCsuffix, & - KIN, MAPL_GRAV, fwet, philic, ple, t, airdens, & - pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, WT, __RC__) + + select case (self%wet_removal_scheme) + + case ('gocart') +! Hydrophobic mode (first tracer) is not removed + if (associated(WT)) WT(:,:,1)=0.0 + +! Hydrophilic mode (second tracer) is removed + call WetRemovalGOCART2G (self%km, self%klid, self%nbins, self%nbins, 2, self%cdt, GCsuffix, & + KIN, MAPL_GRAV, self%fwet(2), philic, ple, t, airdens, & + pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, WT, __RC__) + case ('ufs') +! Both hydrophobic and hydrophilic modes can be removed + do n = 1, self%nbins + rainout_eff = 0.0 + rainout_eff(1) = self%fwet_ice(n) ! remove with ice + rainout_eff(2) = self%fwet_snow(n) ! remove with snow + rainout_eff(3) = self%fwet_rain(n) ! remove with rain + + call MAPL_VarSpecGet(InternalSpec(n), SHORT_NAME=short_name, __RC__) + call MAPL_GetPointer(internal, NAME=short_name, ptr=int_ptr, __RC__) + call WetRemovalUFS (self%km, self%klid, n, self%cdt, GCsuffix, & + KIN, MAPL_GRAV, self%radius(n), rainout_eff, self%washout_tuning, & + self%wet_radius_thr, int_ptr, ple, t, airdens, pfl_lsan, pfi_lsan, WT, __RC__) + end do + case default + _ASSERT_RC(.false.,'Unsupported wet removal scheme: '//trim(self%wet_removal_scheme),ESMF_RC_NOT_IMPL) + end select ! Compute diagnostics ! ------------------- @@ -1112,8 +1208,25 @@ subroutine Run2 (GC, import, export, clock, RC) exttau=EXTTAU,stexttau=STEXTTAU, scatau=SCATAU, stscatau=STSCATAU,& fluxu=FLUXU, fluxv=FLUXV, & conc=CONC, extcoef=EXTCOEF, scacoef=SCACOEF, bckcoef=BCKCOEF, angstrom=ANGSTR,& - aerindx=AERIDX, NO3nFlag=.false., __RC__) - + aerindx=AERIDX, NO3nFlag=.false., SAREA=SAREA, REFF=REFF, __RC__) + + if(associated(SAREA)) then + nullify(int_ptr) + call ESMF_AttributeGet(aero, name='surface_area_density', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(aero, int_ptr, trim(fld_name), __RC__) + int_ptr = SAREA + endif + endif + + if(associated(REFF)) then ! Note unit conversion below to microns + nullify(int_ptr) + call ESMF_AttributeGet(aero, name='effective_radius_in_microns', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(aero, int_ptr, trim(fld_name), __RC__) + int_ptr = REFF*1.e6 + endif + endif i1 = lbound(RH2, 1); i2 = ubound(RH2, 1) j1 = lbound(RH2, 2); j2 = ubound(RH2, 2) @@ -1224,6 +1337,7 @@ subroutine aerosol_optics(state, rc) integer, parameter :: DP=kind(1.0d0) real, dimension(:,:,:), pointer :: ple, rh real(kind=DP), dimension(:,:,:), pointer :: var + real(kind=DP), dimension(:,:,:,:), pointer :: var4d real, dimension(:,:,:), pointer :: q real, dimension(:,:,:,:), pointer :: q_4d integer, allocatable :: opaque_self(:) @@ -1235,12 +1349,14 @@ subroutine aerosol_optics(state, rc) character (len=ESMF_MAXSTR),allocatable :: aerosol_names(:) real(kind=DP), dimension(:,:,:), allocatable :: ext_s, ssa_s, asy_s ! (lon:,lat:,lev:) + real(kind=DP), dimension(:,:,:,:), allocatable :: pmom_s ! (lon:,lat:,lev:,nmom:) real :: x integer :: instance integer :: n, nbins integer :: i1, j1, i2, j2, km integer :: band - + integer :: usePhotTable + real :: wavelength integer :: i, j, k __Iam__('CA2G::aerosol_optics') @@ -1262,6 +1378,11 @@ subroutine aerosol_optics(state, rc) band = 0 call ESMF_AttributeGet(state, name='band_for_aerosol_optics', value=band, __RC__) +! Are we doing a photolysis calculation? +! -------------------------------------- + usePhotTable = 0 + call ESMF_AttributeGet (state, name='use_photolysis_table', value=usePhotTable, __RC__) + ! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) @@ -1307,7 +1428,13 @@ subroutine aerosol_optics(state, rc) address = transfer(opaque_self, address) call c_f_pointer(address, self) - call mie_ (self%rad_Mie, nbins, band, q_4d, rh, ext_s, ssa_s, asy_s, __RC__) + if (usePhotTable /= 0) then + wavelength = band*1.e-9 + allocate(pmom_s(i1:i2, j1:j2, km, self%phot_Mie%nmom), __STAT__) + call miephot_ (self%phot_Mie, nbins, wavelength, q_4d, rh, ext_s, ssa_s, pmom_s, __RC__) + else + call mie_ (self%rad_Mie, nbins, band, q_4d, rh, ext_s, ssa_s, asy_s, __RC__) + endif call ESMF_AttributeGet(state, name='extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) if (fld_name /= '') then @@ -1321,13 +1448,22 @@ subroutine aerosol_optics(state, rc) var = ssa_s(:,:,:) end if - call ESMF_AttributeGet(state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) - if (fld_name /= '') then - call MAPL_GetPointer(state, var, trim(fld_name), __RC__) - var = asy_s(:,:,:) + if (usePhotTable /= 0) then + call ESMF_AttributeGet (state, name='legendre_coefficients_of_p11_for_photolysis', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var4d, trim(fld_name), __RC__) + var4d = pmom_s(:,:,:,:) + end if + else + call ESMF_AttributeGet (state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = asy_s(:,:,:) + end if end if deallocate(ext_s, ssa_s, asy_s, __STAT__) + if (usePhotTable /= 0) deallocate(pmom_s, __STAT__) deallocate(q_4d, __STAT__) RETURN_(ESMF_SUCCESS) @@ -1364,8 +1500,8 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) call mie%Query( band, l, q(:,:,:,l), rh, tau=bext, gasym=gasym, ssa=bssa, __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 + bssa_s = bssa_s + (bssa*bext) ! scattering + basym_s = basym_s + gasym*(bssa*bext) ! asymmetry parameter multiplied by scattering end do @@ -1373,6 +1509,47 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) end subroutine mie_ + subroutine miephot_(mie, nbins, wavelength, q, rh, bext_s, bssa_s, bpmom_s, rc) + + implicit none + + type(GOCART2G_Mie), intent(inout) :: mie ! mie table + integer, intent(in ) :: nbins ! number of bins + real, intent(in ) :: wavelength ! wavelength in nm + real, intent(in ) :: q(:,:,:,:) ! aerosol mass mixing ratio, kg kg-1 + real, intent(in ) :: rh(:,:,:) ! relative humidity + real(kind=DP), intent( out) :: bext_s (size(ext_s,1),size(ext_s,2),size(ext_s,3)) + real(kind=DP), intent( out) :: bssa_s (size(ext_s,1),size(ext_s,2),size(ext_s,3)) + real(kind=DP), intent( out) :: bpmom_s(size(pmom_s,1),size(pmom_s,2),size(pmom_s,3),size(pmom_s,4)) + integer, intent( out) :: rc + + ! local + integer :: l, m + real :: bext (size(ext_s,1),size(ext_s,2),size(ext_s,3)) ! extinction + real :: bssa (size(ext_s,1),size(ext_s,2),size(ext_s,3)) ! SSA + real :: pmom (size(pmom_s,1),size(pmom_s,2),size(pmom_s,3),size(pmom_s,4),6) + + __Iam__('CA2G::aerosol_optics::miephot_') + + bext_s = 0.0d0 + bssa_s = 0.0d0 + bpmom_s = 0.0d0 + + do l = 1, nbins + ! tau is converted to bext + call mie%Query(wavelength, l, q(:,:,:,l), rh, tau=bext, pmom=pmom, ssa=bssa, __RC__) + bext_s = bext_s + bext ! extinction + bssa_s = bssa_s + (bssa*bext) ! scattering + do m = 1, mie%nmom + bpmom_s(:,:,:,m) = bpmom_s(:,:,:,m) + pmom(:,:,:,m,1)*(bssa*bext) ! moments multiplied by scattering + enddo + end do + + + RETURN_(ESMF_SUCCESS) + + end subroutine miephot_ + end subroutine aerosol_optics !------------------------------------------------------------------------------------- @@ -1423,7 +1600,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__) diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc deleted file mode 100644 index 1020ab94..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc +++ /dev/null @@ -1,128 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| - -#========== 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 -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 /dev/null - -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 /dev/null - -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 /dev/null - -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 /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 =========================================== -# ORGANIC CARBON -# --------------- -# Biomass burning -- QFED-v2.x -OC_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.778 biomass /dev/null - -# Biofuel Source -- Included in AeroCom anthropogenic emissions -OC_BIOFUEL NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -OC_ANTEOC1 NA N Y %y4-%m2-%d2t12:00:00 none none oc_nonenergy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 -OC_ANTEOC2 NA N Y %y4-%m2-%d2t12:00:00 none none oc_energy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - -# EDGAR based ship emissions -OC_SHIP NA N Y %y4-%m2-%d2t12:00:00 none none oc_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - -# Aircraft fuel consumption -OC_AIRCRAFT NA N Y %y4-%m2-%d2t12:00:00 none none oc_aviation ExtData/chemistry/CEDS/v2021-04-21-revised/L72/OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - -# Aviation emissions during the three phases of flight -OC_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -OC_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -OC_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null - -# SOA production -pSOA_ANTHRO_VOC NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -#============================================================================================================ -# BLACK CARBON -# ------------ -# QFED v2.x -BC_BIOMASS NA 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_bc.006.%y4%m2%d2.nc4 - -# Biofuel Source -- Included in AeroCom anthropogenic emissions -BC_BIOFUEL NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -BC_ANTEBC1 NA N Y %y4-%m2-%d2t12:00:00 none none bc_nonenergy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 -BC_ANTEBC2 NA N Y %y4-%m2-%d2t12:00:00 none none bc_energy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - -# EDGAR based ship emissions -BC_SHIP NA N Y %y4-%m2-%d2t12:00:00 none none bc_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - -# Aircraft fuel consumption -BC_AIRCRAFT NA N Y %y4-%m2-%d2t12:00:00 none none bc_aviation ExtData/chemistry/CEDS/v2021-04-21-revised/L72/BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - -# Aviation emissions during the LTO, SDC and CRS phases of flight -BC_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none bc_aviation /dev/null -BC_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none bc_aviation /dev/null -BC_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none bc_aviation /dev/null - -#============================================================================================================ -# BROWN CARBON -# ------------ -# Biomass burning -- QFED-v2.x -BRC_BIOMASS NA 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_oc.006.%y4%m2%d2.nc4 - -# Terpene emission -BRC_TERPENE NA Y Y %y4-%m2-%d2t12:00:00 none none terpene /dev/null - -# Biofuel Source -- Included in AeroCom anthropogenic emissions -BRC_BIOFUEL NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -BRC_ANTEBRC1 NA Y Y %y4-%m2-%d2t12:00:00 none none anteoc1 /dev/null -BRC_ANTEBRC2 NA Y Y %y4-%m2-%d2t12:00:00 none none anteoc2 /dev/null - -# EDGAR based ship emissions -BRC_SHIP NA Y Y %y4-%m2-%d2t12:00:00 none none oc_ship /dev/null - -# Aircraft fuel consumption -BRC_AIRCRAFT NA Y Y %y4-%m2-%d2t12:00:00 none none none /dev/null - -# Aviation emissions during the three phases of flight -BRC_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -BRC_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null -BRC_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none oc_aviation /dev/null - -# SOA production -pSOA_BIOB_VOC NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -%% diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.yaml index fa96c6a9..d04c1445 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.yaml @@ -1,23 +1,32 @@ Collections: CA2G_BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/L72/BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/L72/OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" CA2G_OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" 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 - valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" + 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 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" @@ -43,23 +52,23 @@ Samplings: update_frequency: PT24H update_offset: PT12H update_reference_time: '0' + CA2G_sample_3: + extrapolation: clim + update_frequency: PT24H + update_offset: PT12H + update_reference_time: '0' + source_time: "2019-01-15T12:00/2019-12-15T00:00:00" Exports: BC_AIRCRAFT: - collection: CA2G_BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: bc_aviation + - {starting: "1979-01-15T12:00", collection: CA2G_BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: bc_aviation} + - {starting: "2019-12-15T12:00", collection: CA2G_BC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: bc_aviation} BC_ANTEBC1: - collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: bc_nonenergy + - {starting: "1979-01-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: bc_nonenergy} + - {starting: "2019-12-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: bc_nonenergy} BC_ANTEBC2: - collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: bc_energy + - {starting: "1979-01-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: bc_energy} + - {starting: "2019-12-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: bc_energy} BC_AVIATION_CDS: collection: /dev/null regrid: CONSERVE @@ -84,10 +93,8 @@ Exports: - {starting: "2014-12-01T12:00", collection: CA2G_qfed2.emis_bc.006.%y4%m2%d2.nc4, linear_transformation: [0.0, 0.778], regrid: CONSERVE, sample: CA2G_sample_1, variable: biomass} - {starting: "2021-11-01T12:00", collection: CA2G_qfed2.emis_bc.061.%y4%m2%d2.nc4, linear_transformation: [0.0, 0.778], regrid: CONSERVE, sample: CA2G_sample_1, variable: biomass} BC_SHIP: - collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: bc_shipping + - {starting: "1979-01-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: bc_shipping} + - {starting: "2019-12-15T12:00", collection: CA2G_BC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: bc_shipping} BRC_AIRCRAFT: collection: /dev/null regrid: CONSERVE @@ -137,20 +144,14 @@ Exports: sample: CA2G_sample_2 variable: terpene OC_AIRCRAFT: - collection: CA2G_OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: oc_aviation + - {starting: "1979-01-15T12:00", collection: CA2G_OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: oc_aviation} + - {starting: "2019-12-15T12:00", collection: CA2G_OC-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: oc_aviation} OC_ANTEOC1: - collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: oc_nonenergy + - {starting: "1979-01-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: oc_nonenergy} + - {starting: "2019-12-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: oc_nonenergy} OC_ANTEOC2: - collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: oc_energy + - {starting: "1979-01-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: oc_energy} + - {starting: "2019-12-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: oc_energy} OC_AVIATION_CDS: collection: /dev/null regrid: CONSERVE @@ -180,78 +181,88 @@ Exports: sample: CA2G_sample_1 variable: biomass OC_SHIP: - collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: CA2G_sample_1 - variable: oc_shipping + - {starting: "1979-01-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, sample: CA2G_sample_1, regrid: CONSERVE, variable: oc_shipping} + - {starting: "2019-12-15T12:00", collection: CA2G_OC-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: CA2G_sample_3, variable: oc_shipping} climBCDP001: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: BCDP001 climBCDP002: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: BCDP002 climBCSD001: collection: /dev/null + sample: CA2G_sample_0 + variable: BCSD001 climBCSD002: collection: /dev/null + sample: CA2G_sample_0 + variable: BCSD002 climBCSV001: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: BCSV001 climBCSV002: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: BCSV002 climBCWT001: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: BCWT001 climBCWT002: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: BCWT002 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 - 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 + variable: BCphobic climOCDP001: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: OCDP001 climOCDP002: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: OCDP002 climOCSD001: collection: /dev/null + sample: CA2G_sample_0 + variable: OCSD001 climOCSD002: collection: /dev/null + sample: CA2G_sample_0 + variable: OCSD002 climOCSV001: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: OCSV001 climOCSV002: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: OCSV002 climOCWT001: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: OCWT001 climOCWT002: - collection: /dev/null + collection: CA2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: CA2G_sample_0 + variable: OCWT002 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_StateSpecs.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc index f0fe0eb4..36c5bc0d 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc @@ -76,6 +76,9 @@ category: EXPORT #---------------------------------------------------------------------------------------- *MASS | kg kg-1 | xyz | C | | * Aerosol Mass Mixing Ratio *CONC | kg m-3 | xyz | C | | * Aerosol Mass Concentration + *SAREA | m2 m-3 | xyz | C | | * Aerosol Surface Area Density + *REFF | m | xyz | C | | * Aerosol Effective Radius + *SD_V | m s-1 | xyz | C | self%nbins | * Aerosol Settling Velocity (Bin %d) *EXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | * Aerosol Extinction Coefficient *EXTCOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | * Aerosol Extinction Coefficient - Fixed RH=20% *EXTCOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | * Aerosol Extinction Coefficient - Fixed RH=80% @@ -89,6 +92,7 @@ category: EXPORT *DP | kg m-2 s-1 | xy | N | nbins | * Aerosol Dry Deposition (Bin %d) *WT | kg m-2 s-1 | xy | N | nbins | * Aerosol Wet Deposition (Bin %d) *SV | kg m-2 s-1 | xy | N | nbins | * Aerosol Convective Scavenging (Bin %d) + *CH | kg m-2 s-1 | xy | N | nbins | * Aerosol Parameterized Chemical Loss (Bin %d) *EMAN | kg m-2 s-1 | xy | N | | * Aerosol Anthropogenic Emissions *EMBB | kg m-2 s-1 | xy | N | | * Aerosol Biomass Burning Emissions *EMBF | kg m-2 s-1 | xy | N | | * Aerosol Biofuel Emissions diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc index 3d71a2fd..125bc6c9 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc @@ -1,9 +1,9 @@ # -# Resource file for Black Carbon parameters. +# Resource file for Black Carbon parameters. # -aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_BC.v1_3.RRTMG.nc -aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_BC.v1_3.nc +aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_BC.v1_6.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_BC.v1_6.nc # Aircraft emission factor: convert input unit to kg C aircraft_fuel_emission_factor: 1.0000 @@ -14,8 +14,25 @@ aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 # Initially hydrophobic portion hydrophobic_fraction: 0.8 -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) -fscav: 0.0 0.4 +# Rate of conversion of hydrophobic to hydrophilic [days] +time_days_hydrophobic_to_hydrophilic: 2.5 + +# Rate of chemical destruction of carbon species [days] +time_days_chemical_destruction: -1. -1. + +# Wet Removal Scheme Option | gocart, ufs +wet_removal_scheme: gocart ! default value + +# Scavenging efficiency per bin [km-1] +fscav: 0.0 0.4 + +# Large scale rainout efficiency per bin for wet_removal_scheme == gocart +fwet: 0.0 1.0 + +# Rainout efficiency per bin for wet_removal_scheme == ufs +fwet_ice: 0.0 1.0 +fwet_snow: 0.0 1.0 +fwet_rain: 0.0 1.0 # Dry particle density [kg m-3] particle_density: 1800 1800 @@ -29,8 +46,6 @@ fnum: 1.50e19 1.50e19 # Number median radius [um] particle_radius_microns: 0.35 0.35 -rhFlag: 0 - # Sigma of lognormal number distribution sigma: 2.0 2.0 @@ -39,3 +54,7 @@ pressure_lid_in_hPa: 40.0 nbins: 2 point_emissions_srcfilen: /dev/null + +# SettlingSolver options +# Options: 'gocart' or 'ufs' +settling_scheme: 'gocart' diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc index 940ffd40..90b64675 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc @@ -2,8 +2,8 @@ # Resource file for Brown Carbon parameters. # -aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_BRC.v1_5.RRTMG.nc -aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_BRC.v1_5.nc +aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_BRC.v1_6.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_BRC.v1_6.nc # Aircraft emission factor: convert input unit to kg C aircraft_fuel_emission_factor: 1.0000 @@ -17,13 +17,28 @@ pom_ca_ratio: 1.8 # particle radius particle_radius_microns: 0.35 0.35 -rhFlag: 0 - # Initially hydrophobic portion hydrophobic_fraction: 0.5 -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) -fscav: 0.0 0.4 +# Rate of conversion of hydrophobic to hydrophilic [days] +time_days_hydrophobic_to_hydrophilic: 2.5 + +# Rate of chemical destruction of carbon species [days] +time_days_chemical_destruction: -1. -1. + +# Wet Removal Scheme Option | gocart, ufs +wet_removal_scheme: gocart ! default value + +# Scavenging efficiency per bin [km-1] +fscav: 0.0 0.4 + +# Large scale rainout efficiency per bin for wet_removal_scheme == gocart +fwet: 0.0 1.0 + +# Rainout efficiency per bin for wet_removal_scheme == ufs +fwet_ice: 0.0 0.4 +fwet_snow: 0.0 0.4 +fwet_rain: 0.0 0.4 # Dry particle density [kg m-3] particle_density: 1800 1800 @@ -39,6 +54,10 @@ sigma: 2.20 2.20 pressure_lid_in_hPa: 40.0 -nbins: 2 +nbins: 2 point_emissions_srcfilen: /dev/null + +# SettlingSolver options +# Options: 'gocart' or 'ufs' +settling_scheme: 'gocart' diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc index a716a160..0c23ef76 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc @@ -1,9 +1,9 @@ # -# Resource file for Organic Carbon parameters. +# Resource file for Organic Carbon parameters. # -aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_OC.v1_3.RRTMG.nc -aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_OC.v1_3.nc +aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_OC.v1_6.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_OC.v1_6.nc # Aircraft emission factor: convert input unit to kg C aircraft_fuel_emission_factor: 1.0000 @@ -21,13 +21,28 @@ pom_ca_ratio: 1.8 # particle radius particle_radius_microns: 0.35 0.35 -rhFlag: 0 - # Initially hydrophobic portion hydrophobic_fraction: 0.5 -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) -fscav: 0.0 0.4 +# Rate of conversion of hydrophobic to hydrophilic [days] +time_days_hydrophobic_to_hydrophilic: 2.5 + +# Rate of chemical destruction of carbon species [days] +time_days_chemical_destruction: -1. -1. + +# Wet Removal Scheme Option | gocart, ufs +wet_removal_scheme: gocart ! default value + +# Scavenging efficiency per bin [km-1] +fscav: 0.0 0.4 + +# Large scale rainout efficiency per bin for wet_removal_scheme == gocart +fwet: 0.0 1.0 + +# Rainout efficiency per bin for wet_removal_scheme == ufs +fwet_ice: 0.0 1.0 +fwet_snow: 0.0 1.0 +fwet_rain: 0.0 1.0 # Dry particle density [kg m-3] particle_density: 1800 1800 @@ -43,6 +58,10 @@ sigma: 2.20 2.20 pressure_lid_in_hPa: 40.0 -nbins: 2 +nbins: 2 point_emissions_srcfilen: /dev/null + +# SettlingSolver options +# Options: 'gocart' or 'ufs' +settling_scheme: 'gocart' diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMakeLists.txt index f640df6f..83bb6024 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMakeLists.txt +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMakeLists.txt @@ -2,7 +2,7 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES MAPL GA_Environment Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES MAPL GA_Environment Chem_Shared2G Process_Library ESMF::ESMF NetCDF::NetCDF_Fortran) mapl_acg (${this} CA2G_StateSpecs.rc IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS diff --git a/ESMF/GOCART2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/CMakeLists.txt index 0df44f66..c6a06179 100644 --- a/ESMF/GOCART2G_GridComp/CMakeLists.txt +++ b/ESMF/GOCART2G_GridComp/CMakeLists.txt @@ -15,13 +15,13 @@ set (srcs set (resource_files GOCART2G_GridComp.rc - ) + ) -install( FILES ${resource_files} +install( FILES ${resource_files} DESTINATION etc ) -set (dependencies MAPL Chem_Shared2G Process_Library esmf) +set (dependencies MAPL Chem_Shared2G Process_Library ESMF::ESMF) esma_add_library (${this} SRCS ${srcs} SUBCOMPONENTS ${alldirs} diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP.20C/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP.20C/DU2G_GridComp_ExtData.rc deleted file mode 120000 index 7d86d9a2..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP.20C/DU2G_GridComp_ExtData.rc +++ /dev/null @@ -1 +0,0 @@ -../DU2G_GridComp_ExtData.rc \ No newline at end of file diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP/DU2G_GridComp_ExtData.rc deleted file mode 120000 index 7d86d9a2..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/AMIP/DU2G_GridComp_ExtData.rc +++ /dev/null @@ -1 +0,0 @@ -../DU2G_GridComp_ExtData.rc \ No newline at end of file diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMakeLists.txt index f3662b33..ac8e86f5 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMakeLists.txt +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMakeLists.txt @@ -2,10 +2,10 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES GA_Environment MAPL Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES GA_Environment MAPL Chem_Shared2G Process_Library ESMF::ESMF NetCDF::NetCDF_Fortran) -mapl_acg (${this} DU2G_StateSpecs.rc - IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS +mapl_acg (${this} DU2G_StateSpecs.rc + IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS GET_POINTERS DECLARE_POINTERS) file (GLOB_RECURSE rc_files CONFIGURE_DEPENDS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.rc *.yaml) diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 index 8a6d79f8..d8b303ca 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 @@ -32,6 +32,7 @@ module DU2G_GridCompMod ! !DESCRIPTION: This module implements GOCART's Dust (DU) Gridded Component. ! !REVISION HISTORY: +! 4January2024 Collow - Updated call for ChemSettling ! 16Oct2019 Sherman, da Silva, Darmenov, Clune - First attempt at refactoring !EOP @@ -58,7 +59,10 @@ module DU2G_GridCompMod real, allocatable :: sdist(:) ! FENGSHA aerosol fractional size distribution [1] real :: alpha ! FENGSHA scaling factor real :: gamma ! FENGSHA tuning exponent + integer :: drag_opt ! FENGSHA drag option 1 - input only, 2 - Darmenova, 3 - Leung real :: kvhmax ! FENGSHA max. vertical/horizontal mass flux ratio [1] + real :: f_sdl ! FENGSHA drylimit tuning factor + integer :: distribution_opt ! FENGSHA distribution option 1 - Kok, 2 - Kok 2021, 3 - Meng 2022 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 @@ -119,6 +123,7 @@ subroutine SetServices (GC, RC) logical :: data_driven = .true. logical :: file_exists integer :: num_threads + character(len=255) :: msg __Iam__('SetServices') @@ -160,6 +165,8 @@ subroutine SetServices (GC, RC) call ESMF_ConfigGetAttribute (cfg, self%rlow, label='radius_lower:', __RC__) call ESMF_ConfigGetAttribute (cfg, self%rup, label='radius_upper:', __RC__) + ! Choose Emission Scheme + !----------------------- call ESMF_ConfigGetAttribute (cfg, emission_scheme, label='emission_scheme:', default='ginoux', __RC__) self%emission_scheme = ESMF_UtilStringLowerCase(trim(emission_scheme), __RC__) @@ -168,7 +175,7 @@ subroutine SetServices (GC, RC) if (MAPL_AM_I_ROOT()) then write (*,*) trim(Iam)//": Dust emission scheme is "//trim(self%emission_scheme) end if - + ! Point Sources call ESMF_ConfigGetAttribute (cfg, self%point_emissions_srcfilen, & label='point_emissions_srcfilen:', default='/dev/null', __RC__) if ( (index(self%point_emissions_srcfilen,'/dev/null')>0) ) then @@ -181,9 +188,22 @@ subroutine SetServices (GC, RC) ! -------------------------------- select case (self%emission_scheme) case ('fengsha') - call ESMF_ConfigGetAttribute (cfg, self%alpha, label='alpha:', __RC__) - call ESMF_ConfigGetAttribute (cfg, self%gamma, label='gamma:', __RC__) - call ESMF_ConfigGetAttribute (cfg, self%kvhmax, label='vertical_to_horizontal_flux_ratio_limit:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%alpha, label='alpha:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%gamma, label='gamma:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%f_swc, label='soil_moisture_factor:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%f_sdl, label='soil_drylimit_factor:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%kvhmax, label='vertical_to_horizontal_flux_ratio_limit:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%drag_opt, label='drag_partition_option:', __RC__) + + if (MAPL_AM_I_ROOT()) then + write (*,*) "FENGSHA: config: alpha: " , self%alpha + write (*,*) "FENGSHA: config: gamma: " , self%gamma + write (*,*) "FENGSHA: config: soil_moisture_factor: " , self%f_swc + write (*,*) "FENGSHA: config: soil_drylimit_factor: " , self%f_sdl + write (*,*) "FENGSHA: config: vertical_to_horizontal_flux_ratio_limit: " , self%kvhmax + write (*,*) "FENGSHA: config: drag_partition_option: " , self%drag_opt + end if + case ('k14') call ESMF_ConfigGetAttribute (cfg, self%clayFlag, label='clayFlag:', __RC__) call ESMF_ConfigGetAttribute (cfg, self%f_swc, label='soil_moisture_factor:', __RC__) @@ -223,7 +243,7 @@ subroutine SetServices (GC, RC) vlocation=MAPL_VlocationCenter, & restart=MAPL_RestartOptional, & ungridded_dims=[self%nbins], & - friendlyto='DYNAMICS:TURBULENCE:MOIST', & +! friendlyto='DYNAMICS:TURBULENCE:MOIST', & add2export=.true., __RC__) ! Pressure at layer edges @@ -302,6 +322,11 @@ subroutine SetServices (GC, RC) #include "DU2G_Import___.h" end associate #include "DU2G_Internal___.h" + if (MAPL_AM_I_ROOT()) then + write (*,*) trim(Iam)//": Wet removal scheme is "//trim(self%wet_removal_scheme) + write (*,*) trim(Iam)//": Settling scheme is "//trim(self%settling_scheme) + end if + end if ! This state holds fields needed by radiation @@ -409,8 +434,8 @@ subroutine Initialize (GC, import, export, clock, RC) self => wrap%ptr ! Global dimensions are needed here for choosing tuning parameters -! ---------------------------------------------------------------- - call MAPL_GridGet (grid, globalCellCountPerDim=dims, __RC__ ) +! ---------------------------------------------------------------- + call MAPL_GridGet (grid, globalCellCountPerDim=dims, __RC__ ) ! Dust emission tuning coefficient [kg s2 m-5]. NOT bin specific. ! TO DO: find a more robust way to implement resolution dependent tuning @@ -528,6 +553,23 @@ subroutine Initialize (GC, import, export, clock, RC) call ESMF_ConfigGetAttribute (cfg, file_, label="aerosol_radBands_optics_file:", __RC__ ) self%rad_Mie = GOCART2G_Mie(trim(file_), __RC__) +! Trigger for photolysis calculations +! ----------------------------------- + call ESMF_AttributeSet (aero, name="use_photolysis_table", value=0, __RC__) + +! Create Photolysis Mie Table +! --------------------------- +! Get file names for the optical tables + call ESMF_ConfigGetAttribute (cfg, file_, & + label="aerosol_monochromatic_optics_file:", __RC__ ) + call ESMF_ConfigGetAttribute (universal_cfg, nmom_, label="n_phase_function_moments_photolysis:", default=0, __RC__) + i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_photolysis_wavelength_in_nm_from_LUT:', __RC__) + allocate (channels_(i), __STAT__ ) + call ESMF_ConfigGetAttribute (universal_cfg, channels_, & + label= "aerosol_photolysis_wavelength_in_nm_from_LUT:", __RC__) + self%phot_Mie = GOCART2G_Mie(trim(file_), channels_*1.e-9, nmom=nmom_, __RC__) + deallocate(channels_) + ! Create Diagnostics Mie Table ! ----------------------------- ! Get file names for the optical tables @@ -548,14 +590,15 @@ subroutine Initialize (GC, import, export, clock, RC) ! -------------------------------------------------------------------------------------- call add_aero (aero, label='air_pressure_for_aerosol_optics', label2='PLE', grid=grid, typekind=MAPL_R4, __RC__) call add_aero (aero, label='relative_humidity_for_aerosol_optics', label2='RH', grid=grid, typekind=MAPL_R4, __RC__) -! call ESMF_StateGet (import, 'PLE', field, __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 ESMF_ConfigGetAttribute (universal_cfg, nmom_, label='n_phase_function_moments_photolysis:', default=0, __RC__) + if(nmom_ > 0) then + call add_aero (aero, label='legendre_coefficients_of_p11_for_photolysis', label2='MOM', & + grid=grid, typekind=MAPL_R8, ungrid=nmom_, __RC__) + endif 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__) @@ -788,9 +831,8 @@ subroutine Run1 (GC, import, export, clock, RC) ! Set du_src to 0 where undefined ! -------------------------------- - if (associated(du_src)) then - where (1.01*du_src > MAPL_UNDEF) du_src = 0. - endif + where (1.01*du_src > MAPL_UNDEF) du_src = 0. + ! Get dimensions ! --------------- import_shape = shape(wet1) @@ -845,10 +887,11 @@ subroutine Run1 (GC, import, export, clock, RC) if (associated(DU_EROD)) DU_EROD = f_erod_ case ('fengsha') - call DustEmissionFENGSHA (frlake, frsnow, lwi, slc, du_clay, du_sand, du_silt, & - du_ssm, du_rdrag, airdens(:,:,self%km), ustar, du_uthres, & - self%alpha, self%gamma, self%kvhmax, MAPL_GRAV, & - self%rhop, self%sdist, emissions_surface, __RC__) + call DustEmissionFENGSHA (frlake, frsnow, lwi, slc, du_clay, du_sand, du_silt, & + du_ssm, du_rdrag, airdens(:,:,self%km), ustar, du_gvf, du_lai, du_uthres, & + self%alpha, self%gamma, self%kvhmax, MAPL_GRAV, & + self%rhop, self%sdist, self%f_sdl, self%f_swc, self%drag_opt, emissions_surface, __RC__) + case ('ginoux') call DustEmissionGOCART2G(self%radius*1.e-6, frlake, wet1, lwi, u10m, v10m, & @@ -951,12 +994,15 @@ subroutine Run2 (GC, import, export, clock, RC) integer :: n real, allocatable, dimension(:,:) :: drydepositionfrequency, dqa - real :: fwet + real, pointer, dimension(:,:,:) :: dusd_vel logical :: KIN integer :: i1, j1, i2, j2, km + real, dimension(3) :: rainout_eff real, parameter :: cpd = 1004.16 real, target, allocatable, dimension(:,:,:) :: RH20,RH80 + real, pointer, dimension(:,:) :: flux_ptr + integer :: settling_opt #include "DU2G_DeclarePointer___.h" __Iam__('Run2') @@ -997,12 +1043,24 @@ subroutine Run2 (GC, import, export, clock, RC) ! Dust Settling ! ------------- - do n = 1, self%nbins - call Chem_Settling (self%km, self%klid, n, self%rhFlag, self%cdt, MAPL_GRAV, & - self%radius(n)*1.e-6, self%rhop(n), DU(:,:,:,n), t, airdens, & - rh2, zle, delp, DUSD, correctionMaring=self%maringFlag, __RC__) - + select case (self%settling_scheme) + case ('gocart') + settling_opt = 1 + case ('ufs') + settling_opt = 2 + case default + _ASSERT_RC(.false.,'Unsupported settling scheme: '//trim(self%settling_scheme),ESMF_RC_NOT_IMPL) + end select + do n = 1, self%nbins + nullify(flux_ptr) + if (associated(DUSD)) flux_ptr => DUSD(:,:,n) + nullify(dusd_vel) + if (associated(DUSD_V)) dusd_vel => DUSD_V(:,:,:,n) + call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, n, self%cdt, MAPL_GRAV, & + DU(:,:,:,n), t, airdens, & + rh2, zle, delp, flux_ptr, dusd_vel, correctionMaring=self%maringFlag, & + settling_scheme=settling_opt, __RC__) end do ! Dust Deposition @@ -1027,12 +1085,26 @@ subroutine Run2 (GC, import, export, clock, RC) ! Dust Large-scale Wet Removal ! ---------------------------- KIN = .TRUE. - do n = 1, self%nbins - fwet = 1.0 - call WetRemovalGOCART2G(self%km, self%klid, self%nbins, self%nbins, n, self%cdt, 'dust', & - KIN, MAPL_GRAV, fwet, DU(:,:,:,n), ple, t, airdens, & - pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, DUWT, __RC__) - end do + select case (self%wet_removal_scheme) + case ('gocart') + do n = 1, self%nbins + call WetRemovalGOCART2G(self%km, self%klid, self%nbins, self%nbins, n, self%cdt, 'dust', & + KIN, MAPL_GRAV, self%fwet(n), DU(:,:,:,n), ple, t, airdens, & + pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, DUWT, __RC__) + end do + case ('ufs') + rainout_eff = 0.0 + do n = 1, self%nbins + rainout_eff(1) = self%fwet_ice(n) ! remove with ice + rainout_eff(2) = self%fwet_snow(n) ! remove with snow + rainout_eff(3) = self%fwet_rain(n) ! remove with rain + call WetRemovalUFS (self%km, self%klid, n, self%cdt, 'dust', KIN, MAPL_GRAV, & + self%radius(n), rainout_eff, self%washout_tuning, self%wet_radius_thr, & + DU(:,:,:,n), ple, t, airdens, pfl_lsan, pfi_lsan, DUWT, __RC__) + end do + case default + _ASSERT_RC(.false.,'Unsupported wet removal scheme: '//trim(self%wet_removal_scheme),ESMF_RC_NOT_IMPL) + end select ! Compute diagnostics ! ------------------- @@ -1150,6 +1222,7 @@ subroutine aerosol_optics(state, rc) integer, parameter :: DP=kind(1.0d0) real, dimension(:,:,:), pointer :: ple, rh real(kind=DP), dimension(:,:,:), pointer :: var + real(kind=DP), dimension(:,:,:,:), pointer :: var4d real, dimension(:,:,:,:), pointer :: q, q_4d integer, allocatable :: opaque_self(:) type(C_PTR) :: address @@ -1159,11 +1232,14 @@ subroutine aerosol_optics(state, rc) type(ESMF_Field) :: fld real(kind=DP), dimension(:,:,:), allocatable :: ext_s, ssa_s, asy_s ! (lon:,lat:,lev:) + real(kind=DP), dimension(:,:,:,:), allocatable :: pmom_s ! (lon:,lat:,lev:,nmom:) real, dimension(:,:,:), allocatable :: x integer :: instance integer :: n, nbins integer :: i1, j1, i2, j2, km integer :: band + integer :: usePhotTable + real :: wavelength integer :: k @@ -1180,6 +1256,11 @@ subroutine aerosol_optics(state, rc) band = 0 call ESMF_AttributeGet (state, name='band_for_aerosol_optics', value=band, __RC__) +! Are we doing a photolysis calculation? +! -------------------------------------- + usePhotTable = 0 + call ESMF_AttributeGet (state, name='use_photolysis_table', value=usePhotTable, __RC__) + ! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet (state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) @@ -1224,7 +1305,13 @@ subroutine aerosol_optics(state, rc) address = transfer(opaque_self, address) call c_f_pointer(address, self) - call mie_ (self%rad_Mie, nbins, band, q_4d, rh, ext_s, ssa_s, asy_s, __RC__) + if (usePhotTable /= 0) then + wavelength = band*1.e-9 + allocate(pmom_s(i1:i2, j1:j2, km, self%phot_Mie%nmom), __STAT__) + call miephot_ (self%phot_Mie, nbins, wavelength, q_4d, rh, ext_s, ssa_s, pmom_s, __RC__) + else + call mie_ (self%rad_Mie, nbins, band, q_4d, rh, ext_s, ssa_s, asy_s, __RC__) + endif call ESMF_AttributeGet (state, name='extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) if (fld_name /= '') then @@ -1238,13 +1325,22 @@ subroutine aerosol_optics(state, rc) var = ssa_s(:,:,:) end if - call ESMF_AttributeGet (state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) - if (fld_name /= '') then - call MAPL_GetPointer (state, var, trim(fld_name), __RC__) - var = asy_s(:,:,:) + if (usePhotTable /= 0) then + call ESMF_AttributeGet (state, name='legendre_coefficients_of_p11_for_photolysis', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var4d, trim(fld_name), __RC__) + var4d = pmom_s(:,:,:,:) + end if + else + call ESMF_AttributeGet (state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = asy_s(:,:,:) + end if end if deallocate(ext_s, ssa_s, asy_s, __STAT__) + if (usePhotTable /= 0) deallocate(pmom_s, __STAT__) deallocate(q_4d, __STAT__) RETURN_(ESMF_SUCCESS) @@ -1281,14 +1377,55 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) ! tau is converted to bext call mie%Query(band, l, q(:,:,:,l), rh, tau=bext, gasym=gasym, ssa=bssa, __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 + bssa_s = bssa_s + (bssa*bext) ! scattering + basym_s = basym_s + gasym*(bssa*bext) ! asymmetry parameter multiplied by scattering end do RETURN_(ESMF_SUCCESS) end subroutine mie_ + subroutine miephot_(mie, nbins, wavelength, q, rh, bext_s, bssa_s, bpmom_s, rc) + + implicit none + + type(GOCART2G_Mie), intent(inout) :: mie ! mie table + integer, intent(in ) :: nbins ! number of bins + real, intent(in ) :: wavelength ! wavelength in nm + real, intent(in ) :: q(:,:,:,:) ! aerosol mass mixing ratio, kg kg-1 + real, intent(in ) :: rh(:,:,:) ! relative humidity + real(kind=DP), intent( out) :: bext_s (size(ext_s,1),size(ext_s,2),size(ext_s,3)) + real(kind=DP), intent( out) :: bssa_s (size(ext_s,1),size(ext_s,2),size(ext_s,3)) + real(kind=DP), intent( out) :: bpmom_s(size(ext_s,1),size(ext_s,2),size(ext_s,3),size(pmom_s,4)) + integer, intent( out) :: rc + + ! local + integer :: l, m + real :: bext (size(ext_s,1),size(ext_s,2),size(ext_s,3)) ! extinction + real :: bssa (size(ext_s,1),size(ext_s,2),size(ext_s,3)) ! SSA + real :: pmom (size(ext_s,1),size(ext_s,2),size(ext_s,3),size(pmom_s,4),6) + + __Iam__('DU2G::aerosol_optics::miephot_') + + bext_s = 0.0d0 + bssa_s = 0.0d0 + bpmom_s = 0.0d0 + + do l = 1, nbins + ! tau is converted to bext + call mie%Query(wavelength, l, q(:,:,:,l), rh, tau=bext, pmom=pmom, ssa=bssa, __RC__) + bext_s = bext_s + bext ! extinction + bssa_s = bssa_s + (bssa*bext) ! scattering + do m = 1, mie%nmom + bpmom_s(:,:,:,m) = bpmom_s(:,:,:,m) + pmom(:,:,:,m,1)*(bssa*bext) ! moments multiplied by scattering + enddo + end do + + + RETURN_(ESMF_SUCCESS) + + end subroutine miephot_ + end subroutine aerosol_optics !------------------------------------------------------------------------------------- diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc deleted file mode 100644 index 4293cbc3..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc +++ /dev/null @@ -1,52 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -DU_SRC NA N Y - none none du_src ExtData/chemistry/DUST/v0.0.0/sfc/gocart.dust_source.v5a.x1152_y721.nc -#DU_SRC NA N Y - 0.0 2.0 du_src ExtData/chemistry/DUST/v0.0.0/sfc/australia.k14_dust_source.v5a.x1152_y721.nc -DU_CLAY NA N Y - none none clay ExtData/chemistry/DUST/v0.0.0/sfc/_gldas-fao.soil_texture.x1152_y721_t1.nc4 -DU_SILT NA N Y - none none silt ExtData/chemistry/DUST/v0.0.0/sfc/_gldas-fao.soil_texture.x1152_y721_t1.nc4 -DU_SAND NA N Y - none none sand ExtData/chemistry/DUST/v0.0.0/sfc/_gldas-fao.soil_texture.x1152_y721_t1.nc4 -DU_TEXTURE NA N V - none none texture ExtData/chemistry/DUST/v0.0.0/sfc/_gldas-fao.soil_category.x1152_y721_t1.nc4 -DU_VEG NA N V - none none domveg ExtData/chemistry/DUST/v0.0.0/sfc/veg20.x1152_y721_t1.nc4 -DU_Z0 NA N Y - none none roughness ExtData/chemistry/DUST/v0.0.0/sfc/arlems-roughness.x1151_y720_t1.nc4 - -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 - -# DU data - 2D -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_StateSpecs.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc index d5fc35fc..2177f905 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc @@ -9,7 +9,8 @@ category: IMPORT #------------------------------------------------------------------------------------------------------- DU_SRC | 1 | xy | N | SKIP | scheme == 'ginoux' .OR. scheme == 'k14' | erod - dust emissions DU_Z0 | 1 | xy | N | SKIP | scheme == 'k14' | aerodynamic_surface_roughness_for_aeolian_processes - DU_GVF | 1 | xy | N | OPT | scheme == 'k14' | GVF + DU_GVF | 1 | xy | N | OPT | scheme == 'fengsha' .OR. scheme == 'k14' | GVF + DU_LAI | 1 | xy | N | OPT | scheme == 'fengsha' | LAI DU_SAND | 1 | xy | N | SKIP | scheme == 'fengsha' .OR. scheme == 'k14' | volume_fraction_of_sand_in_soil DU_SILT | 1 | xy | N | SKIP | scheme == 'fengsha' .OR. scheme == 'k14' | volume_fraction_of_silt_in_soil DU_CLAY | 1 | xy | N | SKIP | scheme == 'fengsha' .OR. scheme == 'k14' | volume_fraction_of_clay_in_soil @@ -61,6 +62,7 @@ category: EXPORT DUMASS | kg kg-1 | xyz | C | | Dust Mass Mixing Ratio DUMASS25 | kg kg-1 | xyz | C | | Dust Mass Mixing Ratio DUCONC | kg m-3 | xyz | C | | Dust Mass Concentration + DUSD_V | m s-1 | xyz | C | self%nbins | Dust Settling Velocity (Bin %d) DUEXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Dust Extinction Coefficient DUEXTCOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | Dust Extinction Coefficient - Fixed RH=20% DUEXTCOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | Dust Extinction Coefficient - Fixed RH=80% diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc index 87d178ec..b076fcfb 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc @@ -1,9 +1,9 @@ # -# Resource file Dust parameters. +# Resource file Dust parameters. # -aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_DU.v15_3.RRTMG.nc -aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_DU.v15_3.nc +aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_DU.v15_6.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_DU.v15_6.nc particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 @@ -18,7 +18,7 @@ particle_density: 2500. 2650. 2650. 2650. 2650. # ----------------------- emission_scheme: ginoux Ch_DU: 0.20 0.15 0.10 0.09 0.080 0.070 # L181 values for (a,b,c,d,e,f) -#Ch_DU: 0.30 0.30 0.11 0.11 0.110 0.088 # L072 values for (a,b,c,d,e,f) +#Ch_DU: 0.30 0.30 0.11 0.11 0.110 0.088 # L072 values for (a,b,c,d,e,f) # source_fraction: 0.0435465 0.106903 0.220117 0.484606 0.144828 source_fraction: 0.1 0.25 0.25 0.25 0.25 @@ -41,25 +41,41 @@ soil_moisture_factor: 0.8 # clay fraction scaling factor soil_clay_factor: 1.0 +# Wet Removal Scheme Option | gocart, ufs +wet_removal_scheme: gocart ! default value + # Scavenging efficiency per bin [km-1] fscav: 0.2 0.2 0.2 0.2 0.2 +# Large scale rainout efficiency per bin for wet_removal_scheme == gocart +fwet: 1.0 1.0 1.0 1.0 1.0 + +# Rainout efficiency per bin for wet_removal_scheme == ufs +fwet_ice: 0.8 0.8 0.8 1.0 1.0 +fwet_snow: 0.8 0.8 0.8 1.0 1.0 +fwet_rain: 0.8 0.8 0.8 1.0 1.0 + # Molecular weight of species [kg mole-1] molecular_weight: 0.1 0.1 0.1 0.1 0.1 # Number of particles per kg mass fnum: 2.45e14 3.28e13 6.52e12 9.89e11 1.76e11 -rhFlag: 0 - # Maring settling velocity correction -maringFlag: .true. +maringFlag: .true. nbins: 5 pressure_lid_in_hPa: 40.0 # FENGSHA settings -alpha: 0.3 -gamma: 1.3 +alpha: 0.16 +gamma: 1 +soil_moisture_factor: 1.0 +soil_drylimit_factor: 1.0 vertical_to_horizontal_flux_ratio_limit: 2.e-04 +drag_partition_option: 2 + +# SettlingSolver options +# Options: 'gocart' or 'ufs' +settling_scheme: 'gocart' diff --git a/ESMF/GOCART2G_GridComp/GA_Environment/CMakeLists.txt b/ESMF/GOCART2G_GridComp/GA_Environment/CMakeLists.txt index c95604f2..c63aea96 100644 --- a/ESMF/GOCART2G_GridComp/GA_Environment/CMakeLists.txt +++ b/ESMF/GOCART2G_GridComp/GA_Environment/CMakeLists.txt @@ -2,7 +2,7 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES MAPL Chem_Shared2G Process_Library esmf + DEPENDENCIES MAPL Chem_Shared2G Process_Library ESMF::ESMF ) # CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280 diff --git a/ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90 b/ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90 index bfac0c34..43e314a8 100644 --- a/ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90 +++ b/ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90 @@ -12,13 +12,19 @@ module GA_EnvironmentMod public :: GA_Environment type :: GA_Environment - type(GOCART2G_Mie) :: rad_Mie, diag_Mie + type(GOCART2G_Mie) :: rad_Mie, diag_Mie, phot_Mie real, allocatable :: radius(:) ! particle effective radius [um] real, allocatable :: rhop(:) ! soil class density [kg m-3] real, allocatable :: fscav(:) ! scavenging efficiency + real, allocatable :: fwet(:) ! large scale wet removal efficiency (GOCART) ! logical :: scav_byColdCloud ! new flag example - real, allocatable :: molwght(:) ! molecular weight !NOT UNIVERSAL ONLY FOR GASES, + real, allocatable :: molwght(:) ! molecular weight !NOT UNIVERSAL ONLY FOR GASES, real, allocatable :: fnum(:) ! number of particles per kg mass + real, allocatable :: fwet_ice(:) ! large scale wet removal scaling factor for ice (UFS) + real, allocatable :: fwet_snow(:) ! large scale wet removal scaling factor for snow (UFS) + real, allocatable :: fwet_rain(:) ! large scale wet removal scaling factor for rain (UFS) + real :: washout_tuning ! tuning factor for washout process (1 by default) + real :: wet_radius_thr ! wet radius threshold [um] integer :: rhFlag integer :: nbins integer :: km ! vertical grid dimension @@ -26,6 +32,8 @@ module GA_EnvironmentMod integer :: instance ! data or computational instance real :: plid ! pressure lid [hPa] integer :: klid ! vertical index of pressure lid + character(:), allocatable :: wet_removal_scheme ! name of wet removal scheme + character(:), allocatable :: settling_scheme ! settling option (1 - use SettlingSolver, 2 - use SettlingSolverUFS) real, allocatable :: wavelengths_profile(:) ! wavelengths for profile aop [nm] real, allocatable :: wavelengths_vertint(:) ! wavelengths for vertically integrated aop [nm] contains @@ -47,6 +55,10 @@ subroutine load_from_config(self, cfg, universal_cfg, rc) type(ESMF_Config), intent(inout) :: universal_cfg integer, optional, intent(out) :: rc + ! Local variables + character(len=ESMF_MAXSTR) :: wet_removal_scheme + character(len=ESMF_MAXSTR) :: settling_scheme + ! Get nbins from cfg call ESMF_ConfigGetAttribute (cfg, self%nbins, label='nbins:', __RC__) nbins = self%nbins @@ -56,22 +68,62 @@ subroutine load_from_config(self, cfg, universal_cfg, rc) ! Parse config file into private internal state ! ---------------------------------------------- - allocate(self%radius(nbins), self%rhop(nbins), self%fscav(nbins), self%molwght(nbins), & - self%fnum(nbins), self%wavelengths_profile(n_wavelengths_profile), & + allocate(self%radius(nbins), self%rhop(nbins), self%fscav(nbins), self%fwet(nbins), self%molwght(nbins), & + self%fnum(nbins), self%fwet_ice(nbins), self%fwet_snow(nbins), self%fwet_rain(nbins), & + self%wavelengths_profile(n_wavelengths_profile), & self%wavelengths_vertint(n_wavelengths_vertint), & __STAT__) - + call ESMF_ConfigGetAttribute (cfg, self%radius, label='particle_radius_microns:', __RC__) call ESMF_ConfigGetAttribute (cfg, self%rhop, label='particle_density:', __RC__) call ESMF_ConfigGetAttribute (cfg, self%fscav, label='fscav:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%fwet, label='fwet:', default=1.0, __RC__) call ESMF_ConfigGetAttribute (cfg, self%molwght, label='molecular_weight:', __RC__) call ESMF_ConfigGetAttribute (cfg, self%fnum, label='fnum:', __RC__) - call ESMF_ConfigGetAttribute (cfg, self%rhFlag, label='rhFlag:', __RC__) call ESMF_ConfigGetAttribute (cfg, self%plid, label='pressure_lid_in_hPa:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%fwet_ice, label='fwet_ice:', default=1.0, __RC__) + call ESMF_ConfigGetAttribute (cfg, self%fwet_snow, label='fwet_snow:', default=1.0, __RC__) + call ESMF_ConfigGetAttribute (cfg, self%fwet_rain, label='fwet_rain:', default=1.0, __RC__) + call ESMF_ConfigGetAttribute (cfg, self%wet_radius_thr, label='wet_radius_thr:', default=0.05, __RC__) + call ESMF_ConfigGetAttribute (cfg, self%washout_tuning, label='washout_tuning:', default=1.0, __RC__) + call ESMF_ConfigGetAttribute (cfg, wet_removal_scheme, label='wet_removal_scheme:', default='gocart', __RC__) + call ESMF_ConfigGetAttribute (cfg, settling_scheme, label='settling_scheme:', default='gocart', __RC__) + self%wet_removal_scheme = ESMF_UtilStringLowerCase(trim(wet_removal_scheme), __RC__) + self%settling_scheme = ESMF_UtilStringLowerCase(trim(settling_scheme), __RC__) + call ESMF_ConfigGetAttribute (universal_cfg, self%wavelengths_profile, label='wavelengths_for_profile_aop_in_nm:', __RC__) call ESMF_ConfigGetAttribute (universal_cfg, self%wavelengths_vertint, & label='wavelengths_for_vertically_integrated_aop_in_nm:', __RC__) + call validate_config(self, __RC__) + end subroutine load_from_config + subroutine validate_config(self, rc) + class(GA_Environment), intent(in) :: self + integer, optional, intent(out) :: rc + + ! Local variables + character(len=255) :: msg + + ! Validate config + ! --------------- + ! + ! * Rainout efficiency + write(msg,'(5(2x,g20.8))') self%fwet_ice + call ESMF_LogWrite("GA: config: fwet_ice: "//msg) + _ASSERT_RC(any(abs(self%fwet_ice - 1.) <= 1.), "Error. Rainout efficiency (fwet) must be between 0. and 1.", ESMF_RC_VAL_OUTOFRANGE) + write(msg,'(5(2x,g20.8))') self%fwet_snow + call ESMF_LogWrite("GA: config: fwet_snow: "//msg) + _ASSERT_RC(any(abs(self%fwet_snow - 1.) <= 1.), "Error. Rainout efficiency (fwet) must be between 0. and 1.", ESMF_RC_VAL_OUTOFRANGE) + write(msg,'(5(2x,g20.8))') self%fwet_rain + call ESMF_LogWrite("GA: config: fwet_rain: "//msg) + _ASSERT_RC(any(abs(self%fwet_rain - 1.) <= 1.), "Error. Rainout efficiency (fwet) must be between 0. and 1.", ESMF_RC_VAL_OUTOFRANGE) + + ! * Wet removal scheme + _ASSERT_RC(any(self%wet_removal_scheme == [character(len=7) :: 'gocart','ufs']), "Error. Unallowed wet removal scheme: "//trim(self%wet_removal_scheme)//". Allowed: gocart, ufs", ESMF_RC_NOT_IMPL) + _ASSERT_RC(any(self%settling_scheme == [character(len=7) :: 'gocart','ufs']), "Error. Unallowed settling option: "//trim(self%settling_scheme)//". Allowed: gocart, ufs", ESMF_RC_NOT_IMPL) + + end subroutine validate_config + end module GA_EnvironmentMod diff --git a/ESMF/GOCART2G_GridComp/GOCART2G_GridComp.rc b/ESMF/GOCART2G_GridComp/GOCART2G_GridComp.rc index 79d5d8f3..1a9d1356 100644 --- a/ESMF/GOCART2G_GridComp/GOCART2G_GridComp.rc +++ b/ESMF/GOCART2G_GridComp/GOCART2G_GridComp.rc @@ -41,3 +41,5 @@ aerosol_monochromatic_optics_wavelength_in_nm_from_LUT: 470 550 670 870 wavelengths_for_profile_aop_in_nm: 550 # must be included in LUT wavelengths_for_vertically_integrated_aop_in_nm: 550 # must be included in LUT +aerosol_photolysis_wavelength_in_nm_from_LUT: 200 300 400 500 600 +n_phase_function_moments_photolysis: 0 diff --git a/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 index 5b02741b..8ccf6a2e 100644 --- a/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 @@ -109,7 +109,8 @@ subroutine SetServices (GC, RC) type (wrap_) :: wrap integer :: n_wavelengths_profile, n_wavelengths_vertint, n_wavelengths_diagmie - integer, allocatable, dimension(:) :: wavelengths_diagmie + integer :: n_wavelengths_photmie, n_moments_photmie + integer, allocatable, dimension(:) :: wavelengths_diagmie, wavelengths_photmie type (MAPL_MetaComp), pointer :: MAPL logical :: use_threads @@ -146,19 +147,22 @@ subroutine SetServices (GC, RC) n_wavelengths_profile = ESMF_ConfigGetLen (myCF, label='wavelengths_for_profile_aop_in_nm:', __RC__) n_wavelengths_vertint = ESMF_ConfigGetLen (myCF, label='wavelengths_for_vertically_integrated_aop_in_nm:', __RC__) n_wavelengths_diagmie = ESMF_ConfigGetLen (myCF, label='aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:', __RC__) - + n_wavelengths_photmie = ESMF_ConfigGetLen (myCF, label='aerosol_photolysis_wavelength_in_nm_from_LUT:', __RC__) allocate(self%wavelengths_profile(n_wavelengths_profile), self%wavelengths_vertint(n_wavelengths_vertint), & - wavelengths_diagmie(n_wavelengths_diagmie), __STAT__) + wavelengths_diagmie(n_wavelengths_diagmie), wavelengths_photmie(n_wavelengths_photmie), __STAT__) call ESMF_ConfigGetAttribute (myCF, self%wavelengths_profile, label='wavelengths_for_profile_aop_in_nm:', __RC__) call ESMF_ConfigGetAttribute (myCF, self%wavelengths_vertint, label='wavelengths_for_vertically_integrated_aop_in_nm:', __RC__) call ESMF_ConfigGetAttribute (myCF, wavelengths_diagmie, label='aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:', __RC__) + call ESMF_ConfigGetAttribute (myCF, wavelengths_photmie, label='aerosol_photolysis_wavelength_in_nm_from_LUT:', __RC__) + call ESMF_ConfigGetAttribute (myCF, n_moments_photmie, label='n_phase_function_moments_photolysis:', default=0, __RC__) ! Set wavelengths in universal config - call MAPL_ConfigSetAttribute (cf, self%wavelengths_profile, label='wavelengths_for_profile_aop_in_nm:', __RC__) call MAPL_ConfigSetAttribute (cf, self%wavelengths_vertint, label='wavelengths_for_vertically_integrated_aop_in_nm:', __RC__) call MAPL_ConfigSetAttribute (cf, wavelengths_diagmie, label='aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:', __RC__) + call MAPL_ConfigSetAttribute (cf, wavelengths_photmie, label='aerosol_photolysis_wavelength_in_nm_from_LUT:', __RC__) + call MAPL_ConfigSetAttribute (cf, n_moments_photmie, label='n_phase_function_moments_photolysis:', __RC__) call ESMF_ConfigGetAttribute (myCF, use_threads, label='use_threads:', default=.FALSE., __RC__) ! Get my internal MAPL_Generic state @@ -216,6 +220,9 @@ subroutine SetServices (GC, RC) #include "GOCART2G_Export___.h" #include "GOCART2G_Import___.h" +! Allow children of Chemistry to connect to these fields + if ((self%SU%instances(1)%is_active)) call MAPL_AddExportSpec (GC, SHORT_NAME='PSO4', CHILD_ID=self%SU%instances(1)%id, __RC__) + ! Add connectivities for Nitrate component ! Nitrate currently only supports one Nitrate component. Nitrate only ! uses the first active dust and sea salt instance. @@ -279,7 +286,7 @@ subroutine Initialize (GC, import, export, clock, RC) type (ESMF_GridComp), pointer :: gcs(:) type (ESMF_State), pointer :: gex(:) type (ESMF_Grid) :: grid - type (ESMF_Config) :: CF + type (ESMF_Config) :: CF, universal_cfg type (ESMF_State) :: aero type (ESMF_FieldBundle) :: aero_dp @@ -290,6 +297,7 @@ subroutine Initialize (GC, import, export, clock, RC) integer :: n_modes integer, parameter :: n_gocart_modes = 14 integer :: dims(3) + integer :: nmom_ = 0 character(len=ESMF_MAXSTR) :: aero_aci_modes(n_gocart_modes) real :: f_aci_seasalt, maxclean, ccntuning @@ -301,7 +309,7 @@ subroutine Initialize (GC, import, export, clock, RC) ! Get the target components name and set-up traceback handle. ! ----------------------------------------------------------- - call ESMF_GridCompGet (GC, grid=grid, name=COMP_NAME, __RC__) + call ESMF_GridCompGet (GC, grid=grid, name=COMP_NAME, config=universal_cfg, __RC__) Iam = trim(COMP_NAME)//'::'//'Initialize' if (mapl_am_i_root()) then @@ -361,6 +369,11 @@ subroutine Initialize (GC, import, export, clock, RC) grid=grid, typekind=MAPL_R4, __RC__) call add_aero (aero, label='asymmetry_parameter_of_ambient_aerosol', label2='ASY', & grid=grid, typekind=MAPL_R4, __RC__) + call ESMF_ConfigGetAttribute (universal_cfg, nmom_, label='n_phase_function_moments_photolysis:', default=0, __RC__) + if(nmom_ > 0) then + call add_aero (aero, label='legendre_coefficients_of_p11_for_photolysis', label2='MOM', & + grid=grid, typekind=MAPL_R4, ungrid=nmom_, __RC__) + endif call add_aero (aero, label='monochromatic_extinction_in_air_due_to_ambient_aerosol', & label2='monochromatic_EXT', grid=grid, typekind=MAPL_R4, __RC__) @@ -381,7 +394,9 @@ subroutine Initialize (GC, import, export, clock, RC) grid=grid, typekind=MAPL_R4, __RC__) call ESMF_AttributeSet(aero, name='band_for_aerosol_optics', value=0, __RC__) + call ESMF_AttributeSet(aero, name='use_photolysis_table', value=0, __RC__) call ESMF_AttributeSet(aero, name='wavelength_for_aerosol_optics', value=0., __RC__) + call ESMF_AttributeSet(aero, name='n_phase_function_moments', value=0, __RC__) call ESMF_AttributeSet(aero, name='aerosolName', value='', __RC__) call ESMF_AttributeSet(aero, name='im', value=dims(1), __RC__) call ESMF_AttributeSet(aero, name='jm', value=dims(2), __RC__) @@ -508,7 +523,7 @@ subroutine Run1 (GC, import, export, clock, RC) type(ESMF_Alarm) :: alarm logical :: timeToDoWork - integer :: i + integer :: i, user_status __Iam__('Run1') @@ -540,7 +555,9 @@ subroutine Run1 (GC, import, export, clock, RC) ! Run the children ! ----------------- do i = 1, size(gcs) - call ESMF_GridCompRun (gcs(i), importState=gim(i), exportState=gex(i), phase=1, clock=clock, __RC__) + call ESMF_GridCompRun (gcs(i), importState=gim(i), exportState=gex(i), phase=1, clock=clock, userRC=user_status, rc=status) + _VERIFY(status) + _VERIFY(user_status) end do @@ -650,7 +667,7 @@ subroutine Run2 (GC, import, export, clock, RC) real :: nifactor real, parameter :: pi = 3.141529265 integer :: ind550, ind532 - integer :: i1, i2, j1, j2, km, k,kk + integer :: i1, i2, j1, j2, km, k,kk, user_status type(ESMF_Alarm) :: alarm logical :: timeToDoWork @@ -681,7 +698,9 @@ subroutine Run2 (GC, import, export, clock, RC) do i = 1, size(gcs) call ESMF_GridCompGet (gcs(i), NAME=child_name, __RC__ ) if ((index(child_name, 'data')) == 0) then ! only execute phase3 method if a computational instance - call ESMF_GridCompRun (gcs(i), importState=gim(i), exportState=gex(i), phase=3, clock=clock, __RC__) + call ESMF_GridCompRun (gcs(i), importState=gim(i), exportState=gex(i), phase=3, clock=clock, userRC=user_status, rc=status) + _VERIFY(status) + _VERIFY(user_status) end if end do @@ -731,7 +750,9 @@ subroutine Run2 (GC, import, export, clock, RC) do i = 1, size(gcs) call ESMF_GridCompGet (gcs(i), NAME=child_name, __RC__ ) if ((index(child_name, 'data')) == 0) then ! only execute phase2 method if a computational instance - call ESMF_GridCompRun (gcs(i), importState=gim(i), exportState=gex(i), phase=2, clock=clock, __RC__) + call ESMF_GridCompRun (gcs(i), importState=gim(i), exportState=gex(i), phase=2, clock=clock, userRC=user_status, rc=status) + _VERIFY(status) + _VERIFY(user_status) end if end do @@ -1531,15 +1552,20 @@ subroutine run_aerosol_optics (state, rc) real, dimension(:,:,:), pointer :: ple real, dimension(:,:,:), pointer :: rh real, dimension(:,:,:), pointer :: var + real, dimension(:,:,:,:), pointer :: var4d character (len=ESMF_MAXSTR) :: fld_name real(kind=8), dimension(:,:,:),pointer :: ext_, ssa_, asy_ ! (lon:,lat:,lev:) + real(kind=8), dimension(:,:,:,:),pointer :: pmom_ ! (lon:,lat:,lev:,nmom:) real(kind=8), dimension(:,:,:), allocatable :: ext, ssa, asy ! (lon:,lat:,lev:) + real(kind=8), dimension(:,:,:,:), allocatable :: pmom ! (lon:,lat:,lev:,nmom:) integer :: i, n, b, j integer :: i1, j1, i2, j2, km integer :: band + integer :: usePhotTable = 0 + integer :: nmom = 0 integer, parameter :: n_bands = 1 character (len=ESMF_MAXSTR), allocatable :: itemList(:), aeroList(:) @@ -1558,6 +1584,14 @@ subroutine run_aerosol_optics (state, rc) ! -------------- call ESMF_AttributeGet(state, name='band_for_aerosol_optics', value=band, __RC__) +! Are we using a photolysis table? +! -------------------------------- + call ESMF_AttributeGet(state, name='use_photolysis_table', value=usePhotTable, __RC__) + if(usePhotTable /= 0) then + call ESMF_AttributeGet(state, name='n_phase_function_moments', value=nmom, __RC__) + end if + + ! Relative humidity ! ----------------- call ESMF_AttributeGet(state, name='relative_humidity_for_aerosol_optics', value=fld_name, __RC__) @@ -1575,6 +1609,7 @@ subroutine run_aerosol_optics (state, rc) allocate(ext(i1:i2,j1:j2,km), & ssa(i1:i2,j1:j2,km), & asy(i1:i2,j1:j2,km), __STAT__) + allocate(pmom(i1:i2,j1:j2,km,8), __STAT__) ! Get list of child states within state and add to aeroList ! --------------------------------------------------------- @@ -1600,11 +1635,12 @@ subroutine run_aerosol_optics (state, rc) end if end do - ext = 0.0d0 - ssa = 0.0d0 - asy = 0.0d0 + ext = 0.0d0 + ssa = 0.0d0 + asy = 0.0d0 + pmom = 0.0d0 -! ! Get aerosol optic properties from children +! ! Get aerosol optical properties from children do i = 1, size(aeroList) call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) @@ -1627,6 +1663,9 @@ subroutine run_aerosol_optics (state, rc) ! ! set band in child's aero state call ESMF_AttributeSet(child_state, name='band_for_aerosol_optics', value=band, __RC__) +! ! set if we are using photolysis table + call ESMF_AttributeSet(child_state, name='use_photolysis_table', value=usePhotTable, __RC__) + ! ! execute the aerosol optics method call ESMF_MethodExecute(child_state, label="aerosol_optics", __RC__) @@ -1636,27 +1675,42 @@ subroutine run_aerosol_optics (state, rc) call MAPL_GetPointer(child_state, ext_, trim(fld_name), __RC__) end if -! ! Retrieve scattering extinction from each child +! ! Retrieve scattering from each child call ESMF_AttributeGet(child_state, name='single_scattering_albedo_of_ambient_aerosol', value=fld_name, __RC__) if (fld_name /= '') then call MAPL_GetPointer(child_state, ssa_, trim(fld_name), __RC__) end if -! ! Retrieve asymetry parameter multiplied by scatering extiction from each child - call ESMF_AttributeGet(child_state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) - if (fld_name /= '') then - call MAPL_GetPointer(child_state, asy_, trim(fld_name), __RC__) - end if +! ! If for radiation retrieve asymmetry parameter multiplied by scattering from each child +! ! If for photolysis retrieve the phase function moments multipled by the scattering from each child + + if(usePhotTable /= 0) then + call ESMF_AttributeGet(child_state, name='legendre_coefficients_of_p11_for_photolysis', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(child_state, pmom_, trim(fld_name), __RC__) + end if -! ! Sum aerosol optic properties from each child + else + call ESMF_AttributeGet(child_state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(child_state, asy_, trim(fld_name), __RC__) + end if + end if + +! ! Sum aerosol optical properties from each child ext = ext + ext_ ssa = ssa + ssa_ - asy = asy + asy_ + if(usePhotTable /= 0) then + pmom = pmom + pmom_ + else + asy = asy + asy_ + end if end do -! ! Set ext, ssa, asy to equal the sum of ext, ssa, asy from the children. This is what is passed to radiation. +! ! Set ext, ssa, asy to equal the sum of ext, ssa, asy from the children. + ! This is what is passed to radiation or photolysis. call ESMF_AttributeGet(state, name='extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) if (fld_name /= '') then call MAPL_GetPointer(state, var, trim(fld_name), __RC__) @@ -1668,14 +1722,22 @@ subroutine run_aerosol_optics (state, rc) call MAPL_GetPointer(state, var, trim(fld_name), __RC__) var = ssa(:,:,:) end if - - call ESMF_AttributeGet(state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) - if (fld_name /= '') then - call MAPL_GetPointer(state, var, trim(fld_name), __RC__) - var = asy(:,:,:) + if(usePhotTable /= 0) then + call ESMF_AttributeGet(state, name='legendre_coefficients_of_p11_for_photolysis', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(state, var4d, trim(fld_name), __RC__) + var4d = pmom(:,:,:,:) + end if + else + call ESMF_AttributeGet(state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(state, var, trim(fld_name), __RC__) + var = asy(:,:,:) + end if end if deallocate(ext, ssa, asy, __STAT__) + deallocate(pmom, __STAT__) 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 deleted file mode 100644 index b4658a98..00000000 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP.20C/NI2G_GridComp_ExtData.rc +++ /dev/null @@ -1,27 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|---------- -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | File -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | Frequency -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|----------- - -# ======= Nitrate Data Instance ========== -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 -EMI_NH3_AG 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_EN 'kg m-2 s-1' N Y %y4-%m2-%d2t12:00:00 none none nh3 ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4 -EMI_NH3_IN 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_RE 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_TR 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_OC 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none emiss_ocn ExtData/chemistry/GEIA/v0.0.0/sfc/GEIA.emis_NH3.ocean.x576_y361.t12.20080715_12z.nc4 - -NITRATE_HNO3 'mol mol-1' N N %y4-%m2-%d2T12:00:00 none 0.20 hno3 ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 - -NI_regionMask NA N V - none none REGION_MASK ExtData/chemistry/Masks/v0.0.0/sfc/ARCTAS.region_mask.x540_y361.2008.nc - -#DU kg kg-1 N N - none none DU /dev/null -%% - diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.rc deleted file mode 100644 index 5e741b47..00000000 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.rc +++ /dev/null @@ -1,27 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|---------- -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | File -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | Frequency -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|----------- - -# ======= Nitrate Data Instance ========== -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 -EMI_NH3_AG 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_EN 'kg m-2 s-1' N Y %y4-%m2-%d2t12:00:00 none none nh3 ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4 -EMI_NH3_IN 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_RE 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_TR 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_OC 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none emiss_ocn ExtData/chemistry/GEIA/v0.0.0/sfc/GEIA.emis_NH3.ocean.x576_y361.t12.20080715_12z.nc4 - -NITRATE_HNO3 'mol mol-1' N N %y4-%m2-%d2T12:00:00 none 0.20 hno3 ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 - -NI_regionMask NA N V - none none REGION_MASK ExtData/chemistry/Masks/v0.0.0/sfc/ARCTAS.region_mask.x540_y361.2008.nc - -#DU kg kg-1 N N - none none DU /dev/null -%% - 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 0e2ff7a2..7d14f853 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/AMIP/NI2G_GridComp_ExtData.yaml @@ -7,6 +7,7 @@ Collections: 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: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" NI2G_qfed2.emis_nh3.061.%y4%m2%d2.nc4: template: ExtData/chemistry/QFED/v2.6r1/sfc/0.1/Y%y4/M%m2/qfed2.emis_nh3.061.%y4%m2%d2.nc4 valid_range: "2000-02-29T12:00/2025-01-01" @@ -28,6 +29,11 @@ Samplings: update_reference_time: '0' NI2G_sample_3: extrapolation: persist_closest + NI2G_sample_4: + update_frequency: PT24H + update_offset: PT12H + update_reference_time: '0' + source_time: "2019-01-15T12:00/2019-12-15T00:00:00" Exports: EMI_NH3_AG: @@ -39,10 +45,8 @@ Exports: - {starting: "1960-01-16T12:00", collection: NI2G_hfed.emis_nh3.x576_y361.%y4%m2.nc4, linear_transformation: [0.0, 0.778], regrid: CONSERVE, sample: NI2G_sample_1, variable: biomass} - {starting: "2000-03-01T00:00", collection: NI2G_qfed2.emis_nh3.061.%y4%m2%d2.nc4, linear_transformation: [0.0, 0.778], regrid: CONSERVE, sample: NI2G_sample_1, variable: biomass} EMI_NH3_EN: - collection: NI2G_NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: NI2G_sample_1 - variable: nh3 + - {starting: "1979-01-15T12:00", collection: NI2G_NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4, sample: NI2G_sample_1, regrid: CONSERVE, variable: nh3} + - {starting: "2019-12-15T12:00", collection: NI2G_NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: NI2G_sample_4, variable: nh3} EMI_NH3_IN: collection: /dev/null regrid: CONSERVE diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/NI2G_GridComp/CMakeLists.txt index 4857fe13..bbacc0de 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/CMakeLists.txt +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/CMakeLists.txt @@ -2,7 +2,7 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES GA_Environment MAPL Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES GA_Environment MAPL Chem_Shared2G Process_Library ESMF::ESMF NetCDF::NetCDF_Fortran) mapl_acg (${this} NI2G_StateSpecs.rc IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 index 0a624dae..93bd7fde 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 @@ -43,6 +43,7 @@ module NI2G_GridCompMod ! !DESCRIPTION: This module implements GOCART's Nitrate (NI) Gridded Component. ! !REVISION HISTORY: +! 4January2024 Collow - Updated call for ChemSettling ! 01July2020 Sherman, da Silva, Darmenov, Clune - First attempt at refactoring. !EOP @@ -60,7 +61,7 @@ module NI2G_GridCompMod real, allocatable :: fnumDU(:), fnumSS(:) ! DU and SS particles per kg mass type(ThreadWorkspace), allocatable :: workspaces(:) type(ESMF_Alarm) :: alarm - end type NI2G_GridComp + end type NI2G_GridComp type wrap_ type (NI2G_GridComp), pointer :: PTR !=> null() @@ -183,7 +184,7 @@ subroutine SetServices ( GC, RC ) & dims=MAPL_DimsHorzVert, & & vlocation=MAPL_VlocationCenter, & & restart=MAPL_RestartOptional, & - & friendlyto='DYNAMICS:TURBULENCE:MOIST', & +! & friendlyto='DYNAMICS:TURBULENCE:MOIST', & & add2export=.true., __RC__) call MAPL_AddInternalSpec(gc,& @@ -193,7 +194,7 @@ subroutine SetServices ( GC, RC ) & dims=MAPL_DimsHorzVert, & & vlocation=MAPL_VlocationCenter, & & restart=MAPL_RestartOptional, & - & friendlyto='DYNAMICS:TURBULENCE:MOIST', & +! & friendlyto='DYNAMICS:TURBULENCE:MOIST', & & add2export=.true., __RC__) call MAPL_AddInternalSpec(gc,& @@ -203,7 +204,7 @@ subroutine SetServices ( GC, RC ) & dims=MAPL_DimsHorzVert, & & vlocation=MAPL_VlocationCenter, & & restart=MAPL_RestartOptional, & - & friendlyto='DYNAMICS:TURBULENCE:MOIST', & +! & friendlyto='DYNAMICS:TURBULENCE:MOIST', & & add2export=.true., __RC__) call MAPL_AddImportSpec(gc,& @@ -453,6 +454,23 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) call ESMF_ConfigGetAttribute (cfg, file_, label="aerosol_radBands_optics_file:", __RC__ ) self%rad_Mie = GOCART2G_Mie(trim(file_), __RC__) +! Trigger for photolysis calculations +! ----------------------------------- + call ESMF_AttributeSet (aero, name="use_photolysis_table", value=0, __RC__) + +! Create Photolysis Mie Table +! --------------------------- +! Get file names for the optical tables + call ESMF_ConfigGetAttribute (cfg, file_, & + label="aerosol_monochromatic_optics_file:", __RC__ ) + call ESMF_ConfigGetAttribute (universal_cfg, nmom_, label="n_phase_function_moments_photolysis:", default=0, __RC__) + i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_photolysis_wavelength_in_nm_from_LUT:', __RC__) + allocate (channels_(i), __STAT__ ) + call ESMF_ConfigGetAttribute (universal_cfg, channels_, & + label= "aerosol_photolysis_wavelength_in_nm_from_LUT:", __RC__) + self%phot_Mie = GOCART2G_Mie(trim(file_), channels_*1.e-9, nmom=nmom_, __RC__) + deallocate(channels_) + ! Create Diagnostics Mie Table ! ----------------------------- ! Get file names for the optical tables @@ -480,6 +498,11 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, 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 ESMF_ConfigGetAttribute (universal_cfg, nmom_, label='n_phase_function_moments_photolysis:', default=0, __RC__) + if(nmom_ > 0) then + call add_aero (aero, label='legendre_coefficients_of_p11_for_photolysis', label2='MOM', & + grid=grid, typekind=MAPL_R8, ungrid=nmom_, __RC__) + endif 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__) @@ -750,7 +773,7 @@ subroutine Run2 (GC, import, export, clock, RC) type (NI2G_GridComp), pointer :: self real, allocatable, dimension(:,:) :: drydepositionfrequency, dqa - real :: fwet + real, pointer, dimension(:,:,:) :: nisd_vel logical :: KIN real, allocatable, target, dimension(:,:,:) :: fluxoutWT real, allocatable, dimension(:,:,:,:) :: aerosol @@ -764,6 +787,7 @@ subroutine Run2 (GC, import, export, clock, RC) integer :: i, j type(ThreadWorkspace), pointer :: workspace integer :: thread + integer :: settling_opt #include "NI2G_DeclarePointer___.h" @@ -846,54 +870,47 @@ subroutine Run2 (GC, import, export, clock, RC) ! NI Settling ! ----------- -! Because different bins having different swelling coefficients I need to -! handle the call to settling differently. - -! Ammonium - settles like ammonium sulfate (rhflag = 3) - rhflag = 3 -! call Chem_SettlingSimpleOrig (self%km, self%klid, rhflag, MAPL_GRAV, self%cdt, & -! 1.e-6*self%radius(nNH4a), self%rhop(nNH4a), & -! NH4a, t, airdens, rh2, delp, zle, NH4SD, __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 + select case (self%settling_scheme) + case ('gocart') + settling_opt=1 + case ('ufs') + settling_opt=2 + case default + _ASSERT_RC(.false.,'Unsupported settling scheme: '//trim(self%settling_scheme),ESMF_RC_NOT_IMPL) + end select + +! Ammonium - settles like bin 1 of nitrate + nullify(nisd_vel) + if (associated(NH4SD_V)) nisd_vel => NH4SD_V + call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, 1, self%cdt, MAPL_GRAV, & + NH4a, t, airdens, rh2, zle, delp, NH4SD, nisd_vel, & + settling_scheme=settling_opt, __RC__) +! Nitrate Bin 1 nullify(flux_ptr) if (associated(NISD)) flux_ptr => NISD(:,:,1) -! call Chem_SettlingSimpleOrig (self%km, self%klid, rhFlag, MAPL_GRAV, self%cdt, & -! 1.e-6*self%radius(nNO3an1), self%rhop(nNO3an1), & -! NO3an1, t, airdens, rh2, delp, zle, flux_ptr, __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 + nullify(nisd_vel) + if (associated(NISD_V)) nisd_vel => NISD_V(:,:,:,1) + call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, 1, self%cdt, MAPL_GRAV, & + NO3an1, t, airdens, & + rh2, zle, delp, flux_ptr, nisd_vel, settling_scheme=settling_opt, __RC__) +! Nitrate Bin 2 nullify(flux_ptr) if (associated(NISD)) flux_ptr => NISD(:,:,2) -! call Chem_SettlingSimpleOrig (self%km, self%klid, rhFlag, MAPL_GRAV, self%cdt, & -! 1.e-6*self%radius(nNO3an2), self%rhop(nNO3an2), & -! NO3an2, t, airdens, rh2, delp, zle, flux_ptr, __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 + nullify(nisd_vel) + if (associated(NISD_V)) nisd_vel => NISD_V(:,:,:,2) + call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, 2, self%cdt, MAPL_GRAV, & + NO3an2, t, airdens, & + rh2, zle, delp, flux_ptr, nisd_vel, settling_scheme=settling_opt, __RC__) +! Nitrate Bin 3 nullify(flux_ptr) if (associated(NISD)) flux_ptr => NISD(:,:,3) -! call Chem_SettlingSimpleOrig (self%km, self%klid, rhFlag, MAPL_GRAV, self%cdt, & -! 1.e-6*self%radius(nNO3an3), self%rhop(nNO3an3), & -! NO3an3, t, airdens, rh2, delp, zle, flux_ptr, __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 + nullify(nisd_vel) + if (associated(NISD_V)) nisd_vel => NISD_V(:,:,:,3) + call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, 3, self%cdt, MAPL_GRAV, & + NO3an3, t, airdens, & + rh2, zle, delp, flux_ptr, nisd_vel, settling_scheme=settling_opt, __RC__) + + ! NI Deposition ! ----------- @@ -947,22 +964,20 @@ subroutine Run2 (GC, import, export, clock, RC) end if ! NH3 KIN = .false. - fwet = 1. nullify(fluxWT_ptr) if (associated(NH3WT)) fluxWT_ptr => fluxoutWT call WetRemovalGOCART2G (self%km, self%klid, self%nbins, self%nbins, 1, self%cdt, 'NH3', & - KIN, MAPL_GRAV, fwet, NH3, ple, t, airdens, & + KIN, MAPL_GRAV, self%fwet(1), 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 KIN = .true. - fwet = 1. nullify(fluxWT_ptr) if (associated(NH4WT)) fluxWT_ptr => fluxoutWT call WetRemovalGOCART2G(self%km, self%klid, self%nbins, self%nbins, 1, self%cdt, 'NH4a', & - KIN, MAPL_GRAV, fwet, NH4a, ple, t, airdens, & + KIN, MAPL_GRAV, self%fwet(2), NH4a, ple, t, airdens, & pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, fluxWT_ptr, __RC__) if (associated(NH4WT)) NH4WT = fluxWT_ptr(:,:,1) @@ -971,21 +986,18 @@ subroutine Run2 (GC, import, export, clock, RC) end if KIN = .true. - fwet = 1. call WetRemovalGOCART2G(self%km, self%klid, self%nbins, self%nbins, 1, self%cdt, 'nitrate', & - KIN, MAPL_GRAV, fwet, NO3an1, ple, t, airdens, & + KIN, MAPL_GRAV, self%fwet(3), NO3an1, ple, t, airdens, & pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, NIWT, __RC__) KIN = .true. - fwet = 1. call WetRemovalGOCART2G(self%km, self%klid, self%nbins, self%nbins, 2, self%cdt, 'nitrate', & - KIN, MAPL_GRAV, fwet, NO3an2, ple, t, airdens, & + KIN, MAPL_GRAV, self%fwet(4), NO3an2, ple, t, airdens, & pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, NIWT, __RC__) KIN = .true. - fwet = 0.3 call WetRemovalGOCART2G(self%km, self%klid, self%nbins, self%nbins, 3, self%cdt, 'nitrate', & - KIN, MAPL_GRAV, fwet, NO3an3, ple, t, airdens, & + KIN, MAPL_GRAV, self%fwet(5), 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 @@ -1148,6 +1160,7 @@ subroutine aerosol_optics(state, rc) integer, parameter :: DP=kind(1.0d0) real, dimension(:,:,:), pointer :: ple, rh real(kind=DP), dimension(:,:,:), pointer :: var + real(kind=DP), dimension(:,:,:,:), pointer :: var4d real, dimension(:,:,:), pointer :: q real, dimension(:,:,:,:), pointer :: q_4d integer, allocatable :: opaque_self(:) @@ -1159,12 +1172,14 @@ subroutine aerosol_optics(state, rc) character (len=ESMF_MAXSTR),allocatable :: aerosol_names(:) real(kind=DP), dimension(:,:,:), allocatable :: ext_s, ssa_s, asy_s ! (lon:,lat:,lev:) + real(kind=DP), dimension(:,:,:,:), allocatable :: pmom_s ! (lon:,lat:,lev:,nmom:) real :: x integer :: instance integer :: n, nbins integer :: i1, j1, i2, j2, km integer :: band - + integer :: usePhotTable + real :: wavelength integer :: i, j, k __Iam__('NI2G::aerosol_optics') @@ -1186,6 +1201,11 @@ subroutine aerosol_optics(state, rc) band = 0 call ESMF_AttributeGet(state, name='band_for_aerosol_optics', value=band, __RC__) +! Are we doing a photolysis calculation? +! -------------------------------------- + usePhotTable = 0 + call ESMF_AttributeGet (state, name='use_photolysis_table', value=usePhotTable, __RC__) + ! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) @@ -1231,7 +1251,13 @@ subroutine aerosol_optics(state, rc) address = transfer(opaque_self, address) call c_f_pointer(address, self) - call mie_ (self%rad_Mie, nbins, band, q_4d, rh, ext_s, ssa_s, asy_s, __RC__) + if (usePhotTable /= 0) then + wavelength = band*1.e-9 + allocate(pmom_s(i1:i2, j1:j2, km, self%phot_Mie%nmom), __STAT__) + call miephot_ (self%phot_Mie, nbins, wavelength, q_4d, rh, ext_s, ssa_s, pmom_s, __RC__) + else + call mie_ (self%rad_Mie, nbins, band, q_4d, rh, ext_s, ssa_s, asy_s, __RC__) + endif call ESMF_AttributeGet(state, name='extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) if (fld_name /= '') then @@ -1245,20 +1271,28 @@ subroutine aerosol_optics(state, rc) var = ssa_s(:,:,:) end if - call ESMF_AttributeGet(state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) - if (fld_name /= '') then - call MAPL_GetPointer(state, var, trim(fld_name), __RC__) - var = asy_s(:,:,:) + if (usePhotTable /= 0) then + call ESMF_AttributeGet (state, name='legendre_coefficients_of_p11_for_photolysis', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var4d, trim(fld_name), __RC__) + var4d = pmom_s(:,:,:,:) + end if + else + call ESMF_AttributeGet (state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = asy_s(:,:,:) + end if end if deallocate(ext_s, ssa_s, asy_s, __STAT__) + if (usePhotTable /= 0) deallocate(pmom_s, __STAT__) deallocate(q_4d, __STAT__) RETURN_(ESMF_SUCCESS) contains -! subroutine mie_(mie_table, aerosol_names, nb, offset, q, rh, bext_s, bssa_s, basym_s, rc) subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) implicit none @@ -1289,8 +1323,8 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) call mie%Query(band, l, q(:,:,:,l), rh, tau=bext, gasym=gasym, ssa=bssa, __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 + bssa_s = bssa_s + (bssa*bext) ! scattering + basym_s = basym_s + gasym*(bssa*bext) ! asymmetry parameter multiplied by scattering end do @@ -1298,6 +1332,47 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) end subroutine mie_ + subroutine miephot_(mie, nbins, wavelength, q, rh, bext_s, bssa_s, bpmom_s, rc) + + implicit none + + type(GOCART2G_Mie), intent(inout) :: mie ! mie table + integer, intent(in ) :: nbins ! number of bins + real, intent(in ) :: wavelength ! wavelength in nm + real, intent(in ) :: q(:,:,:,:) ! aerosol mass mixing ratio, kg kg-1 + real, intent(in ) :: rh(:,:,:) ! relative humidity + real(kind=DP), intent( out) :: bext_s (size(ext_s,1),size(ext_s,2),size(ext_s,3)) + real(kind=DP), intent( out) :: bssa_s (size(ext_s,1),size(ext_s,2),size(ext_s,3)) + real(kind=DP), intent( out) :: bpmom_s(size(pmom_s,1),size(pmom_s,2),size(pmom_s,3),size(pmom_s,4)) + integer, intent( out) :: rc + + ! local + integer :: l, m + real :: bext (size(ext_s,1),size(ext_s,2),size(ext_s,3)) ! extinction + real :: bssa (size(ext_s,1),size(ext_s,2),size(ext_s,3)) ! SSA + real :: pmom (size(pmom_s,1),size(pmom_s,2),size(pmom_s,3),size(pmom_s,4),6) + + __Iam__('NI2G::aerosol_optics::miephot_') + + bext_s = 0.0d0 + bssa_s = 0.0d0 + bpmom_s = 0.0d0 + + do l = 1, nbins + ! tau is converted to bext + call mie%Query(wavelength, l, q(:,:,:,l), rh, tau=bext, pmom=pmom, ssa=bssa, __RC__) + bext_s = bext_s + bext ! extinction + bssa_s = bssa_s + (bssa*bext) ! scattering + do m = 1, mie%nmom + bpmom_s(:,:,:,m) = bpmom_s(:,:,:,m) + pmom(:,:,:,m,1)*(bssa*bext) ! moments multiplied by scattering + enddo + end do + + + RETURN_(ESMF_SUCCESS) + + end subroutine miephot_ + end subroutine aerosol_optics !------------------------------------------------------------------------------------- diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc deleted file mode 100644 index d7030101..00000000 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc +++ /dev/null @@ -1,27 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|---------- -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | File -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | Frequency -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------|----------- - -# ======= Nitrate Data Instance ========== -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 -EMI_NH3_AG 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_EN 'kg m-2 s-1' N Y %y4-%m2-%d2t12:00:00 none none nh3 ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4 -EMI_NH3_IN 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_RE 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_TR 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis /dev/null -EMI_NH3_OC 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none emiss_ocn ExtData/chemistry/GEIA/v0.0.0/sfc/GEIA.emis_NH3.ocean.x576_y361.t12.20080715_12z.nc4 - -NITRATE_HNO3 'mol mol-1' N N %y4-%m2-%d2T12:00:00 none 0.20 hno3 ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 - -NI_regionMask NA N V - none none REGION_MASK ExtData/chemistry/Masks/v0.0.0/sfc/ARCTAS.region_mask.x540_y361.2008.nc - -#DU kg kg-1 N N - none none DU /dev/null -%% - diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.yaml index 6ea96d38..80ec0318 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.yaml @@ -3,10 +3,13 @@ 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: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" NI2G_qfed2.emis_nh3.006.%y4%m2%d2.nc4: template: ExtData/chemistry/QFED/v2.5r1-nrt/sfc/0.1/Y%y4/M%m2/qfed2.emis_nh3.006.%y4%m2%d2.nc4 valid_range: "2014-12-01T12:00/2021-11-01T12:00" @@ -28,6 +31,11 @@ Samplings: update_reference_time: '0' NI2G_sample_3: extrapolation: persist_closest + NI2G_sample_4: + update_frequency: PT24H + update_offset: PT12H + update_reference_time: '0' + source_time: "2019-01-15T12:00/2019-12-15T00:00:00" Exports: EMI_NH3_AG: @@ -39,10 +47,8 @@ Exports: - {starting: "2014-12-01T12:00", collection: NI2G_qfed2.emis_nh3.006.%y4%m2%d2.nc4, linear_transformation: [0.0, 0.778], regrid: CONSERVE, sample: NI2G_sample_1, variable: biomass} - {starting: "2021-11-01T12:00", collection: NI2G_qfed2.emis_nh3.061.%y4%m2%d2.nc4, linear_transformation: [0.0, 0.778], regrid: CONSERVE, sample: NI2G_sample_1, variable: biomass} EMI_NH3_EN: - collection: NI2G_NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: NI2G_sample_1 - variable: nh3 + - {starting: "1979-01-15T12:00", collection: NI2G_NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4, sample: NI2G_sample_1, regrid: CONSERVE, variable: nh3} + - {starting: "2019-12-15T12:00", collection: NI2G_NH3-em-anthro_CMIP_CEDS_gn.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: NI2G_sample_4, variable: nh3} EMI_NH3_IN: collection: /dev/null regrid: CONSERVE @@ -76,10 +82,18 @@ Exports: sample: NI2G_sample_3 variable: REGION_MASK climNO3an1: - collection: /dev/null + collection: NI2G_GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 + regrid: CONSERVE + sample: NI2G_sample_0 + variable: NO3AN1 climNO3an2: - collection: /dev/null + collection: NI2G_GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 + regrid: CONSERVE + sample: NI2G_sample_0 + variable: NO3AN2 climNO3an3: - collection: /dev/null - + collection: NI2G_GEOS.fp.asm.inst3_3d_aer_Nv.%y4%m2%d2_%h2%n2.V01.nc4 + regrid: CONSERVE + sample: NI2G_sample_0 + variable: NO3AN3 diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc index b0cc0632..33da2e96 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc @@ -48,6 +48,7 @@ category: EXPORT #---------------------------------------------------------------------------------------- NH3MASS | kg/kg | xyz | C | | Ammonia Mass Mixing Ratio NH4MASS | kg/kg | xyz | C | | Ammonium Aerosol Mass Mixing Ratio + NH4SD_V | m s-1 | xyz | C | | Ammonium Settling Velocity NIMASS | kg/kg | xyz | C | | Nitrate Mass Mixing Ratio NIMASS25 | kg/kg | xyz | C | | Nitrate Mass Mixing Ratio of Particulate Matter < 2.5 microns (PM2.5) HNO3CONC | kg m-3 | xyz | C | | Nitric Acid Mass Concentration @@ -55,6 +56,7 @@ category: EXPORT NH4CONC | kg m-3 | xyz | C | | Ammonium Mass Concentration NICONC | kg m-3 | xyz | C | | Nitrate Mass Concentration NICONC25 | kg m-3 | xyz | C | | Nitrate Mass Concentration of Particulate Matter < 2.5 microns (PM2.5) + NISD_V | m s-1 | xyz | C | 3 | Nitrate Settling Velocity (Bin %d) NIEXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Nitrate Extinction Coefficient NIEXTCOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | Nitrate Extinction Coefficient - fixed RH=20% NIEXTCOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | Nitrate Extinction Coefficient - fixed RH=80% diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc index 7d0f2c6a..4de87c26 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc @@ -4,12 +4,15 @@ nbins: 5 -aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_NI.v2_5.RRTMG.nc -aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_NI.v2_5.nc +aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_NI.v2_6.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_NI.v2_6.nc # Scavenging efficiency per bin [km-1] fscav: 0.0 0.4 0.4 0.4 0.4 +#Large scale rainout efficiency per bin for gocart +fwet: 1.0 1.0 1.0 1.0 0.3 + # Dry particle radius [um], used for settling particle_radius_microns: 0.0 0.2695 0.2695 2.1 7.57 @@ -30,4 +33,6 @@ sigma: 2.0 2.0 2.0 2.0 2.0 pressure_lid_in_hPa: 40.0 -rhFlag: 0 +# SettlingSolver options +# Options: 'gocart' or 'ufs' +settling_scheme: 'gocart' diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/AMIP.20C/SS2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/AMIP.20C/SS2G_GridComp_ExtData.rc deleted file mode 120000 index f4a705ce..00000000 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/AMIP.20C/SS2G_GridComp_ExtData.rc +++ /dev/null @@ -1 +0,0 @@ -../SS2G_GridComp_ExtData.rc \ No newline at end of file diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/AMIP/SS2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/AMIP/SS2G_GridComp_ExtData.rc deleted file mode 120000 index f4a705ce..00000000 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/AMIP/SS2G_GridComp_ExtData.rc +++ /dev/null @@ -1 +0,0 @@ -../SS2G_GridComp_ExtData.rc \ No newline at end of file diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMakeLists.txt index 06c1f146..306eea65 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMakeLists.txt +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMakeLists.txt @@ -2,10 +2,10 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES MAPL GA_Environment Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES MAPL GA_Environment Chem_Shared2G Process_Library ESMF::ESMF NetCDF::NetCDF_Fortran) -mapl_acg (${this} SS2G_StateSpecs.rc - IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS +mapl_acg (${this} SS2G_StateSpecs.rc + IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS GET_POINTERS DECLARE_POINTERS) file (GLOB_RECURSE rc_files CONFIGURE_DEPENDS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.rc *.yaml) diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 index 84844619..003567c2 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 @@ -256,6 +256,10 @@ subroutine SetServices ( GC, RC ) #include "SS2G_Export___.h" #include "SS2G_Import___.h" #include "SS2G_Internal___.h" + if (MAPL_AM_I_ROOT()) then + write (*,*) trim(Iam)//": Wet removal scheme is "//trim(self%wet_removal_scheme) + write (*,*) trim(Iam)//": Settling scheme is "//trim(self%settling_scheme) + end if end if ! This state holds fields needed by radiation @@ -367,7 +371,7 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) self => wrap%ptr ! Global dimensions are needed here for choosing tuning parameters -! ---------------------------------------------------------------- +! ---------------------------------------------------------------- call MAPL_GridGet (grid, globalCellCountPerDim=dims, __RC__ ) km = dims(3) self%km = km @@ -476,6 +480,23 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) call ESMF_ConfigGetAttribute (cfg, file_, label="aerosol_radBands_optics_file:", __RC__ ) self%rad_Mie = GOCART2G_Mie(trim(file_), __RC__) +! Trigger for photolysis calculations +! ----------------------------------- + call ESMF_AttributeSet (aero, name="use_photolysis_table", value=0, __RC__) + +! Create Photolysis Mie Table +! --------------------------- +! Get file names for the optical tables + call ESMF_ConfigGetAttribute (cfg, file_, & + label="aerosol_monochromatic_optics_file:", __RC__ ) + call ESMF_ConfigGetAttribute (universal_cfg, nmom_, label="n_phase_function_moments_photolysis:", default=0, __RC__) + i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_photolysis_wavelength_in_nm_from_LUT:', __RC__) + allocate (channels_(i), __STAT__ ) + call ESMF_ConfigGetAttribute (universal_cfg, channels_, & + label= "aerosol_photolysis_wavelength_in_nm_from_LUT:", __RC__) + self%phot_Mie = GOCART2G_Mie(trim(file_), channels_*1.e-9, nmom=nmom_, __RC__) + deallocate(channels_) + ! Create Diagnostics Mie Table ! ----------------------------- ! Get file names for the optical tables @@ -501,6 +522,11 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, 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 ESMF_ConfigGetAttribute (universal_cfg, nmom_, label='n_phase_function_moments_photolysis:', default=0, __RC__) + if(nmom_ > 0) then + call add_aero (aero, label='legendre_coefficients_of_p11_for_photolysis', label2='MOM', & + grid=grid, typekind=MAPL_R8, ungrid=nmom_, __RC__) + endif 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__) @@ -747,11 +773,12 @@ subroutine Run1 (GC, import, export, clock, RC) ! For the Hoppel correction need to compute the wet radius and settling velocity ! in the surface - if (self%hoppelFlag) then - call hoppelCorrection (self%radius(n)*1.e-6, self%rhop(n), rh2(:,:,self%km), & - dz, ustar, self%rhFlag, airdens(:,:,self%km), t(:,:,self%km), & - MAPL_GRAV, MAPL_KARMAN, fhoppel, __RC__) - end if +! Collow: commented out 9 Jan 2024 as this is not consistent with the updated settling based on the optics files. The flag to call this is set to false in the instance RC file. This should be revistited in the future. +! if (self%hoppelFlag) then +! call hoppelCorrection (self%radius(n)*1.e-6, self%rhop(n), rh2(:,:,self%km), & +! 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) @@ -797,11 +824,14 @@ subroutine Run2 (GC, import, export, clock, RC) integer :: n real, allocatable, dimension(:,:) :: drydepositionfrequency, dqa - real :: fwet + real, pointer, dimension(:,:,:) :: sssd_vel logical :: KIN integer :: i1, j1, i2, j2, km + real, dimension(3) :: rainout_eff real, target, allocatable, dimension(:,:,:) :: RH20,RH80 + real, pointer, dimension(:,:) :: flux_ptr + integer :: settling_opt #include "SS2G_DeclarePointer___.h" __Iam__('Run2') @@ -840,10 +870,23 @@ subroutine Run2 (GC, import, export, clock, RC) ! Sea Salt Settling ! ----------------- + select case (self%settling_scheme) + case ('gocart') + settling_opt = 1 + case ('ufs') + settling_opt = 2 + case default + _ASSERT_RC(.false.,'Unsupported settling scheme: '//trim(self%settling_scheme),ESMF_RC_NOT_IMPL) + end select + do n = 1, self%nbins - call Chem_Settling (self%km, self%klid, n, self%rhFlag, self%cdt, MAPL_GRAV, & - self%radius(n)*1.e-6, self%rhop(n), SS(:,:,:,n), t, airdens, & - rh2, zle, delp, SSSD, __RC__) + nullify(flux_ptr) + if (associated(SSSD)) flux_ptr => SSSD(:,:,n) + nullify(sssd_vel) + if (associated(SSSD_V)) sssd_vel => SSSD_V(:,:,:,n) + call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, n, self%cdt, MAPL_GRAV, & + SS(:,:,:,n), t, airdens, & + rh2, zle, delp, flux_ptr, sssd_vel, settling_scheme=settling_opt, __RC__) end do ! Deposition @@ -869,12 +912,26 @@ subroutine Run2 (GC, import, export, clock, RC) ! Large-scale Wet Removal ! ------------------------ KIN = .TRUE. - do n = 1, self%nbins - fwet = 1. - call WetRemovalGOCART2G(self%km, self%klid, self%nbins, self%nbins, n, self%cdt, 'sea_salt', & - KIN, MAPL_GRAV, fwet, SS(:,:,:,n), ple, t, airdens, & - pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, SSWT, __RC__) - end do + select case (self%wet_removal_scheme) + case ('gocart') + do n = 1, self%nbins + call WetRemovalGOCART2G(self%km, self%klid, self%nbins, self%nbins, n, self%cdt, 'sea_salt', & + KIN, MAPL_GRAV, self%fwet(n), SS(:,:,:,n), ple, t, airdens, & + pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, SSWT, __RC__) + end do + case ('ufs') + rainout_eff = 0.0 + do n = 1, self%nbins + rainout_eff(1) = self%fwet_ice(n) ! remove with ice + rainout_eff(2) = self%fwet_snow(n) ! remove with snow + rainout_eff(3) = self%fwet_rain(n) ! remove with rain + call WetRemovalUFS(self%km, self%klid, n, self%cdt, 'sea_salt', KIN, MAPL_GRAV, & + self%radius(n), rainout_eff, self%washout_tuning, self%wet_radius_thr, & + SS(:,:,:,n), ple, t, airdens, pfl_lsan, pfi_lsan, SSWT, __RC__) + end do + case default + _ASSERT_RC(.false.,'Unsupported wet removal scheme: '//trim(self%wet_removal_scheme),ESMF_RC_NOT_IMPL) + end select ! Compute diagnostics ! ------------------- @@ -896,8 +953,8 @@ subroutine Run2 (GC, import, export, clock, RC) 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, & + nbins=self%nbins, rlow=self%rlow, rup=self%rup, & + wavelengths_profile=self%wavelengths_profile*1.0e-9, & wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=SS, & grav=MAPL_GRAV, tmpu=t, rhoa=airdens, & rh=rh20,u=u, v=v, delp=delp, ple=ple,tropp=tropp, & @@ -905,8 +962,8 @@ subroutine Run2 (GC, import, export, clock, 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, & - rup=self%rup, wavelengths_profile=self%wavelengths_profile*1.0e-9, & + nbins=self%nbins, rlow=self%rlow, rup=self%rup, & + wavelengths_profile=self%wavelengths_profile*1.0e-9, & wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=SS, & grav=MAPL_GRAV, tmpu=t, rhoa=airdens, & rh=rh80,u=u, v=v, delp=delp, ple=ple,tropp=tropp, & @@ -993,6 +1050,7 @@ subroutine aerosol_optics(state, rc) integer, parameter :: DP=kind(1.0d0) real, dimension(:,:,:), pointer :: ple, rh real(kind=DP), dimension(:,:,:), pointer :: var + real(kind=DP), dimension(:,:,:,:), pointer :: var4d real, dimension(:,:,:,:), pointer :: q, q_4d integer, allocatable :: opaque_self(:) type(C_PTR) :: address @@ -1002,11 +1060,14 @@ subroutine aerosol_optics(state, rc) type(ESMF_Field) :: fld real(kind=DP), dimension(:,:,:), allocatable :: ext_s, ssa_s, asy_s ! (lon:,lat:,lev:) + real(kind=DP), dimension(:,:,:,:), allocatable :: pmom_s ! (lon:,lat:,lev:,nmom:) real, dimension(:,:,:), allocatable :: x integer :: instance integer :: n, nbins integer :: i1, j1, i2, j2, km integer :: band + integer :: usePhotTable + real :: wavelength integer :: k __Iam__('SS2G::aerosol_optics') @@ -1022,6 +1083,11 @@ subroutine aerosol_optics(state, rc) band = 0 call ESMF_AttributeGet(state, name='band_for_aerosol_optics', value=band, __RC__) +! Are we doing a photolysis calculation? +! -------------------------------------- + usePhotTable = 0 + call ESMF_AttributeGet (state, name='use_photolysis_table', value=usePhotTable, __RC__) + ! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) @@ -1067,7 +1133,13 @@ subroutine aerosol_optics(state, rc) address = transfer(opaque_self, address) call c_f_pointer(address, self) - call mie_ (self%rad_Mie, nbins, band, q_4d, rh, ext_s, ssa_s, asy_s, __RC__) + if (usePhotTable /= 0) then + wavelength = band*1.e-9 + allocate(pmom_s(i1:i2, j1:j2, km, self%phot_Mie%nmom), __STAT__) + call miephot_ (self%phot_Mie, nbins, wavelength, q_4d, rh, ext_s, ssa_s, pmom_s, __RC__) + else + call mie_ (self%rad_Mie, nbins, band, q_4d, rh, ext_s, ssa_s, asy_s, __RC__) + endif call ESMF_AttributeGet(state, name='extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) if (fld_name /= '') then @@ -1081,13 +1153,22 @@ subroutine aerosol_optics(state, rc) var = ssa_s(:,:,:) end if - call ESMF_AttributeGet(state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) - if (fld_name /= '') then - call MAPL_GetPointer(state, var, trim(fld_name), __RC__) - var = asy_s(:,:,:) + if (usePhotTable /= 0) then + call ESMF_AttributeGet (state, name='legendre_coefficients_of_p11_for_photolysis', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var4d, trim(fld_name), __RC__) + var4d = pmom_s(:,:,:,:) + end if + else + call ESMF_AttributeGet (state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = asy_s(:,:,:) + end if end if deallocate(ext_s, ssa_s, asy_s, __STAT__) + if (usePhotTable /= 0) deallocate(pmom_s, __STAT__) deallocate(q_4d, __STAT__) RETURN_(ESMF_SUCCESS) @@ -1125,14 +1206,55 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) call mie%Query(band, l, q(:,:,:,l), rh, tau=bext, gasym=gasym, ssa=bssa, __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 + bssa_s = bssa_s + (bssa*bext) ! scattering + basym_s = basym_s + gasym*(bssa*bext) ! asymmetry parameter multiplied by scattering end do RETURN_(ESMF_SUCCESS) end subroutine mie_ + subroutine miephot_(mie, nbins, wavelength, q, rh, bext_s, bssa_s, bpmom_s, rc) + + implicit none + + type(GOCART2G_Mie), intent(inout) :: mie ! mie table + integer, intent(in ) :: nbins ! number of bins + real, intent(in ) :: wavelength ! wavelength in nm + real, intent(in ) :: q(:,:,:,:) ! aerosol mass mixing ratio, kg kg-1 + real, intent(in ) :: rh(:,:,:) ! relative humidity + real(kind=DP), intent( out) :: bext_s (size(ext_s,1),size(ext_s,2),size(ext_s,3)) + real(kind=DP), intent( out) :: bssa_s (size(ext_s,1),size(ext_s,2),size(ext_s,3)) + real(kind=DP), intent( out) :: bpmom_s(size(pmom_s,1),size(pmom_s,2),size(pmom_s,3),size(pmom_s,4)) + integer, intent( out) :: rc + + ! local + integer :: l, m + real :: bext (size(ext_s,1),size(ext_s,2),size(ext_s,3)) ! extinction + real :: bssa (size(ext_s,1),size(ext_s,2),size(ext_s,3)) ! SSA + real :: pmom (size(pmom_s,1),size(pmom_s,2),size(pmom_s,3),size(pmom_s,4),6) + + __Iam__('SS2G::aerosol_optics::miephot_') + + bext_s = 0.0d0 + bssa_s = 0.0d0 + bpmom_s = 0.0d0 + + do l = 1, nbins + ! tau is converted to bext + call mie%Query(wavelength, l, q(:,:,:,l), rh, tau=bext, pmom=pmom, ssa=bssa, __RC__) + bext_s = bext_s + bext ! extinction + bssa_s = bssa_s + (bssa*bext) ! scattering + do m = 1, mie%nmom + bpmom_s(:,:,:,m) = bpmom_s(:,:,:,m) + pmom(:,:,:,m,1)*(bssa*bext) ! moments multiplied by scattering + enddo + end do + + + RETURN_(ESMF_SUCCESS) + + end subroutine miephot_ + end subroutine aerosol_optics !------------------------------------------------------------------------------------- diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.rc deleted file mode 100644 index f237f121..00000000 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_ExtData.rc +++ /dev/null @@ -1,44 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| - -# 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 - - -# SS.data - 2D - - -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 /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 /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 /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 /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_StateSpecs.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc index 6adfe688..0298001a 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc @@ -44,6 +44,7 @@ category: EXPORT SSMASS | kg kg-1 | xyz | C | | Sea Salt Mass Mixing Ratio SSMASS25 | kg kg-1 | xyz | C | | Sea Salt Mass Mixing Ratio of Particulate Matter < 2.5 microns (PM2.5) SSCONC | kg m-3 | xyz | C | | Sea Salt Mass Concentration + SSSD_V | m s-1 | xyz | C | self%nbins | Sea Salt Settling Velocity (Bin %d) SSEXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Sea Salt Extinction Coefficient SSEXTCOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | Sea Salt Extinction Coefficient - Fixed RH=20% SSEXTCOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | Sea Salt Extinction Coefficient - Fixed RH=80% diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc index 45437e6d..39a77ee8 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc @@ -2,8 +2,8 @@ # Resource file Sea Salt parameters # -aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_SS.v3_3.RRTMG.nc -aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_SS.v3_3.nc +aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_SS.v3_6.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_SS.v3_6.nc particle_radius_microns: 0.079 0.316 1.119 2.818 7.772 @@ -13,8 +13,19 @@ radius_upper: 0.1 0.5 1.5 5.0 10.0 particle_density: 2200. 2200. 2200. 2200. 2200. +# Wet Removal Scheme Option | gocart, ufs +wet_removal_scheme: gocart ! default value + # Scavenging efficiency per bin [km-1] -fscav: 0.4 0.4 0.4 0.4 0.4 +fscav: 0.4 0.4 0.4 0.4 0.4 + +# Rainout efficiency per bin for wet_removal_scheme == gocart +fwet: 1.0 1.0 1.0 1.0 1.0 + +# Rainout efficiency per bin for wet_removal_scheme == ufs +fwet_ice: 1.0 1.0 1.0 1.0 1.0 +fwet_snow: 1.0 1.0 1.0 1.0 1.0 +fwet_rain: 1.0 1.0 1.0 1.0 1.0 # Emissions methods and scaling emission_scheme: 3 # 1 for Gong 2003, 2 for ... @@ -24,10 +35,6 @@ sstEmisFlag: 2 # Apply a correction to e hoppelFlag: .false. # Apply Hoppel correction (set non-zero, see Fan and Toon 2011) weibullFlag: .false. # Apply Weibull distribution (set non-zero, see Fan and Toon 2011) -# Method of apply relative humidity to particle radius -rhFlag: 2 # RH swelling of Seasalt (1 for Fitzgerald 1975, - # 2 for Gerber 1985 method) - # Molecular weight of species [kg mole-1] molecular_weight: 0.058 0.058 0.058 0.058 0.058 @@ -41,4 +48,6 @@ nbins: 5 pressure_lid_in_hPa: 40.0 - +# SettlingSolver options +# Options: 'gocart' or 'ufs' +settling_scheme: 'gocart' 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 deleted file mode 100644 index 32be8f94..00000000 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP.20C/SU2G_GridComp_ExtData.rc +++ /dev/null @@ -1,67 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| - -#===== Sulfate Data Instance ========================================== -climSO4 'kg kg-1' Y N 0 0.0 1.0 SO4 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -#climDMS 'kg kg-1' Y N - 0.0 1.0 none /dev/null -#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 /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 /dev/null - -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 /dev/null - -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 /dev/null - -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 /dev/null - - -#====== Sulfate Sources ================================================= -# Biomass burning -SU_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.778 biomass ExtData/chemistry/HFED/v1.0/Y%y4/hfed.emis_so2.x576_y361_t14.%y4.nc4 - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -SU_ANTHROL1 NA N Y %y4-%m2-%d2t12:00:00 none none so2_nonenergy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 -SU_ANTHROL2 NA N Y %y4-%m2-%d2t12:00:00 none none so2_energy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - -# Ship emissions -SU_SHIPSO2 NA N Y %y4-%m2-%d2t12:00:00 none none so2_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 -SU_SHIPSO4 NA N Y %y4-%m2-%d2t12:00:00 none none so4_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - -# Aircraft fuel consumption -SU_AIRCRAFT NA N Y %y4-%m2-%d2t12:00:00 none none so2_aviation ExtData/chemistry/CEDS/v2021-04-21-revised/L72/SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - -# DMS concentration -SU_DMSO NA Y Y %y4-%m2-%d2t12:00:00 none none conc ExtData/chemistry/Lana/v2011/DMSclim_sfcconcentration.x360_y181_t12.Lana2011.nc4 - -# Aviation emissions during the three phases of flight -SU_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none so2_aviation /dev/null -SU_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none so2_aviation /dev/null -SU_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none so2_aviation /dev/null - -# H2O2, OH and NO3 mixing ratios -SU_H2O2 NA N Y %y4-%m2-%d2t12:00:00 none none h2o2 ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 -SU_OH NA N Y %y4-%m2-%d2t12:00:00 none none oh ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 -SU_NO3 NA N Y %y4-%m2-%d2t12:00:00 none none no3 ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 - -# Production of SO2 from OCS oxidation -pSO2_OCS NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -#SU_regionMask NA N v - none none REGION_MASK ExtData/chemistry/Masks/v0.0.0/sfc/ARCTAS.region_mask.x540_y361.2008.nc -%% - diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP.20C/SU2G_instance_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP.20C/SU2G_instance_SU.rc index d74fed8c..a082804a 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP.20C/SU2G_instance_SU.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP.20C/SU2G_instance_SU.rc @@ -2,13 +2,14 @@ # Resource file for Sulfer parameters. # -aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_SU.v1_3.RRTMG.nc -aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_SU.v1_3.nc +aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_SU.v1_6.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_SU.v1_6.nc nbins: 4 # Volcanic pointwise sources -volcano_srcfilen: ExtData/chemistry/CARN/v202106/sfc/so2_volcanic_emissions_Carns.%y4%m2%d2.rc +volcano_srcfilen_explosive: ExtData/chemistry/CARN/v202401/explosive/so2_explosive_volcanic_emissions_CARN_v202401.%y4%m2%d2.rc +volcano_srcfilen_degassing: ExtData/chemistry/CARN/v202401/so2_volcanic_emissions_CARN_v202401.degassing_only.rc # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 @@ -47,11 +48,5 @@ sigma: -1 -1 2.03 -1 # OH H2O2 NO3 from GMI Combined Stratosphere Troposphere (Lower case yes to enable) # ------------------------------------------------------------------------------------- -#using_GMI_OH: no -#using_GMI_NO3: no -#using_GMI_H2O2: no -export_H2O2: no -using_GMI_OH: .false. -using_GMI_NO3: .false. -using_GMI_H2O2: .false. - +using_GMI: .false. +disable_emissions: .false. diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.rc deleted file mode 100644 index cfd0a2cd..00000000 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.rc +++ /dev/null @@ -1,67 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| - -#===== Sulfate Data Instance ========================================== -climSO4 'kg kg-1' Y N 0 0.0 1.0 SO4 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -#climDMS 'kg kg-1' Y N - 0.0 1.0 none /dev/null -#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 /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 /dev/null - -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 /dev/null - -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 /dev/null - -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 /dev/null - - -#====== Sulfate Sources ================================================= -# Biomass burning -- QFED-v2.x -SU_BIOMASS NA 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_so2.061.%y4%m2%d2.nc4 - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -SU_ANTHROL1 NA N Y %y4-%m2-%d2t12:00:00 none none so2_nonenergy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 -SU_ANTHROL2 NA N Y %y4-%m2-%d2t12:00:00 none none so2_energy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - -# Ship emissions -SU_SHIPSO2 NA N Y %y4-%m2-%d2t12:00:00 none none so2_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 -SU_SHIPSO4 NA N Y %y4-%m2-%d2t12:00:00 none none so4_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - -# Aircraft fuel consumption -SU_AIRCRAFT NA N Y %y4-%m2-%d2t12:00:00 none none so2_aviation ExtData/chemistry/CEDS/v2021-04-21-revised/L72/SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - -# DMS concentration -SU_DMSO NA Y Y %y4-%m2-%d2t12:00:00 none none conc ExtData/chemistry/Lana/v2011/DMSclim_sfcconcentration.x360_y181_t12.Lana2011.nc4 - -# Aviation emissions during the three phases of flight -SU_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none so2_aviation /dev/null -SU_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none so2_aviation /dev/null -SU_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none so2_aviation /dev/null - -# H2O2, OH and NO3 mixing ratios -SU_H2O2 NA N Y %y4-%m2-%d2t12:00:00 none none h2o2 ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 -SU_OH NA N Y %y4-%m2-%d2t12:00:00 none none oh ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 -SU_NO3 NA N Y %y4-%m2-%d2t12:00:00 none none no3 ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 - -# Production of SO2 from OCS oxidation -pSO2_OCS NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -#SU_regionMask NA N v - none none REGION_MASK ExtData/chemistry/Masks/v0.0.0/sfc/ARCTAS.region_mask.x540_y361.2008.nc -%% - 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 ef6daaac..a57fe5cb 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_GridComp_ExtData.yaml @@ -5,14 +5,19 @@ Collections: template: ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 SU2G_SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/L72/SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" SU2G_SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" SU2G_SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" SU2G_SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" SU2G_SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" 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 valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" @@ -35,23 +40,23 @@ Samplings: update_frequency: PT24H update_offset: PT12H update_reference_time: '0' + SU2G_sample_3: + extrapolation: clim + update_frequency: PT24H + update_offset: PT12H + update_reference_time: '0' + source_time: "2019-01-15T12:00/2019-12-15T00:00:00" Exports: SU_AIRCRAFT: - collection: SU2G_SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - regrid: CONSERVE - sample: SU2G_sample_1 - variable: so2_aviation + - {starting: "1979-01-15T12:00", collection: SU2G_SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, sample: SU2G_sample_1, regrid: CONSERVE, variable: so2_aviation} + - {starting: "2019-12-15T12:00", collection: SU2G_SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, regrid: CONSERVE, sample: SU2G_sample_3, variable: so2_aviation} SU_ANTHROL1: - collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: SU2G_sample_1 - variable: so2_nonenergy + - {starting: "1979-01-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, sample: SU2G_sample_1, regrid: CONSERVE, variable: so2_nonenergy} + - {starting: "2019-12-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: SU2G_sample_3, variable: so2_nonenergy} SU_ANTHROL2: - collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: SU2G_sample_1 - variable: so2_energy + - {starting: "1979-01-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, sample: SU2G_sample_1, regrid: CONSERVE, variable: so2_energy} + - {starting: "2019-12-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: SU2G_sample_3, variable: so2_energy} SU_AVIATION_CDS: collection: /dev/null regrid: CONSERVE @@ -91,15 +96,11 @@ Exports: sample: SU2G_sample_1 variable: oh SU_SHIPSO2: - collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: SU2G_sample_1 - variable: so2_shipping + - {starting: "1979-01-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, sample: SU2G_sample_1, regrid: CONSERVE, variable: so2_shipping} + - {starting: "2019-12-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: SU2G_sample_3, variable: so2_shipping} SU_SHIPSO4: - collection: SU2G_SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: SU2G_sample_1 - variable: so4_shipping + - {starting: "1979-01-15T12:00", collection: SU2G_SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, sample: SU2G_sample_1, regrid: CONSERVE, variable: so4_shipping} + - {starting: "2019-12-15T12:00", collection: SU2G_SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: SU2G_sample_3, variable: so4_shipping} climSO4: collection: SU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SU2G_sample_0 @@ -141,4 +142,19 @@ Exports: regrid: CONSERVE sample: SU2G_sample_2 variable: biofuel + GMI_H2O2: + collection: /dev/null + regrid: CONSERVE + sample: SU2G_sample_2 + variable: GMI_H2O2 + GMI_OH: + collection: /dev/null + regrid: CONSERVE + sample: SU2G_sample_2 + variable: GMI_OH + GMI_NO3: + collection: /dev/null + regrid: CONSERVE + sample: SU2G_sample_2 + variable: GMI_NO3 diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_instance_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_instance_SU.rc index d74fed8c..e40f00e7 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_instance_SU.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/AMIP/SU2G_instance_SU.rc @@ -2,13 +2,14 @@ # Resource file for Sulfer parameters. # -aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_SU.v1_3.RRTMG.nc -aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_SU.v1_3.nc +aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_SU.v1_6.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_SU.v1_6.nc nbins: 4 # Volcanic pointwise sources -volcano_srcfilen: ExtData/chemistry/CARN/v202106/sfc/so2_volcanic_emissions_Carns.%y4%m2%d2.rc +volcano_srcfilen_explosive: ExtData/chemistry/CARN/v202401/explosive/so2_explosive_volcanic_emissions_CARN_v202401.%y4%m2%d2.rc +volcano_srcfilen_degassing: ExtData/chemistry/CARN/v202401/sfc/so2_volcanic_emissions_CARN_v202401.degassing_only.rc # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 @@ -47,11 +48,9 @@ sigma: -1 -1 2.03 -1 # OH H2O2 NO3 from GMI Combined Stratosphere Troposphere (Lower case yes to enable) # ------------------------------------------------------------------------------------- -#using_GMI_OH: no -#using_GMI_NO3: no -#using_GMI_H2O2: no -export_H2O2: no -using_GMI_OH: .false. -using_GMI_NO3: .false. -using_GMI_H2O2: .false. +using_GMI: .false. +disable_emissions: .false. +# SettlingSolver options +# Options: 'gocart' or 'ufs' +settling_scheme: 'gocart' diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/SU2G_GridComp/CMakeLists.txt index eba7571e..323b2392 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/CMakeLists.txt +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/CMakeLists.txt @@ -2,7 +2,7 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES GA_Environment MAPL Chem_Shared2G Process_Library esmf) + DEPENDENCIES GA_Environment MAPL Chem_Shared2G Process_Library ESMF::ESMF) mapl_acg (${this} SU2G_StateSpecs.rc IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 index 3bff0c02..a0f9185e 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 @@ -49,12 +49,16 @@ module SU2G_GridCompMod ! !DESCRIPTION: This module implements GOCART's Sulfer (SU) Gridded Component. ! !REVISION HISTORY: +! 04January2024 Collow - Update to ChemSettling Call ! 08July2020 Sherman, da Silva, Darmenov, Clune - First attempt at refactoring. !EOP !=========================================================================== ! !Sulfer state type :: ThreadWorkspace + integer :: nymd_last = -1 ! Previous nymd. Updated daily + +! Degassing volcanoes integer :: nVolc = 0 real, allocatable, dimension(:) :: vLat, & vLon, & @@ -63,7 +67,17 @@ module SU2G_GridCompMod vCloud integer, allocatable, dimension(:) :: vStart, & vEnd - integer :: nymd_last = -1 ! Previous nymd. Updated daily +! Explosive volcanoes + integer :: nVolcE = 0 + real, allocatable, dimension(:) :: vLatE, & + vLonE, & + vSO2E, & + vElevE, & + vCloudE + integer, allocatable, dimension(:) :: vStartE, & + vEndE + +! Other point emissions of Sulfate (SO4) integer :: nPts = -1 integer, allocatable, dimension(:) :: pstart, pend real, allocatable, dimension(:) :: pLat, & @@ -83,12 +97,17 @@ module SU2G_GridCompMod real :: aviation_layers(4) ! heights of the LTO, CDS and CRS layers real :: fSO4anth ! Fraction of anthropogenic emissions that are SO4 !logical :: firstRun = .true. - real, allocatable :: sigma(:) ! Sigma of lognormal number distribution !real, pointer :: h2o2_init(:,:,:) +! PRC: logic for GMI coupling + logical :: using_GMI + logical :: disable_emissions + ! Special handling for volcanic emissions - character(len=255) :: volcano_srcfilen -! !Workspae for point emissions + character(len=255) :: volcano_srcfilen_degassing + character(len=255) :: volcano_srcfilen_explosive + +! Workspace for point emissions logical :: doing_point_emissions = .false. character(len=255) :: point_emissions_srcfilen ! filename for pointwise emissions type(ThreadWorkspace), allocatable :: workspaces(:) @@ -173,13 +192,13 @@ subroutine SetServices ( GC, RC ) ! process generic config items call self%GA_Environment%load_from_config( cfg, universal_cfg, __RC__) - allocate(self%sigma(self%nbins), __STAT__) - ! process SU-specific items - call ESMF_ConfigGetAttribute(cfg, self%volcano_srcfilen, label='volcano_srcfilen:', __RC__) + call ESMF_ConfigGetAttribute(cfg, self%using_GMI, label='using_GMI:', __RC__) + call ESMF_ConfigGetAttribute(cfg, self%disable_emissions, label='disable_emissions:', __RC__) + call ESMF_ConfigGetAttribute(cfg, self%volcano_srcfilen_degassing, label='volcano_srcfilen_degassing:', __RC__) + call ESMF_ConfigGetAttribute(cfg, self%volcano_srcfilen_explosive, label='volcano_srcfilen_explosive:', __RC__) call ESMF_ConfigGetAttribute(cfg, self%eAircraftFuel, label='aircraft_fuel_emission_factor:', __RC__) call ESMF_ConfigGetAttribute(cfg, self%fSO4anth, label='so4_anthropogenic_fraction:', __RC__) - call ESMF_ConfigGetAttribute(cfg, self%sigma, label='sigma:', __RC__) call ESMF_ConfigFindLabel (cfg, 'aviation_vertical_layers:', __RC__) do i=1,size(self%aviation_layers) call ESMF_ConfigGetAttribute (cfg, self%aviation_layers(i), __RC__) @@ -317,12 +336,42 @@ subroutine SetServices ( GC, RC ) RESTART = MAPL_RestartSkip, __RC__) end if + if(self%using_GMI) then + + call MAPL_AddImportSpec(GC, & + SHORT_NAME = 'GMI_OH', & + LONG_NAME = 'Hydroxyl_radical', & + UNITS = 'mol/mol', & + DIMS = MAPL_DimsHorzVert, & + VLOCATION = MAPL_VLocationCenter, & + RESTART = MAPL_RestartSkip, __RC__) + + call MAPL_AddImportSpec(GC, & + SHORT_NAME = 'GMI_H2O2', & + LONG_NAME = 'Hydrogen_peroxide', & + UNITS = 'mol/mol', & + DIMS = MAPL_DimsHorzVert, & + VLOCATION = MAPL_VLocationCenter, & + RESTART = MAPL_RestartSkip, __RC__) + + call MAPL_AddImportSpec(GC, & + SHORT_NAME = 'GMI_NO3', & + LONG_NAME = 'Nitrogen_trioxide', & + UNITS = 'mol/mol', & + DIMS = MAPL_DimsHorzVert, & + VLOCATION = MAPL_VLocationCenter, & + RESTART = MAPL_RestartSkip, __RC__) + endif + ! Import, Export, Internal states for computational instance ! ---------------------------------------------------------- if (.not. data_driven) then #include "SU2G_Export___.h" #include "SU2G_Import___.h" #include "SU2G_Internal___.h" + if (MAPL_AM_I_ROOT()) then + write (*,*) trim(Iam)//": Settling scheme is "//trim(self%settling_scheme) + end if end if ! This state holds fields needed by radiation @@ -566,6 +615,23 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) call ESMF_ConfigGetAttribute (cfg, file_, label="aerosol_radBands_optics_file:", __RC__ ) self%rad_Mie = GOCART2G_Mie(trim(file_), __RC__) +! Trigger for photolysis calculations +! ----------------------------------- + call ESMF_AttributeSet (aero, name="use_photolysis_table", value=0, __RC__) + +! Create Photolysis Mie Table +! --------------------------- +! Get file names for the optical tables + call ESMF_ConfigGetAttribute (cfg, file_, & + label="aerosol_monochromatic_optics_file:", __RC__ ) + call ESMF_ConfigGetAttribute (universal_cfg, nmom_, label="n_phase_function_moments_photolysis:", default=0, __RC__) + i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_photolysis_wavelength_in_nm_from_LUT:', __RC__) + allocate (channels_(i), __STAT__ ) + call ESMF_ConfigGetAttribute (universal_cfg, channels_, & + label= "aerosol_photolysis_wavelength_in_nm_from_LUT:", __RC__) + self%phot_Mie = GOCART2G_Mie(trim(file_), channels_*1.e-9, nmom=nmom_, __RC__) + deallocate(channels_) + ! Create Diagnostics Mie Table ! ----------------------------- ! Get file names for the optical tables @@ -590,9 +656,18 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! call ESMF_StateGet (import, 'RH2', field, __RC__) ! call MAPL_StateAdd (aero, field, __RC__) + ! Add variables to SU instance aero state for chemistry + call add_aero (aero, label='surface_area_density', label2='SAREA', grid=grid, typekind=MAPL_R4,__RC__) + call add_aero (aero, label='effective_radius_in_microns', label2='REFF', grid=grid, typekind=MAPL_R4,__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 ESMF_ConfigGetAttribute (universal_cfg, nmom_, label='n_phase_function_moments_photolysis:', default=0, __RC__) + if(nmom_ > 0) then + call add_aero (aero, label='legendre_coefficients_of_p11_for_photolysis', label2='MOM', & + grid=grid, typekind=MAPL_R8, ungrid=nmom_, __RC__) + endif 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__) @@ -770,11 +845,11 @@ subroutine Run1 (GC, import, export, clock, RC) integer :: nymd, nhms, iyr, imm, idd, ihr, imn, isc real, pointer, dimension(:,:) :: lats real, pointer, dimension(:,:) :: lons - real, dimension(:,:,:), allocatable :: aircraft_fuel_src + real, dimension(:,:,:), allocatable :: aircraft_fuel_src, so2_ocs_src real, dimension(:,:), allocatable :: so2biomass_src, so2biomass_src_, so2anthro_l1_src, & so2anthro_l2_src, so2ship_src, so4ship_src, dmso_conc, & aviation_lto_src, aviation_cds_src, aviation_crs_src - integer, dimension(:), allocatable :: iPointVolc, jPointVolc, iPoint, jPoint + integer, dimension(:), allocatable :: iPoint, jPoint real, dimension(:,:,:), allocatable :: emissions_point character (len=ESMF_MAXSTR) :: fname ! file name for point source emissions logical :: fileExists @@ -854,11 +929,27 @@ subroutine Run1 (GC, import, export, clock, RC) where(1.01*so4ship_src > MAPL_UNDEF) so4ship_src = 0. aircraft_fuel_src = SU_AIRCRAFT - so2biomass_src = SU_BIOMASS - dmso_conc = SU_DMSO - aviation_lto_src = SU_AVIATION_LTO - aviation_cds_src = SU_AVIATION_CDS - aviation_crs_src = SU_AVIATION_CRS + so2biomass_src = SU_BIOMASS + dmso_conc = SU_DMSO + aviation_lto_src = SU_AVIATION_LTO + aviation_cds_src = SU_AVIATION_CDS + aviation_crs_src = SU_AVIATION_CRS + so2_ocs_src = pSO2_OCS + +! PRC: turn off emissions + if(self%disable_emissions) then + so2anthro_l1_src = 0. + so2anthro_l2_src = 0. + so2ship_src = 0. + so4ship_src = 0. + aircraft_fuel_src = 0. + so2biomass_src = 0. + dmso_conc = 0. + aviation_lto_src = 0. + aviation_cds_src = 0. + aviation_crs_src = 0. + so2_ocs_src = 0. + endif ! As a safety check, where value is undefined set to 0 where(1.01*so2biomass_src > MAPL_UNDEF) so2biomass_src = 0. @@ -868,34 +959,54 @@ subroutine Run1 (GC, import, export, clock, RC) where(1.01*aviation_cds_src > MAPL_UNDEF ) aviation_cds_src = 0. where(1.01*aviation_crs_src > MAPL_UNDEF ) aviation_crs_src = 0. +! Start with a clean emission diagnostic + if(associated(SUEM)) SUEM = 0.0 + + ! Update emissions/production if necessary (daily) ! ----------------------------------------------- thread = MAPL_get_current_thread() workspace => self%workspaces(thread) - +! Update Volcanic SO2 Emissions Daily if(workspace%nymd_last /= nymd) then workspace%nymd_last = nymd -! Get pointwise SO2 and altitude of volcanoes from a daily file data base - if(index(self%volcano_srcfilen,'volcanic_') /= 0) then - call StrTemplate(fname, self%volcano_srcfilen, xid='unknown', & +! DEGASSING: Get pointwise SO2 and altitude of volcanoes from a daily file data base + workspace%nVolc = 0 ! case of /dev/null (no volcanoes) or ill-formed filename + if(index(self%volcano_srcfilen_degassing,'volcanic_') /= 0) then + call StrTemplate(fname, self%volcano_srcfilen_degassing, xid='unknown', & nymd=nymd, nhms=120000 ) - call ReadPointEmissions (nymd, fname, workspace%nVolc, workspace%vLat, workspace%vLon, & + inquire(file=fname, exist=fileExists) + if (fileExists) then + call ReadPointEmissions (nymd, fname, workspace%nVolc, workspace%vLat, workspace%vLon, & workspace%vElev, workspace%vCloud, workspace%vSO2, workspace%vStart, & workspace%vEnd, label='volcano', __RC__) - workspace%vSO2 = workspace%vSO2 * fMassSO2 / fMassSulfur -! Special possible case - if(self%volcano_srcfilen(1:9) == '/dev/null') workspace%nVolc = 0 + workspace%vSO2 = workspace%vSO2 * fMassSO2 / fMassSulfur + end if + end if + +! EXPLOSIVE: Get pointwise SO2 and altitude of volcanoes from a daily file data base + workspace%nVolcE = 0 ! case of /dev/null (no volcanoes) or ill-formed filename + if(index(self%volcano_srcfilen_explosive,'volcanic_') /= 0) then + call StrTemplate(fname, self%volcano_srcfilen_explosive, xid='unknown', & + nymd=nymd, nhms=120000 ) + inquire(file=fname, exist=fileExists) + if (fileExists) then + call ReadPointEmissions (nymd, fname, workspace%nVolcE, workspace%vLatE, workspace%vLonE, & + workspace%vElevE, workspace%vCloudE, workspace%vSO2E, workspace%vStartE, & + workspace%vEndE, label='volcano', __RC__) + workspace%vSO2 = workspace%vSO2 * fMassSO2 / fMassSulfur + end if end if + end if -! Apply volcanic emissions -! ------------------------ +! DEGASSING: Apply volcanic emissions +! ----------------------------------- if (workspace%nVolc > 0) then - if (associated(SO2EMVE)) SO2EMVE=0.0 if (associated(SO2EMVN)) SO2EMVN=0.0 - allocate(iPointVolc(workspace%nVolc), jPointVolc(workspace%nVolc), __STAT__) - call MAPL_GetHorzIJIndex(workspace%nVolc, iPointVolc, jPointVolc, & + allocate(iPoint(workspace%nVolc), jPoint(workspace%nVolc), __STAT__) + call MAPL_GetHorzIJIndex(workspace%nVolc, iPoint, jPoint, & grid = grid, & lon = workspace%vLon/real(MAPL_RADIANS_TO_DEGREES), & lat = workspace%vLat/real(MAPL_RADIANS_TO_DEGREES), & @@ -906,8 +1017,30 @@ subroutine Run1 (GC, import, export, clock, RC) end if call SUvolcanicEmissions (workspace%nVolc, workspace%vStart, workspace%vEnd, workspace%vSO2, workspace%vElev, & - workspace%vCloud, iPointVolc, jPointVolc, nhms, SO2EMVN, SO2EMVE, SO2, nSO2, SUEM, & + workspace%vCloud, iPoint, jPoint, nhms, SO2EMVN, SO2, nSO2, SUEM, & self%km, self%cdt, MAPL_GRAV, zle, delp, area, workspace%vLat, workspace%vLon, __RC__) + deallocate(iPoint, jPoint, __STAT__) + end if + +! EXPLOSIVE: Apply volcanic emissions +! ----------------------------------- + if (workspace%nVolcE > 0) then + if (associated(SO2EMVE)) SO2EMVE=0.0 + allocate(iPoint(workspace%nVolcE), jPoint(workspace%nVolcE), __STAT__) + call MAPL_GetHorzIJIndex(workspace%nVolcE, iPoint, jPoint, & + grid = grid, & + lon = workspace%vLon/real(MAPL_RADIANS_TO_DEGREES), & + lat = workspace%vLat/real(MAPL_RADIANS_TO_DEGREES), & + rc = status) + if ( status /= 0 ) then + if (mapl_am_i_root()) print*, trim(Iam), ' - cannot get indices for point emissions' + VERIFY_(status) + end if + + call SUvolcanicEmissions (workspace%nVolcE, workspace%vStartE, workspace%vEndE, workspace%vSO2E, workspace%vElevE, & + workspace%vCloudE, iPoint, jPoint, nhms, SO2EMVE, SO2, nSO2, SUEM, & + self%km, self%cdt, MAPL_GRAV, zle, delp, area, workspace%vLatE, workspace%vLonE, __RC__) + deallocate(iPoint, jPoint, __STAT__) end if ! Apply diurnal cycle if so desired @@ -939,12 +1072,12 @@ subroutine Run1 (GC, import, export, clock, RC) if (associated(dms)) then call DMSemission (self%km, self%cdt, MAPL_GRAV, t, u10m, v10m, lwi, delp, & - fMassDMS, SU_DMSO, dms, SUEM, nDMS, __RC__) + fMassDMS, dmso_conc, dms, SUEM, nDMS, __RC__) end if ! Add source of OCS-produced SO2 ! ------------------------------ - SO2 = SO2 + pSO2_OCS*self%cdt + SO2 = SO2 + so2_ocs_src*self%cdt ! Read any pointwise emissions, if requested ! ------------------------------------------ @@ -982,6 +1115,7 @@ subroutine Run1 (GC, import, export, clock, RC) workspace%pStart, workspace%pEnd, zle, & area, iPoint, jPoint, nhms, emissions_point, __RC__) + deallocate(iPoint, jPoint, __STAT__) SO4 = SO4 + self%cdt * MAPL_GRAV / delp * emissions_point end if @@ -1012,6 +1146,7 @@ subroutine Run2 (GC, import, export, clock, RC) character (len=ESMF_MAXSTR) :: COMP_NAME type (MAPL_MetaComp), pointer :: MAPL type (ESMF_State) :: internal + type (ESMF_State) :: aero type (wrap_) :: wrap type (SU2G_GridComp), pointer :: self type (ESMF_Time) :: time @@ -1022,12 +1157,13 @@ subroutine Run2 (GC, import, export, clock, RC) logical :: KIN real, pointer, dimension(:,:) :: lats real, pointer, dimension(:,:) :: lons - character(len=ESMF_MAXSTR) :: short_name + character(len=ESMF_MAXSTR) :: short_name, fld_name real, pointer, dimension(:,:,:) :: int_ptr real, dimension(:,:,:), allocatable :: xoh, xno3, xh2o2 real, dimension(:,:), allocatable :: drydepositionf + real, pointer, dimension(:,:,:) :: susd_vel real, pointer, dimension(:,:,:) :: dummyMSA !=> null() ! this is so the model can run without MSA enabled logical :: alarm_is_ringing @@ -1035,7 +1171,8 @@ subroutine Run2 (GC, import, export, clock, RC) integer :: thread integer :: i1, j1, i2, j2, km real, target, allocatable, dimension(:,:,:) :: RH20,RH80 - + real, pointer, dimension(:,:) :: flux_ptr + integer :: settling_opt #include "SU2G_DeclarePointer___.h" __Iam__('Run2') @@ -1059,6 +1196,9 @@ subroutine Run2 (GC, import, export, clock, RC) LONS = LONS, & LATS = LATS, __RC__ ) +! Get the aero state + call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO' , aero , __RC__) + #include "SU2G_GetPointer___.h" call MAPL_GetPointer(internal, dummyMSA, 'MSA', rc=status) @@ -1098,39 +1238,60 @@ subroutine Run2 (GC, import, export, clock, RC) allocate(xoh, mold=airdens, __STAT__) allocate(xno3, mold=airdens, __STAT__) allocate(xh2o2, mold=airdens, __STAT__) - xoh = 0.0 - xno3 = 0.0 - !if (workspace%firstRun) then - !xh2o2 = MAPL_UNDEF - !h2o2_init = MAPL_UNDEF - !workspace%firstRun = .false. - !end if + if(self%using_GMI) then + xoh = GMI_OH + xh2o2 = GMI_H2O2 + xno3 = GMI_NO3 + xoh = xoh * (MAPL_AVOGAD/1000.) / MAPL_AIRMW * 1000. * airdens*1.00E-06 + call MAPL_MaxMin ( 'GMI:OH ', xoh) + call MAPL_MaxMin ( 'GMI:H2O2 ', xh2o2) + call MAPL_MaxMin ( 'GMI:NO3 ', xno3) + call MAPL_MaxMin ( 'GMI:rhoa ', airdens) + else - xh2o2 = h2o2_init + xoh = 0.0 + xno3 = 0.0 - call SulfateUpdateOxidants (nymd, nhms, LONS, LATS, airdens, self%km, self%cdt, & - workspace%nymd_oxidants, MAPL_UNDEF, real(MAPL_RADIANS_TO_DEGREES), & - MAPL_AVOGAD/1000., MAPL_PI, MAPL_AIRMW, & - SU_OH, SU_NO3, SU_H2O2, & - xoh, xno3, xh2o2, workspace%recycle_h2o2, __RC__) + if (workspace%firstRun) then + xh2o2 = MAPL_UNDEF + h2o2_init = MAPL_UNDEF + workspace%firstRun = .false. + end if -! SU Settling -! ----------- - do n = 1, self%nbins - ! if radius == 0 then we're dealing with a gas which has no settling losses - if (self%radius(n) == 0.0) then - if (associated(SUSD)) SUSD(:,:,n) = 0.0 - cycle - end if + xh2o2 = h2o2_init - call MAPL_VarSpecGet(InternalSpec(n), SHORT_NAME=short_name, __RC__) - call MAPL_GetPointer(internal, NAME=short_name, ptr=int_ptr, __RC__) + call SulfateUpdateOxidants (nymd, nhms, LONS, LATS, airdens, self%km, self%cdt, & + workspace%nymd_oxidants, MAPL_UNDEF, real(MAPL_RADIANS_TO_DEGREES), & + MAPL_AVOGAD/1000., MAPL_PI, MAPL_AIRMW, & + SU_OH, SU_NO3, SU_H2O2, & + xoh, xno3, xh2o2, workspace%recycle_h2o2, __RC__) + endif - call Chem_Settling (self%km, self%klid, n, self%rhFlag, self%cdt, MAPL_GRAV, & - self%radius(n)*1.e-6, self%rhop(n), int_ptr, t, airdens, & - rh2, zle, delp, SUSD, __RC__) - end do +! SU Settling +! ----------- + select case (self%settling_scheme) + case ('gocart') + settling_opt = 1 + case ('ufs') + settling_opt = 2 + case default + _ASSERT_RC(.false.,'Unsupported settling scheme: '//trim(self%settling_scheme),ESMF_RC_NOT_IMPL) + end select + +! Set default export value to 0.0 for all tracers + if (associated(SUSD)) SUSD(:,:,:) = 0.0 + if (associated(SUSD_V)) SUSD_V(:,:,:,:) = 0.0 +! Do settling only for sulfate aerosol tracer NSO4 + call MAPL_VarSpecGet(InternalSpec(nSO4), SHORT_NAME=short_name, __RC__) + call MAPL_GetPointer(internal, NAME=short_name, ptr=int_ptr, __RC__) + nullify(flux_ptr) + if (associated(SUSD)) flux_ptr => SUSD(:,:,nSO4) + nullify(susd_vel) + if (associated(SUSD_V)) susd_vel => SUSD_V(:,:,:,nSO4) + call Chem_SettlingSimple (self%km, self%klid, self%diag_Mie, 1, self%cdt, MAPL_GRAV, & + int_ptr, t, airdens, & + rh2, zle, delp, flux_ptr, susd_vel, settling_scheme=settling_opt, __RC__) allocate(drydepositionf, mold=lwi, __STAT__) call SulfateChemDriver (self%km, self%klid, self%cdt, MAPL_PI, real(MAPL_RADIANS_TO_DEGREES), MAPL_KARMAN, & @@ -1155,7 +1316,7 @@ subroutine Run2 (GC, import, export, clock, RC) SUWT, SUPSO4, SUPSO4WT, PSO4, PSO4WET, __RC__ ) ! Certain variables are multiplied by 1.0e-9 to convert from nanometers to meters - call SU_Compute_Diags ( self%km, self%klid, self%radius(nSO4), self%sigma(nSO4), self%rhop(nSO4), & + call SU_Compute_Diags ( self%km, self%klid, self%rhop(nSO4), & MAPL_GRAV, MAPL_PI, nSO4, self%diag_Mie, & self%wavelengths_profile*1.0e-9, self%wavelengths_vertint*1.0e-9, & t, airdens, delp, ple,tropp, rh2, u, v, DMS, SO2, SO4, dummyMSA, & @@ -1164,7 +1325,25 @@ subroutine Run2 (GC, import, export, clock, RC) SO2SMASS, SO2CMASS, & SO4SMASS, SO4CMASS, & SUEXTTAU, SUSTEXTTAU,SUSCATAU,SUSTSCATAU, SO4MASS, SUCONC, SUEXTCOEF, & - SUSCACOEF, SUBCKCOEF,SUANGSTR, SUFLUXU, SUFLUXV, SO4SAREA, SO4SNUM, __RC__) + SUSCACOEF, SUBCKCOEF,SUANGSTR, SUFLUXU, SUFLUXV, SO4SAREA, SO4SNUM, SO4REFF, __RC__) + + if(associated(SO4SAREA)) then + nullify(int_ptr) + call ESMF_AttributeGet(aero, name='surface_area_density', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(aero, int_ptr, trim(fld_name), __RC__) + int_ptr = SO4SAREA + endif + endif + + if(associated(SO4REFF)) then ! Note unit conversion below to microns + nullify(int_ptr) + call ESMF_AttributeGet(aero, name='effective_radius_in_microns', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(aero, int_ptr, trim(fld_name), __RC__) + int_ptr = SO4REFF*1.e6 + endif + endif i1 = lbound(RH2, 1); i2 = ubound(RH2, 1) j1 = lbound(RH2, 2); j2 = ubound(RH2, 2) @@ -1174,7 +1353,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, & rhop=self%rhop(nSO4), & grav=MAPL_GRAV, pi=MAPL_PI, nSO4=nSO4, mie=self%diag_Mie, & wavelengths_profile=self%wavelengths_profile*1.0e-9, & @@ -1184,7 +1363,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, & rhop=self%rhop(nSO4), & grav=MAPL_GRAV, pi=MAPL_PI, nSO4=nSO4, mie=self%diag_Mie, & wavelengths_profile=self%wavelengths_profile*1.0e-9, & @@ -1193,6 +1372,8 @@ subroutine Run2 (GC, import, export, clock, RC) DMS=DMS, SO2=SO2, SO4=SO4, MSA=dummyMSA,extcoef=SUEXTCOEFRH80,& scacoef = SUSCACOEFRH80, __RC__) + deallocate(xoh, xh2o2, xno3, stat=STATUS) + RETURN_(ESMF_SUCCESS) @@ -1265,6 +1446,7 @@ subroutine aerosol_optics(state, rc) integer, parameter :: DP=kind(1.0d0) real, dimension(:,:,:), pointer :: ple, rh real(kind=DP), dimension(:,:,:), pointer :: var + real(kind=DP), dimension(:,:,:,:), pointer :: var4d real, dimension(:,:,:), pointer :: q real, dimension(:,:,:,:), pointer :: q_4d integer, allocatable :: opaque_self(:) @@ -1276,11 +1458,14 @@ subroutine aerosol_optics(state, rc) character (len=ESMF_MAXSTR),allocatable :: aerosol_names(:) real(kind=DP), dimension(:,:,:), allocatable :: ext_s, ssa_s, asy_s ! (lon:,lat:,lev:) + real(kind=DP), dimension(:,:,:,:), allocatable :: pmom_s ! (lon:,lat:,lev:,nmom:) real :: x integer :: instance integer :: n, nbins integer :: i1, j1, i2, j2, km integer :: band + integer :: usePhotTable + real :: wavelength integer :: i, j, k @@ -1303,6 +1488,11 @@ subroutine aerosol_optics(state, rc) band = 0 call ESMF_AttributeGet(state, name='band_for_aerosol_optics', value=band, __RC__) +! Are we doing a photolysis calculation? +! -------------------------------------- + usePhotTable = 0 + call ESMF_AttributeGet (state, name='use_photolysis_table', value=usePhotTable, __RC__) + ! Pressure at layer edges ! ------------------------ call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) @@ -1348,7 +1538,13 @@ subroutine aerosol_optics(state, rc) address = transfer(opaque_self, address) call c_f_pointer(address, self) - call mie_ (self%rad_Mie, nbins, band, q_4d, rh, ext_s, ssa_s, asy_s, __RC__) + if (usePhotTable /= 0) then + wavelength = band*1.e-9 + allocate(pmom_s(i1:i2, j1:j2, km, self%phot_Mie%nmom), __STAT__) + call miephot_ (self%phot_Mie, nbins, wavelength, q_4d, rh, ext_s, ssa_s, pmom_s, __RC__) + else + call mie_ (self%rad_Mie, nbins, band, q_4d, rh, ext_s, ssa_s, asy_s, __RC__) + endif call ESMF_AttributeGet(state, name='extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) if (fld_name /= '') then @@ -1362,20 +1558,28 @@ subroutine aerosol_optics(state, rc) var = ssa_s(:,:,:) end if - call ESMF_AttributeGet(state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) - if (fld_name /= '') then - call MAPL_GetPointer(state, var, trim(fld_name), __RC__) - var = asy_s(:,:,:) + if (usePhotTable /= 0) then + call ESMF_AttributeGet (state, name='legendre_coefficients_of_p11_for_photolysis', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var4d, trim(fld_name), __RC__) + var4d = pmom_s(:,:,:,:) + end if + else + call ESMF_AttributeGet (state, name='asymmetry_parameter_of_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = asy_s(:,:,:) + end if end if deallocate(ext_s, ssa_s, asy_s, __STAT__) + if (usePhotTable /= 0) deallocate(pmom_s, __STAT__) deallocate(q_4d, __STAT__) RETURN_(ESMF_SUCCESS) contains -! subroutine mie_(mie_table, aerosol_names, nb, offset, q, rh, bext_s, bssa_s, basym_s, rc) subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) implicit none @@ -1406,8 +1610,8 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) call mie%Query(band, l, q(:,:,:,l), rh, tau=bext, gasym=gasym, ssa=bssa, __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 + bssa_s = bssa_s + (bssa*bext) ! scattering + basym_s = basym_s + gasym*(bssa*bext) ! asymmetry parameter multiplied by scattering end do @@ -1415,6 +1619,47 @@ subroutine mie_(mie, nbins, band, q, rh, bext_s, bssa_s, basym_s, rc) end subroutine mie_ + subroutine miephot_(mie, nbins, wavelength, q, rh, bext_s, bssa_s, bpmom_s, rc) + + implicit none + + type(GOCART2G_Mie), intent(inout) :: mie ! mie table + integer, intent(in ) :: nbins ! number of bins + real, intent(in ) :: wavelength ! wavelength in nm + real, intent(in ) :: q(:,:,:,:) ! aerosol mass mixing ratio, kg kg-1 + real, intent(in ) :: rh(:,:,:) ! relative humidity + real(kind=DP), intent( out) :: bext_s (size(ext_s,1),size(ext_s,2),size(ext_s,3)) + real(kind=DP), intent( out) :: bssa_s (size(ext_s,1),size(ext_s,2),size(ext_s,3)) + real(kind=DP), intent( out) :: bpmom_s(size(pmom_s,1),size(pmom_s,2),size(pmom_s,3),size(pmom_s,4)) + integer, intent( out) :: rc + + ! local + integer :: l, m + real :: bext (size(ext_s,1),size(ext_s,2),size(ext_s,3)) ! extinction + real :: bssa (size(ext_s,1),size(ext_s,2),size(ext_s,3)) ! SSA + real :: pmom (size(pmom_s,1),size(pmom_s,2),size(pmom_s,3),size(pmom_s,4),6) + + __Iam__('SU2G::aerosol_optics::miephot_') + + bext_s = 0.0d0 + bssa_s = 0.0d0 + bpmom_s = 0.0d0 + + do l = 1, nbins + ! tau is converted to bext + call mie%Query(wavelength, l, q(:,:,:,l), rh, tau=bext, pmom=pmom, ssa=bssa, __RC__) + bext_s = bext_s + bext ! extinction + bssa_s = bssa_s + (bssa*bext) ! scattering + do m = 1, mie%nmom + bpmom_s(:,:,:,m) = bpmom_s(:,:,:,m) + pmom(:,:,:,m,1)*(bssa*bext) ! moments multiplied by scattering + enddo + end do + + + RETURN_(ESMF_SUCCESS) + + end subroutine miephot_ + end subroutine aerosol_optics !----------------------------------------------------------------------------------- diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc deleted file mode 100644 index 926803f4..00000000 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc +++ /dev/null @@ -1,67 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| - -#===== Sulfate Data Instance ========================================== -climSO4 'kg kg-1' Y N 0 0.0 1.0 SO4 ExtData/chemistry/MERRA2/v0.0.0/L72/merra2.aer_Nv.2003-2015.2008%m2clm.nc4 -#climDMS 'kg kg-1' Y N - 0.0 1.0 none /dev/null -#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 /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 /dev/null - -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 /dev/null - -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 /dev/null - -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 /dev/null - - -#====== Sulfate Sources ================================================= -# Biomass burning -- QFED-v2.x -SU_BIOMASS NA 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_so2.006.%y4%m2%d2.nc4 - -# Anthropogenic (BF & FF) emissions -- allowed to input as two layers -SU_ANTHROL1 NA N Y %y4-%m2-%d2t12:00:00 none none so2_nonenergy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 -SU_ANTHROL2 NA N Y %y4-%m2-%d2t12:00:00 none none so2_energy ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - -# Ship emissions -SU_SHIPSO2 NA N Y %y4-%m2-%d2t12:00:00 none none so2_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 -SU_SHIPSO4 NA N Y %y4-%m2-%d2t12:00:00 none none so4_shipping ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - -# Aircraft fuel consumption -SU_AIRCRAFT NA N Y %y4-%m2-%d2t12:00:00 none none so2_aviation ExtData/chemistry/CEDS/v2021-04-21-revised/L72/SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - -# DMS concentration -SU_DMSO NA Y Y %y4-%m2-%d2t12:00:00 none none conc ExtData/chemistry/Lana/v2011/DMSclim_sfcconcentration.x360_y181_t12.Lana2011.nc4 - -# Aviation emissions during the three phases of flight -SU_AVIATION_LTO NA Y Y %y4-%m2-%d2t12:00:00 none none so2_aviation /dev/null -SU_AVIATION_CDS NA Y Y %y4-%m2-%d2t12:00:00 none none so2_aviation /dev/null -SU_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none so2_aviation /dev/null - -# H2O2, OH and NO3 mixing ratios -SU_H2O2 NA N Y %y4-%m2-%d2t12:00:00 none none h2o2 ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 -SU_OH NA N Y %y4-%m2-%d2t12:00:00 none none oh ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 -SU_NO3 NA N Y %y4-%m2-%d2t12:00:00 none none no3 ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 - -# Production of SO2 from OCS oxidation -pSO2_OCS NA Y Y %y4-%m2-%d2t12:00:00 none none biofuel /dev/null - -#SU_regionMask NA N v - none none REGION_MASK ExtData/chemistry/Masks/v0.0.0/sfc/ARCTAS.region_mask.x540_y361.2008.nc -%% - diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.yaml b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.yaml index cc390467..665eeae5 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.yaml +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.yaml @@ -5,17 +5,23 @@ Collections: template: ExtData/chemistry/MERRA2GMI/v0.0.0/L72/MERRA2_GMI.tavg24_3d_dac_Nv.x576_y361_t12.%y4.nc4 SU2G_SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/L72/SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" SU2G_SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" SU2G_SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" SU2G_SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" SU2G_SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4: template: ExtData/chemistry/CEDS/v2021-04-21-revised/sfc/SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 + valid_range: "1979-01-15T12:00/2019-12-15T12:00" 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 - valid_range: "2008-01-01T12:00:00/2008-12-15T12:00:00" + 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 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" @@ -35,23 +41,23 @@ Samplings: update_frequency: PT24H update_offset: PT12H update_reference_time: '0' + SU2G_sample_3: + extrapolation: clim + update_frequency: PT24H + update_offset: PT12H + update_reference_time: '0' + source_time: "2019-01-15T12:00/2019-12-15T00:00:00" Exports: SU_AIRCRAFT: - collection: SU2G_SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4 - regrid: CONSERVE - sample: SU2G_sample_1 - variable: so2_aviation + - {starting: "1979-01-15T12:00", collection: SU2G_SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, sample: SU2G_sample_1, regrid: CONSERVE, variable: so2_aviation} + - {starting: "2019-12-15T12:00", collection: SU2G_SO2-em-AIR-anthro_input4MIPs_emissions_CMIP_CEDS-2021-04-21_gn__aviation.x576_y361_z72_t12.%y4.nc4, regrid: CONSERVE, sample: SU2G_sample_3, variable: so2_aviation} SU_ANTHROL1: - collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: SU2G_sample_1 - variable: so2_nonenergy + - {starting: "1979-01-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, sample: SU2G_sample_1, regrid: CONSERVE, variable: so2_nonenergy} + - {starting: "2019-12-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_nonenergy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: SU2G_sample_3, variable: so2_nonenergy} SU_ANTHROL2: - collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: SU2G_sample_1 - variable: so2_energy + - {starting: "1979-01-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, sample: SU2G_sample_1, regrid: CONSERVE, variable: so2_energy} + - {starting: "2019-12-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_energy.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: SU2G_sample_3, variable: so2_energy} SU_AVIATION_CDS: collection: /dev/null regrid: CONSERVE @@ -91,54 +97,97 @@ Exports: sample: SU2G_sample_1 variable: oh SU_SHIPSO2: - collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: SU2G_sample_1 - variable: so2_shipping + - {starting: "1979-01-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, sample: SU2G_sample_1, regrid: CONSERVE, variable: so2_shipping} + - {starting: "2019-12-15T12:00", collection: SU2G_SO2-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: SU2G_sample_3, variable: so2_shipping} SU_SHIPSO4: - collection: SU2G_SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4 - regrid: CONSERVE - sample: SU2G_sample_1 - variable: so4_shipping + - {starting: "1979-01-15T12:00", collection: SU2G_SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, sample: SU2G_sample_1, regrid: CONSERVE, variable: so4_shipping} + - {starting: "2019-12-15T12:00", collection: SU2G_SO4-em-anthro_CMIP_CEDS_gn_shipping.x2304_y1441_t12.%y4.nc4, regrid: CONSERVE, sample: SU2G_sample_3, variable: so4_shipping} climSO4: collection: SU2G_merra2.aer_Nv.2003-2015.2008%m2clm.nc4 sample: SU2G_sample_0 variable: SO4 climSUDP001: - collection: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUDP001 climSUDP002: - collection: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUDP002 climSUDP003: - collection: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUDP003 climSUDP004: - collection: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUDP004 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: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUSV001 climSUSV002: - collection: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUSV002 climSUSV003: - collection: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUSV003 climSUSV004: - collection: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUSV004 climSUWT001: - collection: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUWT001 climSUWT002: - collection: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUWT002 climSUWT003: - collection: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUWT003 climSUWT004: - collection: /dev/null + collection: SU2G_merra2.aer_Nx.2003-2015.2008%m2clm.nc4 + sample: SU2G_sample_0 + variable: SUWT004 pSO2_OCS: collection: /dev/null regrid: CONSERVE sample: SU2G_sample_2 variable: biofuel + GMI_H2O2: + collection: /dev/null + regrid: CONSERVE + sample: SU2G_sample_2 + variable: GMI_H2O2 + GMI_OH: + collection: /dev/null + regrid: CONSERVE + sample: SU2G_sample_2 + variable: GMI_OH + GMI_NO3: + collection: /dev/null + regrid: CONSERVE + sample: SU2G_sample_2 + variable: GMI_NO3 diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc index af8781f5..ba311467 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc @@ -36,6 +36,9 @@ category: IMPORT SU_NO3 | 1 | xyz | C | SKIP | climatological NO3 source SU_OH | 1 | xyz | C | SKIP | climatological OH source SU_H2O2 | 1 | xyz | C | SKIP | climatological H2O2 source + GMI_NO3 | 1 | xyz | C | SKIP | GMI NO3 source + GMI_OH | 1 | xyz | C | SKIP | GMI OH source + GMI_H2O2 | 1 | xyz | C | SKIP | GMI H2O2 source #........................................................................................ SU_BIOMASS | 1 | xy | N | SKIP | biomass burning emissions SU_ANTHROL1 | 1 | xy | N | SKIP | anthropogenic BF emissions @@ -53,10 +56,10 @@ category: EXPORT #---------------------------------------------------------------------------------------- NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME #---------------------------------------------------------------------------------------- - SUEM | kg m-2 s-1 | xy | N | self%nbins | Sulfer Emission (Bin %d) - SUDP | kg m-2 s-1 | xy | N | self%nbins | Sulfate Dry Deposition (Bin %d) - SUSD | kg m-2 s-1 | xy | N | self%nbins | Sulfate Settling (Bin %d) - SUWT | kg m-2 s-1 | xy | N | self%nbins | Sulfate Wet Deposition (Bin %d) + SUEM | kg m-2 s-1 | xy | N | self%nbins | Sulfur Emission (Bin %d) + SUDP | kg m-2 s-1 | xy | N | self%nbins | Sulfur Dry Deposition (Bin %d) + SUSD | kg m-2 s-1 | xy | N | self%nbins | Sulfur Settling (Bin %d) + SUWT | kg m-2 s-1 | xy | N | self%nbins | Sulfur Wet Deposition (Bin %d) SUSV | kg m-2 s-1 | xy | N | self%nbins | Sulfate Convective Scavenging (Bin %d) SO4EMAN | kg m-2 s-1 | xy | N | | SO4 Anthropogenic Emissions SO2EMAN | kg m-2 s-1 | xy | N | | SO2 Anthropogenic Emissions @@ -84,6 +87,7 @@ category: EXPORT MSASMASS | kg m-3 | xy | N | | MSA Surface Mass Concentration MSACMASS | kg m-2 | xy | N | | MSA Column Mass Density SUCONC | kg m-3 | xyz | C | | SO4 Aerosol Mass Concentration + SUSD_V | m s-1 | xyz | C | self%nbins | SO4 Settling Velocity (Bin %d) SUEXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | SO4 Extinction Coefficient SUEXTCOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | SO4 Extinction Coefficient - Fixed RH=20% SUEXTCOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | SO4 Extinction Coefficient - Fixed RH=80% @@ -100,6 +104,7 @@ category: EXPORT SUSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | SO4 Aerosol Optical Depth Due to Scattering SUSTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | SO4 Stratospheric Aerosol Optical Depth Due to Scattering SO4SAREA | m2 m-3 | xyz | C | | SO4 Surface Area Density + SO4REFF | m | xyz | C | | SO4 Effective Radius SO4SNUM | m-3 | xyz | C | | SO4 Number Density category: INTERNAL @@ -111,8 +116,8 @@ category: INTERNAL DMS |kg kg-1| xyz | C | MAPL_RestartOptional | T | DYNAMICS:TURBULENCE:MOIST | Dimethylsulphide 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 | | F | | private H2O2 that is saved and used to initialize + MSA |kg kg-1| xyz | C | MAPL_RestartOptional | T | DYNAMICS:TURBULENCE:MOIST | Methanesulphonic acid + H2O2_INIT |kg kg-1| xyz | C | | F | | private H2O2 that is saved and used to initialize #******************************************************** diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc index 015f3d3a..da8e7b6d 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc @@ -2,13 +2,14 @@ # Resource file for Sulfer parameters. # -aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_SU.v1_3.RRTMG.nc -aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_SU.v1_3.nc +aerosol_radBands_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/opticsBands_SU.v1_6.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/chemistry/AerosolOptics/v0.0.0/x/optics_SU.v1_6.nc nbins: 4 # Volcanic pointwise sources -volcano_srcfilen: ExtData/chemistry/CARN/v202106/sfc/so2_volcanic_emissions_CARN_v202106.degassing_only.rc +volcano_srcfilen_explosive: /dev/null +volcano_srcfilen_degassing: ExtData/chemistry/CARN/v202401/sfc/so2_volcanic_emissions_CARN_v202401.degassing_only.rc # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 @@ -19,15 +20,15 @@ so4_anthropogenic_fraction: 0.03 # Aircraft emission factor: convert input unit to kg SO2 aircraft_fuel_emission_factor: 1.0000 -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) +# Scavenging efficiency per bin [km-1] fscav: 0.0 0.0 0.4 0.4 +#Dummy wet removal efficiency for the GOCART scheme. This is not used for sulfate as of GOCART v2.5 and should be revisited. +fwet: 1.0 1.0 1.0 1.0 + # Dry particle radius [um], used for settling particle_radius_microns: 0.0 0.0 0.35 0.0 -# Type of settling to use (see Chem_SettlingMod) -rhFlag: 4 - # Dry particle density [kg m-3] particle_density: -1 -1 1700 -1 @@ -47,11 +48,9 @@ sigma: -1 -1 2.03 -1 # OH H2O2 NO3 from GMI Combined Stratosphere Troposphere (Lower case yes to enable) # ------------------------------------------------------------------------------------- -#using_GMI_OH: no -#using_GMI_NO3: no -#using_GMI_H2O2: no -export_H2O2: no -using_GMI_OH: .false. -using_GMI_NO3: .false. -using_GMI_H2O2: .false. +using_GMI: .false. +disable_emissions: .false. +# SettlingSolver options +# Options: 'gocart' or 'ufs' +settling_scheme: 'gocart' diff --git a/ESMF/GOCART_GridComp/CFC_GridComp/AMIP.20C/CFC_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CFC_GridComp/AMIP.20C/CFC_GridComp_ExtData.rc deleted file mode 100644 index 7035706f..00000000 --- a/ESMF/GOCART_GridComp/CFC_GridComp/AMIP.20C/CFC_GridComp_ExtData.rc +++ /dev/null @@ -1,8 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -CFC12 NA N Y - none none CFC-12_EMISSION ExtData/g5chem/sfc/ARCTAS.CFC12.emission.x540_y361.2008.hdf -%% - diff --git a/ESMF/GOCART_GridComp/CFC_GridComp/AMIP/CFC_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CFC_GridComp/AMIP/CFC_GridComp_ExtData.rc deleted file mode 100644 index 7035706f..00000000 --- a/ESMF/GOCART_GridComp/CFC_GridComp/AMIP/CFC_GridComp_ExtData.rc +++ /dev/null @@ -1,8 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -CFC12 NA N Y - none none CFC-12_EMISSION ExtData/g5chem/sfc/ARCTAS.CFC12.emission.x540_y361.2008.hdf -%% - diff --git a/ESMF/GOCART_GridComp/CFC_GridComp/CFC_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CFC_GridComp/CFC_GridComp_ExtData.rc deleted file mode 100644 index 7035706f..00000000 --- a/ESMF/GOCART_GridComp/CFC_GridComp/CFC_GridComp_ExtData.rc +++ /dev/null @@ -1,8 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -CFC12 NA N Y - none none CFC-12_EMISSION ExtData/g5chem/sfc/ARCTAS.CFC12.emission.x540_y361.2008.hdf -%% - diff --git a/ESMF/GOCART_GridComp/CFC_GridComp/CMakeLists.txt b/ESMF/GOCART_GridComp/CFC_GridComp/CMakeLists.txt index 927e7449..20aecab7 100644 --- a/ESMF/GOCART_GridComp/CFC_GridComp/CMakeLists.txt +++ b/ESMF/GOCART_GridComp/CFC_GridComp/CMakeLists.txt @@ -2,7 +2,7 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES Chem_Shared Chem_Base GMAO_mpeu MAPL_cfio_r4 esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES Chem_Shared Chem_Base GMAO_mpeu MAPL_cfio_r4 ESMF::ESMF NetCDF::NetCDF_Fortran) esma_generate_gocart_code (${this} "-B\;-C\;-N\;GOCART") diff --git a/ESMF/GOCART_GridComp/CH4_GridComp/AMIP.20C/CH4_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CH4_GridComp/AMIP.20C/CH4_GridComp_ExtData.rc deleted file mode 100644 index cd77dc88..00000000 --- a/ESMF/GOCART_GridComp/CH4_GridComp/AMIP.20C/CH4_GridComp_ExtData.rc +++ /dev/null @@ -1,39 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -CH4_sfcFluxanimls NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_ANIMLS /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxcoal NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_COAL /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxleak NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_LEAK /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxgasvnt NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_GASVNT /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxhydz NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_HYDZ /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxmsw NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_MSW /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxsoilab NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_SOILAB /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxtrmite NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_TRMITE /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxbogs NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_BOGS /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxburn NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_BURN /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxricec NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_RICEC /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxswamps NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_SWAMPS /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxtundra NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_TUNDRA /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxbf NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_BF /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxtot NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_TOT /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_ohanimls NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohcoal NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohleak NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohgasvnt NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohhydz NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohmsw NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohsoilab NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohtrmite NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohbogs NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohburn NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohricec NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohswamps NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohtundra NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohbf NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohtot NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -# -CH4_regionMask NA N v - none none REGION_MASK ExtData/g5chem/sfc/ARCTAS.region_mask.x540_y361.2008.nc -%% - diff --git a/ESMF/GOCART_GridComp/CH4_GridComp/AMIP/CH4_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CH4_GridComp/AMIP/CH4_GridComp_ExtData.rc deleted file mode 100644 index cd77dc88..00000000 --- a/ESMF/GOCART_GridComp/CH4_GridComp/AMIP/CH4_GridComp_ExtData.rc +++ /dev/null @@ -1,39 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -CH4_sfcFluxanimls NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_ANIMLS /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxcoal NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_COAL /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxleak NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_LEAK /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxgasvnt NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_GASVNT /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxhydz NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_HYDZ /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxmsw NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_MSW /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxsoilab NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_SOILAB /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxtrmite NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_TRMITE /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxbogs NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_BOGS /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxburn NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_BURN /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxricec NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_RICEC /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxswamps NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_SWAMPS /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxtundra NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_TUNDRA /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxbf NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_BF /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxtot NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_TOT /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_ohanimls NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohcoal NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohleak NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohgasvnt NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohhydz NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohmsw NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohsoilab NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohtrmite NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohbogs NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohburn NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohricec NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohswamps NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohtundra NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohbf NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohtot NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -# -CH4_regionMask NA N v - none none REGION_MASK ExtData/g5chem/sfc/ARCTAS.region_mask.x540_y361.2008.nc -%% - diff --git a/ESMF/GOCART_GridComp/CH4_GridComp/CH4_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CH4_GridComp/CH4_GridComp_ExtData.rc deleted file mode 100644 index cd77dc88..00000000 --- a/ESMF/GOCART_GridComp/CH4_GridComp/CH4_GridComp_ExtData.rc +++ /dev/null @@ -1,39 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -CH4_sfcFluxanimls NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_ANIMLS /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxcoal NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_COAL /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxleak NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_LEAK /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxgasvnt NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_GASVNT /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxhydz NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_HYDZ /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxmsw NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_MSW /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxsoilab NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_SOILAB /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxtrmite NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_TRMITE /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxbogs NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_BOGS /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxburn NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_BURN /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxricec NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_RICEC /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxswamps NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_SWAMPS /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxtundra NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_TUNDRA /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxbf NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_BF /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_sfcFluxtot NA Y Y %y4-%m2-%d2t12:00:00 none none CH4_TOT /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/emist_plusCH4WangAposteriori.x288_y181_z72_t12.2006.nc -CH4_ohanimls NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohcoal NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohleak NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohgasvnt NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohhydz NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohmsw NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohsoilab NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohtrmite NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohbogs NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohburn NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohricec NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohswamps NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohtundra NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohbf NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CH4_ohtot NA Y Y %y4-%m2-%d2t12:00:00 none none oh /discover/nobackup/projects/gmao/share/dasilva/fvInput/g5chem/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -# -CH4_regionMask NA N v - none none REGION_MASK ExtData/g5chem/sfc/ARCTAS.region_mask.x540_y361.2008.nc -%% - diff --git a/ESMF/GOCART_GridComp/CMakeLists.txt b/ESMF/GOCART_GridComp/CMakeLists.txt index cce3ec13..5e017637 100644 --- a/ESMF/GOCART_GridComp/CMakeLists.txt +++ b/ESMF/GOCART_GridComp/CMakeLists.txt @@ -22,7 +22,7 @@ install( FILES ${resource_files} DESTINATION etc ) -set (dependencies Chem_Base Chem_Shared MAPL GMAO_mpeu esmf) +set (dependencies Chem_Base Chem_Shared MAPL GMAO_mpeu ESMF::ESMF) esma_add_library (${this} SRCS ${srcs} SUBCOMPONENTS ${alldirs} diff --git a/ESMF/GOCART_GridComp/CO2_GridComp/AMIP.20C/CO2_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CO2_GridComp/AMIP.20C/CO2_GridComp_ExtData.rc deleted file mode 100644 index ad06aea5..00000000 --- a/ESMF/GOCART_GridComp/CO2_GridComp/AMIP.20C/CO2_GridComp_ExtData.rc +++ /dev/null @@ -1,19 +0,0 @@ -PrimaryExports%% -# A = Climatology? Y/N; B = Conservative regridding? Y/N -#---------------+-------------------+-+-+---------------------+--------+--------+------------------------------------ -# Export | | | |_______ Refresh _____|____ Factors ____|_______ External File __________ -# Name | Units |A|B| Time Template | Offset | Scale | Variable | Template -#---------------+-------------------+-+-+---------------------+--------+--------+-------------+---------------------- - CO2_BIOMASS 'kg CO2 m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none biomass ExtData/chemistry/HFED/v1.0/Y%y4/hfed.emis_co2.x576_y361_t14.%y4.nc4 - CO2_FF 'kg C m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none emco2ff ExtData/PIESA/sfc/bian.co2.x288_y181_t12.2001.nc - CO2_NEP 'kg C m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none emco2nep ExtData/PIESA/sfc/bian.co2.x288_y181_t12.2001.nc - CO2_OCN 'kg C m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none emco2ocn ExtData/PIESA/sfc/bian.co2.x288_y181_t12.2001.nc - - CO2_CMS_BIOMASS 'kg C m-2 s-1' N Y F%y4-%m2-%d2t12:00:00 none none biomass ExtData/PIESA/sfc/CMS/em.daily.1x1.25.%y4.nc - CO2_CMS_FF 'kg C m-2 s-1' N Y F%y4-%m2-%d2t12:00:00 none none emco2ff ExtData/PIESA/sfc/CMS/ORNL_TRANSCOM.co2_ff_nep_ocn.x288_y181_t12.%y4.nc - CO2_CMS_NEP 'kg C m-2 s-1' N Y P0000-00-00T03:00 none none emco2nep ExtData/PIESA/sfc/CMS/casa.3hr.1x1.25.%y4.nc - CO2_CMS_OCN 'kg C m-2 s-1' N Y F%y4-%m2-%d2t12:00:00 none none emco2ocn ExtData/PIESA/sfc/CMS/NOBM_fco2.daily.1x1.25.%y4.nc - - CO2_regionMask NA N v - none none REGION_MASK ExtData/PIESA/sfc/ARCTAS.region_mask.x540_y361.2008.nc -#---------------+-------------------+-+-+---------------------+--------+--------+-------------+---------------------- -%% diff --git a/ESMF/GOCART_GridComp/CO2_GridComp/AMIP/CO2_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CO2_GridComp/AMIP/CO2_GridComp_ExtData.rc deleted file mode 100644 index c1244ab9..00000000 --- a/ESMF/GOCART_GridComp/CO2_GridComp/AMIP/CO2_GridComp_ExtData.rc +++ /dev/null @@ -1,19 +0,0 @@ -PrimaryExports%% -# A = Climatology? Y/N; B = Conservative regridding? Y/N -#---------------+-------------------+-+-+---------------------+--------+--------+------------------------------------ -# Export | | | |_______ Refresh _____|____ Factors ____|_______ External File __________ -# Name | Units |A|B| Time Template | Offset | Scale | Variable | Template -#---------------+-------------------+-+-+---------------------+--------+--------+-------------+---------------------- - CO2_BIOMASS 'kg CO2 m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none biomass ExtData/PIESA/sfc/QFED/v2.4r6/climatology/qfed2.emis_co2.005.x1152_y721_t12.2003_2012.2007.nc4 - CO2_FF 'kg C m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none emco2ff ExtData/PIESA/sfc/bian.co2.x288_y181_t12.2001.nc - CO2_NEP 'kg C m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none emco2nep ExtData/PIESA/sfc/bian.co2.x288_y181_t12.2001.nc - CO2_OCN 'kg C m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none emco2ocn ExtData/PIESA/sfc/bian.co2.x288_y181_t12.2001.nc - - CO2_CMS_BIOMASS 'kg C m-2 s-1' N Y F%y4-%m2-%d2t12:00:00 none none biomass ExtData/PIESA/sfc/CMS/em.daily.1x1.25.%y4.nc - CO2_CMS_FF 'kg C m-2 s-1' N Y F%y4-%m2-%d2t12:00:00 none none emco2ff ExtData/PIESA/sfc/CMS/ORNL_TRANSCOM.co2_ff_nep_ocn.x288_y181_t12.%y4.nc - CO2_CMS_NEP 'kg C m-2 s-1' N Y P0000-00-00T03:00 none none emco2nep ExtData/PIESA/sfc/CMS/casa.3hr.1x1.25.%y4.nc - CO2_CMS_OCN 'kg C m-2 s-1' N Y F%y4-%m2-%d2t12:00:00 none none emco2ocn ExtData/PIESA/sfc/CMS/NOBM_fco2.daily.1x1.25.%y4.nc - - CO2_regionMask NA N v - none none REGION_MASK ExtData/PIESA/sfc/ARCTAS.region_mask.x540_y361.2008.nc -#---------------+-------------------+-+-+---------------------+--------+--------+-------------+---------------------- -%% diff --git a/ESMF/GOCART_GridComp/CO2_GridComp/CMakeLists.txt b/ESMF/GOCART_GridComp/CO2_GridComp/CMakeLists.txt index 927e7449..20aecab7 100644 --- a/ESMF/GOCART_GridComp/CO2_GridComp/CMakeLists.txt +++ b/ESMF/GOCART_GridComp/CO2_GridComp/CMakeLists.txt @@ -2,7 +2,7 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES Chem_Shared Chem_Base GMAO_mpeu MAPL_cfio_r4 esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES Chem_Shared Chem_Base GMAO_mpeu MAPL_cfio_r4 ESMF::ESMF NetCDF::NetCDF_Fortran) esma_generate_gocart_code (${this} "-B\;-C\;-N\;GOCART") diff --git a/ESMF/GOCART_GridComp/CO2_GridComp/CO2_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CO2_GridComp/CO2_GridComp_ExtData.rc deleted file mode 100644 index c1244ab9..00000000 --- a/ESMF/GOCART_GridComp/CO2_GridComp/CO2_GridComp_ExtData.rc +++ /dev/null @@ -1,19 +0,0 @@ -PrimaryExports%% -# A = Climatology? Y/N; B = Conservative regridding? Y/N -#---------------+-------------------+-+-+---------------------+--------+--------+------------------------------------ -# Export | | | |_______ Refresh _____|____ Factors ____|_______ External File __________ -# Name | Units |A|B| Time Template | Offset | Scale | Variable | Template -#---------------+-------------------+-+-+---------------------+--------+--------+-------------+---------------------- - CO2_BIOMASS 'kg CO2 m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none biomass ExtData/PIESA/sfc/QFED/v2.4r6/climatology/qfed2.emis_co2.005.x1152_y721_t12.2003_2012.2007.nc4 - CO2_FF 'kg C m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none emco2ff ExtData/PIESA/sfc/bian.co2.x288_y181_t12.2001.nc - CO2_NEP 'kg C m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none emco2nep ExtData/PIESA/sfc/bian.co2.x288_y181_t12.2001.nc - CO2_OCN 'kg C m-2 s-1' Y Y F%y4-%m2-%d2t12:00:00 none none emco2ocn ExtData/PIESA/sfc/bian.co2.x288_y181_t12.2001.nc - - CO2_CMS_BIOMASS 'kg C m-2 s-1' N Y F%y4-%m2-%d2t12:00:00 none none biomass ExtData/PIESA/sfc/CMS/em.daily.1x1.25.%y4.nc - CO2_CMS_FF 'kg C m-2 s-1' N Y F%y4-%m2-%d2t12:00:00 none none emco2ff ExtData/PIESA/sfc/CMS/ORNL_TRANSCOM.co2_ff_nep_ocn.x288_y181_t12.%y4.nc - CO2_CMS_NEP 'kg C m-2 s-1' N Y P0000-00-00T03:00 none none emco2nep ExtData/PIESA/sfc/CMS/casa.3hr.1x1.25.%y4.nc - CO2_CMS_OCN 'kg C m-2 s-1' N Y F%y4-%m2-%d2t12:00:00 none none emco2ocn ExtData/PIESA/sfc/CMS/NOBM_fco2.daily.1x1.25.%y4.nc - - CO2_regionMask NA N v - none none REGION_MASK ExtData/PIESA/sfc/ARCTAS.region_mask.x540_y361.2008.nc -#---------------+-------------------+-+-+---------------------+--------+--------+-------------+---------------------- -%% diff --git a/ESMF/GOCART_GridComp/CO_GridComp/AMIP.20C/CO_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CO_GridComp/AMIP.20C/CO_GridComp_ExtData.rc deleted file mode 100755 index 6a662b98..00000000 --- a/ESMF/GOCART_GridComp/CO_GridComp/AMIP.20C/CO_GridComp_ExtData.rc +++ /dev/null @@ -1,112 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -CO_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 1.11 biomass ExtData/chemistry/HFED/v1.0/Y%y4/hfed.emis_co.x576_y361_t14.%y4.nc4 -CO_OH NA Y Y %y4-%m2-%d2t12:00:00 none none oh ExtData/PIESA/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CO_CH4 NA Y Y %y4-%m2-%d2t12:00:00 none none ch4 ExtData/PIESA/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CO_BF NA Y Y %y4-%m2-%d2t12:00:00 none 1.19 emcobf ExtData/PIESA/sfc/co_biofuel_v2.x360_y181_t12.2001.nc -CO_FS NA Y Y %y4-%m2-%d2t12:00:00 none 1.20 emcofs ExtData/PIESA/sfc/co_fossilfuel_v2.x360_y181_t12.2001.nc -CO_ISOP NA Y Y %y4-%m2-%d2t12:00:00 none 0.2 emcoisop ExtData/PIESA/sfc/co_biogenic.x288_y181_t12.2006.nc -CO_NVOC NA Y Y %y4-%m2-%d2t12:00:00 none none emconvoc ExtData/PIESA/sfc/co_biogenic.x288_y181_t12.2006.nc -CO_TERP NA Y Y %y4-%m2-%d2t12:00:00 none none emcoterp ExtData/PIESA/sfc/co_biogenic.x288_y181_t12.2006.nc - -CO_CH4bbae NA Y Y - none none ch4 /dev/null -CO_BFbbae NA Y Y - none none bf /dev/null -CO_FSbbae NA Y Y - none none fs /dev/null -CO_ISOPbbae NA Y Y - none none isop /dev/null -CO_NVOCbbae NA Y Y - none none nvoc /dev/null -CO_TERPbbae NA Y Y - none none terp /dev/null -# -CO_CH4bbna NA Y Y - none none ch4 /dev/null -CO_BFbbna NA Y Y - none none bf /dev/null -CO_FSbbna NA Y Y - none none fs /dev/null -CO_ISOPbbna NA Y Y - none none isop /dev/null -CO_NVOCbbna NA Y Y - none none nvoc /dev/null -CO_TERPbbna NA Y Y - none none terp /dev/null -# -CO_CH4bbla NA Y Y - none none ch4 /dev/null -CO_BFbbla NA Y Y - none none bf /dev/null -CO_FSbbla NA Y Y - none none fs /dev/null -CO_ISOPbbla NA Y Y - none none isop /dev/null -CO_NVOCbbla NA Y Y - none none nvoc /dev/null -CO_TERPbbla NA Y Y - none none terp /dev/null -# -CO_CH4bbaf NA Y Y - none none ch4 /dev/null -CO_BFbbaf NA Y Y - none none bf /dev/null -CO_FSbbaf NA Y Y - none none fs /dev/null -CO_ISOPbbaf NA Y Y - none none isop /dev/null -CO_NVOCbbaf NA Y Y - none none nvoc /dev/null -CO_TERPbbaf NA Y Y - none none terp /dev/null -# -CO_CH4bbgl NA Y Y - none none ch4 /dev/null -CO_BFbbgl NA Y Y - none none bf /dev/null -CO_FSbbgl NA Y Y - none none fs /dev/null -CO_ISOPbbgl NA Y Y - none none isop /dev/null -CO_NVOCbbgl NA Y Y - none none nvoc /dev/null -CO_TERPbbgl NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbna NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbeu NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbas NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbgl NA Y Y - none none terp /dev/null -# -CO_regionMask NA N V - none none REGION_MASK ExtData/PIESA/sfc/ARCTAS.region_mask.x540_y361.2008.nc -%% - - -DerivedExports%% -# ---------|---------|--------------------------------------------| -# Export | Primary |_________________ Mask _____________________| -# Name | Name | Name | Expression | -# ---------|---------|------------|-------------------------------| -# ---------|---------|------------|-------------------------------| -CO_BIOMASSbbae regionmask(CO_BIOMASS,CO_regionMask;3,9,10) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbna regionmask(CO_BIOMASS,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbla regionmask(CO_BIOMASS,CO_regionMask;2,6) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbaf regionmask(CO_BIOMASS,CO_regionMask;5) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbgl CO_BIOMASS %y4-%m2-%d2t12:00:00 -# -CO_CH4nbna regionmask(CO_CH4,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_BFnbna regionmask(CO_BF,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_FSnbna regionmask(CO_FS,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_ISOPnbna regionmask(CO_ISOP,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_NVOCnbna regionmask(CO_NVOC,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_TERPnbna regionmask(CO_TERP,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -# -CO_CH4nbeu regionmask(CO_CH4,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_BFnbeu regionmask(CO_BF,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_FSnbeu regionmask(CO_FS,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_ISOPnbeu regionmask(CO_ISOP,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_NVOCnbeu regionmask(CO_NVOC,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_TERPnbeu regionmask(CO_TERP,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -# -CO_CH4nbas regionmask(CO_CH4,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_BFnbas regionmask(CO_BF,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_FSnbas regionmask(CO_FS,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_ISOPnbas regionmask(CO_ISOP,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_NVOCnbas regionmask(CO_NVOC,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_TERPnbas regionmask(CO_TERP,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -# -CO_CH4nbgl CO_CH4 %y4-%m2-%d2t12:00:00 -CO_BFnbgl CO_BF %y4-%m2-%d2t12:00:00 -CO_FSnbgl CO_FS %y4-%m2-%d2t12:00:00 -CO_ISOPnbgl CO_ISOP %y4-%m2-%d2t12:00:00 -CO_NVOCnbgl CO_NVOC %y4-%m2-%d2t12:00:00 -CO_TERPnbgl CO_TERP %y4-%m2-%d2t12:00:00 -# -CO_OHbbae CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbna CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbla CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbaf CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbgl CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbna CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbeu CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbas CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbgl CO_OH %y4-%m2-%d2t12:00:00 -%% - diff --git a/ESMF/GOCART_GridComp/CO_GridComp/AMIP/CO_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CO_GridComp/AMIP/CO_GridComp_ExtData.rc deleted file mode 100755 index f1748325..00000000 --- a/ESMF/GOCART_GridComp/CO_GridComp/AMIP/CO_GridComp_ExtData.rc +++ /dev/null @@ -1,112 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -CO_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 1.11 biomass ExtData/chemistry/QFED/v2.6r1/sfc/0.1/Y%y4/M%m2/qfed2.emis_co.061.%y4%m2%d2.nc4 -CO_OH NA Y Y %y4-%m2-%d2t12:00:00 none none oh ExtData/PIESA/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CO_CH4 NA Y Y %y4-%m2-%d2t12:00:00 none none ch4 ExtData/PIESA/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CO_BF NA Y Y %y4-%m2-%d2t12:00:00 none 1.19 emcobf ExtData/PIESA/sfc/co_biofuel_v2.x360_y181_t12.2001.nc -CO_FS NA Y Y %y4-%m2-%d2t12:00:00 none 1.20 emcofs ExtData/PIESA/sfc/co_fossilfuel_v2.x360_y181_t12.2001.nc -CO_ISOP NA Y Y %y4-%m2-%d2t12:00:00 none 0.2 emcoisop ExtData/PIESA/sfc/co_biogenic.x288_y181_t12.2006.nc -CO_NVOC NA Y Y %y4-%m2-%d2t12:00:00 none none emconvoc ExtData/PIESA/sfc/co_biogenic.x288_y181_t12.2006.nc -CO_TERP NA Y Y %y4-%m2-%d2t12:00:00 none none emcoterp ExtData/PIESA/sfc/co_biogenic.x288_y181_t12.2006.nc - -CO_CH4bbae NA Y Y - none none ch4 /dev/null -CO_BFbbae NA Y Y - none none bf /dev/null -CO_FSbbae NA Y Y - none none fs /dev/null -CO_ISOPbbae NA Y Y - none none isop /dev/null -CO_NVOCbbae NA Y Y - none none nvoc /dev/null -CO_TERPbbae NA Y Y - none none terp /dev/null -# -CO_CH4bbna NA Y Y - none none ch4 /dev/null -CO_BFbbna NA Y Y - none none bf /dev/null -CO_FSbbna NA Y Y - none none fs /dev/null -CO_ISOPbbna NA Y Y - none none isop /dev/null -CO_NVOCbbna NA Y Y - none none nvoc /dev/null -CO_TERPbbna NA Y Y - none none terp /dev/null -# -CO_CH4bbla NA Y Y - none none ch4 /dev/null -CO_BFbbla NA Y Y - none none bf /dev/null -CO_FSbbla NA Y Y - none none fs /dev/null -CO_ISOPbbla NA Y Y - none none isop /dev/null -CO_NVOCbbla NA Y Y - none none nvoc /dev/null -CO_TERPbbla NA Y Y - none none terp /dev/null -# -CO_CH4bbaf NA Y Y - none none ch4 /dev/null -CO_BFbbaf NA Y Y - none none bf /dev/null -CO_FSbbaf NA Y Y - none none fs /dev/null -CO_ISOPbbaf NA Y Y - none none isop /dev/null -CO_NVOCbbaf NA Y Y - none none nvoc /dev/null -CO_TERPbbaf NA Y Y - none none terp /dev/null -# -CO_CH4bbgl NA Y Y - none none ch4 /dev/null -CO_BFbbgl NA Y Y - none none bf /dev/null -CO_FSbbgl NA Y Y - none none fs /dev/null -CO_ISOPbbgl NA Y Y - none none isop /dev/null -CO_NVOCbbgl NA Y Y - none none nvoc /dev/null -CO_TERPbbgl NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbna NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbeu NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbas NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbgl NA Y Y - none none terp /dev/null -# -CO_regionMask NA N V - none none REGION_MASK ExtData/PIESA/sfc/ARCTAS.region_mask.x540_y361.2008.nc -%% - - -DerivedExports%% -# ---------|---------|--------------------------------------------| -# Export | Primary |_________________ Mask _____________________| -# Name | Name | Name | Expression | -# ---------|---------|------------|-------------------------------| -# ---------|---------|------------|-------------------------------| -CO_BIOMASSbbae regionmask(CO_BIOMASS,CO_regionMask;3,9,10) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbna regionmask(CO_BIOMASS,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbla regionmask(CO_BIOMASS,CO_regionMask;2,6) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbaf regionmask(CO_BIOMASS,CO_regionMask;5) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbgl CO_BIOMASS %y4-%m2-%d2t12:00:00 -# -CO_CH4nbna regionmask(CO_CH4,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_BFnbna regionmask(CO_BF,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_FSnbna regionmask(CO_FS,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_ISOPnbna regionmask(CO_ISOP,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_NVOCnbna regionmask(CO_NVOC,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_TERPnbna regionmask(CO_TERP,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -# -CO_CH4nbeu regionmask(CO_CH4,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_BFnbeu regionmask(CO_BF,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_FSnbeu regionmask(CO_FS,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_ISOPnbeu regionmask(CO_ISOP,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_NVOCnbeu regionmask(CO_NVOC,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_TERPnbeu regionmask(CO_TERP,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -# -CO_CH4nbas regionmask(CO_CH4,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_BFnbas regionmask(CO_BF,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_FSnbas regionmask(CO_FS,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_ISOPnbas regionmask(CO_ISOP,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_NVOCnbas regionmask(CO_NVOC,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_TERPnbas regionmask(CO_TERP,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -# -CO_CH4nbgl CO_CH4 %y4-%m2-%d2t12:00:00 -CO_BFnbgl CO_BF %y4-%m2-%d2t12:00:00 -CO_FSnbgl CO_FS %y4-%m2-%d2t12:00:00 -CO_ISOPnbgl CO_ISOP %y4-%m2-%d2t12:00:00 -CO_NVOCnbgl CO_NVOC %y4-%m2-%d2t12:00:00 -CO_TERPnbgl CO_TERP %y4-%m2-%d2t12:00:00 -# -CO_OHbbae CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbna CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbla CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbaf CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbgl CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbna CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbeu CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbas CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbgl CO_OH %y4-%m2-%d2t12:00:00 -%% - diff --git a/ESMF/GOCART_GridComp/CO_GridComp/CMakeLists.txt b/ESMF/GOCART_GridComp/CO_GridComp/CMakeLists.txt index ef32201f..1a17c597 100644 --- a/ESMF/GOCART_GridComp/CO_GridComp/CMakeLists.txt +++ b/ESMF/GOCART_GridComp/CO_GridComp/CMakeLists.txt @@ -2,7 +2,7 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES Chem_Shared Chem_Base GMAO_mpeu MAPL_cfio_r4 esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES Chem_Shared Chem_Base GMAO_mpeu MAPL_cfio_r4 ESMF::ESMF NetCDF::NetCDF_Fortran) esma_generate_gocart_code (${this} "-B\;-E\;-F\;-N\;GOCART") diff --git a/ESMF/GOCART_GridComp/CO_GridComp/CO_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/CO_GridComp/CO_GridComp_ExtData.rc deleted file mode 100755 index 8294d023..00000000 --- a/ESMF/GOCART_GridComp/CO_GridComp/CO_GridComp_ExtData.rc +++ /dev/null @@ -1,112 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -CO_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 1.11 biomass ExtData/chemistry/QFED/v2.5r1-nrt/sfc/0.1/Y%y4/M%m2/qfed2.emis_co.006.%y4%m2%d2.nc4 -CO_OH NA Y Y %y4-%m2-%d2t12:00:00 none none oh ExtData/PIESA/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CO_CH4 NA Y Y %y4-%m2-%d2t12:00:00 none none ch4 ExtData/PIESA/L72/gmi_oh_ch4_h2o2_no3.x144_y91_z72_t12.2006.nc -CO_BF NA Y Y %y4-%m2-%d2t12:00:00 none 1.19 emcobf ExtData/PIESA/sfc/co_biofuel_v2.x360_y181_t12.2001.nc -CO_FS NA Y Y %y4-%m2-%d2t12:00:00 none 1.20 emcofs ExtData/PIESA/sfc/co_fossilfuel_v2.x360_y181_t12.2001.nc -CO_ISOP NA Y Y %y4-%m2-%d2t12:00:00 none 0.2 emcoisop ExtData/PIESA/sfc/co_biogenic.x288_y181_t12.2006.nc -CO_NVOC NA Y Y %y4-%m2-%d2t12:00:00 none none emconvoc ExtData/PIESA/sfc/co_biogenic.x288_y181_t12.2006.nc -CO_TERP NA Y Y %y4-%m2-%d2t12:00:00 none none emcoterp ExtData/PIESA/sfc/co_biogenic.x288_y181_t12.2006.nc - -CO_CH4bbae NA Y Y - none none ch4 /dev/null -CO_BFbbae NA Y Y - none none bf /dev/null -CO_FSbbae NA Y Y - none none fs /dev/null -CO_ISOPbbae NA Y Y - none none isop /dev/null -CO_NVOCbbae NA Y Y - none none nvoc /dev/null -CO_TERPbbae NA Y Y - none none terp /dev/null -# -CO_CH4bbna NA Y Y - none none ch4 /dev/null -CO_BFbbna NA Y Y - none none bf /dev/null -CO_FSbbna NA Y Y - none none fs /dev/null -CO_ISOPbbna NA Y Y - none none isop /dev/null -CO_NVOCbbna NA Y Y - none none nvoc /dev/null -CO_TERPbbna NA Y Y - none none terp /dev/null -# -CO_CH4bbla NA Y Y - none none ch4 /dev/null -CO_BFbbla NA Y Y - none none bf /dev/null -CO_FSbbla NA Y Y - none none fs /dev/null -CO_ISOPbbla NA Y Y - none none isop /dev/null -CO_NVOCbbla NA Y Y - none none nvoc /dev/null -CO_TERPbbla NA Y Y - none none terp /dev/null -# -CO_CH4bbaf NA Y Y - none none ch4 /dev/null -CO_BFbbaf NA Y Y - none none bf /dev/null -CO_FSbbaf NA Y Y - none none fs /dev/null -CO_ISOPbbaf NA Y Y - none none isop /dev/null -CO_NVOCbbaf NA Y Y - none none nvoc /dev/null -CO_TERPbbaf NA Y Y - none none terp /dev/null -# -CO_CH4bbgl NA Y Y - none none ch4 /dev/null -CO_BFbbgl NA Y Y - none none bf /dev/null -CO_FSbbgl NA Y Y - none none fs /dev/null -CO_ISOPbbgl NA Y Y - none none isop /dev/null -CO_NVOCbbgl NA Y Y - none none nvoc /dev/null -CO_TERPbbgl NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbna NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbeu NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbas NA Y Y - none none terp /dev/null -# -CO_BIOMASSnbgl NA Y Y - none none terp /dev/null -# -CO_regionMask NA N V - none none REGION_MASK ExtData/PIESA/sfc/ARCTAS.region_mask.x540_y361.2008.nc -%% - - -DerivedExports%% -# ---------|---------|--------------------------------------------| -# Export | Primary |_________________ Mask _____________________| -# Name | Name | Name | Expression | -# ---------|---------|------------|-------------------------------| -# ---------|---------|------------|-------------------------------| -CO_BIOMASSbbae regionmask(CO_BIOMASS,CO_regionMask;3,9,10) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbna regionmask(CO_BIOMASS,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbla regionmask(CO_BIOMASS,CO_regionMask;2,6) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbaf regionmask(CO_BIOMASS,CO_regionMask;5) %y4-%m2-%d2t12:00:00 -CO_BIOMASSbbgl CO_BIOMASS %y4-%m2-%d2t12:00:00 -# -CO_CH4nbna regionmask(CO_CH4,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_BFnbna regionmask(CO_BF,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_FSnbna regionmask(CO_FS,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_ISOPnbna regionmask(CO_ISOP,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_NVOCnbna regionmask(CO_NVOC,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -CO_TERPnbna regionmask(CO_TERP,CO_regionMask;1) %y4-%m2-%d2t12:00:00 -# -CO_CH4nbeu regionmask(CO_CH4,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_BFnbeu regionmask(CO_BF,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_FSnbeu regionmask(CO_FS,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_ISOPnbeu regionmask(CO_ISOP,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_NVOCnbeu regionmask(CO_NVOC,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -CO_TERPnbeu regionmask(CO_TERP,CO_regionMask;3,9) %y4-%m2-%d2t12:00:00 -# -CO_CH4nbas regionmask(CO_CH4,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_BFnbas regionmask(CO_BF,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_FSnbas regionmask(CO_FS,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_ISOPnbas regionmask(CO_ISOP,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_NVOCnbas regionmask(CO_NVOC,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -CO_TERPnbas regionmask(CO_TERP,CO_regionMask;4,10) %y4-%m2-%d2t12:00:00 -# -CO_CH4nbgl CO_CH4 %y4-%m2-%d2t12:00:00 -CO_BFnbgl CO_BF %y4-%m2-%d2t12:00:00 -CO_FSnbgl CO_FS %y4-%m2-%d2t12:00:00 -CO_ISOPnbgl CO_ISOP %y4-%m2-%d2t12:00:00 -CO_NVOCnbgl CO_NVOC %y4-%m2-%d2t12:00:00 -CO_TERPnbgl CO_TERP %y4-%m2-%d2t12:00:00 -# -CO_OHbbae CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbna CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbla CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbaf CO_OH %y4-%m2-%d2t12:00:00 -CO_OHbbgl CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbna CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbeu CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbas CO_OH %y4-%m2-%d2t12:00:00 -CO_OHnbgl CO_OH %y4-%m2-%d2t12:00:00 -%% - diff --git a/ESMF/GOCART_GridComp/O3_GridComp/AMIP.20C/O3_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/O3_GridComp/AMIP.20C/O3_GridComp_ExtData.rc deleted file mode 100644 index 3f562311..00000000 --- a/ESMF/GOCART_GridComp/O3_GridComp/AMIP.20C/O3_GridComp_ExtData.rc +++ /dev/null @@ -1,52 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -O3_ireg NA Y Y - none none ireg ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID001 NA Y Y - none none iuseVegID001 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID002 NA Y Y - none none iuseVegID002 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID003 NA Y Y - none none iuseVegID003 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID004 NA Y Y - none none iuseVegID004 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID005 NA Y Y - none none iuseVegID005 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID006 NA Y Y - none none iuseVegID006 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID007 NA Y Y - none none iuseVegID007 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID008 NA Y Y - none none iuseVegID008 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID009 NA Y Y - none none iuseVegID009 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID010 NA Y Y - none none iuseVegID010 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID011 NA Y Y - none none iuseVegID011 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID012 NA Y Y - none none iuseVegID012 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID013 NA Y Y - none none iuseVegID013 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID014 NA Y Y - none none iuseVegID014 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID015 NA Y Y - none none iuseVegID015 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID001 NA Y Y - none none ilandVegID001 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID002 NA Y Y - none none ilandVegID002 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID003 NA Y Y - none none ilandVegID003 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID004 NA Y Y - none none ilandVegID004 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID005 NA Y Y - none none ilandVegID005 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID006 NA Y Y - none none ilandVegID006 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID007 NA Y Y - none none ilandVegID007 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID008 NA Y Y - none none ilandVegID008 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID009 NA Y Y - none none ilandVegID009 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID010 NA Y Y - none none ilandVegID010 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID011 NA Y Y - none none ilandVegID011 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID012 NA Y Y - none none ilandVegID012 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID013 NA Y Y - none none ilandVegID013 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID014 NA Y Y - none none ilandVegID014 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID015 NA Y Y - none none ilandVegID015 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_laiVegID001 NA Y Y - none none laiVegID001 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID002 NA Y Y - none none laiVegID002 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID003 NA Y Y - none none laiVegID003 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID004 NA Y Y - none none laiVegID004 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID005 NA Y Y - none none laiVegID005 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID006 NA Y Y - none none laiVegID006 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID007 NA Y Y - none none laiVegID007 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID008 NA Y Y - none none laiVegID008 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID009 NA Y Y - none none laiVegID009 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID010 NA Y Y - none none laiVegID010 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID011 NA Y Y - none none laiVegID011 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID012 NA Y Y - none none laiVegID012 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID013 NA Y Y - none none laiVegID013 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID014 NA Y Y - none none laiVegID014 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID015 NA Y Y - none none laiVegID015 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -%% diff --git a/ESMF/GOCART_GridComp/O3_GridComp/AMIP/O3_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/O3_GridComp/AMIP/O3_GridComp_ExtData.rc deleted file mode 100644 index 3f562311..00000000 --- a/ESMF/GOCART_GridComp/O3_GridComp/AMIP/O3_GridComp_ExtData.rc +++ /dev/null @@ -1,52 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -O3_ireg NA Y Y - none none ireg ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID001 NA Y Y - none none iuseVegID001 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID002 NA Y Y - none none iuseVegID002 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID003 NA Y Y - none none iuseVegID003 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID004 NA Y Y - none none iuseVegID004 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID005 NA Y Y - none none iuseVegID005 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID006 NA Y Y - none none iuseVegID006 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID007 NA Y Y - none none iuseVegID007 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID008 NA Y Y - none none iuseVegID008 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID009 NA Y Y - none none iuseVegID009 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID010 NA Y Y - none none iuseVegID010 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID011 NA Y Y - none none iuseVegID011 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID012 NA Y Y - none none iuseVegID012 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID013 NA Y Y - none none iuseVegID013 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID014 NA Y Y - none none iuseVegID014 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID015 NA Y Y - none none iuseVegID015 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID001 NA Y Y - none none ilandVegID001 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID002 NA Y Y - none none ilandVegID002 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID003 NA Y Y - none none ilandVegID003 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID004 NA Y Y - none none ilandVegID004 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID005 NA Y Y - none none ilandVegID005 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID006 NA Y Y - none none ilandVegID006 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID007 NA Y Y - none none ilandVegID007 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID008 NA Y Y - none none ilandVegID008 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID009 NA Y Y - none none ilandVegID009 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID010 NA Y Y - none none ilandVegID010 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID011 NA Y Y - none none ilandVegID011 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID012 NA Y Y - none none ilandVegID012 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID013 NA Y Y - none none ilandVegID013 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID014 NA Y Y - none none ilandVegID014 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID015 NA Y Y - none none ilandVegID015 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_laiVegID001 NA Y Y - none none laiVegID001 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID002 NA Y Y - none none laiVegID002 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID003 NA Y Y - none none laiVegID003 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID004 NA Y Y - none none laiVegID004 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID005 NA Y Y - none none laiVegID005 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID006 NA Y Y - none none laiVegID006 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID007 NA Y Y - none none laiVegID007 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID008 NA Y Y - none none laiVegID008 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID009 NA Y Y - none none laiVegID009 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID010 NA Y Y - none none laiVegID010 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID011 NA Y Y - none none laiVegID011 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID012 NA Y Y - none none laiVegID012 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID013 NA Y Y - none none laiVegID013 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID014 NA Y Y - none none laiVegID014 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID015 NA Y Y - none none laiVegID015 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -%% diff --git a/ESMF/GOCART_GridComp/O3_GridComp/O3_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/O3_GridComp/O3_GridComp_ExtData.rc deleted file mode 100644 index 3f562311..00000000 --- a/ESMF/GOCART_GridComp/O3_GridComp/O3_GridComp_ExtData.rc +++ /dev/null @@ -1,52 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -O3_ireg NA Y Y - none none ireg ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID001 NA Y Y - none none iuseVegID001 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID002 NA Y Y - none none iuseVegID002 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID003 NA Y Y - none none iuseVegID003 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID004 NA Y Y - none none iuseVegID004 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID005 NA Y Y - none none iuseVegID005 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID006 NA Y Y - none none iuseVegID006 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID007 NA Y Y - none none iuseVegID007 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID008 NA Y Y - none none iuseVegID008 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID009 NA Y Y - none none iuseVegID009 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID010 NA Y Y - none none iuseVegID010 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID011 NA Y Y - none none iuseVegID011 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID012 NA Y Y - none none iuseVegID012 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID013 NA Y Y - none none iuseVegID013 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID014 NA Y Y - none none iuseVegID014 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_iuseVegID015 NA Y Y - none none iuseVegID015 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID001 NA Y Y - none none ilandVegID001 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID002 NA Y Y - none none ilandVegID002 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID003 NA Y Y - none none ilandVegID003 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID004 NA Y Y - none none ilandVegID004 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID005 NA Y Y - none none ilandVegID005 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID006 NA Y Y - none none ilandVegID006 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID007 NA Y Y - none none ilandVegID007 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID008 NA Y Y - none none ilandVegID008 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID009 NA Y Y - none none ilandVegID009 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID010 NA Y Y - none none ilandVegID010 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID011 NA Y Y - none none ilandVegID011 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID012 NA Y Y - none none ilandVegID012 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID013 NA Y Y - none none ilandVegID013 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID014 NA Y Y - none none ilandVegID014 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_ilandVegID015 NA Y Y - none none ilandVegID015 ExtData/g5chem/sfc/vegetationType_GMI.x288_y181_t12.2006.nc -O3_laiVegID001 NA Y Y - none none laiVegID001 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID002 NA Y Y - none none laiVegID002 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID003 NA Y Y - none none laiVegID003 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID004 NA Y Y - none none laiVegID004 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID005 NA Y Y - none none laiVegID005 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID006 NA Y Y - none none laiVegID006 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID007 NA Y Y - none none laiVegID007 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID008 NA Y Y - none none laiVegID008 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID009 NA Y Y - none none laiVegID009 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID010 NA Y Y - none none laiVegID010 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID011 NA Y Y - none none laiVegID011 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID012 NA Y Y - none none laiVegID012 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID013 NA Y Y - none none laiVegID013 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID014 NA Y Y - none none laiVegID014 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -O3_laiVegID015 NA Y Y - none none laiVegID015 ExtData/g5chem/sfc/leafAreaIndex_GMI.x288_y181_t12.2006.nc -%% diff --git a/ESMF/GOCART_GridComp/Rn_GridComp/AMIP.20C/Rn_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/Rn_GridComp/AMIP.20C/Rn_GridComp_ExtData.rc deleted file mode 100644 index acb6e571..00000000 --- a/ESMF/GOCART_GridComp/Rn_GridComp/AMIP.20C/Rn_GridComp_ExtData.rc +++ /dev/null @@ -1,17 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -Rn_EMISSION NA Y Y %y4-%m2-%d2t12:00:00 none none Rn_EMISSION ExtData/g5chem/sfc/gocart.radon.x540_y361.nc -RN_regionMask NA N V - none none REGION_MASK ExtData/g5chem/sfc/RADON.region_mask.x540_y361.2001.nc -%% - -DerivedExports%% -Rn_EMISSIONAfri regionmask(Rn_EMISSION,Rn_regionMask;5) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONAsia regionmask(Rn_EMISSION,Rn_regionMask;4) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONAust regionmask(Rn_EMISSION,Rn_regionMask;7) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONEuro regionmask(Rn_EMISSION,Rn_regionMask;3) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONSoAm regionmask(Rn_EMISSION,Rn_regionMask;6) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONNoAm regionmask(Rn_EMISSION,Rn_regionMask;1,2) %y4-%m2-%d2t12:00:00 -%% diff --git a/ESMF/GOCART_GridComp/Rn_GridComp/AMIP/Rn_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/Rn_GridComp/AMIP/Rn_GridComp_ExtData.rc deleted file mode 100644 index acb6e571..00000000 --- a/ESMF/GOCART_GridComp/Rn_GridComp/AMIP/Rn_GridComp_ExtData.rc +++ /dev/null @@ -1,17 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -Rn_EMISSION NA Y Y %y4-%m2-%d2t12:00:00 none none Rn_EMISSION ExtData/g5chem/sfc/gocart.radon.x540_y361.nc -RN_regionMask NA N V - none none REGION_MASK ExtData/g5chem/sfc/RADON.region_mask.x540_y361.2001.nc -%% - -DerivedExports%% -Rn_EMISSIONAfri regionmask(Rn_EMISSION,Rn_regionMask;5) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONAsia regionmask(Rn_EMISSION,Rn_regionMask;4) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONAust regionmask(Rn_EMISSION,Rn_regionMask;7) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONEuro regionmask(Rn_EMISSION,Rn_regionMask;3) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONSoAm regionmask(Rn_EMISSION,Rn_regionMask;6) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONNoAm regionmask(Rn_EMISSION,Rn_regionMask;1,2) %y4-%m2-%d2t12:00:00 -%% diff --git a/ESMF/GOCART_GridComp/Rn_GridComp/CMakeLists.txt b/ESMF/GOCART_GridComp/Rn_GridComp/CMakeLists.txt index ef32201f..1a17c597 100644 --- a/ESMF/GOCART_GridComp/Rn_GridComp/CMakeLists.txt +++ b/ESMF/GOCART_GridComp/Rn_GridComp/CMakeLists.txt @@ -2,7 +2,7 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES Chem_Shared Chem_Base GMAO_mpeu MAPL_cfio_r4 esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES Chem_Shared Chem_Base GMAO_mpeu MAPL_cfio_r4 ESMF::ESMF NetCDF::NetCDF_Fortran) esma_generate_gocart_code (${this} "-B\;-E\;-F\;-N\;GOCART") diff --git a/ESMF/GOCART_GridComp/Rn_GridComp/Rn_GridComp_ExtData.rc b/ESMF/GOCART_GridComp/Rn_GridComp/Rn_GridComp_ExtData.rc deleted file mode 100644 index acb6e571..00000000 --- a/ESMF/GOCART_GridComp/Rn_GridComp/Rn_GridComp_ExtData.rc +++ /dev/null @@ -1,17 +0,0 @@ -PrimaryExports%% -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -# Import | | | Regrid | Refresh | OffSet | Scale | Variable On | File | -# Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | -# -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| -Rn_EMISSION NA Y Y %y4-%m2-%d2t12:00:00 none none Rn_EMISSION ExtData/g5chem/sfc/gocart.radon.x540_y361.nc -RN_regionMask NA N V - none none REGION_MASK ExtData/g5chem/sfc/RADON.region_mask.x540_y361.2001.nc -%% - -DerivedExports%% -Rn_EMISSIONAfri regionmask(Rn_EMISSION,Rn_regionMask;5) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONAsia regionmask(Rn_EMISSION,Rn_regionMask;4) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONAust regionmask(Rn_EMISSION,Rn_regionMask;7) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONEuro regionmask(Rn_EMISSION,Rn_regionMask;3) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONSoAm regionmask(Rn_EMISSION,Rn_regionMask;6) %y4-%m2-%d2t12:00:00 -Rn_EMISSIONNoAm regionmask(Rn_EMISSION,Rn_regionMask;1,2) %y4-%m2-%d2t12:00:00 -%% diff --git a/ESMF/Shared/CMakeLists.txt b/ESMF/Shared/CMakeLists.txt index a4c25fbb..c4aa4053 100644 --- a/ESMF/Shared/CMakeLists.txt +++ b/ESMF/Shared/CMakeLists.txt @@ -7,16 +7,18 @@ set (srcs esma_add_library(${this} SRCS ${srcs} - DEPENDENCIES MAPL esmf) + DEPENDENCIES MAPL ESMF::ESMF) if( EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/@GSW ) set (gsw_ECBUILD_SYSTEM_INCLUDED TRUE) endif() -if ( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/MAPL@ ) - esma_add_subdirectories ( - MAPL - ) +if (NOT TARGET MAPL) + if ( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/MAPL@ ) + esma_add_subdirectories ( + MAPL + ) + endif () endif () if ( IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/GMAO_Shared@ ) diff --git a/ESMF/Shared/Chem_AeroGeneric.F90 b/ESMF/Shared/Chem_AeroGeneric.F90 index e1da972b..da090ee8 100644 --- a/ESMF/Shared/Chem_AeroGeneric.F90 +++ b/ESMF/Shared/Chem_AeroGeneric.F90 @@ -7,8 +7,8 @@ !BOP ! -! !MODULE: Chem_AeroGeneric - Utilitarian subroutines used by GOCART2G children. -! +! !MODULE: Chem_AeroGeneric - Utilitarian subroutines used by GOCART2G children. +! ! ! !INTERFACE: ! @@ -17,7 +17,7 @@ module Chem_AeroGeneric ! !USES: use ESMF use MAPL -! USE Chem_MieMod2G +! USE GOCART2G_MieMod implicit none private @@ -31,6 +31,7 @@ module Chem_AeroGeneric public setZeroKlid4d public findKlid public get_mixR + ! ! !DESCRIPTION: ! @@ -46,9 +47,9 @@ module Chem_AeroGeneric !==================================================================================== - subroutine add_aero (state, label, label2, grid, typekind, ptr, rc) + subroutine add_aero (state, label, label2, grid, typekind, ptr, ungrid, rc) -! Description: Adds fields to aero state for aerosol optics calcualtions. +! Description: Adds fields to aero state for aerosol optics calcualtions. implicit none @@ -58,8 +59,9 @@ subroutine add_aero (state, label, label2, grid, typekind, ptr, rc) type (ESMF_Grid), intent(inout) :: grid integer, intent(in ) :: typekind real, pointer, dimension(:,:,:), optional, intent(in ) :: ptr + integer, optional, intent(in ) :: ungrid integer, intent( out) :: rc - + ! locals type (ESMF_Field) :: field character (len=ESMF_MAXSTR) :: field_name @@ -79,7 +81,11 @@ subroutine add_aero (state, label, label2, grid, typekind, ptr, rc) else if ((trim(field_name) == 'FRLAND') .or. (trim(field_name) == 'monochromatic_EXT')) then call MAPL_FieldAllocCommit(field, dims=MAPL_DimsHorzOnly, location=MAPL_VLocationCenter, typekind=MAPL_R4, hw=0, __RC__) else - call MAPL_FieldAllocCommit (field, dims=MAPL_DimsHorzVert, location=MAPL_VLocationCenter, typekind=typekind, hw=0, __RC__) + if(present(ungrid)) then + call MAPL_FieldAllocCommit (field, dims=MAPL_DimsHorzVert, location=MAPL_VLocationCenter, typekind=typekind, ungrid=[ungrid], hw=0, __RC__) + else + call MAPL_FieldAllocCommit (field, dims=MAPL_DimsHorzVert, location=MAPL_VLocationCenter, typekind=typekind, hw=0, __RC__) + end if end if call MAPL_StateAdd (state, field, __RC__) end if @@ -109,7 +115,7 @@ recursive subroutine determine_data_driven(COMP_NAME, data_driven, RC) __Iam__('determine_data_driven') -! Begin... +! Begin... ! Is DU data driven? ! ------------------ @@ -142,7 +148,7 @@ subroutine append_to_bundle(varName, providerState, prefix, bundle, rc) integer :: dimCount, i real, pointer :: orig_ptr(:,:,:) real, pointer :: ptr2d(:,:) - character(len=ESMF_MAXSTR) :: bin_index, varNameNew + character(len=ESMF_MAXSTR) :: bin_index, varNameNew, units, longname ! Description: Adds deposition variables to deposition bundle @@ -155,18 +161,25 @@ subroutine append_to_bundle(varName, providerState, prefix, bundle, rc) call ESMF_FieldGet (field, dimCount=dimCount, __RC__) if (dimCount == 2) then ! this handles data instances - call MAPL_FieldBundleAdd (bundle, field, __RC__) + call MAPL_FieldBundleAdd (bundle, field, __RC__) else if (dimCount == 3) then ! this handles computational instances call ESMF_FieldGet (field, grid=grid, __RC__) call MAPL_GetPointer (providerState, orig_ptr, trim(prefix)//trim(varName), __RC__) + call ESMF_AttributeGet(field, name='UNITS', value=units, __RC__) + call ESMF_AttributeGet(field, name='LONG_NAME', value=longname, __RC__) + longname=longname(1:index(trim(longname), '(Bin')-1) if ((index(trim(varname), 'DU') > 0) .or. (index(trim(varname), 'SS') > 0)) then do i = 1, size(orig_ptr, 3) write (bin_index,'(A, I0.3)') '', i ptr2d => orig_ptr(:,:,i) - field2D = ESMF_FieldCreate(grid=grid, datacopyflag=ESMF_DATACOPY_REFERENCE, farrayPtr=ptr2d,& - name=trim(varName)//trim(bin_index) , __RC__) + field2D = ESMF_FieldCreate(grid=grid, datacopyflag=ESMF_DATACOPY_REFERENCE, farray=ptr2d,& + name=trim(varName)//trim(bin_index) , indexflag=ESMF_INDEX_DELOCAL, __RC__) + call ESMF_AttributeSet(field2d, name='DIMS', value=MAPL_DimsHorzOnly, _RC) + call ESMF_AttributeSet(field2d, name='VLOCATION', value=MAPL_VLocationNone, _RC) + call ESMF_AttributeSet(field2d, name='UNITS', value=trim(units), _RC) + call ESMF_AttributeSet(field2d, name='LONG_NAME', value=trim(longname)//' Bin '//trim(bin_index), _RC) call MAPL_AllocateCoupling (field2D, __RC__) call MAPL_FieldBundleAdd (bundle, field2D, __RC__) end do @@ -174,8 +187,12 @@ subroutine append_to_bundle(varName, providerState, prefix, bundle, rc) if (index(trim(varname), 'SU') > 0) then ! only use SO4, which is the 3rd index ptr2d => orig_ptr(:,:,3) - field2D = ESMF_FieldCreate(grid=grid, datacopyflag=ESMF_DATACOPY_REFERENCE, farrayPtr=ptr2d,& - name=trim(varName)//'003' , __RC__) + field2D = ESMF_FieldCreate(grid=grid, datacopyflag=ESMF_DATACOPY_REFERENCE, farray=ptr2d,& + name=trim(varName)//'003' , indexflag=ESMF_INDEX_DELOCAL, __RC__) + call ESMF_AttributeSet(field2d, name='DIMS', value=MAPL_DimsHorzOnly, _RC) + call ESMF_AttributeSet(field2d, name='VLOCATION', value=MAPL_VLocationNone, _RC) + call ESMF_AttributeSet(field2d, name='UNITS', value=units, _RC) + call ESMF_AttributeSet(field2d, name='LONG_NAME', value=trim(longname)//' Bin 003', _RC) call MAPL_AllocateCoupling (field2D, __RC__) call MAPL_FieldBundleAdd (bundle, field2D, __RC__) end if @@ -185,8 +202,12 @@ subroutine append_to_bundle(varName, providerState, prefix, bundle, rc) write (bin_index,'(A, I0.3)') '', i ptr2d => orig_ptr(:,:,i) varNameNew = 'OC'//varName(6:7) - field2D = ESMF_FieldCreate(grid=grid, datacopyflag=ESMF_DATACOPY_REFERENCE, farrayPtr=ptr2d,& - name=trim(varNameNew)//trim(bin_index) , __RC__) + field2D = ESMF_FieldCreate(grid=grid, datacopyflag=ESMF_DATACOPY_REFERENCE, farray=ptr2d,& + name=trim(varNameNew)//trim(bin_index) , indexflag=ESMF_INDEX_DELOCAL, __RC__) + call ESMF_AttributeSet(field2d, name='DIMS', value=MAPL_DimsHorzOnly, _RC) + call ESMF_AttributeSet(field2d, name='VLOCATION', value=MAPL_VLocationNone, _RC) + call ESMF_AttributeSet(field2d, name='UNITS', value=units, _RC) + call ESMF_AttributeSet(field2d, name='LONG_NAME', value=trim(longname)//' Bin '//trim(bin_index), _RC) call MAPL_AllocateCoupling (field2D, __RC__) call MAPL_FieldBundleAdd (bundle, field2D, __RC__) end do @@ -197,8 +218,12 @@ subroutine append_to_bundle(varName, providerState, prefix, bundle, rc) write (bin_index,'(A, I0.3)') '', i ptr2d => orig_ptr(:,:,i) varNameNew = 'BC'//varName(6:7) - field2D = ESMF_FieldCreate(grid=grid, datacopyflag=ESMF_DATACOPY_REFERENCE, farrayPtr=ptr2d,& - name=trim(varNameNew)//trim(bin_index) , __RC__) + field2D = ESMF_FieldCreate(grid=grid, datacopyflag=ESMF_DATACOPY_REFERENCE, farray=ptr2d,& + name=trim(varNameNew)//trim(bin_index) , indexflag=ESMF_INDEX_DELOCAL, __RC__) + call ESMF_AttributeSet(field2d, name='DIMS', value=MAPL_DimsHorzOnly, _RC) + call ESMF_AttributeSet(field2d, name='VLOCATION', value=MAPL_VLocationNone, _RC) + call ESMF_AttributeSet(field2d, name='UNITS', value=units, _RC) + call ESMF_AttributeSet(field2d, name='LONG_NAME', value=trim(longname)//' Bin '//trim(bin_index), _RC) call MAPL_AllocateCoupling (field2D, __RC__) call MAPL_FieldBundleAdd (bundle, field2D, __RC__) end do @@ -206,7 +231,7 @@ subroutine append_to_bundle(varName, providerState, prefix, bundle, rc) else if (dimCount > 3) then if(mapl_am_i_root()) print*,'Chem_AeroGenric::append_to_bundle does not currently support fields greater than 3 dimensions' - VERIFY_(824) + VERIFY_(824) end if RETURN_(ESMF_SUCCESS) @@ -232,7 +257,7 @@ subroutine setZeroKlid(km, klid, int_ptr) ! ! !REVISION HISTORY: ! -! 25Aug2020 E.Sherman - Written +! 25Aug2020 E.Sherman - Written ! ! !Local Variables integer :: k @@ -269,7 +294,7 @@ subroutine setZeroKlid4d (km, klid, int_ptr) ! ! !REVISION HISTORY: ! -! 25Aug2020 E.Sherman - Written +! 25Aug2020 E.Sherman - Written ! ! !Local Variables integer :: k, n @@ -312,7 +337,7 @@ subroutine findKlid (klid, plid, ple, rc) ! ! !REVISION HISTORY: ! -! 25Aug2020 E.Sherman - Written +! 25Aug2020 E.Sherman - Written ! ! !Local Variables integer :: k, j, i @@ -403,7 +428,6 @@ subroutine get_mixR (state, rc) end subroutine get_mixR - end module Chem_AeroGeneric diff --git a/ESMF/UFS/Aerosol_Cap.F90 b/ESMF/UFS/Aerosol_Cap.F90 index b753afa9..a642a9cb 100644 --- a/ESMF/UFS/Aerosol_Cap.F90 +++ b/ESMF/UFS/Aerosol_Cap.F90 @@ -8,9 +8,9 @@ module Aerosol_Cap NUOPC_ModelGet, & SetVM, & model_routine_SS => SetServices, & - model_routine_Run => routine_Run, & - model_label_Advance => label_Advance, & + model_label_Advertise => label_Advertise, & model_label_DataInitialize => label_DataInitialize, & + model_label_Advance => label_Advance, & model_label_Finalize => label_Finalize use Aerosol_Comp_mod @@ -94,23 +94,15 @@ subroutine SetServices(model, rc) file=__FILE__)) & return ! bail out - ! switch to IPDv03 - call ESMF_GridCompSetEntryPoint(model, ESMF_METHOD_INITIALIZE, & - userRoutine=ModelInitializeP0, phase=0, rc=rc) + ! specialize the model component + call NUOPC_CompSpecialize(model, & + specLabel=model_label_Advertise, specRoutine=ModelAdvertise, & + rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, & file=__FILE__)) & return ! bail out - ! set entry point for methods that require specific implementation - call NUOPC_CompSetEntryPoint(model, ESMF_METHOD_INITIALIZE, & - phaseLabelList=(/"IPDv03p1"/), userRoutine=ModelInitializeP1, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! - set component's initialization status call NUOPC_CompSpecialize(model, & specLabel=model_label_DataInitialize, specRoutine=ModelDataInitialize, & rc=rc) @@ -136,70 +128,31 @@ subroutine SetServices(model, rc) end subroutine SetServices - subroutine ModelInitializeP0(model, importState, exportState, clock, rc) + subroutine ModelAdvertise(model, rc) type(ESMF_GridComp) :: model - type(ESMF_State) :: importState - type(ESMF_State) :: exportState - type(ESMF_Clock) :: clock integer, intent(out) :: rc ! local variables - integer :: verbosity - character(len=ESMF_MAXSTR) :: name - - ! local parameters - character(len=*), parameter :: rName = "ModelInitializeP0" + type(ESMF_State) :: importState, exportState ! begin rc = ESMF_SUCCESS - ! startup - call AerosolLog(modelName//': Initializing ...', rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! get component's info - call NUOPC_CompGet(model, name=name, verbosity=verbosity, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! intro - call NUOPC_LogIntro(name, rName, verbosity, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! switch to IPDv01 by filtering all other phaseMap entries - call NUOPC_CompFilterPhaseMap(model, ESMF_METHOD_INITIALIZE, & - acceptStringList=(/"IPDv03p"/), rc=rc) + ! query for importState and exportState + call NUOPC_ModelGet(model, importState=importState, & + exportState=exportState, rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, & file=__FILE__)) & return ! bail out - ! extro - call NUOPC_LogExtro(name, rName, verbosity, rc=rc) + ! startup + call AerosolLog(modelName//': Initializing ...', rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, & file=__FILE__)) & return ! bail out - end subroutine ModelInitializeP0 - - subroutine ModelInitializeP1(model, importState, exportState, clock, rc) - type(ESMF_GridComp) :: model - type(ESMF_State) :: importState, exportState - type(ESMF_Clock) :: clock - integer, intent(out) :: rc - - ! begin - rc = ESMF_SUCCESS - ! -- advertise imported fields call NUOPC_Advertise(importState, importFieldNames, & TransferOfferGeomObject="cannot provide", & @@ -220,7 +173,7 @@ subroutine ModelInitializeP1(model, importState, exportState, clock, rc) file=__FILE__)) & return ! bail out - end subroutine ModelInitializeP1 + end subroutine ModelAdvertise subroutine ModelDataInitialize(model, rc) type(ESMF_GridComp) :: model diff --git a/ESMF/UFS/Aerosol_Diag_Mod.F90 b/ESMF/UFS/Aerosol_Diag_Mod.F90 index 2300e090..1d38c7e1 100644 --- a/ESMF/UFS/Aerosol_Diag_Mod.F90 +++ b/ESMF/UFS/Aerosol_Diag_Mod.F90 @@ -147,11 +147,6 @@ function PMGetTracerWeight(name, pm, w) result(nbins) nbins = 1 select case (trim(name)) - case ('CAphilicCA.bc', & - 'CAphilicCA.oc', & - 'CAphobicCA.bc', & - 'CAphobicCA.oc') - ! -- set to 1 by default case ('DU') select case (trim(pm)) case ('PM10') @@ -183,7 +178,8 @@ function PMGetTracerWeight(name, pm, w) result(nbins) w(3) = w25_ss3 end select case default - nbins = 0 + ! -- carbonaceous emissions have weights equal to 1 (default) + if (name(1:2) /= 'CA') nbins = 0 end select end function PMGetTracerWeight diff --git a/ESMF/UFS/CMakeLists.txt b/ESMF/UFS/CMakeLists.txt index 3a0b501e..0b79aa6b 100644 --- a/ESMF/UFS/CMakeLists.txt +++ b/ESMF/UFS/CMakeLists.txt @@ -10,7 +10,7 @@ set (srcs Aerosol_Tracer_Mod.F90 ) -set (dependencies Aerosol_GridComp MAPL esmf) +set (dependencies Aerosol_GridComp MAPL ESMF::ESMF) esma_add_library (${this} SRCS ${srcs} DEPENDENCIES ${dependencies}) diff --git a/Process_Library/CMakeLists.txt b/Process_Library/CMakeLists.txt index d4d9ff1c..76fe00ef 100644 --- a/Process_Library/CMakeLists.txt +++ b/Process_Library/CMakeLists.txt @@ -5,9 +5,9 @@ set (srcs GOCART2G_Process.F90 ) -esma_add_library(${this} - SRCS ${srcs} - DEPENDENCIES esmf NetCDF::NetCDF_Fortran +esma_add_library(${this} + SRCS ${srcs} + DEPENDENCIES ESMF::ESMF NetCDF::NetCDF_Fortran ) # CMake has an OpenMP issue with NAG Fortran: https://gitlab.kitware.com/cmake/cmake/-/issues/21280 diff --git a/Process_Library/GOCART2G_MieMod.F90 b/Process_Library/GOCART2G_MieMod.F90 index a595d8d4..225eacab 100644 --- a/Process_Library/GOCART2G_MieMod.F90 +++ b/Process_Library/GOCART2G_MieMod.F90 @@ -1,3 +1,4 @@ +#include "Process.H" !BOP ! ! !MODULE: GOCART2G_MieMod --- Reader for aerosol mie tables @@ -64,7 +65,7 @@ module GOCART2G_MieMod real, pointer :: pmom(:,:,:,:,:) => Null() ! (r,c,b,m,p) moments of phase function real, pointer :: gf(:,:) => Null() ! (r,b) hygroscopic growth factor real, pointer :: rhop(:,:) => Null() ! (r,b) wet particle density [kg m-3] - real, pointer :: rhod(:,:) => Null() ! (r,b) wet particle density [kg m-3] + real, pointer :: rhod(:,:) => Null() ! (r,b) dry particle density [kg m-3] real, pointer :: vol(:,:) => Null() ! (r,b) wet particle volume [m3 kg-1] real, pointer :: area(:,:) => Null() ! (r,b) wet particle cross section [m2 kg-1] real, pointer :: refr(:,:,:) => Null() ! (r,c,b) real part of refractive index @@ -318,13 +319,21 @@ type(GOCART2G_Mie) function GOCART2G_MieCreate ( MieFile, wavelengths, nmom, rc refi_table = abs(refi_table) endif -! Wet particle volume [m3 kg-1] -! Ratio of wet to dry volume is gf^3, hence the following - vol_table = gf_table**3 / rhod_table +! Wet particle volume [m3 kg-1 dry mass] + rc = nf90_inq_varid(ncid,'volume',ivarid) + if(rc .ne. NF90_NOERR) then ! not in table, fill in dummy variable + vol_table = gf_table**3 / rhod_table + else + NF_VERIFY_(nf90_get_var(ncid,ivarid,vol_table)) + endif -! Wet particle cross sectional area [m2 kg-1] -! Assume area is volume divided by (4./3.*reff) - area_table = vol_table / (4./3.*reff_table) +! Wet particle cross sectional area [m2 kg-1 dry mass] + rc = nf90_inq_varid(ncid,'area',ivarid) + if(rc .ne. NF90_NOERR) then ! not in table, fill in dummy variable + area_table = vol_table / (4./3.*reff_table) + else + NF_VERIFY_(nf90_get_var(ncid,ivarid,area_table)) + endif ! Close the table file ! ------------------------------------- @@ -540,13 +549,15 @@ integer function getChannel(this, wavelength, rc) result (ch) endif enddo - if (present(rc)) rc = 0 - - if (ch < 0) then - !$omp critical (GetCha) - print*, "wavelength of ",wavelength, " is an invalid value." - !$omp end critical (GetCha) - if (present(rc)) rc = -1 + if (present(rc)) then + if (ch > 0) then + rc = __SUCCESS__ + else + rc = __FAIL__ + !$omp critical (GetCha) + print*, "wavelength of ",wavelength, " is an invalid value." + !$omp end critical (GetCha) + endif endif end function getChannel @@ -558,18 +569,22 @@ real function getWavelength(this, ith_channel, rc) result (wavelength) real, parameter :: w_tol = 1.e-9 integer :: i - if (present(rc)) rc = 0 - if (ith_channel <=0 .or. ith_channel > this%nch ) then - !$omp critical (GetWav) - print*, "The channel of ",ith_channel, " is an invalid channel number." - !$omp end critical (GetWav) - if (present(rc)) rc = -1 - wavelength = -1. ! meanlingless nagative - return + wavelength = -1. ! meaningless negative + else + wavelength = this%wavelengths(ith_channel) endif - - wavelength = this%wavelengths(ith_channel) + + if (present(rc)) then + if (wavelength > 0) then + rc = __SUCCESS__ + else + rc = __FAIL__ + !$omp critical (GetWav) + print*, "The channel of ",ith_channel, " is an invalid channel number." + !$omp end critical (GetWav) + endif + endif end function getWavelength diff --git a/Process_Library/GOCART2G_Process.F90 b/Process_Library/GOCART2G_Process.F90 index 6299600e..db3c07d3 100644 --- a/Process_Library/GOCART2G_Process.F90 +++ b/Process_Library/GOCART2G_Process.F90 @@ -1,13 +1,4 @@ -#define __SUCCESS__ 0 -#define __FAIL__ 1 -#define __VERIFY__(x) if(x/=0) then; if(present(rc)) rc=x; return; endif -#define __VERIFY_NO_OPT__(x) if(x/=0) then; rc=x; return; endif -#define __RC__ rc=status); __VERIFY__(status -#define __RC_NO_OPT__ rc=status); __VERIFY_NO_OPT__(status -#define __STAT__ stat=status); __VERIFY__(status -#define __IOSTAT__ iostat=status); __VERIFY__(status -#define __RETURN__(x) if (present(rc)) rc=x; return -#define __ASSERT__(expr) if(.not. (expr)) then; if (present(rc)) rc=-1; return; endif +#include "Process.H" !------------------------------------------------------------------------- ! ! !MODULE: GOCART2G_Process -- GOCART2G process library @@ -32,6 +23,8 @@ module GOCART2G_Process public DustEmissionK14 public DustFluxV2HRatioMB95 public moistureCorrectionFecan + public DarmenovaDragPartition + public LeungDragPartition public soilMoistureConvertVol2Grav public DistributePointEmission public updatePointwiseEmissions @@ -41,6 +34,7 @@ module GOCART2G_Process public Chem_SettlingSimpleOrig public DryDeposition public WetRemovalGOCART2G + public WetRemovalUFS public UpdateAerosolState public Aero_Compute_Diags public jeagleSSTcorrection @@ -50,7 +44,8 @@ module GOCART2G_Process public wetRadius public hoppelCorrection public CAEmission - public phobicTophilic + public phobicToPhilic + public carbonChemLoss public NIheterogenousChem public SulfateDistributeEmissions public DMSemission @@ -108,6 +103,156 @@ module GOCART2G_Process !------------------------------------------------------------------------- CONTAINS +!===================================================================================== +!BOP +! +! !IROUTINE: DustAerosolDistributionKok2021 - Compute updated Kok's dust size aerosol distribution +! +! !INTERFACE: +subroutine DustAerosolDistributionMeng2022 ( radius, rLow, rUp, distribution ) + + ! !USES: + implicit NONE + + ! !INPUT PARAMETERS: + real, dimension(:), intent(in) :: radius ! Dry particle bin effective radius [um] + real, dimension(:), intent(in) :: rLow, rUp ! Dry particle bin edge radii [um] + + ! !OUTPUT PARAMETERS: + real, dimension(:), intent(out) :: distribution ! Normalized dust aerosol distribution [1] + + ! !DESCRIPTION: Computes lognormal aerosol size distribution for dust bins according to Eq 3-4 in + ! Meng et al. 2021, https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2021GL097287 + ! + ! !REVISION HISTORY: + ! + ! 22Feb2022 B.Baker/NOAA - Original implementation + ! 01Apr2022 R.Montuoro/NOAA - Refactored for GOCART process library + ! + + ! !Local Variables + integer :: n, numBins + real :: diameter, dlam, totalVolume + real :: lambda, probability_agg + real :: cv + + ! !CONSTANTS + real, parameter :: medianMassDiameter = 1.13 ! updated median mass diameter [um] + real, parameter :: geometricStdDev = 1.92 ! updated geometric standard deviation [1] + real, parameter :: crackPropagationLength = 11.0 ! updated crack propagation length [um] + real, parameter :: DAggretate = 127.0 ! updated aggregate diameter [um] + real, parameter :: flambda = 0.15 ! ratio of lambda to Daggregate + real, parameter :: factor = 1.e0 / (sqrt(2.e0) * log(geometricStdDev)) ! auxiliary constant + real, parameter :: pi = 3.141529265 + real, parameter :: geometricStdDevAgg = 2.95 + + character(len=*), parameter :: subroutineName = 'DustAerosolDistributionKok2021' + + !EOP + !------------------------------------------------------------------------- + ! Begin... + + ! Initialize distribution array to zero + distribution = 0.0 + + ! Assume all arrays are dimensioned consistently + numBins = size(radius) + + ! Initialize total volume to zero + totalVolume = 0.0 + + ! Loop over particle sizes + do n = 1, numBins + ! Diameter calculation + diameter = 2.0 * radius(n) + + ! f_\lambda * DAggretate from Equation 2 in Meng et al. 2021 + lambda = flambda * DAggretate + + ! Pagg from Equation 4 in Meng et al. 2021 + probability_agg = 1.0 / (DAggretate * log(geometricStdDevAgg) * sqrt ( 2. * pi)) & + * exp(-((log(DAggretate) - log(DAggretate)) ** 2) / (2. * (log(geometricStdDevAgg)) ** 2)) + + !Calculate normalized volume Vemis + distribution(n) = diameter / cv * (1.0_dp + erf(factor * (log(diameter / medianMassDiameter)))) & + * exp(-diameter / lambda) ** 3 * probability_agg * log(rUp(n) / rLow(n)) + + totalVolume = totalVolume + distribution(n) + end do + ! Normalize the distribution + do n = 1, numBins + distribution(n) = distribution(n) / totalVolume + end do + + end subroutine DustAerosolDistributionMeng2022 +!===================================================================================== +!BOP +! +! !IROUTINE: DustAerosolDistributionKok2021 - Compute updated Kok's dust size aerosol distribution +! +! !INTERFACE: + subroutine DustAerosolDistributionKok2021 ( radius, rLow, rUp, distribution ) + +! !USES: + implicit NONE + +! !INPUT PARAMETERS: + real, dimension(:), intent(in) :: radius ! Dry particle bin effective radius [um] + real, dimension(:), intent(in) :: rLow, rUp ! Dry particle bin edge radii [um] + +! !OUTPUT PARAMETERS: + real, dimension(:), intent(out) :: distribution ! Normalized dust aerosol distribution [1] + +! !DESCRIPTION: Computes lognormal aerosol size distribution for dust bins according to Eq 2 in +! Meng et al. 2021, https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2021GL097287 +! +! !REVISION HISTORY: +! +! 22Feb2022 B.Baker/NOAA - Original implementation +! 01Apr2022 R.Montuoro/NOAA - Refactored for GOCART process library +! + +! !Local Variables + integer :: n, numBins + real :: diameter, dlam, totalVolume + +! !CONSTANTS + real, parameter :: medianMassDiameter = 3.5 ! updated median mass diameter [um] + real, parameter :: geometricStdDev = 2.8 ! updated geometric standard deviation [1] + real, parameter :: crackPropagationLength = 11.0 ! updated crack propagation length [um] + real, parameter :: factor = 1.e0 / (sqrt(2.e0) * log(geometricStdDev)) ! auxiliary constant + + character(len=*), parameter :: subroutineName = 'DustAerosolDistributionKok2021' + +!EOP +!------------------------------------------------------------------------- +! Begin... + + ! Initialize distribution array to zero + distribution = 0.0 + + ! Assume all arrays are dimensioned consistently + numBins = size(radius) + + ! Initialize total volume to zero + totalVolume = 0.0 + + ! Compute the distribution for each bin + do n = 1, numBins + diameter = 2.0 * radius(n) + dlam = diameter / crackPropagationLength + distribution(n) = diameter * (1.0 + erf(factor * log(diameter / medianMassDiameter))) & + * exp(-dlam**3) * log(rUp(n) / rLow(n)) + totalVolume = totalVolume + distribution(n) + end do + + ! Normalize the distribution + do n = 1, numBins + distribution(n) = distribution(n) / totalVolume + end do + + end subroutine DustAerosolDistributionKok2021 + !===================================================================================== !BOP ! @@ -136,38 +281,42 @@ subroutine DustAerosolDistributionKok ( radius, rLow, rUp, distribution ) ! ! !Local Variables - integer :: n, nbins - real :: diameter, dlam, dvol + integer :: n, numBins + real :: diameter, dlam, totalVolume ! !CONSTANTS - real, parameter :: mmd = 3.4 ! median mass diameter [um] - real, parameter :: stddev = 3.0 ! geometric standard deviation [1] - real, parameter :: lambda = 12.0 ! crack propagation length [um] - real, parameter :: factor = 1.e0 / (sqrt(2.e0) * log(stddev)) ! auxiliary constant + real, parameter :: medianMassDiameter = 3.4 ! median mass diameter [um] + real, parameter :: geometricStdDev = 3.0 ! geometric standard deviation [1] + real, parameter :: crackPropagationLength = 12.0 ! crack propagation length [um] + real, parameter :: factor = 1.e0 / (sqrt(2.e0) * log(geometricStdDev)) ! auxiliary constant - character(len=*), parameter :: myname = 'DustAerosolDistributionKok' + character(len=*), parameter :: subroutineName = 'DustAerosolDistributionKok' !EOP !------------------------------------------------------------------------- ! Begin... - distribution = 0. + ! Initialize distribution array to zero + distribution = 0.0 -! Assume all arrays are dimensioned consistently - nbins = size(radius) + ! Assume all arrays are dimensioned consistently + numBins = size(radius) - dvol = 0. - do n = 1, nbins - diameter = 2 * radius(n) - dlam = diameter/lambda - distribution(n) = diameter * (1. + erf(factor * log(diameter/mmd))) & - * exp(-dlam * dlam * dlam) * log(rUp(n)/rLow(n)) - dvol = dvol + distribution(n) + ! Initialize total volume to zero + totalVolume = 0.0 + + ! Compute the distribution for each bin + do n = 1, numBins + diameter = 2.0 * radius(n) + dlam = diameter / crackPropagationLength + distribution(n) = diameter * (1.0 + erf(factor * log(diameter / medianMassDiameter))) & + * exp(-dlam**3) * log(rUp(n) / rLow(n)) + totalVolume = totalVolume + distribution(n) end do -! Normalize distribution - do n = 1, nbins - distribution(n) = distribution(n) / dvol + ! Normalize the distribution + do n = 1, numBins + distribution(n) = distribution(n) / totalVolume end do end subroutine DustAerosolDistributionKok @@ -178,15 +327,14 @@ end subroutine DustAerosolDistributionKok ! !IROUTINE: soilMoistureConvertVol2Grav - volumetric to gravimetric soil moisture ! ! !INTERFACE: - real function soilMoistureConvertVol2Grav(vsoil, sandfrac, rhop) + real function soilMoistureConvertVol2Grav(volumetricSoilMoisture, sandFraction) ! !USES: implicit NONE ! !INPUT PARAMETERS: - real, intent(in) :: vsoil ! volumetric soil moisture fraction [1] - real, intent(in) :: sandfrac ! fractional sand content [1] - real, intent(in) :: rhop ! dry dust density [kg m-3] + real, intent(in) :: volumetricSoilMoisture ! volumetric soil moisture fraction [1] + real, intent(in) :: sandFraction ! fractional sand content [1] ! !DESCRIPTION: Convert soil moisture fraction from volumetric to gravimetric. ! @@ -196,20 +344,20 @@ real function soilMoistureConvertVol2Grav(vsoil, sandfrac, rhop) ! 01Apr2020, R.Montuoro/NOAA - Adapted for GOCART process library ! !Local Variables - real :: vsat + real :: saturatedVolumetricWaterContent ! !CONSTANTS: - real, parameter :: rhow = 1000. ! density of water [kg m-3] - + real, parameter :: waterDensity = 1000.0 ! density of water [kg m-3] + real, parameter :: particleDensity = 1700.0 ! density of soil particles [kg m-3] !EOP !------------------------------------------------------------------------- ! Begin... -! Saturated volumetric water content (sand-dependent) ! [m3 m-3] - vsat = 0.489 - 0.00126 * ( 100. * sandfrac ) +! Compute saturated volumetric water content (sand-dependent) [m3 m-3] + saturatedVolumetricWaterContent = 0.489 - 0.126 * sandFraction -! Gravimetric soil content - soilMoistureConvertVol2Grav = vsoil * rhow / (rhop * (1. - vsat)) +! Convert volumetric soil moisture to gravimetric soil moisture + soilMoistureConvertVol2Grav = 100.0 * volumetricSoilMoisture * waterDensity / (particleDensity * (1.0 - saturatedVolumetricWaterContent)) end function soilMoistureConvertVol2Grav @@ -219,7 +367,7 @@ end function soilMoistureConvertVol2Grav ! !IROUTINE: moistureCorrectionFecan - Correction factor for Fecan soil moisture ! ! !INTERFACE: - real function moistureCorrectionFecan(slc, sand, clay, rhop) + real function moistureCorrectionFecan(slc, sand, clay, b) ! !USES: implicit NONE @@ -228,9 +376,9 @@ real function moistureCorrectionFecan(slc, sand, clay, rhop) real, intent(in) :: slc ! liquid water content of top soil layer, volumetric fraction [1] real, intent(in) :: sand ! fractional sand content [1] real, intent(in) :: clay ! fractional clay content [1] - real, intent(in) :: rhop ! dry dust density [kg m-3] + real, intent(in) :: b ! drylimit factor from Zender 2003 -! !DESCRIPTION: Compute correction factor to account for Fecal soil moisture +! !DESCRIPTION: Compute correction factor to account for Fecan soil moisture ! ! !REVISION HISTORY: ! @@ -238,21 +386,21 @@ real function moistureCorrectionFecan(slc, sand, clay, rhop) ! 01Apr2020, R.Montuoro/NOAA - Adapted for GOCART process library ! !Local Variables - real :: grvsoilm - real :: drylimit + real :: gravimetricSoilMoisture + real :: fecanDryLimit !EOP !------------------------------------------------------------------------- ! Begin... ! Convert soil moisture from volumetric to gravimetric - grvsoilm = soilMoistureConvertVol2Grav(slc, sand, rhop) + gravimetricSoilMoisture = soilMoistureConvertVol2Grav(slc, sand) -! Compute fecan dry limit - drylimit = clay * (14.0 * clay + 17.0) +! Compute Fecan dry limit + fecanDryLimit = b * clay * (14.0 * clay + 17.0) -! Compute soil moisture correction - moistureCorrectionFecan = sqrt(1.0 + 1.21 * max(0., grvsoilm - drylimit)**0.68) +! Compute soil moisture correction factor + moistureCorrectionFecan = sqrt(1.0 + 1.21 * max(0.0, gravimetricSoilMoisture - fecanDryLimit)**0.68) end function moistureCorrectionFecan @@ -262,17 +410,17 @@ end function moistureCorrectionFecan ! !IROUTINE: DustFluxV2HRatioMB95 - vertical-to-horizontal dust flux ratio (MB95) ! ! !INTERFACE: - real function DustFluxV2HRatioMB95(clay, kvhmax) + real function DustFluxV2HRatioMB95(clay_fraction, max_flux_ratio) ! !USES: implicit NONE ! !INPUT PARAMETERS: - real, intent(in) :: clay ! fractional clay content [1] - real, intent(in) :: kvhmax ! maximum flux ratio [1] + real, intent(in) :: clay_fraction ! fractional clay content [1] + real, intent(in) :: max_flux_ratio ! maximum flux ratio [1] ! !CONSTANTS: - real, parameter :: clay_thresh = 0.2 ! clay fraction above which the maximum flux ratio is returned + real, parameter :: CLAY_THRESHOLD = 0.2 ! clay fraction above which the maximum flux ratio is returned ! !DESCRIPTION: Computes the vertical-to-horizontal dust flux ratio according to ! B.Marticorena, G.Bergametti, J.Geophys.Res., 100(D8), 16415–16430, 1995 @@ -287,151 +435,344 @@ real function DustFluxV2HRatioMB95(clay, kvhmax) !------------------------------------------------------------------------- ! Begin... - if (clay > clay_thresh) then - DustFluxV2HRatioMB95 = kvhmax + if (clay_fraction > CLAY_THRESHOLD) then + DustFluxV2HRatioMB95 = max_flux_ratio else - DustFluxV2HRatioMB95 = 10.0**(13.4*clay-6.0) + DustFluxV2HRatioMB95 = 10.0**(13.4 * clay_fraction - 6.0) end if end function DustFluxV2HRatioMB95 -!================================================================================== +!============================================================================ !BOP ! -! !IROUTINE: DustEmissionFENGSHA - Compute dust emissions using NOAA/ARL FENGSHA model +! !IROUTINE: DarmenovaDragPartition - Calculates the double drag parition +! from Darmenova et al. 2009 ! ! !INTERFACE: - subroutine DustEmissionFENGSHA(fraclake, fracsnow, oro, slc, clay, sand, silt, & - ssm, rdrag, airdens, ustar, uthrs, alpha, gamma, & - kvhmax, grav, rhop, distribution, emissions, rc) + real function DarmenovaDragPartition(Lc, vegfrac, thresh) ! !USES: implicit NONE ! !INPUT PARAMETERS: - real, dimension(:,:), intent(in) :: fraclake ! fraction of lake [1] - real, dimension(:,:), intent(in) :: fracsnow ! surface snow area fraction [1] - real, dimension(:,:), intent(in) :: slc ! liquid water content of soil layer, volumetric fraction [1] - real, dimension(:,:), intent(in) :: oro ! land-ocean-ice mask [1] - real, dimension(:,:), intent(in) :: clay ! fractional clay content [1] - real, dimension(:,:), intent(in) :: sand ! fractional sand content [1] - real, dimension(:,:), intent(in) :: silt ! fractional silt content [1] - real, dimension(:,:), intent(in) :: ssm ! erosion map [1] - real, dimension(:,:), intent(in) :: rdrag ! drag partition [1/m] - real, dimension(:,:), intent(in) :: airdens ! air density at lowest level [kg/m^3] - real, dimension(:,:), intent(in) :: ustar ! friction velocity [m/sec] - real, dimension(:,:), intent(in) :: uthrs ! threshold velocity [m/2] - real, intent(in) :: alpha ! scaling factor [1] - real, intent(in) :: gamma ! scaling factor [1] - real, intent(in) :: kvhmax ! max. vertical to horizontal mass flux ratio [1] - real, intent(in) :: grav ! gravity [m/sec^2] - real, dimension(:), intent(in) :: rhop ! soil class density [kg/m^3] - real, dimension(:), intent(in) :: distribution ! normalized dust binned distribution [1] + real, intent(in) :: Lc ! Roughness length + real, intent(in) :: vegfrac ! Vegetative fraction [0-1] + real, intent(in) :: thresh ! Threshold for vegetation fraction -! !OUTPUT PARAMETERS: - real, intent(out) :: emissions(:,:,:) ! binned surface emissions [kg/(m^2 sec)] - integer, intent(out) :: rc ! Error return code: __SUCCESS__ or __FAIL__ +! !DESCRIPTION: Computes the drag partition according to +! Darmenova, K. et al. 2009 Dust emission parameterization scheme +! regions in Central and East Asia, JGR Atmospheres, 114, D14201 +! +! !REVISION HISTORY: +! 27Jun2024 B.Baker/NOAA - Original implementation +! DD MMM YYYY Author - Refactored for improved structure +! +!EOP +!------------------------------------------------------------------------- + +! !CONSTANTS: + real, parameter :: DRAG_MIN = 1.0e-3 ! Minimum allowable drag partition + real, parameter :: sigb = 1.0 ! Bare surface sigma + real, parameter :: mb = 0.5 ! Bare surface m + real, parameter :: Betab = 90.0 ! Bare surface Beta + real, parameter :: sigv = 1.45 ! Vegetation sigma + real, parameter :: mv = 0.16 ! Vegetation m + real, parameter :: Betav = 202.0 ! Vegetation Beta + +! !LOCAL VARIABLES: + real :: Lc_veg ! Vegetation roughness length + real :: Lc_bare ! Bare surface roughness length + real :: feff_bare ! Bare surface drag partition + real :: feff_veg ! Vegetation drag partition + real :: feff ! Total drag partition + logical :: skip ! Flag to skip calculations + real :: tmpVal ! Temp value for numerical check + + ! Skip conditions logic + skip = .false. + if (vegfrac < 0.0 .or. vegfrac >= thresh) skip = .true. + + if (.not. skip) then + ! Calculate vegetation effect + Lc_veg = -0.35 * LOG(1. - vegfrac) + feff_veg = calc_drag_partition(sigv, mv, Betav, Lc_veg) + else + feff_veg = DRAG_MIN + endif + + ! Calculate bare surface effect + Lc_bare = Lc / (1 - vegfrac) ! Avoid numerical issues at high Lc + tmpVal = 1 - sigb * mb * Lc_bare + + skip = .false. + if (vegfrac < 0.0 .or. vegfrac >= thresh) skip = .true. + if (.not. skip) skip = (Lc > 0.2) .or. (tmpVal <= 0.0) + + if (.not. skip) then + feff_bare = calc_drag_partition(sigb, mb, Betab, Lc_bare) + else + feff_bare = DRAG_MIN + endif + + ! Calculate total drag partition + feff = feff_veg * feff_bare + + ! Apply bounds + if (feff > 1. .or. feff < 1.e-5) then + DarmenovaDragPartition = DRAG_MIN + else + DarmenovaDragPartition = feff + endif + + contains + + function calc_drag_partition(sig, m, Beta, Lc) result(feff) + real, intent(in) :: sig, m, Beta, Lc + real :: feff + real :: R1, R2 + + R1 = 1.0 / sqrt(1 - sig * m * Lc) + R2 = 1.0 / sqrt(1 + m * Beta * Lc) + feff = R1 * R2 + end function calc_drag_partition + +end function DarmenovaDragPartition -! !DESCRIPTION: Compute dust emissions using NOAA/ARL FENGSHA model +!=============================================================================== +!BOP +! +! !IROUTINE: LeungDragPartition - Calculates drag partition for mixed surfaces +! +! !DESCRIPTION: Computes the drag partition coefficient for surfaces with both +! vegetative and bare components based on Leung's formulation ! ! !REVISION HISTORY: +! 15Aug2024 B.Baker/NOAA - Original implementation ! -! 22Feb2020 B.Baker/NOAA - Original implementation -! 29Mar2021 R.Montuoro/NOAA - Refactored for process library + real function LeungDragPartition(Lc, lai, gvf, thresh) + +! !USES: + implicit NONE + +! !INPUT PARAMETERS: + real, intent(in) :: Lc ! Canopy length scale [m] + real, intent(in) :: lai ! Leaf Area Index [m²/m²] + real, intent(in) :: gvf ! Green Vegetation Fraction [0-1] + real, intent(in) :: thresh ! LAI threshold value [m²/m²] + +! !LOCAL VARIABLES: + real :: frac_bare ! Fraction of bare surface [0-1] + real :: K ! Normalized gap length [-] + real :: feff_bare ! Effective drag partition for bare surfaces [-] + real :: feff_veg ! Effective drag partition for vegetated surfaces [-] + real :: Rbare1 ! Intermediate bare surface calculation [-] + real :: Rbare2 ! Intermediate bare surface calculation [-] + real :: Lc_bare ! Bare surface canopy length scale [m] + real :: feff ! Final effective drag partition [-] + real :: tmpVal ! Temporary calculation value [-] + +! !CONSTANTS: + real, parameter :: LAI_THR = 0.33 ! LAI threshold [-] + real, parameter :: C = 4.8 ! Empirical constant [-] + real, parameter :: F0 = 0.32 ! Base efficiency factor [-] + real, parameter :: SIGB = 1.0 ! Roughness density parameter [-] + real, parameter :: MB = 0.5 ! Empirical constant [-] + real, parameter :: BETAB = 90.0 ! Empirical constant [-] + real, parameter :: MIN_FEFF = 1.0E-5 ! Minimum allowable drag partition [-] + real, parameter :: MAX_FEFF = 1.0 ! Maximum allowable drag partition [-] + real, parameter :: SMALL = 1.0E-10 ! Small number to prevent division by zero + + ! Initialize variables + feff_bare = 0.0 + feff_veg = 0.0 + + ! Calculate bare surface fraction with bounds checking + frac_bare = MAX(MIN(1.0 - lai / thresh, 1.0), SMALL) + + ! Calculate vegetative component + if ((lai <= 0.0) .or. (lai >= thresh)) then + feff_veg = 0.0 + else + K = 2.0 * (1.0 / MAX(1.0 - lai, SMALL) - 1.0) + feff_veg = (K + F0 * C) / (K + C) + endif + + ! Calculate bare surface component + if ((Lc <= 0.2) .and. (Lc > 0.0) .and. (lai < thresh)) then + Lc_bare = Lc / MAX(frac_bare, SMALL) + tmpVal = 1.0 - SIGB * MB * Lc_bare + + if (tmpVal > SMALL) then + Rbare1 = 1.0 / SQRT(MAX(1.0 - SIGB * MB * Lc_bare, SMALL)) + Rbare2 = 1.0 / SQRT(1.0 + BETAB * MB * Lc_bare) + feff_bare = Rbare1 * Rbare2 + else + feff_bare = 0.0 + endif + else + feff_bare = 0.0 + endif + + ! Calculate final effective drag partition + feff = (gvf * feff_veg**3 + frac_bare * feff_bare**3) ** (1.0/3.0) + + ! Apply bounds + if (feff > MAX_FEFF .or. feff < MIN_FEFF) then + LeungDragPartition = MIN_FEFF + else + LeungDragPartition = feff + endif + + end function LeungDragPartition +!=============================================================================== + +!================================================================================== +!BOP +! +! !IROUTINE: DustEmissionFENGSHA - Compute dust emissions using NOAA/ARL FENGSHA model ! +! !INTERFACE: + subroutine DustEmissionFENGSHA(fraclake, fracsnow, oro, slc, clay, sand, silt, & + ssm, rdrag, airdens, ustar, vegfrac, lai, uthrs, & + alpha, gamma, kvhmax, grav, rhop, distribution, & + drylimit_factor, moist_correct, drag_opt, & + emissions, rc) -! !Local Variables - logical :: skip - integer :: i, j, n, nbins +! !USES: + implicit NONE + +! !INPUT PARAMETERS: + real, dimension(:,:), intent(in) :: fraclake ! fraction of lake [0-1] + real, dimension(:,:), intent(in) :: fracsnow ! surface snow area fraction [0-1] + real, dimension(:,:), intent(in) :: slc ! soil liquid water content [0-1] + real, dimension(:,:), intent(in) :: oro ! land-ocean-ice mask [1] + real, dimension(:,:), intent(in) :: clay ! fractional clay content [0-1] + real, dimension(:,:), intent(in) :: sand ! fractional sand content [0-1] + real, dimension(:,:), intent(in) :: silt ! fractional silt content [0-1] + real, dimension(:,:), intent(in) :: ssm ! erosion map [0-1] + real, dimension(:,:), intent(in) :: rdrag ! drag partition [1/m] + real, dimension(:,:), intent(in) :: airdens ! air density [kg/m^3] + real, dimension(:,:), intent(in) :: ustar ! friction velocity [m/s] + real, dimension(:,:), intent(in) :: vegfrac ! vegetation fraction [0-1] + real, dimension(:,:), intent(in) :: lai ! leaf area index [m²/m²] + real, dimension(:,:), intent(in) :: uthrs ! threshold velocity [m/s] + real, intent(in) :: alpha ! scaling factor [1] + real, intent(in) :: gamma ! scaling factor [1] + real, intent(in) :: kvhmax ! max vertical/horizontal flux ratio [1] + real, intent(in) :: grav ! gravity [m/s²] + real, dimension(:), intent(in) :: rhop ! soil class density [kg/m³] + real, dimension(:), intent(in) :: distribution ! dust bin distribution [0-1] + real, intent(in) :: drylimit_factor ! dry limit tuning factor [1] + real, intent(in) :: moist_correct ! moisture correction [1] + integer, intent(in) :: drag_opt ! drag partition option [1-3] + +! !OUTPUT PARAMETERS: + real, intent(out) :: emissions(:,:,:) ! binned surface emissions [kg/(m² s)] + integer, intent(out) :: rc ! Error return code + +! !LOCAL VARIABLES: + logical :: skip + integer :: i, j, n, nbins + integer :: stat integer, dimension(2) :: ilb, iub - real :: alpha_grav - real :: fracland - real :: h - real :: kvh - real :: q - real :: rustar - real :: total_emissions - real :: u_sum, u_thresh + real :: alpha_grav, fracland, h, kvh, q + real :: rustar, total_emissions, u_sum, u_thresh + real :: smois, R ! !CONSTANTS: - real, parameter :: ssm_thresh = 1.e-02 ! emit above this erodibility threshold [1] - -!EOP -!------------------------------------------------------------------------- -! Begin + real, parameter :: SSM_THRESH = 1.0E-02 ! Minimum erodibility threshold + real, parameter :: VEG_THRESH = 0.4 ! Maximum vegetation threshold + real, parameter :: SMALL = 1.0E-10 ! Small number for division protection + real, parameter :: MAX_RDRAG = 0.3 ! Maximum drag partition ratio + ! Initialize rc = __SUCCESS__ + emissions = 0.0 + + ! Input validation + if (any(shape(emissions) < 1)) then + rc = __FAIL__ + return + endif -! Get dimensions and index bounds -! ------------------------------- + ! Get array bounds nbins = size(emissions, dim=3) ilb = lbound(ustar) iub = ubound(ustar) -! Initialize emissions -! -------------------- - emissions = 0. + ! Precompute scaling factor + alpha_grav = alpha / max(grav, SMALL) -! Prepare scaling factor -! ---------------------- - alpha_grav = alpha / grav - -! Compute size-independent factors for emission flux -! --------------------------- - do j = ilb(2), iub(2) - do i = ilb(1), iub(1) - ! skip if we are not on land - ! -------------------------- + ! Main computation loop + jloop: do j = ilb(2), iub(2) + iloop: do i = ilb(1), iub(1) + ! Skip criteria evaluation skip = (oro(i,j) /= LAND) - ! threshold and sanity check for surface input - ! -------------------------------------------- - if (.not.skip) skip = (ssm(i,j) < ssm_thresh) & - .or. (clay(i,j) < 0.) .or. (sand(i,j) < 0.) & - .or. (rdrag(i,j) < 0.) - - if (.not.skip) then - fracland = max(0., min(1., 1.-fraclake(i,j))) & - * max(0., min(1., 1.-fracsnow(i,j))) - - ! Compute vertical-to-horizontal mass flux ratio - ! ---------------------------------------------- - kvh = DustFluxV2HRatioMB95(clay(i,j), kvhmax) - ! Compute total emissions - ! ----------------------- - total_emissions = alpha_grav * fracland * (ssm(i,j) ** gamma) & - * airdens(i,j) * kvh + select case(drag_opt) + case(2) ! Darmenova scheme + if (.not. skip) then + skip = (vegfrac(i,j) < 0.0) .or. (vegfrac(i,j) >= VEG_THRESH) .or. & + (rdrag(i,j) > MAX_RDRAG) + endif + case(3) ! Leung scheme + if (.not. skip) then + skip = (vegfrac(i,j) < 0.0) .or. (lai(i,j) >= VEG_THRESH) + endif + case default + if (.not. skip) skip = (rdrag(i,j) < 0.0) + end select - ! Compute threshold wind friction velocity using drag partition - ! ------------------------------------------------------------- - rustar = rdrag(i,j) * ustar(i,j) + if (.not. skip) then + skip = (ssm(i,j) < SSM_THRESH) .or. & + (clay(i,j) < 0.0) .or. (sand(i,j) < 0.0) + endif + + ! Emission calculations + if (.not. skip) then + ! Calculate land fraction + fracland = max(0.0, min(1.0, 1.0 - fraclake(i,j))) * & + max(0.0, min(1.0, 1.0 - fracsnow(i,j))) - ! Now compute size-dependent total emission flux - ! ---------------------------------------------- - do n = 1, nbins - ! Fecan moisture correction - ! ------------------------- - h = moistureCorrectionFecan(slc(i,j), sand(i,j), clay(i,j), rhop(n)) + ! Calculate vertical-to-horizontal mass flux ratio + kvh = DustFluxV2HRatioMB95(clay(i,j), kvhmax) - ! Adjust threshold - ! ---------------- - u_thresh = uthrs(i,j) * h + ! Calculate total emissions potential + total_emissions = alpha_grav * fracland * (ssm(i,j) ** gamma) * & + airdens(i,j) * kvh + + ! Calculate drag partition + select case(drag_opt) + case(1) + R = rdrag(i,j) + case(2) + R = DarmenovaDragPartition(rdrag(i,j), vegfrac(i,j), VEG_THRESH) + case(3) + R = LeungDragPartition(rdrag(i,j), lai(i,j), vegfrac(i,j), VEG_THRESH) + end select - u_sum = rustar + u_thresh + rustar = R * ustar(i,j) - ! Compute Horizontal Saltation Flux according to Eq (9) in Webb et al. (2020) - ! --------------------------------------------------------------------------- - q = max(0., rustar - u_thresh) * u_sum * u_sum + ! Apply moisture correction + smois = slc(i,j) * moist_correct + h = moistureCorrectionFecan(smois, sand(i,j), clay(i,j), drylimit_factor) - ! Distribute emissions to bins and convert to mass flux (kg s-1) - ! -------------------------------------------------------------- - emissions(i,j,n) = distribution(n) * total_emissions * q - end do + ! Calculate threshold velocity + u_thresh = uthrs(i,j) * h + u_sum = rustar + u_thresh - end if + ! Calculate horizontal saltation flux + q = max(0.0, rustar - u_thresh) * u_sum * u_sum - end do - end do + ! Distribute emissions to bins + binloop: do n = 1, nbins + emissions(i,j,n) = distribution(n) * total_emissions * q + end do binloop + endif + + end do iloop + end do jloop end subroutine DustEmissionFENGSHA @@ -1092,10 +1433,11 @@ end subroutine DistributePointEmission !BOP ! !IROUTINE: Chem_SettlingSimple - subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & - radiusInp, rhopInp, int_qa, tmpu, & - rhoa, rh, hghte, delp, fluxout, & - vsettleOut, correctionMaring, rc) + subroutine Chem_SettlingSimple ( km, klid, mie, bin, cdt, grav, & + int_qa, tmpu, rhoa, rh, hghte, & + delp, fluxout, & + vsettleOut, correctionMaring, & + settling_scheme, rc) ! !USES: @@ -1104,11 +1446,10 @@ subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & ! !INPUT PARAMETERS: integer, intent(in) :: km ! total model levels integer, intent(in) :: klid ! index for pressure lid - integer, intent(in) :: flag ! flag to control particle swelling (see note) + type(GOCART2G_Mie), intent(in) :: mie ! mie table + integer, intent(in) :: bin ! aerosol bin index real, intent(in) :: cdt real, intent(in) :: grav ! gravity [m/sec^2] - real, intent(in) :: radiusInp ! particle radius [microns] - real, intent(in) :: rhopInp ! soil class density [kg/m^3] real, dimension(:,:,:), intent(inout) :: int_qa ! aerosol [kg/kg] real, pointer, dimension(:,:,:), intent(in) :: tmpu ! temperature [K] real, pointer, dimension(:,:,:), intent(in) :: rhoa ! air density [kg/m^3] @@ -1124,22 +1465,23 @@ subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & ! 0 - all is well ! 1 - ! Optionally output the settling velocity calculated - real, pointer, optional, dimension(:,:,:) :: vsettleOut + real, pointer, optional, intent (inout) :: vsettleOut (:,:,:) ! Optionally correct the settling velocity following Maring et al, 2003 logical, optional, intent(in) :: correctionMaring +! Optionally choose the default gocart settling scheme or the one used in the UFS + integer, intent(in) :: settling_scheme ! 1 - use SettlingSolver, 2 - use SettlingSolverUFS + character(len=*), parameter :: myname = 'SettlingSimple' ! !DESCRIPTION: Gravitational settling of aerosol between vertical ! layers. Assumes input radius in [m] and density (rhop) -! in [kg m-3]. If flag is set, use the Fitzgerald 1975 (flag = 1) -! or Gerber 1985 (flag = 2) parameterization to update the -! particle radius for the calculation (local variables radius -! and rhop). +! in [kg m-3]arrays from the optics files. ! ! !REVISION HISTORY: -! +! 02Jan2024 Collow Removed calls to particle swelling and added +! interpolation based on RH ! 17Sep2004 Colarco Strengthen sedimentation flux out at surface ! by setting removal to be valid from middle of ! surface layer @@ -1200,10 +1542,10 @@ subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & enddo ! If radius le 0 then get out - if(radiusInp .le. 0.) then - status = 100 - __RETURN__(STATUS) - end if +! if(radiusInp .le. 0.) then +! status = 100 +! __RETURN__(STATUS) +! end if ! Find the column dry mass before sedimentation do k = klid, km @@ -1214,14 +1556,15 @@ subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & enddo enddo -! Particle swelling - call ParticleSwelling(i1, i2, j1, j2, km, rh, radiusInp, rhopInp, radius, rhop, flag) - +! Find radius and density of the wet particle + call mie%Query(550e-9,bin, & + qa*delp/grav, & + rh, reff=radius, rhop=rhop, __RC__) ! Settling velocity of the wet particle do k = klid, km do j = j1, j2 do i = i1, i2 - call Chem_CalcVsettle(radius(i,j,k), rhop(i,j,k), rhoa(i,j,k), & + call Chem_CalcVsettle(radius(i,j,k), rhop(i,j,k), rhoa(i,j,k), & tmpu(i,j,k), vsettle(i,j,k), grav) end do end do @@ -1229,16 +1572,23 @@ subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & if(present(correctionMaring)) then if (correctionMaring) then - vsettle = max(1.0e-9, vsettle - v_upwardMaring) + vsettle = max(1.0e-9, vsettle - v_upwardMaring) endif endif - if(present(vsettleOut)) then - vsettleOut = vsettle - endif + if (present(vsettleOut)) then + if (associated(vsettleOut)) then + vsettleOut = vsettle + end if + end if ! Time integration - call SettlingSolver(i1, i2, j1, j2, km, cdt, delp, dz, vsettle, qa) + select case (settling_scheme) + case (1) ! Use the default gocart SettlingSolver + call SettlingSolver(i1, i2, j1, j2, km, cdt, delp, dz, vsettle, qa) + case (2) ! Use the new SettlingSolverUFS + call SettlingSolverUFS(i1, i2, j1, j2, km, cdt, delp, dz, vsettle, qa) + end select ! Find the column dry mass after sedimentation and thus the loss flux do k = klid, km @@ -1252,7 +1602,6 @@ subroutine Chem_SettlingSimple ( km, klid, flag, cdt, grav, & if( associated(fluxout) ) then fluxout(:,:) = (cmass_before - cmass_after)/cdt endif - int_qa = qa __RETURN__(__SUCCESS__) @@ -1266,7 +1615,8 @@ end subroutine Chem_SettlingSimple subroutine Chem_Settling ( km, klid, bin, flag, cdt, grav, & radiusInp, rhopInp, int_qa, tmpu, & rhoa, rh, hghte, delp, fluxout, & - vsettleOut, correctionMaring, rc) + vsettleOut, correctionMaring, & + settling_scheme, rc) ! !USES: @@ -1279,7 +1629,7 @@ subroutine Chem_Settling ( km, klid, bin, flag, cdt, grav, & integer, intent(in) :: flag ! flag to control particle swelling (see note) real, intent(in) :: cdt real, intent(in) :: grav ! gravity [m/sec^2] - real, intent(in) :: radiusInp ! particle radius [microns] + real, intent(in) :: radiusInp ! particle radius [meters] (converted from microns in call to function) real, intent(in) :: rhopInp ! soil class density [kg/m^3] real, dimension(:,:,:), intent(inout) :: int_qa ! aerosol [kg/kg] real, pointer, dimension(:,:,:), intent(in) :: tmpu ! temperature [K] @@ -1301,6 +1651,9 @@ subroutine Chem_Settling ( km, klid, bin, flag, cdt, grav, & ! Optionally correct the settling velocity following Maring et al, 2003 logical, optional, intent(in) :: correctionMaring +! Optionally choose the default gocart settling scheme or the one used in the UFS + integer, optional, intent(in) :: settling_scheme ! 1 - use SettlingSolver, 2 - use SettlingSolverUFS + character(len=*), parameter :: myname = 'Settling' ! !DESCRIPTION: Gravitational settling of aerosol between vertical @@ -1412,7 +1765,13 @@ subroutine Chem_Settling ( km, klid, bin, flag, cdt, grav, & endif ! Time integration - call SettlingSolver(i1, i2, j1, j2, km, cdt, delp, dz, vsettle, qa) + select case (settling_scheme) + case (1) ! Use the default gocart SettlingSolver + call SettlingSolver(i1, i2, j1, j2, km, cdt, delp, dz, vsettle, qa) + case (2) ! Use the new SettlingSolverUFS + call SettlingSolverUFS(i1, i2, j1, j2, km, cdt, delp, dz, vsettle, qa) + end select + ! Find the column dry mass after sedimentation and thus the loss flux do k = klid, km @@ -1580,7 +1939,9 @@ subroutine SettlingSolver(i1, i2, j1, j2, km, cdt, delp, dz, vs, qa) dt_cfl = 1 / maxval(tau_) - if (dt_cfl > cdt) then + if (dt_cfl <= 0.) then + nSubSteps = 0 + else if (dt_cfl > cdt) then ! no need for time sub-splitting nSubSteps = 1 dt = cdt @@ -1600,6 +1961,109 @@ subroutine SettlingSolver(i1, i2, j1, j2, km, cdt, delp, dz, vs, qa) end subroutine SettlingSolver + +!================================================================================== +!BOP +! !IROUTINE: SettlingSolverUFS + + subroutine SettlingSolverUFS(i1, i2, j1, j2, km, cdt, delp, dz, vs, qa) +! !USES: + implicit none + +! !INPUT PARAMETERS: + integer, intent(in) :: i1, i2 + integer, intent(in) :: j1, j2 + integer, intent(in) :: km + + real, intent(in) :: cdt + + real, dimension(i1:i2,j1:j2,km), intent(in) :: delp + real, dimension(i1:i2,j1:j2,km), intent(in) :: dz + real, dimension(i1:i2,j1:j2,km), intent(in) :: vs + +! !OUTPUT PARAMETERS: + real, dimension(i1:i2,j1:j2,km), intent(inout) :: qa + +! !LOCAL VARIABLES: + integer :: i, j, k, iit + integer :: nSubSteps + + real, dimension(i1:i2, j1:j2, km) :: tau + + real, dimension(km) :: dp_ + real, dimension(km) :: tau_ + real, dimension(km) :: qa_old + + real :: dt, dt_cfl, max_tau + real :: transfer_factor, loss_factor + real, parameter :: eps = 1.0e-30 ! Small number to prevent division by zero + real, parameter :: cfl_factor = 0.1 ! CFL stability factor + +! !DESCRIPTION: This subroutine solves the settling of particles +! in the vertical layers of the atmosphere. +! It uses a time-splitting method to ensure stability +! and mass conservation. The settling velocity is +! calculated based on the input parameters and +! the particle properties. +! +! !REVISION HISTORY: +! 14Jul2025: B. Baker refactored to improve performance and readability +! +!EOP +!------------------------------------------------------------------------- + + tau = vs / dz + + ! loop over grid points + jloop : do j = j1, j2 + iloop : do i = i1, i2 + + dp_ = delp(i,j,:) + tau_ = tau(i,j,:) + + ! Find maximum tau with numerical safety + max_tau = maxval(tau_) + + dt_cfl = cfl_factor / max_tau + + + + if (dt_cfl >= cdt) then + ! no need for time sub-splitting + nSubSteps = 0 + dt = cdt + else + nSubSteps = max(1, ceiling(cdt / dt_cfl)) + dt = cdt / real(nSubSteps) + end if + + ! Time integration with numerical safeguards + iitloop : do iit = 1, nSubSteps + ! Store old values for mass conservation check + qa_old = qa(i,j,:) + + ! Update top layer (only loss) + loss_factor = max(0.0,min(1.0, dt * tau_(1))) + qa(i,j,1) = max(0.0, qa(i,j,1) * (1.0 - min(loss_factor, 1.0))) + + ! Update interior and bottom layers + kloop: do k = 2, km + loss_factor = max(0.0,min(1.0, dt * tau_(k))) + + ! Check if pressure layers are valid + if (dp_(k-1) > eps .and. dp_(k) > eps) then + transfer_factor = (dp_(k-1) / dp_(k)) * dt * tau_(k-1) + qa(i,j,k) = max(0.0, qa(i,j,k) * (1.0 - min(loss_factor, 1.0))) + & + transfer_factor * qa_old(k-1) + else + qa(i,j,k) = max(0.0, qa(i,j,k) * (1.0 - min(loss_factor, 1.0))) + end if + end do kloop + end do iitloop + end do iloop + end do jloop + end subroutine SettlingSolverUFS + !================================================================================== !BOP ! !IROUTINE: ParticleSwelling @@ -2096,7 +2560,7 @@ subroutine Chem_Settling2Gorig (km, klid, flag, bin, int_qa, grav, delp, & qmin = minval(dz(i,j,:)/vsettle(i,j,:)) minTime = min(cdt,qmin) ! Now, how many iterations do we need to do? - if ( minTime < 0 ) then + if ( minTime <= 0 ) then nSubSteps = 0 else if(minTime .ge. cdt) then nSubSteps = 1 @@ -2436,7 +2900,7 @@ subroutine Chem_SettlingSimpleOrig ( km, klid, flag, grav, cdt, radiusInp, rhopI minTime = min(minTime,qmin) ! Now, how many iterations do we need to do? - if ( minTime < 0 ) then + if ( minTime <= 0 ) then nSubSteps = 0 ! call mpout_log(myname,'no Settling because minTime = ', minTime ) else if(minTime .ge. cdt) then @@ -2951,7 +3415,6 @@ subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, if (tmpu(i,j,k) < 258d0 .and. .not.snow_scavenging) then F = 0.d0 endif - effRemoval = fwet DC(n) = aerosol(i,j,k) * F * effRemoval *(1.-exp(-BT)) if (DC(n).lt.0.) DC(n) = 0. @@ -3181,6 +3644,601 @@ subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, end subroutine WetRemovalGOCART2G +!================================================================================== +!BOP + +! !IROUTINE: WetRemovalUFS + subroutine WetRemovalUFS( km, klid, bin_ind, cdt, aero_type, kin, grav, radius, & + rainout_eff, wtune, radius_thr, aerosol, ple, tmpu, rhoa, pfllsan, pfilsan, & + fluxout, rc ) + +! !USES: + implicit none + +! !INPUT PARAMETERS: + integer, intent(in) :: km ! total model levels + integer, intent(in) :: klid ! index for pressure lid + integer, intent(in) :: bin_ind ! bin index (usually the loop iteration) + real, intent(in) :: cdt ! chemistry model time-step [sec] + character(len=*), intent(in) :: aero_type ! species name + logical, intent(in) :: kin ! true for aerosol + real, intent(in) :: grav ! gravity [m/sec^2] + real, intent(in) :: radius ! Particle radius [um] + real, intent(in) :: wtune ! Washout Tuning factor [-] + real, intent(in) :: radius_thr ! Threshold particle radius for washout[um] + real, dimension(3), intent(in) :: rainout_eff ! temperature-dependent rainout efficiencies + real, dimension(:,:,:), intent(inout) :: aerosol ! internal state aerosol [kg/kg] + real, pointer, dimension(:,:,:), intent(in) :: ple ! pressure level thickness [Pa] + real, pointer, dimension(:,:,:), intent(in) :: tmpu ! temperature [K] + real, pointer, dimension(:,:,:), intent(in) :: rhoa ! moist air density [kg/m^3] + real, pointer, dimension(:,:,:), intent(in) :: pfllsan ! 3D flux of liquid nonconvective precipitation [kg/(m^2 sec)] + real, pointer, dimension(:,:,:), intent(in) :: pfilsan ! 3D flux of ice nonconvective precipitation [kg/(m^2 sec)] + real, pointer, dimension(:,:,:) :: fluxout ! tracer loss flux [kg m-2 s-1] + +! !OUTPUT PARAMETERS: + integer, intent(out) :: rc ! Error return code: + +! !DESCRIPTION: Computes and applies concentration losses due to large scale rainout and washout processes. +! This subroutine is tailored for applications based on NOAA's GEFSv13 prototypes. +! +! !REVISION HISTORY: +! +! 08Aug2024 - R. Montuoro (NOAA/NWS/NCEP/EMC), B. Baker (NOAA/OAR/ARL), Initial implementation, based on GEOS-Chem +! +! !Local Variables + ! Grid size + integer :: il, iu, jl, ju + ! looping indexes + integer :: i, j, k, km1, ktop, kbot + ! local physical variables + real :: delp ! pressure thickness [Pa] + real :: dqls ! liquid water flux gradient [kg/(m^2 s)] + real :: dqis ! ice water flux gradient [kg/(m^2 s)] + real :: dqls_kgm3s ! liquid water flux gradient [kg/(m^3 s)] + real :: dqis_kgm3s ! ice water flux gradient [kg/(m^3 s)] + real :: f ! total precipitation fraction (f_rainout + f_washout) [1] + real :: ftop ! top of grid box rainout fraction [1] + real :: f_prime ! rainout fraction in middle layers [1] + real :: f_rainout ! rainout fraction [1] + real :: f_washout ! washout fraction [1] + real :: k_rain ! rainout rate [m^3/s] + real :: dt ! chemistry model time-step [sec] + real :: totloss ! total loss fraction + real :: lossfrac ! loss fraction + real :: wetloss ! wet loss fraction before evaporation + real :: qdwn ! cm3 (h2o) / cm2 (air) / s + real :: pres ! pressure [Pa] + real :: alpha ! ratio of evap. to sublimation + real :: gain ! gain fraction + real :: washed ! concentration of washed out tracer + real :: delz ! thickness of layer [m] + real, dimension(:), allocatable :: qq ! precipatitng water rate [cm3 (h2o) / cm2 (air) / s] + real, dimension(:), allocatable :: pdwn ! preciptation rate at top of grid cells [cm3 (h2o) / cm2 (air) / s] + real, dimension(:), allocatable :: dpog ! pressure thickness of grid cells divided by gravity [Pa / (m/s^2)] + real, dimension(:), allocatable :: conc ! concentration [kg/m2] + real, dimension(:), allocatable :: dconc ! concentration loss kg/m2 + real, dimension(:), allocatable :: c_h2o ! concentration of h2o + real, dimension(:), allocatable :: cldice ! ice concentration + real, dimension(:), allocatable :: cldliq ! liquid water concentration + real, dimension(:), allocatable :: delz_cm ! thickness of layer [cm] + + type spc_t + real :: retfac + real :: cnvI2G + real(dp) :: CR + real(dp) :: K0 + real(dp) :: pKa + end type spc_t + + type(spc_t) :: spc + + ! -- local parameters + real, parameter :: one = 1.0 ! for code readability + real, parameter :: zero = 0.0 ! for code readability + real, parameter :: density_ice = 917.0 ! density of ice in kg m-3 + real, parameter :: density_liq = 1.e+03 ! density of liquid water in kg m-3 + real, parameter :: m_to_cm = 100. ! conversion factor from m to cm + real, parameter :: kg_to_cm3_liq = m_to_cm / density_liq ! conversion factor from kg to cm3 for liquid water + real, parameter :: kg_to_cm3_ice = m_to_cm / density_ice ! conversion factor from kg to cm3 for ice + real, parameter :: qq_thr = 0.0 ! cm3 (h2o) / cm3 (air) / s + real, parameter :: pdwn_thr = 0.0 ! cm3 (h2o) / cm2 (air) / s + real, parameter :: k_min = 1.e-04 ! s-1 + real, parameter :: cwc = 1.e-06 ! s-1 (recommended by Qiaoqiao Wang et al., 2014. Originally 1.5e-6, see Jacob et al., 2000) + + ! -- begin + + rc = __SUCCESS__ + + if (.not. kin) then ! Gases + if (aero_type == 'NH3') then ! Only for NH3 at present + spc % retfac = 5.0e-2 + spc % cnvI2G = 6.17395e-1 + spc % CR = 4100._dp + spc % K0 = 3.3e+6_dp + spc % pKa = 9.25_dp + else + !$omp critical (G2G_proc_1) + print *, 'stop in WetRemoval, need parameters for species ' // trim(aero_type) + !$omp end critical (G2G_proc_1) + rc = __FAIL__ + return + endif + endif + + il = lbound(rhoa,1) + iu = ubound(rhoa,1) + jl = lbound(rhoa,2) + ju = ubound(rhoa,2) + + if( associated(fluxout) ) fluxout(il:iu,jl:ju,bin_ind) = zero + + ktop = 1 + kbot = km + + dt = cdt + + allocate(qq(ktop:kbot), pdwn(ktop:kbot), conc(ktop:kbot), dconc(ktop:kbot), dpog(ktop:kbot), & + c_h2o(ktop:kbot), cldice(ktop:kbot), cldliq(ktop:kbot), delz_cm(ktop:kbot)) + + do j = jl, ju + do i = il, iu + ! -- compute column quantities + do k = ktop, kbot + km1 = k - 1 + + ! -- initialize auxiliary arrays + delp = ple(i,j,k) - ple(i,j,km1) + dpog(k) = delp / grav + delz = dpog(k) / rhoa(i,j,k) ! thickness of layer [m] + delz_cm(k) = delz * m_to_cm ! thickness of layer [cm] + + ! -- liquid/ice precipitation formation in grid cell (kg/m2/s) + dqls = pfllsan(i,j,k) - pfllsan(i,j,km1) + dqis = pfilsan(i,j,k) - pfilsan(i,j,km1) + + ! -- convert from kg/m2/s to kg (H2O) / m3(air) / s + dqls_kgm3s = dqls / delz + dqis_kgm3s = dqis / delz + + ! -- total precipitation formation (convert from kg (H2O) / m3(air) / s to cm3 (H2O) / cm3 (air) /s) + ! -- To convert from kg (H2O) / m3(air) / s to cm3 (H2O) / cm3 (air) / s, divide by the density of + ! -- the precipitation (ice or liquid) + qq(k) = dqls_kgm3s / density_liq + dqis_kgm3s / density_ice + + ! -- precipitation flux from upper level (convert from kg/m2/s to cm3/cm2/s) + pdwn(k) = kg_to_cm3_liq * pfllsan(i,j,km1) & + + kg_to_cm3_ice * pfilsan(i,j,km1) + + ! -- initialize concentrations array, converting from kg/kg to kg/m2 + conc(k) = aerosol(i,j,k) * dpog(k) + + ! -- initialize loss array + dconc(k) = zero + + ! -- compute mixing ratio of saturated water vapour over ice + pres = 0.5 * ( ple(i,j,km1) + ple(i,j,k) ) + c_h2o(k) = 10._dp ** (-2663.5_dp / tmpu(i,j,k) + 12.537_dp ) / pres + + ! -- estimate cloud ice and liquid water content + if ( tmpu(i,j,k) >= 268. ) then + cldliq(k) = cwc + else if ( tmpu(i,j,k) > 248. ) then + cldliq(k) = cwc * ( tmpu(i,j,k) - 248. ) / 20. + else + cldliq(k) = zero + end if + cldice(k) = MAX(cwc - cldliq(k), zero) ! ensure cldice >= 0 + end do + + ! -- starts at the top + k = ktop + f = zero + if (qq(k) > qq_thr) then + ! -- compute rainout rate + k_rain = k_min + qq(k) / cwc + f = qq(k) / ( k_rain * cwc ) + + call rainout( kin, rainout_eff, f, k_rain, dt, tmpu(i,j,k), delz_cm(k), & + pdwn(k), c_h2o(k), cldice(k), cldliq(k), spc, lossfrac ) + + ! -- compute and apply effective loss fraction + wetloss = lossfrac * conc(k) + conc(k) = conc(k) - wetloss + dconc(k) = wetloss + + ! -- add to total column deposition flux + dconc(k) = wetloss + end if + + ! -- middle layers + ftop = f + do k = ktop + 1, kbot - 1 + km1 = k - 1 + + f_prime = zero + ! -- if precipitation is forming in the grid cell + if (qq(k) > qq_thr) then + k_rain = k_min + qq(k) / cwc + f_prime = qq(k) / ( k_rain * cwc ) + end if + + ! -- account for precipitation flux + f_rainout = zero + f_washout = zero + + if (pdwn(k) > pdwn_thr) then + f_rainout = f_prime + f_washout = max( zero, ftop - f_rainout ) + end if + + f = f_rainout + f_washout + + if ( f > zero ) then + if ( f_rainout > zero ) then + call rainout( kin, rainout_eff, f_rainout, k_rain, dt, tmpu(i,j,k), delz_cm(k), & + pdwn(k), c_h2o(k), cldice(k), cldliq(k), spc, lossfrac ) + + ! -- compute and apply effective loss fraction + wetloss = lossfrac * conc(k) + conc(k) = conc(k) - wetloss + dconc(k) = dconc(km1) + wetloss + end if + if ( f_washout > zero ) then + if ( f_rainout > zero ) then + ! -- washout from precipitation entering from the top + qdwn = pdwn(km1) + else + ! -- washout from precipitation leaving through the bottom + qdwn = pdwn(k) + end if + call washout( kin, radius, f, tmpu(i,j,k), qdwn, delz_cm(k), dt, & + spc, wtune, radius_thr, lossfrac ) + + if ( kin ) then + ! -- adjust loss fraction for aerosols + lossfrac = lossfrac * f_washout / f + + alpha = abs( qq(k) ) * delz_cm(k) / pdwn(km1) + alpha = min( one, alpha ) + gain = 0.5 * alpha * dconc(km1) + wetloss = conc(k) * lossfrac - gain + ! -- skip sulfate + else + washed = f_washout * conc(k) + dconc(km1) + wetloss = lossfrac * ( washed - dconc(km1) ) + end if + conc(k) = conc(k) - wetloss + if ( f_rainout > zero ) then + dconc(k) = dconc(k) + wetloss + else + dconc(k) = dconc(km1) + wetloss + end if + end if + else + ! -- complete resuspension of rainout + washout from level above + conc(k) = conc(k) + dconc(km1) + end if + + ftop = f + + end do + + ! -- surface level + k = kbot + if (pdwn(km1) > pdwn_thr) then + f = ftop + if ( f > zero ) then + qdwn = pdwn(km1) + call washout( kin, radius, f, tmpu(i,j,k), qdwn, delz_cm(k), & + dt, spc, wtune, radius_thr, lossfrac ) + + ! -- f is included in lossfrac for aerosols and HNO3 + if ( kin ) then + wetloss = lossfrac * conc(k) + else + wetloss = f * lossfrac * conc(k) + end if + conc (k) = conc (k) - wetloss + dconc(k) = dconc(km1) + wetloss + end if + end if + + do k = ktop, kbot + ! -- convert back to kg/kg + aerosol(i,j,k) = conc(k) / dpog(k) + end do + + if (associated(fluxout)) fluxout(i,j,bin_ind) = sum(dconc) / dt + + end do + end do + + deallocate(qq, pdwn, conc, dconc, dpog, delz_cm, c_h2o, cldice, cldliq) + + contains + + subroutine rainout( kin, efficiency, f, k, dt, tk, dz, pdwn, c_h2o, cldice, cldliq, spc, lossfrac ) + + logical, intent(in) :: kin + real, intent(in) :: efficiency(3) + real, intent(in) :: f + real, intent(in) :: k + real, intent(in) :: dt + real, intent(in) :: tk + real, intent(in) :: dz + real, intent(in) :: pdwn + real, intent(in) :: c_h2o + real, intent(in) :: cldice + real, intent(in) :: cldliq + type(spc_t), intent(in) :: spc + real, intent(out) :: lossfrac + + ! -- local variables + real :: i2g, l2g, c_tot + real :: f_i, f_l, ki + + ! -- local parameters + real, parameter :: kc = 5.e-3 ! conversion rate from cloud condensate to precip (s-1) + + ! -- begin + + lossfrac = zero + + if (kin) then + lossfrac = rainfrac( f, k, dt ) + + ! -- apply rainout efficiency + if (tk < 237.) then + ! ice + lossfrac = efficiency(1) * lossfrac + else if (tk < 258.) then + ! snow + lossfrac = efficiency(2) * lossfrac + else + ! liquid rain + lossfrac = efficiency(3) * lossfrac + end if + + else + + ! -- compute ice to gas ratio assuming scavenging by co-condensation + i2g = zero + if ( c_h2o > zero ) i2g = spc % cnvI2G * cldice / c_h2o + + ! -- compute l2g + l2g = washfrac_liq_gas( f, tk, pdwn, dz, dt, spc ) + + ! -- fraction of species in liquid and ice phases + c_tot = one + l2g + i2g + f_l = l2g / c_tot + f_i = i2g / c_tot + + ! -- compute Ki for loss due to scavenging from convective updraft + if ( tk >= 268. ) then + ki = kc * ( f_l + f_i ) + else if ( tk > 248. ) then + ki = kc * ( spc % retfac * f_l + f_i ) + else + ki = kc * f_i + end if + + ! -- compute rained-out fraction + lossfrac = rainfrac( f, ki, dt ) + + end if + + end subroutine rainout + + subroutine washout( kin, radius, f, tk, qdwn, dz, dt, spc, wtune, radius_thr, lossfrac ) + + implicit none + + logical, intent(in) :: kin + real, intent(in) :: radius + real, intent(in) :: f + real, intent(in) :: tk + real, intent(in) :: qdwn + real, intent(in) :: dz + real, intent(in) :: dt + type(spc_t), intent(in) :: spc + real, intent(in) :: wtune + real, intent(in) :: radius_thr + real, intent(out) :: lossfrac + + ! -- begin + + lossfrac = zero + + if ( kin ) then + ! -- kinetic process + lossfrac = washfrac_aerosol( radius, f, tk, qdwn, dt, wtune, radius_thr) + else + ! -- equilibrium process + lossfrac = washfrac_liq_gas( f, tk, qdwn, dz, dt, spc ) + end if + + end subroutine washout + + subroutine loss( lossfrac, conc, deploss ) + + implicit none + + real, intent(in) :: lossfrac + real, intent(inout) :: conc + real, intent(out) :: deploss + + ! -- begin + + ! -- apply loss + deploss = lossfrac * conc + conc = conc - deploss + + end subroutine loss + + real function rainfrac( f, k, dt ) + + implicit none + + real, intent(in) :: f + real, intent(in) :: k + real, intent(in) :: dt + + rainfrac = f * ( one - exp( -k * dt ) ) + + end function rainfrac + + real function washfrac_aerosol( radius, f, tk, pdwn, dt, tuning, radius_fine ) + + implicit none + + real, intent(in) :: radius ! particle radius (um) + real, intent(in) :: f ! washout fraction + real, intent(in) :: tk ! Temperature in grid box (K) + real, intent(in) :: pdwn ! Instant precip rate in grid box (cm3 (H2O) / cm2 (air) / s) + real, intent(in) :: dt ! Timestep (s) + real, intent(in) :: tuning ! Washout tuning factor + real, intent(in) :: radius_fine ! fine particle radius threshold (um) + + ! -- local variables + integer :: i, j + real :: dth, pph + + ! -- local parameters + real, parameter :: k_wash = 1.06e-03 + real, parameter :: h2s = 3600.0 ! s-1 + + ! -- begin + + washfrac_aerosol = zero + + if ( f > zero ) then + ! -- convert instant rates (s-1) to hourly rates + pph = 10. * pdwn * h2s + dth = dt / h2s + + if ( radius < radius_fine ) then + if ( tk >= 268. ) then + washfrac_aerosol = F * ( one - EXP(-k_wash * tuning * (pph / f ) ** 0.61 * dth)) + else + washfrac_aerosol = F * ( one - EXP(-26. * tuning * k_wash * (pph / f ) ** 0.96 * dth)) + endif + else + if ( tk >= 268. ) then + washfrac_aerosol = F * ( one - EXP(-0.92 * tuning * (pph / f ) ** 0.79 * dth)) + else + washfrac_aerosol = F * ( one - EXP(-1.57 / 0.5 * tuning * (pph / f ) ** 0.96 * dth)) + endif + endif + endif + + end function washfrac_aerosol + + real function washfrac_liq_gas( f, tk, pdwn, dz, dt, spc ) + + implicit none + + real, intent(in) :: f + real, intent(in) :: tk + real, intent(in) :: pdwn + real, intent(in) :: dz + real, intent(in) :: dt + type(spc_t), intent(in) :: spc + + ! -- local variables + real :: qliq, l2g, washfrac_kin + real(dp) :: k0, cr, pKa + + ! -- begin + if ( tk < 268. ) then + ! -- no washout + washfrac_liq_gas = zero + + else + + ! -- compute L2G + qliq = pdwn * dt / ( f * dz ) + + l2g = liq_to_gas_ratio( spc % k0, spc % cr, spc % pKa, tk, qliq ) + + ! -- washout fraction from Henry's Law + washfrac_liq_gas = l2g / ( one + l2g ) + + ! -- washout fraction from kinetic processes (HNO3) + washfrac_kin = washfrac_hno3( one, tk, pdwn, dt ) + + ! -- equilibrium washout must not exceed kinetic washout + if ( washfrac_liq_gas > washfrac_kin ) washfrac_liq_gas = washfrac_kin + + end if + + end function washfrac_liq_gas + + real function washfrac_hno3( f, tk, pdwn, dt ) + + implicit none + + real, intent(in) :: f + real, intent(in) :: tk + real, intent(in) :: pdwn + real, intent(in) :: dt + + ! -- local parameters + real, parameter :: k_wash = 1.0 ! First order washout rate (cm-1) + + ! -- begin + if ( tk < 268. ) then + ! -- no washout + washfrac_hno3 = zero + else if ( f > zero ) then + washfrac_hno3 = f * ( one - exp( -k_wash * pdwn * dt / f ) ) + end if + + end function washfrac_hno3 + + real function liq_to_gas_ratio( k0, cr, pKa, tk, qliq ) + + real(dp), intent(in) :: k0 + real(dp), intent(in) :: cr + real(dp), intent(in) :: pKa + real, intent(in) :: tk + real, intent(in) :: qliq + + ! -- local variables + real(dp) :: h, t + + ! -- local parameters + real(dp), parameter :: cloud_pH = 4.5_dp + + ! -- compute Henry's law constant + t = real(tk, kind=dp) + h = Henry( k0, cr, t ) + + ! -- adjust for chemical equilibriums in liquid phase + if ( pKa > -100._dp ) h = h * ( one + 10._dp ** ( cloud_pH - pKa ) ) + + liq_to_gas_ratio = h * qliq + + end function liq_to_gas_ratio + + real(dp) function Henry( k0, cr, tk ) + + real(dp), intent(in) :: k0 + real(dp), intent(in) :: cr + real(dp), intent(in) :: tk + + ! -- local parameters + real(dp), parameter :: Tref = 298.15_dp ! K + real(dp), parameter :: R = 8.3144598_dp ! J K-1 mol-1 + real(dp), parameter :: Pref = 101.325_dp ! mPa + + ! -- begin + + Henry = k0 * exp( cr * (1._dp/tk - 1._dp/Tref) ) * R * tk / Pref + + end function Henry + + end subroutine WetRemovalUFS + !============================================================================= !BOP @@ -3252,7 +4310,8 @@ subroutine Aero_Compute_Diags (mie, km, klid, nbegin, nbins, rlow, rup, & sfcmass, colmass, mass, exttau, stexttau, scatau, stscatau,& sfcmass25, colmass25, mass25, exttau25, scatau25, & fluxu, fluxv, conc, extcoef, scacoef, bckcoef,& - exttaufm, scataufm, angstrom, aerindx, NO3nFlag, rc ) + exttaufm, scataufm, angstrom, aerindx, NO3nFlag, & + sarea, reff, rc ) ! !USES: @@ -3302,7 +4361,9 @@ subroutine Aero_Compute_Diags (mie, km, klid, nbegin, nbins, rlow, rup, & real, optional, dimension(:,:,:,:), intent(inout) :: bckcoef ! 3d backscatter coefficient, m-1 sr-1 real, optional, dimension(:,:,:), intent(inout) :: exttaufm ! fine mode (sub-micron) ext. AOT at 550 nm real, optional, dimension(:,:,:), intent(inout) :: scataufm ! fine mode (sub-micron) sct. AOT at 550 nm - real, optional, dimension(:,:), intent(inout) :: angstrom ! 470-870 nm Angstrom parameter + real, optional, dimension(:,:), intent(inout) :: angstrom ! 470-870 nm Angstrom parameter + real, optional, dimension(:,:,:), intent(inout) :: sarea ! Aerosol surface area density [m2 m-3] + real, optional, dimension(:,:,:), intent(inout) :: reff ! Aerosol effective radius [m] integer, optional, intent(out) :: rc ! Error return code: ! 0 - all is well ! 1 - @@ -3320,7 +4381,7 @@ subroutine Aero_Compute_Diags (mie, km, klid, nbegin, nbins, rlow, rup, & integer :: i, j, k, n, w, ios, status integer :: i1 =1, i2, j1=1, j2 integer :: ilam470, ilam870 - real, allocatable, dimension(:,:,:) :: tau, ssa, bck + real, allocatable, dimension(:,:,:) :: tau, ssa, bck, area, tarea, pref, pref0 ! real :: fPMfm(nbins) ! fraction of bin with particles diameter < 1.0 um ! real :: fPM25(nbins) ! fraction of bin with particles diameter < 2.5 um real, dimension(:), allocatable :: fPMfm ! fraction of bin with particles diameter < 1.0 um @@ -3537,9 +4598,9 @@ subroutine Aero_Compute_Diags (mie, km, klid, nbegin, nbins, rlow, rup, & ! Integrate in the vertical if( present(exttau) ) exttau(:,:,w) = exttau(:,:,w) + tau(:,:,k) if( present(stexttau) ) then - where (ple(:,:,k) .le. tropp) + where (ple(:,:,k) .le. tropp) stexttau(:,:,w) = stexttau(:,:,w) + tau(:,:,k) - elsewhere(ple(:,:,k) .gt. tropp .and. ple(:,:,k-1) .lt. tropp) + elsewhere(ple(:,:,k) .gt. tropp .and. ple(:,:,k-1) .lt. tropp) stexttau(:,:,w) = stexttau(:,:,w) + log(tropp/ple(:,:,k-1))/log(ple(:,:,k)/ple(:,:,k-1))*tau(:,:,k) endwhere endif @@ -3562,9 +4623,9 @@ subroutine Aero_Compute_Diags (mie, km, klid, nbegin, nbins, rlow, rup, & if( present(scatau) ) scatau(:,:,w) = scatau(:,:,w) + tau(:,:,k)*ssa(:,:,k) if( present(stscatau) ) then - where (ple(:,:,k) .le. tropp) + where (ple(:,:,k) .le. tropp) stscatau(:,:,w) = stscatau(:,:,w) + tau(:,:,k)*ssa(:,:,k) - elsewhere(ple(:,:,k) .gt. tropp .and. ple(:,:,k-1) .lt. tropp) + elsewhere(ple(:,:,k) .gt. tropp .and. ple(:,:,k-1) .lt. tropp) stscatau(:,:,w) = stscatau(:,:,w) + log(tropp/ple(:,:,k-1))/log(ple(:,:,k)/ple(:,:,k-1))*tau(:,:,k)*ssa(:,:,k) endwhere endif @@ -3619,6 +4680,46 @@ subroutine Aero_Compute_Diags (mie, km, klid, nbegin, nbins, rlow, rup, & log(470./870.) endif deallocate(tau,ssa) + +! Calculate the sulfate area density [m2 m-3], possibly for use in +! StratChem or other component. Optics tables provide cross-sectional area +! for hydrated particle per kg dry mass but we want total surface area, +! which is 4 x cross section. + if(present(sarea)) then + sarea = 0.0 + allocate(area(i1:i2,j1:j2,km), __STAT__) + do n = nbegin, nbins + call mie%Query(550e-9,n, & + aerosol(:,:,:,n)*delp/grav, rh, & + area=area, __RC__) + sarea = sarea + 4.*area*aerosol(:,:,:,n)*rhoa + enddo + deallocate(area) + endif + +! Also if present compute the species integrated effective radius by +! area weighting individual components + if(present(reff)) then + reff = 0.0 + allocate(tarea(i1:i2,j1:j2,km), area(i1:i2,j1:j2,km), & + pref0(i1:i2,j1:j2,km), pref(i1:i2,j1:j2,km), __STAT__) + tarea = 0.0 + do n = nbegin, nbins + call mie%Query(550e-9,n, & + aerosol(:,:,:,n)*delp/grav, rh, & + area=area, reff=pref, __RC__) + if(n .eq. nbegin) pref0 = pref + area = 4.*area*aerosol(:,:,:,n)*rhoa + tarea = tarea + area + reff = reff + area*pref + enddo + reff = reff/tarea +! Trap zero reff for low concentrations + where(reff < 1.e-12) reff = pref0 + + deallocate(tarea, area, pref, pref0) + endif + __RETURN__(__SUCCESS__) end subroutine Aero_Compute_Diags !==================================================================== @@ -4299,7 +5400,7 @@ subroutine CAEmission (mie, km, nbins, cdt, grav, prefix, ratPOM, eAircraftfuel, real, dimension(:,:), allocatable :: f_bb_ ! scaling factor for BB emissions based on maximum allowed exttau real, dimension(:,:), allocatable :: exttau_bb_ ! increment of exttau due to BB during the current time step - real, allocatable, dimension(:,:,:,:) :: qa_bb_ ! increment of qa due to BB during the current time step (nbins,i1:i2,j1:j2:km) + real, allocatable, dimension(:,:,:,:) :: qa_bb_ ! increment of qa due to BB during the current time step (nbins,i1:i2,j1:j2:km) ! W.Jiang note, changed to (i1:i2,j1:j2,km,nbins) for efficiency real :: cutoff_bb_exttau integer :: idx @@ -4692,16 +5793,17 @@ end subroutine distribute_aviation_emissions !BOP ! -! !IROUTINE: phobicTophilic +! !IROUTINE: phobicToPhilic ! ! !INTERFACE: subroutine phobicTophilic (aerosol_phobic, aerosol_philic, aerosol_toHydrophilic, & - km, cdt, grav, delp, rc) + tConvPhobicToPhilic, km, cdt, grav, delp, rc) ! !USES: implicit NONE ! !INPUT PARAMETERS: + real, intent(in) :: tConvPhobicToPhilic ! e-folding time in days to transfer integer, intent(in) :: km ! total model level real, intent(in) :: cdt ! chemistry model time-step [sec] real, intent(in) :: grav ! [m/sec^2] @@ -4716,7 +5818,7 @@ subroutine phobicTophilic (aerosol_phobic, aerosol_philic, aerosol_toHydrophilic ! !Local Variables integer :: i, j, k - real :: qUpdate, delq + real :: qUpdate, delq, ts !EOP !------------------------------------------------------------------------------------ @@ -4724,10 +5826,17 @@ subroutine phobicTophilic (aerosol_phobic, aerosol_philic, aerosol_toHydrophilic if(associated(aerosol_toHydrophilic)) aerosol_toHydrophilic = 0.0 +! tConvPhobicToPhilic is the e-folding time (in days) of the conversion +! If < 0 no conversion is desired; exit the subroutine + if(tConvPhobicToPhilic < 0) then + __RETURN__(__SUCCESS__) + endif + ts = tConvPhobicToPhilic*86400. + do k = 1, km do j = 1, ubound(delp, 2) do i = 1, ubound(delp, 1) - qUpdate = aerosol_phobic(i,j,k)*exp(-4.63e-6*cdt) + qUpdate = aerosol_phobic(i,j,k)*exp(-cdt/ts) qUpdate = max(qUpdate,1.e-32) delq = max(0.,aerosol_phobic(i,j,k)-qUpdate) aerosol_phobic(i,j,k) = qUpdate @@ -4742,6 +5851,70 @@ subroutine phobicTophilic (aerosol_phobic, aerosol_philic, aerosol_toHydrophilic __RETURN__(__SUCCESS__) end subroutine phobicTophilic +!============================================================================ +!BOP +! +! !IROUTINE: carbonChemLoss +! +! !INTERFACE: + subroutine carbonChemLoss (km, klid, n, cdt, grav, delp, & + tChemLoss, int_qa, fluxout, rc) + +! !USES: + implicit NONE + +! !INPUT PARAMETERS: + real, intent(in) :: tChemLoss ! e-folding loss time [days] + integer, intent(in) :: km ! total model levels + integer, intent(in) :: klid ! index for pressure lid + integer, intent(in) :: n ! bin index number + real, intent(in) :: cdt ! time step [s] + real, intent(in) :: grav ! acceleration of gravity [m/sec^2] + real, dimension(:,:,:), intent(inout) :: int_qa ! aerosol [kg/kg] + real, pointer, dimension(:,:,:), intent(in) :: delp ! pressure level thickness [Pa] + +! !OUTPUT PARAMETERS: + + real, pointer, dimension(:,:,:), intent(inout) :: fluxout ! Mass lost by chemistry [kg/m^2/s] + integer, optional, intent(out) :: rc ! Error return code: + ! 0 - all is well + ! 1 - + +! !Local Variables + integer :: i, j, k + real :: qUpdate, delq, ts + +!EOP +!------------------------------------------------------------------------------------ +! Begin... + + if(associated(fluxout)) fluxout(:,:,n) = 0.0 + +! tChemLoss is the e-folding time (in days) of parameterized chemistry loss +! If < 0 no loss is desired; exit the subroutine + if(tChemLoss < 0) then + __RETURN__(__SUCCESS__) + endif + ts = tChemLoss*86400. + + do k = klid, km + do j = 1, ubound(delp, 2) + do i = 1, ubound(delp, 1) + qUpdate = int_qa(i,j,k)*exp(-cdt/ts) + qUpdate = max(qUpdate,1.e-32) + delq = max(0.,int_qa(i,j,k)-qUpdate) + int_qa(i,j,k) = qUpdate + if(associated(fluxout)) & + fluxout(i,j,n) = fluxout(i,j,n) & + + delq*delp(i,j,k)/grav/cdt + + end do + end do + end do + + __RETURN__(__SUCCESS__) + end subroutine carbonChemLoss + !============================================================================ !BOP @@ -5673,7 +6846,7 @@ end subroutine DMSemission ! !IROUTINE: SUvolcanicEmissions subroutine SUvolcanicEmissions (nVolc, vStart, vEnd, vSO2, vElev, vCloud, iPoint, & - jPoint, nhms, SO2EMVN, SO2EMVE, SO2, nSO2, SU_emis, km, cdt, grav,& + jPoint, nhms, SO2EMVol, SO2, nSO2, SU_emis, km, cdt, grav,& hghte, delp, area, vLat, vLon, rc) ! !USES: implicit NONE @@ -5697,8 +6870,7 @@ subroutine SUvolcanicEmissions (nVolc, vStart, vEnd, vSO2, vElev, vCloud, iPoint real, dimension(:), intent(in) :: vLat ! latitude specified in file [degree] real, dimension(:), intent(in) :: vLon ! longitude specified in file [degree] ! !INOUT PARAMETERS: - real, pointer, dimension(:,:), intent(inout) :: SO2EMVN ! non-explosive volcanic emissions [kg m-2 s-1] - real, pointer, dimension(:,:), intent(inout) :: SO2EMVE ! explosive volcanic emissions [kg m-2 s-1] + real, pointer, dimension(:,:), intent(inout) :: SO2EMVol ! volcanic emissions [kg m-2 s-1] real, pointer, dimension(:,:,:), intent(inout) :: SO2 ! SO2 [kg kg-1] real, pointer, dimension(:,:,:), intent(inout) :: SU_emis ! SU emissions, kg/m2/s real, dimension(:), intent(inout) :: vElev ! bottom elevation of emissions [m] @@ -5714,15 +6886,14 @@ subroutine SUvolcanicEmissions (nVolc, vStart, vEnd, vSO2, vElev, vCloud, iPoint ! 22July2020 E.Sherman ! ! !Local Variables - integer :: i, j, it + integer :: i, j, k, it real, dimension(:,:,:), allocatable :: emissions_point real :: so2volcano - real :: hup, hlow, dzvolc, dz, z1, k + real :: hup, hlow, dzvolc, dz, z1 real :: deltaSO2v real, dimension(:,:), allocatable :: z0 real, allocatable, dimension(:,:) :: srcSO2volc - real, allocatable, dimension(:,:) :: srcSO2volce !EOP !------------------------------------------------------------------------- @@ -5731,13 +6902,9 @@ subroutine SUvolcanicEmissions (nVolc, vStart, vEnd, vSO2, vElev, vCloud, iPoint if (nVolc > 0) then allocate(srcSO2volc, mold=area) - allocate(srcSO2volce, mold=area) srcSO2volc = 0. - srcSO2volce = 0. - if (associated(SU_emis)) SU_emis = 0.0 - if (associated(SO2EMVN)) SO2EMVN = 0. - if (associated(SO2EMVE)) SO2EMVE = 0. + if (associated(SO2EMVol)) SO2EMVol = 0. allocate(z0, mold=area) z0 = hghte(:,:,km) @@ -5776,11 +6943,7 @@ subroutine SUvolcanicEmissions (nVolc, vStart, vEnd, vSO2, vElev, vCloud, iPoint ! Diagnostic - sum of volcanos ! ---------------------------- - if (hup .eq. hlow) then - srcSO2volc(i,j) = srcSO2volc(i,j) + so2volcano - else - srcSO2volce(i,j) = srcSO2volce(i,j) + so2volcano - endif + srcSO2volc(i,j) = srcSO2volc(i,j) + so2volcano dzvolc = hup-hlow do k = km, 1, -1 @@ -5827,9 +6990,8 @@ subroutine SUvolcanicEmissions (nVolc, vStart, vEnd, vSO2, vElev, vCloud, iPoint enddo ! it end if ! nVolc > 0 - if (associated(SO2EMVN)) SO2EMVN = SO2EMVN + srcSO2volc - if (associated(SO2EMVE)) SO2EMVE = SO2EMVE + srcSO2volce - if (associated(SU_emis)) SU_emis(:,:,nSO2) = SU_emis(:,:,nSO2) + srcSO2volc + srcSO2volce + if (associated(SO2EMVol)) SO2EMVol = SO2EMVol + srcSO2volc + if (associated(SU_emis)) SU_emis(:,:,nSO2) = SU_emis(:,:,nSO2) + srcSO2volc __RETURN__(__SUCCESS__) end subroutine SUvolcanicEmissions @@ -6166,7 +7328,7 @@ subroutine SU_Wet_Removal ( km, nbins, klid, cdt, kin, grav, airMolWght, delp, f real, intent(in) :: airMolWght ! air molecular weight [kg] real, dimension(:,:,:), intent(in) :: delp ! pressure thickness [Pa] real, intent(in) :: fMassSO4, fMassSO2 - real, dimension(:,:,:) :: h2o2_int + real, dimension(:,:,:) :: h2o2_int real, pointer, dimension(:,:,:), intent(in) :: ple ! level edge air pressure real, pointer, dimension(:,:,:), intent(in) :: rhoa ! air density, [kg m-3] real, pointer, dimension(:,:), intent(in) :: precc ! total convective precip, [mm day-1] @@ -6710,7 +7872,7 @@ end subroutine SU_Wet_Removal !BOP ! !IROUTINE: SU_Compute_Diags - subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, & + subroutine SU_Compute_Diags ( km, klid, rhop, grav, pi, nSO4, mie, & wavelengths_profile, wavelengths_vertint, & tmpu, rhoa, delp, ple, tropp,rh, u, v, & DMS, SO2, SO4, MSA, & @@ -6719,7 +7881,7 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, so2sfcmass, so2colmass, & so4sfcmass, so4colmass, & exttau, stexttau,scatau, stscatau,so4mass, so4conc, extcoef, & - scacoef, bckcoef, angstrom, fluxu, fluxv, sarea, snum, rc ) + scacoef, bckcoef, angstrom, fluxu, fluxv, sarea, snum, reff, rc ) ! !USES: implicit NONE @@ -6727,8 +7889,6 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, ! !INPUT PARAMETERS: integer, intent(in) :: km ! number of model levels integer, intent(in) :: klid ! index for pressure lid - real, intent(in) :: rmed ! mean radius [um] - real, intent(in) :: sigma ! Sigma of lognormal number distribution real, intent(in) :: rhop ! dry particle density [kg m-3] real, intent(in) :: grav ! gravity [m/sec] real, intent(in) :: pi ! pi constant @@ -6772,6 +7932,7 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, real, optional, dimension(:,:), intent(inout) :: fluxv ! Column mass flux in y direction real, optional, dimension(:,:,:), intent(inout) :: sarea ! Sulfate surface area density [m2 m-3] real, optional, dimension(:,:,:), intent(inout) :: snum ! Sulfate number density [# m-2] + real, optional, dimension(:,:,:), intent(inout) :: reff ! Sulfate effective radius [m] integer, optional, intent(out) :: rc ! Error return code: ! 0 - all is well ! 1 - @@ -6786,7 +7947,7 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, ! !Local Variables integer :: i, j, k, w, i1=1, j1=1, i2, j2, status - real, dimension(:,:,:), allocatable :: tau, ssa, bck + real, dimension(:,:,:), allocatable :: tau, ssa, bck, area real, dimension(:,:), allocatable :: tau470, tau870 integer :: ilam470, ilam870 logical :: do_angstrom @@ -6943,7 +8104,7 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, endif if( present(bckcoef) ) then bckcoef(:,:,:,w) = bckcoef(:,:,:,w) + & - bck * SO4 * rhoa + bck * SO4 * rhoa endif enddo endif @@ -6968,9 +8129,9 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, endif if (present(stexttau) ) then - where (ple(:,:,k) .le. tropp) + where (ple(:,:,k) .le. tropp) stexttau(:,:,w) = stexttau(:,:,w) + tau(:,:,k) - elsewhere(ple(:,:,k-1) .lt. tropp) + elsewhere(ple(:,:,k-1) .lt. tropp) stexttau(:,:,w) = stexttau(:,:,w) + log(tropp/ple(:,:,k-1))/log(ple(:,:,k)/ple(:,:,k-1))*tau(:,:,k) endwhere endif @@ -6980,9 +8141,9 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, endif if ( present(stscatau) ) then - where (ple(:,:,k) .le. tropp) + where (ple(:,:,k) .le. tropp) stscatau(:,:,w) = stscatau(:,:,w) + tau(:,:,k)*ssa(:,:,k) - elsewhere(ple(:,:,k-1) .lt. tropp) + elsewhere(ple(:,:,k-1) .lt. tropp) stscatau(:,:,w) = stscatau(:,:,w) + log(tropp/ple(:,:,k-1))/log(ple(:,:,k)/ple(:,:,k-1))*tau(:,:,k)*ssa(:,:,k) endwhere endif @@ -7019,30 +8180,30 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, endif ! Calculate the sulfate surface area density [m2 m-3], possibly for use in -! StratChem or other component. Assumption here is a specified effective -! radius (gcSU%radius for sulfate) and standard deviation of lognormal -! distribution. Hydration is by grid box provided RH and is follows Petters -! and Kreeidenweis (ACP2007) - if(present(sarea) .or. present(snum)) then -! rmed = w_c%reg%rmed(n1+nSO4-1) ! median radius, m - if(rmed > 0.) then -! sigma = w_c%reg%sigma(n1+nSO4-1) ! width of lognormal distribution - do k = klid, km - do j = j1, j2 - do i = i1, i2 - rh_ = min(0.95,rh(i,j,k)) - gf = (1. + 1.19*rh_/(1.-rh_) ) ! ratio of wet/dry volume, eq. 5 - rwet = rmed * gf**(1./3.) ! wet effective radius, m -! Wet particle volume m3 m-3 - svol = SO4(i,j,k) * rhoa(i,j,k) / rhop * gf -! Integral of lognormal surface area m2 m-3 - if(present(sarea)) sarea(i,j,k) = 3./rwet*svol*exp(-5./2.*alog(sigma)**2.) -! Integral of lognormal number density # m-3 - if(present(snum)) snum(i,j,k) = svol / (rwet**3) * exp(-9/2.*alog(sigma)**2.) * 3./4./pi - enddo - enddo - enddo - endif +! StratChem or other component. Optics tables provide cross-sectional area +! for hydrated particle per kg dry mass but we want total surface area, +! which is 4 x cross section. + if(present(sarea)) then + sarea = 0. + allocate(area(i1:i2,j1:j2,km), __STAT__) + call mie%Query(550e-9,1, & + SO4*delp/grav, rh, & + area=area, __RC__) + sarea = 4.*area*SO4*rhoa + deallocate(area) + endif + +! Get the sulfate particle effective radius [m] possibly for use in chemistry + if(present(reff)) then + reff = 0. + call mie%Query(550e-9,1, & + SO4*delp/grav, rh, & + reff=reff, __RC__) + endif + + +! To implement if desired: + if(present(snum)) then endif deallocate(tau,ssa) __RETURN__(__SUCCESS__) diff --git a/Process_Library/MieQuery.H b/Process_Library/MieQuery.H index 51db0438..4b4e037e 100644 --- a/Process_Library/MieQuery.H +++ b/Process_Library/MieQuery.H @@ -48,7 +48,7 @@ real, optional, intent(out) :: bext (__DIMS__) ! mass extinction efficiency [m2 (kg dry mass)-1] real, optional, intent(out) :: bsca (__DIMS__) ! mass scattering efficiency [m2 (kg dry mass)-1] real, optional, intent(out) :: bbck (__DIMS__) ! mass backscatter efficiency [m2 (kg dry mass)-1] - real, optional, intent(out) :: reff (__DIMS__) ! effective radius (micron) + real, optional, intent(out) :: reff (__DIMS__) ! effective radius (m) real, optional, intent(out) :: pmom (__DIMS__,:,:) ! moments of phase function real, optional, intent(out) :: p11 (__DIMS__) ! P11 phase function at backscatter real, optional, intent(out) :: p22 (__DIMS__) ! P22 phase function at backscatter @@ -115,7 +115,11 @@ endif if(present(rEff)) then - rEff = 1.E6* __RHINTERP2__(this%rEff, irh, arh, bin, rEff) + rEff = __RHINTERP2__(this%rEff, irh, arh, bin, rEff) + endif + + if(present(rhop)) then + rhop = __RHINTERP2__(this%rhop, irh, arh, bin, rhop) endif if(present(p11)) then @@ -130,6 +134,10 @@ gf = __RHINTERP2__(this%gf, irh, arh, bin, gf) endif + if(present(rhop)) then + rhop = __RHINTERP2__(this%rhop, irh, arh, bin, rhop) + endif + if(present(rhod)) then rhod = __RHINTERP2__(this%rhod, irh, arh, bin, rhod) endif @@ -196,7 +204,7 @@ real, optional, intent(out) :: bext (__DIMS__) ! mass extinction efficiency [m2 (kg dry mass)-1] real, optional, intent(out) :: bsca (__DIMS__) ! mass scattering efficiency [m2 (kg dry mass)-1] real, optional, intent(out) :: bbck (__DIMS__) ! mass backscatter efficiency [m2 (kg dry mass)-1] - real, optional, intent(out) :: reff (__DIMS__) ! effective radius (micron) + real, optional, intent(out) :: reff (__DIMS__) ! effective radius (m) real, optional, intent(out) :: pmom (__DIMS__,:,:) ! moments of phase function real, optional, intent(out) :: p11 (__DIMS__) ! P11 phase function at backscatter real, optional, intent(out) :: p22 (__DIMS__) ! P22 phase function at backscatter diff --git a/Process_Library/Process.H b/Process_Library/Process.H new file mode 100644 index 00000000..fa74ee6c --- /dev/null +++ b/Process_Library/Process.H @@ -0,0 +1,10 @@ +#define __SUCCESS__ 0 +#define __FAIL__ 1 +#define __VERIFY__(x) if(x/=0) then; if(present(rc)) rc=x; return; endif +#define __VERIFY_NO_OPT__(x) if(x/=0) then; rc=x; return; endif +#define __RC__ rc=status); __VERIFY__(status +#define __RC_NO_OPT__ rc=status); __VERIFY_NO_OPT__(status +#define __STAT__ stat=status); __VERIFY__(status +#define __IOSTAT__ iostat=status); __VERIFY__(status +#define __RETURN__(x) if (present(rc)) rc=x; return +#define __ASSERT__(expr) if(.not. (expr)) then; if (present(rc)) rc=-1; return; endif diff --git a/components.yaml b/components.yaml index a77d6198..8e94a7fc 100644 --- a/components.yaml +++ b/components.yaml @@ -5,7 +5,7 @@ GOCART: env: local: ./env@ remote: ../ESMA_env.git - tag: v4.29.2 + tag: v4.35.0 develop: main cmake: @@ -22,18 +22,18 @@ ecbuild: HEMCO: local: ./ESMF/HEMCO_GridComp@ remote: ../HEMCO.git - tag: geos/v2.2.3 + tag: geos/v2.3.0 develop: geos/develop GMAO_Shared: local: ./ESMF/Shared/GMAO_Shared@ remote: ../GMAO_Shared.git - tag: v1.9.9 + tag: v2.0.0 sparse: ./config/GMAO_Shared.sparse develop: main MAPL: local: ./ESMF/Shared/MAPL@ remote: ../MAPL.git - tag: v2.51.2 + tag: v2.54.1 develop: develop