diff --git a/.circleci/config.yml b/.circleci/config.yml index c035f868..37bc9c57 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 # Anchors to prevent forgetting to update a version baselibs_version: &baselibs_version v7.5.0 -bcs_version: &bcs_version v10.22.5 +bcs_version: &bcs_version v10.23.0 orbs: ci: geos-esm/circleci-tools@1 @@ -24,6 +24,21 @@ workflows: mepodevelop: true develop_repos: GMAO_Shared persist_workspace: false # Needs to be true to run fv3/gcm experiment, costs extra + # Build GOCART like UFS + - ci/build: + name: build-GOCART2G-like-UFS-on-<< matrix.compiler >> + context: + - docker-hub-creds + matrix: + parameters: + compiler: [gfortran, ifort] + baselibs_version: *baselibs_version + repo: GOCART + buildtarget: GOCART2G_GridComp + mepodevelop: true + develop_repos: GMAO_Shared + extra_cmake_options: "-DBUILD_WITH_FLAP=OFF -DBUILD_WITH_PFLOGGER=OFF -DBUILD_SHARED_MAPL=OFF -DUSE_EXTDATA2G=OFF" + persist_workspace: false # Needs to be true to run fv3/gcm experiment, costs extra # Build GEOSgcm - ci/build: name: build-GEOSgcm-on-<< matrix.compiler >> diff --git a/CHANGELOG.md b/CHANGELOG.md index 0672e1b2..44392772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,10 +9,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added -### Fixed +### Fixed + +### Changed + +## [2.1.2] - 2022-10-07 + +### Added + +- Extinction exports with RH=20% and RH=80% + +### Fixed ### Changed +## [2.1.1] - 2022-09-16 + +### Fixed + +- Remove GOCART requirement for gFTL, pFlogger and yaFyaml. These are requirements of MAPL. (#184) +- Update BCs version in CI for GEOSgcm run + +### Added + +- Added CI test for building GOCART like UFS does ## [2.1.0] - 2022-08-24 @@ -22,8 +42,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - This matches the styles currently used in MAPL (2 space indents in CMake and yaml, 4 spaces for Python) - Add YAML validator GitHub Action - This action makes sure all YAML files are valid (to a relaxed standard) -- Initial implementation of offline simulator for 3D profiles of extinction based on the new GOCART2G-Mie interface. Work for the 2D simulator in progress. - +- Initial implementation of offline simulator for 3D profiles of extinction based on the new GOCART2G-Mie interface. Work for the 2D simulator in progress. + ### Fixed - Added protection guard for pointer DU_SRC. fixed issue #148 diff --git a/CMakeLists.txt b/CMakeLists.txt index 06dc1396..6b20e22c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_policy (SET CMP0054 NEW) project ( GOCART - VERSION 2.0.7 + VERSION 2.1.1 LANGUAGES Fortran CXX C) # Note - CXX is required for ESMF if ("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}") @@ -57,14 +57,10 @@ if (NOT Baselibs_FOUND) if (NOT ESMF_FOUND) find_package (ESMF REQUIRED) endif () - - find_package (GFTL REQUIRED) - find_package (GFTL_SHARED REQUIRED) - find_package (PFLOGGER QUIET) - find_package (YAFYAML REQUIRED) endif () if (UFS_GOCART) + find_package (GFTL_SHARED REQUIRED) find_package (MAPL REQUIRED) include(mapl_acg) elseif (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/ESMF/Shared/MAPL@") diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 index c2533c93..d6047cc5 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 @@ -901,7 +901,8 @@ subroutine Run2 (GC, import, export, clock, RC) real, pointer, dimension(:,:,:) :: intPtr_phobic, intPtr_philic real, parameter :: cpd = 1004.16 - + integer :: i1, j1, i2, j2, km + real, target, allocatable, dimension(:,:,:) :: RH20,RH80 #include "CA2G_DeclarePointer___.h" __Iam__('Run2') @@ -1026,6 +1027,29 @@ subroutine Run2 (GC, import, export, clock, RC) NO3nFlag=.false., __RC__) + i1 = lbound(RH2, 1); i2 = ubound(RH2, 1) + j1 = lbound(RH2, 2); j2 = ubound(RH2, 2) + km = ubound(RH2, 3) + + allocate(RH20(i1:i2,j1:j2,km), __STAT__) + allocate(RH80(i1:i2,j1:j2,km), __STAT__) + + RH20(:,:,:) = 0.20 + call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, nbins=2, & + wavelengths_profile=self%wavelengths_profile*1.0e-9, & + wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=int_arr, grav=MAPL_GRAV, & + tmpu=t, rhoa=airdens, rh=rh20, u=u, v=v, delp=delp, ple=ple, tropp=tropp, & + extcoef=EXTCOEFRH20, scacoef=SCACOEFRH20, NO3nFlag=.false., __RC__) + + + RH80(:,:,:) = 0.80 + call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, nbins=2, & + wavelengths_profile=self%wavelengths_profile*1.0e-9, & + wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=int_arr, grav=MAPL_GRAV, & + tmpu=t, rhoa=airdens, rh=rh80, u=u, v=v, delp=delp, ple=ple, tropp=tropp, & + extcoef=EXTCOEFRH80, scacoef=SCACOEFRH80, NO3nFlag=.false., __RC__) + + deallocate(RH20,RH80) RETURN_(ESMF_SUCCESS) end subroutine Run2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc index 1dc6abe3..83057eae 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc @@ -72,34 +72,38 @@ category: EXPORT #---------------------------------------------------------------------------------------- # VARIABLE | DIMENSIONS | Additional Metadata #---------------------------------------------------------------------------------------- - NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME + NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME #---------------------------------------------------------------------------------------- - *MASS | kg kg-1 | xyz | C | | Carbonaceous Aerosol Mass Mixing Ratio - *CONC | kg m-3 | xyz | C | | Carbonaceous Aerosol Mass Concentration - *EXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Extinction Coefficient - *SCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Scattering Coefficient -#........... | ............ | ..... | ..... | ....... | ............................................ - *EM | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Emission (Bin %d) - *SD | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Sedimentation (Bin %d) - *DP | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Dry Deposition (Bin %d) - *WT | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Wet Deposition (Bin %d) - *SV | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Convective Scavenging (Bin %d) - *EMAN | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol Anthropogenic Emissions - *EMBB | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol Biomass Burning Emissions - *EMBF | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol Biofuel Emissions - *EMBG | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol Biogenic Emissions - *HYPHIL | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol Hydrophobic to Hydrophilic - *PSOA | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol SOA Production - *SMASS | kg m-3 | xy | N | | Carbonaceous Aerosol Surface Mass Concentration - *CMASS | kg m-2 | xy | N | | Carbonaceous Aerosol Column Mass Density - *EXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Extinction AOT - *STEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Extinction AOT Stratosphere - *SCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Scattering AOT - *STSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Scattering AOT Stratosphere - *ANGSTR | 1 | xy | N | | Carbonaceous Aerosol Angstrom parameter [470-870 nm] - *FLUXU | kg m-1 s-1 | xy | N | | Carbonaceous Aerosol column u-wind mass flux - *FLUXV | kg m-1 s-1 | xy | N | | Carbonaceous Aerosol column v-wind mass flux - *AERIDX | 1 | xy | N | | Carbonaceous Aerosol TOMS UV Aerosol Index + *MASS | kg kg-1 | xyz | C | | Carbonaceous Aerosol Mass Mixing Ratio + *CONC | kg m-3 | xyz | C | | Carbonaceous Aerosol Mass Concentration + *EXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Extinction Coefficient + *EXTCOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Extinction Coefficient - Fixed RH=20% + *EXTCOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Extinction Coefficient - Fixed RH=80% + *SCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Scattering Coefficient + *SCACOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Scattering Coefficient - Fixed RH=20% + *SCACOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Scattering Coefficient - Fixed RH=80% +#............ | ............ | ..... | ..... | ....... | ............................................ + *EM | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Emission (Bin %d) + *SD | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Sedimentation (Bin %d) + *DP | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Dry Deposition (Bin %d) + *WT | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Wet Deposition (Bin %d) + *SV | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Convective Scavenging (Bin %d) + *EMAN | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol Anthropogenic Emissions + *EMBB | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol Biomass Burning Emissions + *EMBF | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol Biofuel Emissions + *EMBG | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol Biogenic Emissions + *HYPHIL | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol Hydrophobic to Hydrophilic + *PSOA | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol SOA Production + *SMASS | kg m-3 | xy | N | | Carbonaceous Aerosol Surface Mass Concentration + *CMASS | kg m-2 | xy | N | | Carbonaceous Aerosol Column Mass Density + *EXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Extinction AOT + *STEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Extinction AOT Stratosphere + *SCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Scattering AOT + *STSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Scattering AOT Stratosphere + *ANGSTR | 1 | xy | N | | Carbonaceous Aerosol Angstrom parameter [470-870 nm] + *FLUXU | kg m-1 s-1 | xy | N | | Carbonaceous Aerosol column u-wind mass flux + *FLUXV | kg m-1 s-1 | xy | N | | Carbonaceous Aerosol column v-wind mass flux + *AERIDX | 1 | xy | N | | Carbonaceous Aerosol TOMS UV Aerosol Index diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 index d2714392..27e18784 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 @@ -876,8 +876,9 @@ subroutine Run2 (GC, import, export, clock, RC) real :: fwet logical :: KIN + integer :: i1, j1, i2, j2, km real, parameter :: cpd = 1004.16 - + real, target, allocatable, dimension(:,:,:) :: RH20,RH80 #include "DU2G_DeclarePointer___.h" __Iam__('Run2') @@ -962,7 +963,35 @@ subroutine Run2 (GC, import, export, clock, RC) DUFLUXU, DUFLUXV, DUCONC, DUEXTCOEF, DUSCACOEF, & DUEXTTFM, DUSCATFM, DUANGSTR, DUAERIDX, NO3nFlag=.false., __RC__ ) - RETURN_(ESMF_SUCCESS) + + i1 = lbound(RH2, 1); i2 = ubound(RH2, 1) + j1 = lbound(RH2, 2); j2 = ubound(RH2, 2) + km = ubound(RH2, 3) + + allocate(RH20(i1:i2,j1:j2,km), __STAT__) + allocate(RH80(i1:i2,j1:j2,km), __STAT__) + + 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, & + wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=DU, & + grav=MAPL_GRAV, tmpu=t, rhoa=airdens, & + rh=rh20, u=u, v=v, delp=delp, ple=ple,tropp=tropp, & + extcoef = DUEXTCOEFRH20, scacoef = DUSCACOEFRH20, NO3nFlag=.False., __RC__) + + 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, & + wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=DU, & + grav=MAPL_GRAV, tmpu=t, rhoa=airdens, & + rh=rh80, u=u, v=v, delp=delp, ple=ple,tropp=tropp, & + extcoef = DUEXTCOEFRH80, scacoef = DUSCACOEFRH80, NO3nFlag=.False., __RC__) + + deallocate(RH20,RH80) + RETURN_(ESMF_SUCCESS) end subroutine Run2 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc index 7087583c..ea832c98 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc @@ -56,41 +56,45 @@ category: EXPORT #---------------------------------------------------------------------------------------- # VARIABLE | DIMENSIONS | Additional Metadata #---------------------------------------------------------------------------------------- - NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME + NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME #---------------------------------------------------------------------------------------- - 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 - DUEXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Dust Extinction Coefficient - DUSCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Dust Scattering Coefficient + 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 + 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% + DUSCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Dust Scattering Coefficient + DUSCACOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | Dust Scattering Coefficient - Fixed RH=20% + DUSCACOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | Dust Scattering Coefficient - Fixed RH=80% #........................................................................................ - DUSMASS | kg m-3 | xy | N | | Dust Surface Mass Concentration - DUCMASS | kg m-2 | xy | N | | Dust Column Mass Density - DUEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Dust Extinction AOT - DUSTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Dust Extinction AOT Stratosphere - DUSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Dust Scattering AOT - DUSTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Dust Scattering AOT Stratosphere - DUSMASS25 | kg m-3 | xy | N | | Dust Surface Mass Concentration - PM 2.5 - DUCMASS25 | kg m-2 | xy | N | | Dust Column Mass Density - PM 2.5 - DUEXTT25 | 1 | xy | N | size(self%wavelengths_vertint) | Dust Extinction AOT - PM 2.5 - DUSCAT25 | 1 | xy | N | size(self%wavelengths_vertint) | Dust Scattering AOT - PM 2.5 - DUAERIDX | 1 | xy | N | | Dust TOMS UV Aerosol Index - DUFLUXU | kg m-1 s-1 | xy | N | | Dust column u-wind mass flux - DUFLUXV | kg m-1 s-1 | xy | N | | Dust column v-wind mass flux - DUEXTTFM | 1 | xy | N | size(self%wavelengths_vertint) | Dust Extinction AOT - PM 1.0 um - DUSCATFM | 1 | xy | N | size(self%wavelengths_vertint) | Dust Scattering AOT - PM 1.0 um - DUANGSTR | 1 | xy | N | | Dust Angstrom parameter [470-870 nm] - DUEM | kg m-2 s-1 | xy | N | self%nbins | Dust Emission (Bin %d) - DUSD | kg m-2 s-1 | xy | N | self%nbins | Dust Sedimentation (Bin %d) - DUDP | kg m-2 s-1 | xy | N | self%nbins | Dust Dry Deposition (Bin %d) - DUWT | kg m-2 s-1 | xy | N | self%nbins | Dust Wet Deposition (Bin %d) - DUSV | kg m-2 s-1 | xy | N | self%nbins | Dust Convective Scavenging (Bin %d) - DU_UST | 1 | xy | N | | aeolian_friction_velocity - DU_UST_T | 1 | xy | N | | aeolian_threshold_friction_velocity - DU_UST_TS | 1 | xy | N | | aeolian_threshold_friction_velocity_over_smooth_surface - DU_DPC | 1 | xy | N | | aeolian_drag_partition_correction - DU_SMC | 1 | xy | N | | aeolian_soil_moisture_correction - DU_EROD | 1 | xy | N | | aeolian_erodibilitiy + DUSMASS | kg m-3 | xy | N | | Dust Surface Mass Concentration + DUCMASS | kg m-2 | xy | N | | Dust Column Mass Density + DUEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Dust Extinction AOT + DUSTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Dust Extinction AOT Stratosphere + DUSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Dust Scattering AOT + DUSTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Dust Scattering AOT Stratosphere + DUSMASS25 | kg m-3 | xy | N | | Dust Surface Mass Concentration - PM 2.5 + DUCMASS25 | kg m-2 | xy | N | | Dust Column Mass Density - PM 2.5 + DUEXTT25 | 1 | xy | N | size(self%wavelengths_vertint) | Dust Extinction AOT - PM 2.5 + DUSCAT25 | 1 | xy | N | size(self%wavelengths_vertint) | Dust Scattering AOT - PM 2.5 + DUAERIDX | 1 | xy | N | | Dust TOMS UV Aerosol Index + DUFLUXU | kg m-1 s-1 | xy | N | | Dust column u-wind mass flux + DUFLUXV | kg m-1 s-1 | xy | N | | Dust column v-wind mass flux + DUEXTTFM | 1 | xy | N | size(self%wavelengths_vertint) | Dust Extinction AOT - PM 1.0 um + DUSCATFM | 1 | xy | N | size(self%wavelengths_vertint) | Dust Scattering AOT - PM 1.0 um + DUANGSTR | 1 | xy | N | | Dust Angstrom parameter [470-870 nm] + DUEM | kg m-2 s-1 | xy | N | self%nbins | Dust Emission (Bin %d) + DUSD | kg m-2 s-1 | xy | N | self%nbins | Dust Sedimentation (Bin %d) + DUDP | kg m-2 s-1 | xy | N | self%nbins | Dust Dry Deposition (Bin %d) + DUWT | kg m-2 s-1 | xy | N | self%nbins | Dust Wet Deposition (Bin %d) + DUSV | kg m-2 s-1 | xy | N | self%nbins | Dust Convective Scavenging (Bin %d) + DU_UST | 1 | xy | N | | aeolian_friction_velocity + DU_UST_T | 1 | xy | N | | aeolian_threshold_friction_velocity + DU_UST_TS | 1 | xy | N | | aeolian_threshold_friction_velocity_over_smooth_surface + DU_DPC | 1 | xy | N | | aeolian_drag_partition_correction + DU_SMC | 1 | xy | N | | aeolian_soil_moisture_correction + DU_EROD | 1 | xy | N | | aeolian_erodibilitiy category: INTERNAL diff --git a/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 index 39e00787..c4096081 100644 --- a/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 @@ -68,7 +68,6 @@ module GOCART2G_GridCompMod ! 25feb2005 da Silva First crack. ! 19jul2006 da Silva First separate GOCART component. ! 14Oct2019 E.Sherman, A.Darmenov, A. da Silva, T. Clune First attempt at refactoring. - ! !EOP !============================================================================ @@ -582,29 +581,50 @@ subroutine Run2 (GC, import, export, clock, RC) duscatau, dustscatau, & duextt25, duscat25, & duexttfm, duscatfm + real, pointer, dimension(:,:,:,:) :: duextcoef, duscacoef + real, pointer, dimension(:,:,:,:) :: duextcoefrh20, duextcoefrh80 + real, pointer, dimension(:,:,:,:) :: duscacoefrh20, duscacoefrh80 real, pointer, dimension(:,:) :: duangstr, dusmass, & dusmass25 real, pointer, dimension(:,:,:) :: ssexttau, ssstexttau, & ssscatau, ssstscatau, & ssextt25, ssscat25, & ssexttfm, ssscatfm + real, pointer, dimension(:,:,:,:) :: ssextcoef, ssscacoef + real, pointer, dimension(:,:,:,:) :: ssextcoefrh20, ssextcoefrh80 + real, pointer, dimension(:,:,:,:) :: ssscacoefrh20, ssscacoefrh80 real, pointer, dimension(:,:) :: ssangstr, sssmass, & sssmass25 real, pointer, dimension(:,:,:) :: niexttau, nistexttau, & niscatau, nistscatau, & niextt25, niscat25, & niexttfm, niscatfm + real, pointer, dimension(:,:,:,:) :: niextcoef, niscacoef + real, pointer, dimension(:,:,:,:) :: niextcoefrh20, niextcoefrh80 + real, pointer, dimension(:,:,:,:) :: niscacoefrh20, niscacoefrh80 real, pointer, dimension(:,:) :: niangstr, nismass, & nismass25 real, pointer, dimension(:,:) :: nh4smass real, pointer, dimension(:,:,:) :: suexttau, sustexttau, & suscatau, sustscatau + real, pointer, dimension(:,:,:,:) :: suextcoef, suscacoef + real, pointer, dimension(:,:,:,:) :: suextcoefrh20, suextcoefrh80 + real, pointer, dimension(:,:,:,:) :: suscacoefrh20, suscacoefrh80 real, pointer, dimension(:,:) :: suangstr, so4smass real, pointer, dimension(:,:,:) :: bcexttau, bcstexttau, bcscatau, bcstscatau + real, pointer, dimension(:,:,:,:) :: bcextcoef, bcscacoef + real, pointer, dimension(:,:,:,:) :: bcextcoefrh20, bcextcoefrh80 + real, pointer, dimension(:,:,:,:) :: bcscacoefrh20, bcscacoefrh80 real, pointer, dimension(:,:) :: bcangstr, bcsmass real, pointer, dimension(:,:,:) :: ocexttau, ocstexttau, ocscatau, ocstscatau + real, pointer, dimension(:,:,:,:) :: ocextcoef, ocscacoef + real, pointer, dimension(:,:,:,:) :: ocextcoefrh20, ocextcoefrh80 + real, pointer, dimension(:,:,:,:) :: ocscacoefrh20, ocscacoefrh80 real, pointer, dimension(:,:) :: ocangstr, ocsmass real, pointer, dimension(:,:,:) :: brexttau, brstexttau, brscatau, brstscatau + real, pointer, dimension(:,:,:,:) :: brextcoef, brscacoef + real, pointer, dimension(:,:,:,:) :: brextcoefrh20, brextcoefrh80 + real, pointer, dimension(:,:,:,:) :: brscacoefrh20, brscacoefrh80 real, pointer, dimension(:,:) :: brangstr, brsmass real, pointer, dimension(:,:,:) :: pso4 real, allocatable :: tau1(:,:), tau2(:,:) @@ -649,7 +669,12 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totscat25)) totscat25 = 0. if(associated(totexttfm)) totexttfm = 0. if(associated(totscatfm)) totscatfm = 0. - + if(associated(totextcoef)) totextcoef = 0. + if(associated(totextcoefrh20)) totextcoefrh20 = 0. + if(associated(totextcoefrh80)) totextcoefrh80 = 0. + if(associated(totscacoef)) totscacoef = 0. + if(associated(totscacoefrh20)) totscacoefrh20 = 0. + if(associated(totscacoefrh80)) totscacoefrh80 = 0. if(associated(pm)) pm(:,:) = 0. if(associated(pm25)) pm25(:,:) = 0. if(associated(pm_rh35)) pm_rh35(:,:) = 0. @@ -704,6 +729,12 @@ subroutine Run2 (GC, import, export, clock, RC) call MAPL_GetPointer (gex(self%DU%instances(n)%id), dustexttau, 'DUSTEXTTAU', __RC__) call MAPL_GetPointer (gex(self%DU%instances(n)%id), duscatau, 'DUSCATAU', __RC__) call MAPL_GetPointer (gex(self%DU%instances(n)%id), dustscatau, 'DUSTSCATAU', __RC__) + call MAPL_GetPointer (gex(self%DU%instances(n)%id), duextcoef, 'DUEXTCOEF', __RC__) + call MAPL_GetPointer (gex(self%DU%instances(n)%id), duextcoefrh20, 'DUEXTCOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%DU%instances(n)%id), duextcoefrh80, 'DUEXTCOEFRH80', __RC__) + call MAPL_GetPointer (gex(self%DU%instances(n)%id), duscacoef, 'DUSCACOEF', __RC__) + call MAPL_GetPointer (gex(self%DU%instances(n)%id), duscacoefrh20, 'DUSCACOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%DU%instances(n)%id), duscacoefrh80, 'DUSCACOEFRH80', __RC__) call MAPL_GetPointer (gex(self%DU%instances(n)%id), duextt25, 'DUEXTT25', __RC__) call MAPL_GetPointer (gex(self%DU%instances(n)%id), duscat25, 'DUSCAT25', __RC__) call MAPL_GetPointer (gex(self%DU%instances(n)%id), duexttfm, 'DUEXTTFM', __RC__) @@ -721,7 +752,16 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totexttfm) .and. associated(duexttfm)) totexttfm(:,:,w) = totexttfm(:,:,w)+duexttfm(:,:,w) if(associated(totscatfm) .and. associated(duscatfm)) totscatfm(:,:,w) = totscatfm(:,:,w)+duscatfm(:,:,w) end do - + + do w = 1, size(self%wavelengths_profile) + if(associated(totextcoef) .and. associated(duextcoef)) totextcoef(:,:,:,w) = totextcoef(:,:,:,w)+duextcoef(:,:,:,w) + if(associated(totextcoefrh20) .and. associated(duextcoefrh20)) totextcoefrh20(:,:,:,w) = totextcoefrh20(:,:,:,w)+duextcoefrh20(:,:,:,w) + if(associated(totextcoefrh80) .and. associated(duextcoefrh80)) totextcoefrh80(:,:,:,w) = totextcoefrh80(:,:,:,w)+duextcoefrh80(:,:,:,w) + if(associated(totscacoef) .and. associated(duscacoef)) totscacoef(:,:,:,w) = totscacoef(:,:,:,w)+duscacoef(:,:,:,w) + if(associated(totscacoefrh20) .and. associated(duscacoefrh20)) totscacoefrh20(:,:,:,w) = totscacoefrh20(:,:,:,w)+duscacoefrh20(:,:,:,w) + if(associated(totscacoefrh80) .and. associated(duscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+duscacoefrh80(:,:,:,w) + end do + call MAPL_GetPointer (gex(self%DU%instances(n)%id), dusmass, 'DUSMASS', __RC__) call MAPL_GetPointer (gex(self%DU%instances(n)%id), dusmass25, 'DUSMASS25', __RC__) if(associated(pm) .and. associated(dusmass)) pm = pm + dusmass @@ -745,6 +785,12 @@ subroutine Run2 (GC, import, export, clock, RC) call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssstexttau, 'SSSTEXTTAU', __RC__) call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssscatau, 'SSSCATAU', __RC__) call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssstscatau, 'SSSTSCATAU', __RC__) + call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssextcoef, 'SSEXTCOEF', __RC__) + call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssextcoefrh20, 'SSEXTCOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssextcoefrh80, 'SSEXTCOEFRH80', __RC__) + call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssscacoef, 'SSSCACOEF', __RC__) + call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssscacoefrh20, 'SSSCACOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssscacoefrh80, 'SSSCACOEFRH80', __RC__) call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssextt25, 'SSEXTT25', __RC__) call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssscat25, 'SSSCAT25', __RC__) call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssexttfm, 'SSEXTTFM', __RC__) @@ -763,6 +809,15 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totscatfm) .and. associated(ssscatfm)) totscatfm(:,:,w) = totscatfm(:,:,w)+ssscatfm(:,:,w) end do + do w = 1, size(self%wavelengths_profile) + if(associated(totextcoef) .and. associated(ssextcoef)) totextcoef(:,:,:,w) = totextcoef(:,:,:,w)+ssextcoef(:,:,:,w) + if(associated(totextcoefrh20) .and. associated(ssextcoefrh20)) totextcoefrh20(:,:,:,w) = totextcoefrh20(:,:,:,w)+ssextcoefrh20(:,:,:,w) + if(associated(totextcoefrh80) .and. associated(ssextcoefrh80)) totextcoefrh80(:,:,:,w) = totextcoefrh80(:,:,:,w)+ssextcoefrh80(:,:,:,w) + if(associated(totscacoef) .and. associated(ssscacoef)) totscacoef(:,:,:,w) = totscacoef(:,:,:,w)+ssscacoef(:,:,:,w) + if(associated(totscacoefrh20) .and. associated(ssscacoefrh20)) totscacoefrh20(:,:,:,w) = totscacoefrh20(:,:,:,w)+ssscacoefrh20(:,:,:,w) + if(associated(totscacoefrh80) .and. associated(ssscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+ssscacoefrh80(:,:,:,w) + enddo + call MAPL_GetPointer (gex(self%SS%instances(n)%id), sssmass, 'SSSMASS', __RC__) call MAPL_GetPointer (gex(self%SS%instances(n)%id), sssmass25, 'SSSMASS25', __RC__) if(associated(pm) .and. associated(sssmass)) pm = pm + sssmass @@ -786,6 +841,12 @@ subroutine Run2 (GC, import, export, clock, RC) call MAPL_GetPointer (gex(self%NI%instances(n)%id), nistexttau, 'NISTEXTTAU', __RC__) call MAPL_GetPointer (gex(self%NI%instances(n)%id), niscatau, 'NISCATAU', __RC__) call MAPL_GetPointer (gex(self%NI%instances(n)%id), nistscatau, 'NISTSCATAU', __RC__) + call MAPL_GetPointer (gex(self%NI%instances(n)%id), niextcoef, 'NIEXTCOEF', __RC__) + call MAPL_GetPointer (gex(self%NI%instances(n)%id), niextcoefrh20, 'NIEXTCOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%NI%instances(n)%id), niextcoefrh80, 'NIEXTCOEFRH80', __RC__) + call MAPL_GetPointer (gex(self%NI%instances(n)%id), niscacoef, 'NISCACOEF', __RC__) + call MAPL_GetPointer (gex(self%NI%instances(n)%id), niscacoefrh20, 'NISCACOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%NI%instances(n)%id), niscacoefrh80, 'NISCACOEFRH80', __RC__) call MAPL_GetPointer (gex(self%NI%instances(n)%id), niextt25, 'NIEXTT25', __RC__) call MAPL_GetPointer (gex(self%NI%instances(n)%id), niscat25, 'NISCAT25', __RC__) call MAPL_GetPointer (gex(self%NI%instances(n)%id), niexttfm, 'NIEXTTFM', __RC__) @@ -804,6 +865,15 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totscatfm) .and. associated(niscatfm)) totscatfm(:,:,w) = totscatfm(:,:,w)+niscatfm(:,:,w) end do + do w = 1, size(self%wavelengths_profile) + if(associated(totextcoef) .and. associated(niextcoef)) totextcoef(:,:,:,w) = totextcoef(:,:,:,w)+niextcoef(:,:,:,w) + if(associated(totextcoefrh20) .and. associated(niextcoefrh20)) totextcoefrh20(:,:,:,w) = totextcoefrh20(:,:,:,w)+niextcoefrh20(:,:,:,w) + if(associated(totextcoefrh80) .and. associated(niextcoefrh80)) totextcoefrh80(:,:,:,w) = totextcoefrh80(:,:,:,w)+niextcoefrh80(:,:,:,w) + if(associated(totscacoef) .and. associated(niscacoef)) totscacoef(:,:,:,w) = totscacoef(:,:,:,w)+niscacoef(:,:,:,w) + if(associated(totscacoefrh20) .and. associated(niscacoefrh20)) totscacoefrh20(:,:,:,w) = totscacoefrh20(:,:,:,w)+niscacoefrh20(:,:,:,w) + if(associated(totscacoefrh80) .and. associated(niscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+niscacoefrh80(:,:,:,w) + end do + call MAPL_GetPointer (gex(self%NI%instances(n)%id), nismass, 'NISMASS', __RC__) call MAPL_GetPointer (gex(self%NI%instances(n)%id), nismass25, 'NISMASS25', __RC__) call MAPL_GetPointer (gex(self%NI%instances(n)%id), nh4smass, 'NH4SMASS', __RC__) @@ -825,6 +895,12 @@ subroutine Run2 (GC, import, export, clock, RC) do n = 1, size(self%SU%instances) if ((self%SU%instances(n)%is_active) .and. (index(self%SU%instances(n)%name, 'data') == 0 )) then call MAPL_GetPointer (gex(self%SU%instances(n)%id), suexttau, 'SUEXTTAU', __RC__) + call MAPL_GetPointer (gex(self%SU%instances(n)%id), suextcoef, 'SUEXTCOEF', __RC__) + call MAPL_GetPointer (gex(self%SU%instances(n)%id), suextcoefrh20, 'SUEXTCOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%SU%instances(n)%id), suextcoefrh80, 'SUEXTCOEFRH80', __RC__) + call MAPL_GetPointer (gex(self%SU%instances(n)%id), suscacoef, 'SUSCACOEF', __RC__) + call MAPL_GetPointer (gex(self%SU%instances(n)%id), suscacoefrh20, 'SUSCACOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%SU%instances(n)%id), suscacoefrh80, 'SUSCACOEFRH80', __RC__) call MAPL_GetPointer (gex(self%SU%instances(n)%id), sustexttau, 'SUSTEXTTAU', __RC__) call MAPL_GetPointer (gex(self%SU%instances(n)%id), suscatau, 'SUSCATAU', __RC__) call MAPL_GetPointer (gex(self%SU%instances(n)%id), sustscatau, 'SUSTSCATAU', __RC__) @@ -842,6 +918,15 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totscatfm) .and. associated(suscatau)) totscatfm(:,:,w) = totscatfm(:,:,w)+suscatau(:,:,w) end do + do w = 1, size(self%wavelengths_profile) + if(associated(totextcoef) .and. associated(suextcoef)) totextcoef(:,:,:,w) = totextcoef(:,:,:,w)+suextcoef(:,:,:,w) + if(associated(totextcoefrh20) .and. associated(suextcoefrh20)) totextcoefrh20(:,:,:,w) = totextcoefrh20(:,:,:,w)+suextcoefrh20(:,:,:,w) + if(associated(totextcoefrh80) .and. associated(suextcoefrh80)) totextcoefrh80(:,:,:,w) = totextcoefrh80(:,:,:,w)+suextcoefrh80(:,:,:,w) + if(associated(totscacoef) .and. associated(suscacoef)) totscacoef(:,:,:,w) = totscacoef(:,:,:,w)+suscacoef(:,:,:,w) + if(associated(totscacoefrh20) .and. associated(suscacoefrh20)) totscacoefrh20(:,:,:,w) = totscacoefrh20(:,:,:,w)+suscacoefrh20(:,:,:,w) + if(associated(totscacoefrh80) .and. associated(suscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+suscacoefrh80(:,:,:,w) + end do + call MAPL_GetPointer (gex(self%SU%instances(n)%id), pso4, 'PSO4', __RC__) if(associated(pso4tot) .and. associated(pso4)) pso4tot = pso4tot + pso4 @@ -880,6 +965,12 @@ subroutine Run2 (GC, import, export, clock, RC) call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcscatau, 'CA.bcSCATAU', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcstscatau, 'CA.bcSTSCATAU', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcangstr, 'CA.bcANGSTR', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcextcoef, 'CA.bcEXTCOEF', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcextcoefrh20, 'CA.bcEXTCOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcextcoefrh80, 'CA.bcEXTCOEFRH80', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcscacoef, 'CA.bcSCACOEF', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcscacoefrh20, 'CA.bcSCACOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcscacoefrh80, 'CA.bcSCACOEFRH80', __RC__) ! Iterate over the wavelengths do w = 1, size(self%wavelengths_vertint) @@ -893,6 +984,15 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totscatfm) .and. associated(bcscatau)) totscatfm(:,:,w) = totscatfm(:,:,w)+bcscatau(:,:,w) end do + do w = 1, size(self%wavelengths_profile) + if(associated(totextcoef) .and. associated(bcextcoef)) totextcoef(:,:,:,w) = totextcoef(:,:,:,w)+bcextcoef(:,:,:,w) + if(associated(totextcoefrh20) .and. associated(bcextcoefrh20)) totextcoefrh20(:,:,:,w) = totextcoefrh20(:,:,:,w)+bcextcoefrh20(:,:,:,w) + if(associated(totextcoefrh80) .and. associated(bcextcoefrh80)) totextcoefrh80(:,:,:,w) = totextcoefrh80(:,:,:,w)+bcextcoefrh80(:,:,:,w) + if(associated(totscacoef) .and. associated(bcscacoef)) totscacoef(:,:,:,w) = totscacoef(:,:,:,w)+bcscacoef(:,:,:,w) + if(associated(totscacoefrh20) .and. associated(bcscacoefrh20)) totscacoefrh20(:,:,:,w) = totscacoefrh20(:,:,:,w)+bcscacoefrh20(:,:,:,w) + if(associated(totscacoefrh80) .and. associated(bcscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+bcscacoefrh80(:,:,:,w) + end do + call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcsmass, 'CA.bcSMASS', __RC__) if(associated(pm) .and. associated(bcsmass)) pm = pm + bcsmass if(associated(pm25) .and. associated(bcsmass)) pm25 = pm25 + bcsmass @@ -913,6 +1013,12 @@ subroutine Run2 (GC, import, export, clock, RC) call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocscatau, 'CA.ocSCATAU', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocstscatau, 'CA.ocSTSCATAU', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocangstr, 'CA.ocANGSTR', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocextcoef, 'CA.ocEXTCOEF', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocextcoefrh20, 'CA.ocEXTCOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocextcoefrh80, 'CA.ocEXTCOEFRH80', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocscacoef, 'CA.ocSCACOEF', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocscacoefrh20, 'CA.ocSCACOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocscacoefrh80, 'CA.ocSCACOEFRH80', __RC__) ! Iterate over the wavelengths do w = 1, size(self%wavelengths_vertint) @@ -925,7 +1031,16 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totexttfm) .and. associated(ocexttau)) totexttfm(:,:,w) = totexttfm(:,:,w)+ocexttau(:,:,w) if(associated(totscatfm) .and. associated(ocscatau)) totscatfm(:,:,w) = totscatfm(:,:,w)+ocscatau(:,:,w) end do - + + do w = 1, size(self%wavelengths_profile) + if(associated(totextcoef) .and. associated(ocextcoef)) totextcoef(:,:,:,w) = totextcoef(:,:,:,w)+ocextcoef(:,:,:,w) + if(associated(totextcoefrh20) .and. associated(ocextcoefrh20)) totextcoefrh20(:,:,:,w) = totextcoefrh20(:,:,:,w)+ocextcoefrh20(:,:,:,w) + if(associated(totextcoefrh80) .and. associated(ocextcoefrh80)) totextcoefrh80(:,:,:,w) = totextcoefrh80(:,:,:,w)+ocextcoefrh80(:,:,:,w) + if(associated(totscacoef) .and. associated(ocscacoef)) totscacoef(:,:,:,w) = totscacoef(:,:,:,w)+ocscacoef(:,:,:,w) + if(associated(totscacoefrh20) .and. associated(ocscacoefrh20)) totscacoefrh20(:,:,:,w) = totscacoefrh20(:,:,:,w)+ocscacoefrh20(:,:,:,w) + if(associated(totscacoefrh80) .and. associated(ocscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+ocscacoefrh80(:,:,:,w) + end do + call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocsmass, 'CA.ocSMASS', __RC__) if(associated(pm) .and. associated(ocsmass)) pm = pm + ocsmass if(associated(pm25) .and. associated(ocsmass)) pm25 = pm25 + ocsmass @@ -946,6 +1061,12 @@ subroutine Run2 (GC, import, export, clock, RC) call MAPL_GetPointer (gex(self%CA%instances(n)%id), brscatau, 'CA.brSCATAU', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), brstscatau, 'CA.brSTSCATAU', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), brangstr, 'CA.brANGSTR', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), brextcoef, 'CA.brEXTCOEF', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), brextcoefrh20, 'CA.brEXTCOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), brextcoefrh80, 'CA.brEXTCOEFRH80', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), brscacoef, 'CA.brSCACOEF', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), brscacoefrh20, 'CA.brSCACOEFRH20', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), brscacoefrh80, 'CA.brSCACOEFRH80', __RC__) ! Iterate over the wavelengths do w = 1, size(self%wavelengths_vertint) @@ -959,6 +1080,15 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(totscatfm) .and. associated(brscatau)) totscatfm(:,:,w) = totscatfm(:,:,w)+brscatau(:,:,w) end do + do w = 1, size(self%wavelengths_profile) + if(associated(totextcoef) .and. associated(brextcoef)) totextcoef(:,:,:,w) = totextcoef(:,:,:,w)+brextcoef(:,:,:,w) + if(associated(totextcoefrh20) .and. associated(brextcoefrh20)) totextcoefrh20(:,:,:,w) = totextcoefrh20(:,:,:,w)+brextcoefrh20(:,:,:,w) + if(associated(totextcoefrh80) .and. associated(brextcoefrh80)) totextcoefrh80(:,:,:,w) = totextcoefrh80(:,:,:,w)+brextcoefrh80(:,:,:,w) + if(associated(totscacoef) .and. associated(brscacoef)) totscacoef(:,:,:,w) = totscacoef(:,:,:,w)+brscacoef(:,:,:,w) + if(associated(totscacoefrh20) .and. associated(brscacoefrh20)) totscacoefrh20(:,:,:,w) = totscacoefrh20(:,:,:,w)+brscacoefrh20(:,:,:,w) + if(associated(totscacoefrh80) .and. associated(brscacoefrh80)) totscacoefrh80(:,:,:,w) = totscacoefrh80(:,:,:,w)+brscacoefrh80(:,:,:,w) + end do + call MAPL_GetPointer (gex(self%CA%instances(n)%id), brsmass, 'CA.brSMASS', __RC__) if(associated(pm) .and. associated(brsmass)) pm = pm + brsmass if(associated(pm25) .and. associated(brsmass)) pm25 = pm25 + brsmass diff --git a/ESMF/GOCART2G_GridComp/GOCART2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/GOCART2G_StateSpecs.rc index 78121bec..2132ce85 100644 --- a/ESMF/GOCART2G_GridComp/GOCART2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/GOCART2G_StateSpecs.rc @@ -14,25 +14,31 @@ category: EXPORT #---------------------------------------------------------------------------------------- # VARIABLE | DIMENSIONS | Additional Metadata #---------------------------------------------------------------------------------------- - NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME + NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME #---------------------------------------------------------------------------------------- - PSO4TOT | kg m-2 s-1 | xyz | C | | Total Sulfate Produced in GOCART + PSO4TOT | kg m-2 s-1 | xyz | C | | Total Sulfate Produced in GOCART #........................................................................................ - TOTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] - TOTSTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] Stratosphere - TOTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Scattering AOT [550 nm] - TOTSTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Scattering AOT [550 nm] Stratosphere - TOTEXTT25 | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] - PM2.5 - TOTSCAT25 | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] - PM2.5 - TOTEXTTFM | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] - PM1.0 - TOTSCATFM | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] - PM1.0 - TOTANGSTR | 1 | xy | N | | Total Aerosol Angstrom parameter [470-870 nm] - PM | kg m-3 | xy | N | | Total reconstructed PM - PM_RH35 | kg m-3 | xy | N | | Total reconstructed PM(RH=35%) - PM_RH50 | kg m-3 | xy | N | | Total reconstructed PM(RH=50%) - PM25 | kg m-3 | xy | N | | Total reconstructed PM2.5 - PM25_RH35 | kg m-3 | xy | N | | Total reconstructed PM2.5(RH=35%) - PM25_RH50 | kg m-3 | xy | N | | Total reconstructed PM2.5(RH=50%) + TOTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] + TOTSTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] Stratosphere + TOTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Scattering AOT [550 nm] + TOTSTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Scattering AOT [550 nm] Stratosphere + TOTEXTT25 | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] - PM2.5 + TOTSCAT25 | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] - PM2.5 + TOTEXTTFM | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] - PM1.0 + TOTSCATFM | 1 | xy | N | size(self%wavelengths_vertint) | Total Aerosol Extinction AOT [550 nm] - PM1.0 + TOTANGSTR | 1 | xy | N | | Total Aerosol Angstrom parameter [470-870 nm] + TOTEXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Total Aerosol Extinction coefficient + TOTEXTCOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | Total Aerosol Extinction coefficient - Fixed RH=20% + TOTEXTCOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | Total Aerosol Extinction coefficient - Fixed RH=80% + TOTSCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Total Aerosol Scattering coefficient + TOTSCACOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | Total Aerosol Scattering coefficient - Fixed RH=20% + TOTSCACOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | Total Aerosol Scattering coefficient - Fixed RH=80% + PM | kg m-3 | xy | N | | Total reconstructed PM + PM_RH35 | kg m-3 | xy | N | | Total reconstructed PM(RH=35%) + PM_RH50 | kg m-3 | xy | N | | Total reconstructed PM(RH=50%) + PM25 | kg m-3 | xy | N | | Total reconstructed PM2.5 + PM25_RH35 | kg m-3 | xy | N | | Total reconstructed PM2.5(RH=35%) + PM25_RH50 | kg m-3 | xy | N | | Total reconstructed PM2.5(RH=50%) category: INTERNAL #---------------------------------------------------------------------------------------- diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 index 979f9eb4..c068512c 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 @@ -719,7 +719,8 @@ subroutine Run2 (GC, import, export, clock, RC) type (ESMF_ALARM) :: alarm logical :: alarm_is_ringing - + integer :: i1, j1, i2, j2, km + real, target,allocatable, dimension(:,:,:) :: RH20,RH80 integer :: rhFlag integer :: i, j @@ -971,7 +972,34 @@ subroutine Run2 (GC, import, export, clock, RC) fluxu=NIFLUXU, fluxv=NIFLUXV, extcoef=NIEXTCOEF, scacoef=NISCACOEF, & angstrom=NIANGSTR, __RC__ ) - RETURN_(ESMF_SUCCESS) + i1 = lbound(RH2, 1); i2 = ubound(RH2, 1) + j1 = lbound(RH2, 2); j2 = ubound(RH2, 2) + km = ubound(RH2, 3) + + allocate(RH20(i1:i2,j1:j2,km), __STAT__) + allocate(RH80(i1:i2,j1:j2,km), __STAT__) + + RH20(:,:,:) = 0.20 + + call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, & + nbins=3, & + wavelengths_profile=self%wavelengths_profile*1.0e-9, & + wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=aerosol, & + grav=MAPL_GRAV, tmpu=t, rhoa=airdens, & + rh=rh20,u=u, v=v, delp=delp, ple=ple,tropp=tropp, & + extcoef = NIEXTCOEFRH20, scacoef=NISCACOEFRH20, __RC__) + + RH80(:,:,:) = 0.80 + call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, & + nbins=3, & + wavelengths_profile=self%wavelengths_profile*1.0e-9, & + wavelengths_vertint=self%wavelengths_vertint*1.0e-9, aerosol=aerosol, & + grav=MAPL_GRAV, tmpu=t, rhoa=airdens, & + rh=rh80,u=u, v=v, delp=delp, ple=ple,tropp=tropp, & + extcoef = NIEXTCOEFRH80, scacoef=NISCACOEFRH80,__RC__) + + deallocate(RH20,RH80) + RETURN_(ESMF_SUCCESS) end subroutine Run2 diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc index ac941196..7531b822 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc @@ -44,57 +44,61 @@ category: EXPORT #---------------------------------------------------------------------------------------- # VARIABLE | DIMENSIONS | Additional Metadata #---------------------------------------------------------------------------------------- - NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME + NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME #---------------------------------------------------------------------------------------- - NH3MASS | kg/kg | xyz | C | | Ammonia Mass Mixing Ratio - NH4MASS | kg/kg | xyz | C | | Ammonium Aerosol Mass Mixing Ratio - NIMASS | kg/kg | xyz | C | | Nitrate Mass Mixing Ratio - NIMASS25 | kg/kg | xyz | C | | Nitrate Mass Mixing Ratio [PM2.5] - HNO3CONC | kg m-3 | xyz | C | | Nitric Acid Mass Concentration - NH3CONC | kg m-3 | xyz | C | | Ammonia Mass Concentration - 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 [PM2.5] - NIEXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Nitrate Extinction Coefficient - NISCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Nitrate Scattering Coefficient -# .......... | ............ | ..... | ..... | ........... | .................................. - NIPNO3AQ | kg m-2 s-1 | xy | N | | Nitrate Production from Aqueous Chemistry - NIPNH4AQ | kg m-2 s-1 | xy | N | | Ammonium Production from Aqueous Chemistry - NIPNH3AQ | kg m-2 s-1 | xy | N | | Ammonia Change from Aqueous Chemistry - NIHT | kg m-2 s-1 | xy | N | 3 | Nitrate Production from Het Chem (Bin %d) - NISD | kg m-2 s-1 | xy | N | 3 | Nitrate Sedimentation (Bin %d) - NIDP | kg m-2 s-1 | xy | N | 3 | Nitrate Dry Deposition (Bin %d) - NIWT | kg m-2 s-1 | xy | N | 3 | Nitrate Wet Deposition (Bin %d) - NISV | kg m-2 s-1 | xy | N | 3 | Nitrate Convective Scavenging (Bin %d) - NH3EM | kg m-2 s-1 | xy | N | | Ammonia Emission - NH3DP | kg m-2 s-1 | xy | N | | Ammonia Dry Deposition - NH3WT | kg m-2 s-1 | xy | N | | Ammonia Wet Deposition - NH3SV | kg m-2 s-1 | xy | N | | Ammonia Convective Scavenging - NH4SD | kg m-2 s-1 | xy | N | | Ammonium Settling - NH4DP | kg m-2 s-1 | xy | N | | Ammonium Dry Deposition - NH4WT | kg m-2 s-1 | xy | N | | Ammonium Wet Deposition - NH4SV | kg m-2 s-1 | xy | N | | Ammonium Convective Scavenging - HNO3SMASS | kg m-3 | xy | N | | Nitric Acid Surface Mass Concentration - NH3SMASS | kg m-3 | xy | N | | Ammonia Surface Mass Concentration - NH4SMASS | kg m-3 | xy | N | | Ammonium Surface Mass Concentration - NISMASS | kg m-3 | xy | N | | Nitrate Surface Mass Concentration - NISMASS25 | kg m-3 | xy | N | | Nitrate Surface Mass Concentration [PM2.5] - HNO3CMASS | kg m-3 | xy | N | | Nitric Acid Column Mass Density - NH3CMASS | kg m-3 | xy | N | | Ammonia Column Mass Density - NH4CMASS | kg m-3 | xy | N | | Ammonium Column Mass Density - NICMASS | kg m-2 | xy | N | | Nitrate Column Mass Density - NICMASS25 | kg m-2 | xy | N | | Nitrate Column Mass Density [PM2.5] - NIEXTTFM | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Extinction AOT - PM 1.0 um - NISCATFM | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Scattering AOT - PM 1.0 um - NIEXTT25 | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Extinction AOT - PM 2.5 um - NISCAT25 | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Scattering AOT - PM 2.5 um - NIEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Extinction AOT - NISTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Extinction AOT Stratosphere - NISCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Scattering AOT - NISTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Scattering AOT Stratosphere - NIANGSTR | 1 | xy | N | | Nitrate Angstrom parameter [470-870 nm] - NIFLUXU | kg m-1 s-1 | xy | N | | Nitrate column u-wind mass flux - NIFLUXV | kg m-1 s-1 | xy | N | | Nitrate column v-wind mass flux + NH3MASS | kg/kg | xyz | C | | Ammonia Mass Mixing Ratio + NH4MASS | kg/kg | xyz | C | | Ammonium Aerosol Mass Mixing Ratio + NIMASS | kg/kg | xyz | C | | Nitrate Mass Mixing Ratio + NIMASS25 | kg/kg | xyz | C | | Nitrate Mass Mixing Ratio [PM2.5] + HNO3CONC | kg m-3 | xyz | C | | Nitric Acid Mass Concentration + NH3CONC | kg m-3 | xyz | C | | Ammonia Mass Concentration + 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 [PM2.5] + 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% + NISCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Nitrate Scattering Coefficient + NISCACOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | Nitrate Scattering Coefficient - fixed RH=20% + NISCACOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | Nitrate Scattering Coefficient - fixed RH=80% +# ............. | ............ | ..... | ..... | ........... | .................................. + NIPNO3AQ | kg m-2 s-1 | xy | N | | Nitrate Production from Aqueous Chemistry + NIPNH4AQ | kg m-2 s-1 | xy | N | | Ammonium Production from Aqueous Chemistry + NIPNH3AQ | kg m-2 s-1 | xy | N | | Ammonia Change from Aqueous Chemistry + NIHT | kg m-2 s-1 | xy | N | 3 | Nitrate Production from Het Chem (Bin %d) + NISD | kg m-2 s-1 | xy | N | 3 | Nitrate Sedimentation (Bin %d) + NIDP | kg m-2 s-1 | xy | N | 3 | Nitrate Dry Deposition (Bin %d) + NIWT | kg m-2 s-1 | xy | N | 3 | Nitrate Wet Deposition (Bin %d) + NISV | kg m-2 s-1 | xy | N | 3 | Nitrate Convective Scavenging (Bin %d) + NH3EM | kg m-2 s-1 | xy | N | | Ammonia Emission + NH3DP | kg m-2 s-1 | xy | N | | Ammonia Dry Deposition + NH3WT | kg m-2 s-1 | xy | N | | Ammonia Wet Deposition + NH3SV | kg m-2 s-1 | xy | N | | Ammonia Convective Scavenging + NH4SD | kg m-2 s-1 | xy | N | | Ammonium Settling + NH4DP | kg m-2 s-1 | xy | N | | Ammonium Dry Deposition + NH4WT | kg m-2 s-1 | xy | N | | Ammonium Wet Deposition + NH4SV | kg m-2 s-1 | xy | N | | Ammonium Convective Scavenging + HNO3SMASS | kg m-3 | xy | N | | Nitric Acid Surface Mass Concentration + NH3SMASS | kg m-3 | xy | N | | Ammonia Surface Mass Concentration + NH4SMASS | kg m-3 | xy | N | | Ammonium Surface Mass Concentration + NISMASS | kg m-3 | xy | N | | Nitrate Surface Mass Concentration + NISMASS25 | kg m-3 | xy | N | | Nitrate Surface Mass Concentration [PM2.5] + HNO3CMASS | kg m-3 | xy | N | | Nitric Acid Column Mass Density + NH3CMASS | kg m-3 | xy | N | | Ammonia Column Mass Density + NH4CMASS | kg m-3 | xy | N | | Ammonium Column Mass Density + NICMASS | kg m-2 | xy | N | | Nitrate Column Mass Density + NICMASS25 | kg m-2 | xy | N | | Nitrate Column Mass Density [PM2.5] + NIEXTTFM | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Extinction AOT - PM 1.0 um + NISCATFM | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Scattering AOT - PM 1.0 um + NIEXTT25 | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Extinction AOT - PM 2.5 um + NISCAT25 | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Scattering AOT - PM 2.5 um + NIEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Extinction AOT + NISTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Extinction AOT Stratosphere + NISCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Scattering AOT + NISTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Scattering AOT Stratosphere + NIANGSTR | 1 | xy | N | | Nitrate Angstrom parameter [470-870 nm] + NIFLUXU | kg m-1 s-1 | xy | N | | Nitrate column u-wind mass flux + NIFLUXV | kg m-1 s-1 | xy | N | | Nitrate column v-wind mass flux category: INTERNAL #--------------------------------------------------------------------------------------------------------------- diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 index 81e63e64..b71faff9 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 @@ -733,7 +733,8 @@ subroutine Run2 (GC, import, export, clock, RC) real :: fwet logical :: KIN - + integer :: i1, j1, i2, j2, km + real, target, allocatable, dimension(:,:,:) :: RH20,RH80 #include "SS2G_DeclarePointer___.h" __Iam__('Run2') @@ -813,7 +814,33 @@ subroutine Run2 (GC, import, export, clock, RC) SSSMASS25, SSCMASS25, SSMASS25, SSEXTT25, SSSCAT25, & SSFLUXU, SSFLUXV, SSCONC, SSEXTCOEF, SSSCACOEF, & SSEXTTFM, SSSCATFM ,SSANGSTR, SSAERIDX, NO3nFlag=.false.,__RC__) + + i1 = lbound(RH2, 1); i2 = ubound(RH2, 1) + j1 = lbound(RH2, 2); j2 = ubound(RH2, 2) + km = ubound(RH2, 3) + + allocate(RH20(i1:i2,j1:j2,km), __STAT__) + allocate(RH80(i1:i2,j1:j2,km), __STAT__) + + 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, & + 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, & + extcoef = SSEXTCOEFRH20, scacoef = SSSCACOEFRH20, NO3nFlag=.False., __RC__) + RH80(:,:,:) = 0.80 + call Aero_Compute_Diags (mie=self%diag_Mie, km=self%km, klid=self%klid, nbegin=1, & + nbins=self%nbins, rlow=self%rlow, & + 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, & + extcoef = SSEXTCOEFRH80, scacoef = SSSCACOEFRH80, NO3nFlag=.False., __RC__) + + deallocate(RH20,RH80) RETURN_(ESMF_SUCCESS) end subroutine Run2 diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc index 872bb5b1..6fe202fd 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc @@ -39,35 +39,39 @@ category: EXPORT #---------------------------------------------------------------------------------------- # VARIABLE | DIMENSIONS | Additional Metadata #---------------------------------------------------------------------------------------- - NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME + NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME #---------------------------------------------------------------------------------------- - SSMASS | kg kg-1 | xyz | C | | Sea Salt Mass Mixing Ratio - SSMASS25 | kg kg-1 | xyz | C | | Sea Salt Mass Mixing Ratio - PM 2.5 - SSCONC | kg m-3 | xyz | C | | Sea Salt Mass Concentration - SSEXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Sea Salt Extinction Coefficient - SSSCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Sea Salt Scattering Coefficient -#.......... | ............ | ..... | ..... | ............ | .................................. - SSEM | kg m-2 s-1 | xy | N | self%nbins | Sea Salt Emission (Bin %d) - SSSD | kg m-2 s-1 | xy | N | self%nbins | Sea Salt Sedimentation (Bin %d) - SSDP | kg m-2 s-1 | xy | N | self%nbins | Sea Salt Dry Deposition (Bin %d) - SSWT | kg m-2 s-1 | xy | N | self%nbins | Sea Salt Wet Deposition (Bin %d) - SSSV | kg m-2 s-1 | xy | N | self%nbins | Sea Salt Convective Scavenging (Bin %d) - SSSMASS | kg m-3 | xy | N | | Sea Salt Surface Mass Concentration - SSCMASS | kg m-2 | xy | N | | Sea Salt Column Mass Density - SSEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Extinction AOT - SSSTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Extinction AOT Stratosphere - SSSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Scattering AOT - SSSTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Scattering AOT Stratosphere - SSSMASS25 | kg m-3 | xy | N | | Sea Salt Surface Mass Concentration - PM 2.5 - SSCMASS25 | kg m-2 | xy | N | | Sea Salt Column Mass Density - PM 2.5 - SSEXTT25 | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Extinction AOT - PM 2.5 - SSSCAT25 | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Scattering AOT - PM 2.5 - SSAERIDX | 1 | xy | N | | Sea Salt TOMS UV Aerosol Index - SSEXTTFM | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Extinction AOT [550 nm] - PM 1.0 um - SSSCATFM | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Scattering AOT [550 nm] - PM 1.0 um - SSANGSTR | 1 | xy | N | | Sea Salt Angstrom parameter [470-870 nm] - SSFLUXU | kg m-1 s-1 | xy | N | | Sea Salt column u-wind mass flux - SSFLUXV | kg m-1 s-1 | xy | N | | Sea Salt column v-wind mass flux + SSMASS | kg kg-1 | xyz | C | | Sea Salt Mass Mixing Ratio + SSMASS25 | kg kg-1 | xyz | C | | Sea Salt Mass Mixing Ratio - PM 2.5 + SSCONC | kg m-3 | xyz | C | | Sea Salt Mass Concentration + 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% + SSSCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Sea Salt Scattering Coefficient + SSSCACOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | Sea Salt Scattering Coefficient - Fixed RH=20% + SSSCACOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | Sea Salt Scattering Coefficient - Fixed RH=80% +#............. | ............ | ..... | ..... | ............ | .................................. + SSEM | kg m-2 s-1 | xy | N | self%nbins | Sea Salt Emission (Bin %d) + SSSD | kg m-2 s-1 | xy | N | self%nbins | Sea Salt Sedimentation (Bin %d) + SSDP | kg m-2 s-1 | xy | N | self%nbins | Sea Salt Dry Deposition (Bin %d) + SSWT | kg m-2 s-1 | xy | N | self%nbins | Sea Salt Wet Deposition (Bin %d) + SSSV | kg m-2 s-1 | xy | N | self%nbins | Sea Salt Convective Scavenging (Bin %d) + SSSMASS | kg m-3 | xy | N | | Sea Salt Surface Mass Concentration + SSCMASS | kg m-2 | xy | N | | Sea Salt Column Mass Density + SSEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Extinction AOT + SSSTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Extinction AOT Stratosphere + SSSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Scattering AOT + SSSTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Scattering AOT Stratosphere + SSSMASS25 | kg m-3 | xy | N | | Sea Salt Surface Mass Concentration - PM 2.5 + SSCMASS25 | kg m-2 | xy | N | | Sea Salt Column Mass Density - PM 2.5 + SSEXTT25 | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Extinction AOT - PM 2.5 + SSSCAT25 | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Scattering AOT - PM 2.5 + SSAERIDX | 1 | xy | N | | Sea Salt TOMS UV Aerosol Index + SSEXTTFM | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Extinction AOT [550 nm] - PM 1.0 um + SSSCATFM | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Scattering AOT [550 nm] - PM 1.0 um + SSANGSTR | 1 | xy | N | | Sea Salt Angstrom parameter [470-870 nm] + SSFLUXU | kg m-1 s-1 | xy | N | | Sea Salt column u-wind mass flux + SSFLUXV | kg m-1 s-1 | xy | N | | Sea Salt column v-wind mass flux category: INTERNAL diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 index 09a21a97..37dac4fd 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 @@ -973,6 +973,8 @@ subroutine Run2 (GC, import, export, clock, RC) real, dimension(:,:), allocatable :: drydepositionf real, pointer, dimension(:,:,:) :: dummyMSA => null() ! this is so the model can run without MSA enabled logical :: alarm_is_ringing + integer :: i1, j1, i2, j2, km + real, target, allocatable, dimension(:,:,:) :: RH20,RH80 #include "SU2G_DeclarePointer___.h" @@ -1093,6 +1095,33 @@ subroutine Run2 (GC, import, export, clock, RC) SUEXTTAU, SUSTEXTTAU,SUSCATAU,SUSTSCATAU, SO4MASS, SUCONC, SUEXTCOEF, & SUSCACOEF, SUANGSTR, SUFLUXU, SUFLUXV, SO4SAREA, SO4SNUM, __RC__) + i1 = lbound(RH2, 1); i2 = ubound(RH2, 1) + j1 = lbound(RH2, 2); j2 = ubound(RH2, 2) + km = ubound(RH2, 3) + + allocate(RH20(i1:i2,j1:j2,km), __STAT__) + 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),& + rhop=self%rhop(nSO4), & + grav=MAPL_GRAV, pi=MAPL_PI, nSO4=nSO4, mie=self%diag_Mie, & + wavelengths_profile=self%wavelengths_profile*1.0e-9, & + wavelengths_vertint=self%wavelengths_vertint*1.0e-9, & + tmpu=t, rhoa=airdens, delp=delp, ple=ple,tropp=tropp, rh=rh20, u=u, v=v, & + DMS=DMS, SO2=SO2, SO4=SO4, MSA=dummyMSA,extcoef=SUEXTCOEFRH20, & + scacoef = SUSCACOEFRH20, __RC__) + + RH80(:,:,:) = 0.80 + call SU_Compute_Diags ( km=self%km, klid=self%klid, rmed=self%radius(nSO4), sigma=self%sigma(nSO4),& + rhop=self%rhop(nSO4), & + grav=MAPL_GRAV, pi=MAPL_PI, nSO4=nSO4, mie=self%diag_Mie, & + wavelengths_profile=self%wavelengths_profile*1.0e-9, & + wavelengths_vertint=self%wavelengths_vertint*1.0e-9, & + tmpu=t, rhoa=airdens, delp=delp, ple=ple,tropp=tropp, rh=rh80, u=u, v=v, & + DMS=DMS, SO2=SO2, SO4=SO4, MSA=dummyMSA,extcoef=SUEXTCOEFRH80,& + scacoef = SUSCACOEFRH80, __RC__) + RETURN_(ESMF_SUCCESS) diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc index 4cbe179e..10aa5531 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc @@ -51,51 +51,55 @@ category: EXPORT #---------------------------------------------------------------------------------------- # VARIABLE | DIMENSIONS | Additional Metadata #---------------------------------------------------------------------------------------- - NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME + 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) - 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 - SO2EMBB | kg m-2 s-1 | xy | N | | SO2 Biomass Burning Emissions - SO2EMVN | kg m-2 s-1 | xy | N | | SO2 Volcanic (non-explosive) Emissions - SO2EMVE | kg m-2 s-1 | xy | N | | SO2 Volcanic (explosive) Emissions - PSO2 | kg m-2 s-1 | xyz | C | | SO2 Prod from DMS oxidation - PMSA | kg m-2 s-1 | xyz | C | | MSA Prod from DMS oxidation - PSO4 | kg m-2 s-1 | xyz | C | | SO4 Prod from all SO2 oxidation - PSO4G | kg m-2 s-1 | xyz | C | | SO4 Prod from gaseous SO2 oxidation - PSO4WET | kg m-2 s-1 | xyz | C | | SO4 Prod from wet SO2 oxidation - PSO4AQ | kg m-2 s-1 | xyz | C | | SO4 Prod from aqueous SO2 oxidation - SUPSO2 | kg m-2 s-1 | xy | N | | SO2 Prod from DMS Oxidation [column] - SUPSO4 | kg m-2 s-1 | xy | N | | SO4 Prod from All SO2 Oxidation [column] - SUPSO4G | kg m-2 s-1 | xy | N | | SO4 Prod from Gaseous SO2 Oxidation [column] - SUPSO4AQ | kg m-2 s-1 | xy | N | | SO4 Prod from Aqueous SO2 Oxidation [column] - SUPSO4WT | kg m-2 s-1 | xy | N | | SO4 Prod from Aqueous SO2 Oxidation (wet dep) - SUPMSA | kg m-2 s-1 | xy | N | | MSA Prod from DMS Oxidation [column] - SO2SMASS | kg m-3 | xy | N | | SO2 Surface Mass Concentration - SO2CMASS | kg m-2 | xy | N | | SO2 Column Mass Density - SO4SMASS | kg m-3 | xy | N | | SO4 Surface Mass Concentration - SO4CMASS | kg m-2 | xy | N | | SO4 Column Mass Density - DMSSMASS | kg m-3 | xy | N | | DMS Surface Mass Concentration - DMSCMASS | kg m-2 | xy | N | | DMS Column Mass Density - 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 - SUEXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | SO4 Extinction Coefficient - SUSCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | SO4 Scattering Coefficient - SUANGSTR | 1 | xy | N | | SO4 Angstrom parameter [470-870 nm] - SUFLUXU | kg m-1 s-1 | xy | N | | SO4 column u-wind mass flux - SUFLUXV | kg m-1 s-1 | xy | N | | SO4 column v-wind mass flux - SO4MASS | kg kg-1 | xyz | C | | SO4 Aerosol Mass Mixing Ratio - SUEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | SO4 Extinction AOT - SUSTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | SO4 Extinction AOT Stratosphere - SUSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | SO4 Scattering AOT - SUSTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | SO4 Scattering AOT Stratosphere - SO4SAREA | m2 m-3 | xyz | C | | SO4 Surface Area Density - SO4SNUM | m-3 | xyz | C | | SO4 Number Density + 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) + 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 + SO2EMBB | kg m-2 s-1 | xy | N | | SO2 Biomass Burning Emissions + SO2EMVN | kg m-2 s-1 | xy | N | | SO2 Volcanic (non-explosive) Emissions + SO2EMVE | kg m-2 s-1 | xy | N | | SO2 Volcanic (explosive) Emissions + PSO2 | kg m-2 s-1 | xyz | C | | SO2 Prod from DMS oxidation + PMSA | kg m-2 s-1 | xyz | C | | MSA Prod from DMS oxidation + PSO4 | kg m-2 s-1 | xyz | C | | SO4 Prod from all SO2 oxidation + PSO4G | kg m-2 s-1 | xyz | C | | SO4 Prod from gaseous SO2 oxidation + PSO4WET | kg m-2 s-1 | xyz | C | | SO4 Prod from wet SO2 oxidation + PSO4AQ | kg m-2 s-1 | xyz | C | | SO4 Prod from aqueous SO2 oxidation + SUPSO2 | kg m-2 s-1 | xy | N | | SO2 Prod from DMS Oxidation [column] + SUPSO4 | kg m-2 s-1 | xy | N | | SO4 Prod from All SO2 Oxidation [column] + SUPSO4G | kg m-2 s-1 | xy | N | | SO4 Prod from Gaseous SO2 Oxidation [column] + SUPSO4AQ | kg m-2 s-1 | xy | N | | SO4 Prod from Aqueous SO2 Oxidation [column] + SUPSO4WT | kg m-2 s-1 | xy | N | | SO4 Prod from Aqueous SO2 Oxidation (wet dep) + SUPMSA | kg m-2 s-1 | xy | N | | MSA Prod from DMS Oxidation [column] + SO2SMASS | kg m-3 | xy | N | | SO2 Surface Mass Concentration + SO2CMASS | kg m-2 | xy | N | | SO2 Column Mass Density + SO4SMASS | kg m-3 | xy | N | | SO4 Surface Mass Concentration + SO4CMASS | kg m-2 | xy | N | | SO4 Column Mass Density + DMSSMASS | kg m-3 | xy | N | | DMS Surface Mass Concentration + DMSCMASS | kg m-2 | xy | N | | DMS Column Mass Density + 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 + 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% + SUSCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | SO4 Scattering Coefficient + SUSCACOEFRH20 | m-1 | xyz | C | size(self%wavelengths_profile) | SO4 Scattering Coefficient - Fixed RH=20% + SUSCACOEFRH80 | m-1 | xyz | C | size(self%wavelengths_profile) | SO4 Scattering Coefficient - Fixed RH=80% + SUANGSTR | 1 | xy | N | | SO4 Angstrom parameter [470-870 nm] + SUFLUXU | kg m-1 s-1 | xy | N | | SO4 column u-wind mass flux + SUFLUXV | kg m-1 s-1 | xy | N | | SO4 column v-wind mass flux + SO4MASS | kg kg-1 | xyz | C | | SO4 Aerosol Mass Mixing Ratio + SUEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | SO4 Extinction AOT + SUSTEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | SO4 Extinction AOT Stratosphere + SUSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | SO4 Scattering AOT + SUSTSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | SO4 Scattering AOT Stratosphere + SO4SAREA | m2 m-3 | xyz | C | | SO4 Surface Area Density + SO4SNUM | m-3 | xyz | C | | SO4 Number Density category: INTERNAL #------------------------------------------------------------------------------------------------------------ diff --git a/ESMF/UFS/Aerosol_Internal_Mod.F90 b/ESMF/UFS/Aerosol_Internal_Mod.F90 index 0c8d62a4..3e129a1d 100644 --- a/ESMF/UFS/Aerosol_Internal_Mod.F90 +++ b/ESMF/UFS/Aerosol_Internal_Mod.F90 @@ -1,8 +1,6 @@ module Aerosol_Internal_Mod use MAPL - use gFTL_StringIntegerMap - use gFTL_StringStringMap use Aerosol_Tracer_Mod, only: Aerosol_Tracer_T diff --git a/Process_Library/GOCART2G_Process.F90 b/Process_Library/GOCART2G_Process.F90 index 44b90a85..8b985ccc 100644 --- a/Process_Library/GOCART2G_Process.F90 +++ b/Process_Library/GOCART2G_Process.F90 @@ -3280,8 +3280,8 @@ subroutine Aero_Compute_Diags (mie, km, klid, nbegin, nbins, rlow, rup, & ! Total mass real, optional, dimension(:,:), intent(inout) :: sfcmass ! sfc mass concentration kg/m3 real, optional, dimension(:,:), intent(inout) :: colmass ! col mass density kg/m2 - real, pointer, dimension(:,:,:), intent(inout) :: mass ! 3d mass mixing ratio kg/kg - real, pointer, dimension(:,:,:), intent(inout) :: conc ! 3d mass concentration, kg/m3 + real, optional, dimension(:,:,:), intent(inout) :: mass ! 3d mass mixing ratio kg/kg + real, optional, dimension(:,:,:), intent(inout) :: conc ! 3d mass concentration, kg/m3 ! Total optical properties real, optional, dimension(:,:,:), intent(inout) :: exttau ! ext. AOT at 550 nm real, optional, dimension(:,:,:), intent(inout) :: stexttau ! stratospheric ext. AOT at 550 nm @@ -3417,7 +3417,7 @@ subroutine Aero_Compute_Diags (mie, km, klid, nbegin, nbins, rlow, rup, & endif ! Calculate the total mass concentration - if( associated(conc) ) then + if( present(conc) ) then conc(i1:i2,j1:j2,1:km) = 0. do n = nbegin, nbins conc(i1:i2,j1:j2,1:km) & @@ -3427,7 +3427,7 @@ subroutine Aero_Compute_Diags (mie, km, klid, nbegin, nbins, rlow, rup, & endif ! Calculate the total mass mixing ratio - if( associated(mass) ) then + if( present(mass) ) then mass(i1:i2,j1:j2,1:km) = 0. do n = nbegin, nbins mass(i1:i2,j1:j2,1:km) & @@ -6720,27 +6720,27 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, real, dimension(:,:,:), intent(inout) :: SO2 ! sulfer dioxide [kg/kg] real, dimension(:,:,:), intent(inout) :: SO4 ! sulfate aerosol [kg/kg] real, pointer, dimension(:,:,:), intent(inout) :: MSA ! methanesulphonic acid [kg/kg] - real, pointer, dimension(:,:), intent(inout) :: dmssfcmass ! sfc mass concentration [kg/m3] - real, pointer, dimension(:,:), intent(inout) :: dmscolmass ! col mass density [kg/m2] - real, pointer, dimension(:,:), intent(inout) :: msasfcmass ! sfc mass concentration [kg/m3] - real, pointer, dimension(:,:), intent(inout) :: msacolmass ! col mass density [kg/m2] - real, pointer, dimension(:,:), intent(inout) :: so2sfcmass ! sfc mass concentration [kg/m3] - real, pointer, dimension(:,:), intent(inout) :: so2colmass ! col mass density [kg/m2] - real, pointer, dimension(:,:), intent(inout) :: so4sfcmass ! sfc mass concentration [kg/m3] - real, pointer, dimension(:,:), intent(inout) :: so4colmass ! col mass density [kg/m2] - real, pointer, dimension(:,:,:), intent(inout) :: exttau ! ext. AOT at 550 nm - real, pointer, dimension(:,:,:), intent(inout) :: stexttau ! Stratosphere ext. AOT at 550 nm - real, pointer, dimension(:,:,:), intent(inout) :: scatau ! sct. AOT at 550 nm - real, pointer, dimension(:,:,:), intent(inout) :: stscatau ! Stratosphere sct. AOT at 550 nm - real, pointer, dimension(:,:,:), intent(inout) :: so4mass ! 3D sulfate mass mr - real, pointer, dimension(:,:,:), intent(inout) :: so4conc ! 3D mass concentration, [kg/m3] - real, pointer, dimension(:,:,:,:), intent(inout) :: extcoef ! 3D ext. coefficient, [1/m] - real, pointer, dimension(:,:,:,:), intent(inout) :: scacoef ! 3D scat.coefficient, [1/m] - real, pointer, dimension(:,:), intent(inout) :: angstrom ! 470-870 nm Angstrom parameter - real, pointer, dimension(:,:), intent(inout) :: fluxu ! Column mass flux in x direction - real, pointer, dimension(:,:), intent(inout) :: fluxv ! Column mass flux in y direction - real, pointer, dimension(:,:,:), intent(inout) :: sarea ! Sulfate surface area density [m2 m-3] - real, pointer, dimension(:,:,:), intent(inout) :: snum ! Sulfate number density [# m-2] + real, optional, dimension(:,:), intent(inout) :: dmssfcmass ! sfc mass concentration [kg/m3] + real, optional, dimension(:,:), intent(inout) :: dmscolmass ! col mass density [kg/m2] + real, optional, dimension(:,:), intent(inout) :: msasfcmass ! sfc mass concentration [kg/m3] + real, optional, dimension(:,:), intent(inout) :: msacolmass ! col mass density [kg/m2] + real, optional, dimension(:,:), intent(inout) :: so2sfcmass ! sfc mass concentration [kg/m3] + real, optional, dimension(:,:), intent(inout) :: so2colmass ! col mass density [kg/m2] + real, optional, dimension(:,:), intent(inout) :: so4sfcmass ! sfc mass concentration [kg/m3] + real, optional, dimension(:,:), intent(inout) :: so4colmass ! col mass density [kg/m2] + real, optional, dimension(:,:,:), intent(inout) :: exttau ! ext. AOT at 550 nm + real, optional, dimension(:,:,:), intent(inout) :: stexttau ! Stratosphere ext. AOT at 550 nm + real, optional, dimension(:,:,:), intent(inout) :: scatau ! sct. AOT at 550 nm + real, optional, dimension(:,:,:), intent(inout) :: stscatau ! Stratosphere sct. AOT at 550 nm + real, optional, dimension(:,:,:), intent(inout) :: so4mass ! 3D sulfate mass mr + real, optional, dimension(:,:,:), intent(inout) :: so4conc ! 3D mass concentration, [kg/m3] + real, optional, dimension(:,:,:,:), intent(inout) :: extcoef ! 3D ext. coefficient, [1/m] + real, optional, dimension(:,:,:,:), intent(inout) :: scacoef ! 3D scat.coefficient, [1/m] + real, optional, dimension(:,:), intent(inout) :: angstrom ! 470-870 nm Angstrom parameter + real, optional, dimension(:,:), intent(inout) :: fluxu ! Column mass flux in x direction + 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] integer, optional, intent(out) :: rc ! Error return code: ! 0 - all is well ! 1 - @@ -6793,22 +6793,22 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, ! ----------------------------------------------- ! Calculate the surface mass concentration - if( associated(so4sfcmass) ) then + if( present(so4sfcmass) ) then so4sfcmass(i1:i2,j1:j2) = 0. so4sfcmass(i1:i2,j1:j2) & = SO4(i1:i2,j1:j2,km)*rhoa(i1:i2,j1:j2,km) endif - if( associated(so2sfcmass) ) then + if( present(so2sfcmass) ) then so2sfcmass(i1:i2,j1:j2) = 0. so2sfcmass(i1:i2,j1:j2) & = SO2(i1:i2,j1:j2,km)*rhoa(i1:i2,j1:j2,km) endif - if( associated(dmssfcmass) ) then + if( present(dmssfcmass) ) then dmssfcmass(i1:i2,j1:j2) = 0. dmssfcmass(i1:i2,j1:j2) & = DMS(i1:i2,j1:j2,km)*rhoa(i1:i2,j1:j2,km) endif - if( associated(msasfcmass) .and. associated(MSA)) then + if( present(msasfcmass) .and. associated(MSA)) then msasfcmass(i1:i2,j1:j2) = 0. msasfcmass(i1:i2,j1:j2) & = MSA(i1:i2,j1:j2,km)*rhoa(i1:i2,j1:j2,km) @@ -6819,7 +6819,7 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, ! ----------------------------------- ! Calculate the column loading - if( associated(so4colmass) ) then + if( present(so4colmass) ) then so4colmass(i1:i2,j1:j2) = 0. do k = klid, km so4colmass(i1:i2,j1:j2) & @@ -6827,7 +6827,7 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, + SO4(i1:i2,j1:j2,k)*delp(i1:i2,j1:j2,k)/grav enddo endif - if( associated(so2colmass) ) then + if( present(so2colmass) ) then so2colmass(i1:i2,j1:j2) = 0. do k = klid, km so2colmass(i1:i2,j1:j2) & @@ -6835,7 +6835,7 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, + SO2(i1:i2,j1:j2,k)*delp(i1:i2,j1:j2,k)/grav enddo endif - if( associated(dmscolmass) ) then + if( present(dmscolmass) ) then dmscolmass(i1:i2,j1:j2) = 0. do k = klid, km dmscolmass(i1:i2,j1:j2) & @@ -6843,7 +6843,7 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, + DMS(i1:i2,j1:j2,k)*delp(i1:i2,j1:j2,k)/grav enddo endif - if( associated(msacolmass) .and. associated(MSA)) then + if( present(msacolmass) .and. associated(MSA)) then msacolmass(i1:i2,j1:j2) = 0. do k = klid, km msacolmass(i1:i2,j1:j2) & @@ -6854,19 +6854,19 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, ! Calculate the mass concentration of sulfate - if( associated(so4conc) ) then + if( present(so4conc) ) then so4conc(i1:i2,j1:j2,1:km) = 0. so4conc(i1:i2,j1:j2,1:km) = SO4(i1:i2,j1:j2,1:km)*rhoa(i1:i2,j1:j2,1:km) endif ! Mass mixing ratio of sulfate - if( associated(so4mass) ) then + if( present(so4mass) ) then so4mass(i1:i2,j1:j2,1:km) = 0. so4mass(i1:i2,j1:j2,1:km) = SO4(i1:i2,j1:j2,1:km) endif ! Calculate the column mass flux in x direction - if( associated(fluxu) ) then + if( present(fluxu) ) then fluxu(i1:i2,j1:j2) = 0. do k = klid, km fluxu(i1:i2,j1:j2) & @@ -6876,7 +6876,7 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, endif ! Calculate the column mass flux in y direction - if( associated(fluxv) ) then + if( present(fluxv) ) then fluxv(i1:i2,j1:j2) = 0. do k = klid, km fluxv(i1:i2,j1:j2) & @@ -6888,10 +6888,10 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, ! Calculate the extinction and/or scattering AOD allocate(tau(i1:i2,j1:j2,km), source = 0.) allocate(ssa(i1:i2,j1:j2,km), source = 0.) - if( associated(extcoef) .or. associated(scacoef) ) then + if( present(extcoef) .or. present(scacoef) ) then - if (associated(extcoef)) extcoef = 0. - if (associated(scacoef)) scacoef = 0. + if (present(extcoef)) extcoef = 0. + if (present(scacoef)) scacoef = 0. do w = 1, size(wavelengths_profile) call mie%Query(wavelengths_profile(w), 1, & ! Only SO4 exists in the MieTable, so its index is 1 @@ -6899,24 +6899,24 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, tau=tau, ssa=ssa, __RC__) ! Calculate the total ext. and scat. coefficients - if( associated(extcoef) ) then + if( present(extcoef) ) then extcoef(:,:,:,w) = extcoef(:,:,:,w) + & tau * (grav * rhoa / delp) endif - if( associated(scacoef) ) then + if( present(scacoef) ) then scacoef(:,:,:,w) = scacoef(:,:,:,w) + & ssa * tau * (grav * rhoa / delp) endif enddo endif - if( associated(exttau) .or. associated(stexttau) .or. & - associated(scatau) .or. associated(stscatau)) then + if( present(exttau) .or. present(stexttau) .or. & + present(scatau) .or. present(stscatau)) then - if (associated(exttau)) exttau = 0. - if (associated(stexttau)) stexttau = 0. - if (associated(scatau)) scatau = 0. - if (associated(stscatau)) stscatau = 0. + if (present(exttau)) exttau = 0. + if (present(stexttau)) stexttau = 0. + if (present(scatau)) scatau = 0. + if (present(stscatau)) stscatau = 0. do w = 1, size(wavelengths_vertint) call mie%Query(wavelengths_vertint(w), 1, & ! Only SO4 exists in the MieTable, so its index is 1 @@ -6925,11 +6925,11 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, do k = klid, km ! Integrate in the vertical - if ( associated(exttau) ) then + if ( present(exttau) ) then exttau(:,:,w) = exttau(:,:,w) + tau(:,:,k) endif - if (associated(stexttau) ) then + if (present(stexttau) ) then where (ple(:,:,k) .le. tropp) stexttau(:,:,w) = stexttau(:,:,w) + tau(:,:,k) elsewhere(ple(:,:,k-1) .lt. tropp) @@ -6937,11 +6937,11 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, endwhere endif - if ( associated(scatau) ) then + if ( present(scatau) ) then scatau(:,:,w) = scatau(:,:,w) + tau(:,:,k)*ssa(:,:,k) endif - if ( associated(stscatau) ) then + if ( present(stscatau) ) then where (ple(:,:,k) .le. tropp) stscatau(:,:,w) = stscatau(:,:,w) + tau(:,:,k)*ssa(:,:,k) elsewhere(ple(:,:,k-1) .lt. tropp) @@ -6953,7 +6953,7 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, endif ! Calculate the 470-870 Angstrom parameter - if( associated(angstrom) .and. do_angstrom ) then + if( present(angstrom) .and. do_angstrom ) then angstrom(i1:i2,j1:j2) = 0. ! Set tau to small number by default @@ -6985,7 +6985,7 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, ! 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(associated(sarea) .or. associated(snum)) then + 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 @@ -6998,9 +6998,9 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie, ! 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(associated(sarea)) sarea(i,j,k) = 3./rwet*svol*exp(-5./2.*alog(sigma)**2.) + if(present(sarea)) sarea(i,j,k) = 3./rwet*svol*exp(-5./2.*alog(sigma)**2.) ! Integral of lognormal number density # m-3 - if(associated(snum)) snum(i,j,k) = svol / (rwet**3) * exp(-9/2.*alog(sigma)**2.) * 3./4./pi + if(present(snum)) snum(i,j,k) = svol / (rwet**3) * exp(-9/2.*alog(sigma)**2.) * 3./4./pi enddo enddo enddo