diff --git a/CHANGELOG.md b/CHANGELOG.md index 87e76b57..061bb6bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- Added callbacks needed for GAAS2G. Removed diagnostic prints statements. Fixed bug with + the creation of Diagnostic Mie tables. + - Updated `CODEOWNERS` to reflect changes in staffing - Updated `components.yaml` - Added fixture block diff --git a/ESMF/Aerosol_GridComp/Aerosol_StateSpecs.rc b/ESMF/Aerosol_GridComp/Aerosol_StateSpecs.rc index 84f10740..ac42d34d 100644 --- a/ESMF/Aerosol_GridComp/Aerosol_StateSpecs.rc +++ b/ESMF/Aerosol_GridComp/Aerosol_StateSpecs.rc @@ -12,6 +12,7 @@ category: IMPORT #FRLAKE | 1 | xy | N | | fraction_of_lake #WET1 | 1 | xy | N | | surface_soil_wetness #LWI | 1 | xy | N | | land-ocean-ice_mask +#TROPP | Pa | xy | N | | tropopause_pressure_based_on_blended_estimate #U10M | m s-1 | xy | N | | 10-meter_eastward_wind #V10M | m s-1 | xy | N | | 10-meter_northward_wind #AREA | m^2 | xy | N | | agrid_cell_area diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 index 4e728392..2f1985fa 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridCompMod.F90 @@ -16,7 +16,7 @@ module CA2G_GridCompMod use iso_c_binding, only: c_loc, c_f_pointer, c_ptr use GOCART2G_Process ! GOCART2G process library - use GA_GridCompMod + use GA_EnvironmentMod use MAPL_StringTemplate, only: StrTemplate implicit none @@ -38,10 +38,11 @@ module CA2G_GridCompMod !=========================================================================== ! !Carbonaceous aerosol state - type, extends(GA_GridComp) :: CA2G_GridComp + type, extends(GA_Environment) :: CA2G_GridComp integer :: myDOW = -1 ! my Day of the week: Sun=1, Mon=2,...,Sat=7 real :: ratPOM = 1.0 ! Ratio of POM to OC mass - real :: fTerpene = 0.0 ! Fraction of terpene emissions -> aerosol + 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 :: aviation_layers(4) ! heights of the LTO, CDS and CRS layers @@ -127,15 +128,15 @@ subroutine SetServices (GC, RC) ! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'CA2G_GridComp_'//trim(COMP_NAME)//'.rc', rc=status) + call ESMF_ConfigLoadFile (cfg, 'CA2G_instance_'//trim(comp_name)//'.rc', rc=status) if (status /= 0) then - if (mapl_am_i_root()) print*,'CA2G_GridComp_'//trim(COMP_NAME)//'.rc does not exist! & - Loading CA2G_GridComp_CA.oc.rc instead' - call ESMF_ConfigLoadFile (cfg, 'CA2G_GridComp_CA.oc.rc', __RC__) + if (mapl_am_i_root()) print*,'CA2G_instance_'//trim(comp_name)//'.rc does not exist! & + Loading CA2G_instance_'//trim(comp_name)//'.rc instead' + call ESMF_ConfigLoadFile (cfg, 'CA2G_instance_'//trim(comp_name)//'.rc', __RC__) end if ! process generic config items - call self%GA_GridComp%load_from_config( cfg, universal_cfg, __RC__) + call self%GA_Environment%load_from_config( cfg, universal_cfg, __RC__) call ESMF_ConfigGetAttribute (cfg, self%nbins, label='nbins:', __RC__) nbins = self%nbins @@ -144,8 +145,9 @@ 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%ratPOM, label='pom_oc_ratio:', default=1.0, __RC__) - call ESMF_ConfigGetAttribute (cfg, self%fTerpene, label='terpene_emission_fraction:', default=0.0, __RC__) + 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__) call ESMF_ConfigFindLabel (cfg, 'aviation_vertical_layers:', __RC__) do i=1,size(self%aviation_layers) @@ -290,16 +292,6 @@ subroutine SetServices (GC, RC) vlocation = MAPL_VLocationCenter, & datatype = MAPL_StateItem, __RC__) -! This state is needed by MOIST - It will contain aerosols -! ---------------------------------------------------------- - call MAPL_AddExportSpec (GC, & - short_name = trim(COMP_NAME)//'_AERO_ACI', & - long_name = 'aerosol_cloud_interaction_aerosols_from_'//trim(COMP_NAME), & - units = 'kg kg-1', & - dims = MAPL_DimsHorzVert, & - vlocation = MAPL_VLocationCenter, & - datatype = MAPL_StateItem, __RC__) - ! This bundle is needed by surface for snow albedo modification ! by aerosol settling and deposition ! ~~~DEVELOPERS NOTE~~~ Change to StateItem when possible @@ -352,7 +344,7 @@ subroutine Initialize (GC, import, export, clock, RC) type (MAPL_MetaComp), pointer :: MAPL type (ESMF_Grid) :: grid type (ESMF_State) :: internal - type (ESMF_State) :: aero, aero_aci + type (ESMF_State) :: aero type (ESMF_State) :: providerState type (ESMF_Config) :: cfg, universal_cfg type (ESMF_FieldBundle) :: Bundle_DP @@ -427,9 +419,9 @@ subroutine Initialize (GC, import, export, clock, RC) ! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'CA2G_GridComp_'//trim(COMP_NAME)//'.rc', rc=status) + call ESMF_ConfigLoadFile (cfg, 'CA2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) if (status /= 0) then - if (mapl_am_i_root()) print*,'ERROR: CA2G_GridComp_'//trim(COMP_NAME)//'.rc does not exist!' + if (mapl_am_i_root()) print*,'ERROR: CA2G_instance_'//trim(COMP_NAME)//'.rc does not exist!' return end if @@ -459,16 +451,13 @@ subroutine Initialize (GC, import, export, clock, RC) ! Fill AERO States with carbon fields ! ------------------------------------ call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO' , aero , __RC__) - call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO_ACI', aero_aci, __RC__) call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO_DP' , Bundle_DP, __RC__) call ESMF_StateGet (internal, 'CAphobic'//trim(comp_name), field, __RC__) call ESMF_AttributeSet (field, NAME='ScavengingFractionPerKm', VALUE=self%fscav(1), __RC__) fld = MAPL_FieldCreate (field, 'CAphobic'//trim(comp_name), __RC__) call MAPL_StateAdd (aero, fld, __RC__) -! call MAPL_StateAdd (aero_aci, fld, __RC__) - self%klid = 1 ! temporary value ! Set internal CAphobic values to 0 where above klid call MAPL_GetPointer (internal, int_ptr, 'CAphobic'//trim(comp_name), __RC__) call setZeroKlid(self%km, self%klid, int_ptr) @@ -477,7 +466,6 @@ subroutine Initialize (GC, import, export, clock, RC) call ESMF_AttributeSet (field, NAME='ScavengingFractionPerKm', VALUE=self%fscav(2), __RC__) fld = MAPL_FieldCreate (field, 'CAphilic'//trim(comp_name), __RC__) call MAPL_StateAdd (aero, fld, __RC__) - call MAPL_StateAdd (aero_aci, fld, __RC__) if (.not. data_driven) then ! Set klid @@ -556,16 +544,16 @@ subroutine Initialize (GC, import, export, clock, RC) label="aerosol_monochromatic_optics_file:", __RC__ ) call ESMF_ConfigGetAttribute (cfg, self%diag_MieTable(instance)%nmom, label="n_moments:", default=0, __RC__) - i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_monochromatic_optics_wavelength:', __RC__) + i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:', __RC__) self%diag_MieTable(instance)%nch = i allocate (self%diag_MieTable(instance)%channels(self%diag_MieTable(instance)%nch), __STAT__ ) call ESMF_ConfigGetAttribute (universal_cfg, self%diag_MieTable(instance)%channels, & - label= "aerosol_monochromatic_optics_wavelength:", __RC__) + label= "aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:", __RC__) allocate (self%diag_MieTable(instance)%mie_aerosol, __STAT__) self%diag_MieTable(instance)%mie_aerosol = Chem_MieTableCreate (self%diag_MieTable(instance)%optics_file, __RC__ ) call Chem_MieTableRead (self%diag_MieTable(instance)%mie_aerosol, self%diag_MieTable(instance)%nch, & - self%diag_MieTable(instance)%channels, rc=status, nmom=self%diag_MieTable(instance)%nmom) + self%diag_MieTable(instance)%channels*1.e-9, rc=status, nmom=self%diag_MieTable(instance)%nmom) VERIFY_(status) ! Finish creating AERO state @@ -584,8 +572,12 @@ 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 add_aero (aero, label='monochromatic_extinction_in_air_due_to_ambient_aerosol', & + label2='monochromatic_EXT', grid=grid, typekind=MAPL_R4,__RC__) + call add_aero (aero, label='sum_of_internalState_aerosol', label2='aerosolSum', grid=grid, typekind=MAPL_R4, __RC__) call ESMF_AttributeSet(aero, name='band_for_aerosol_optics', value=0, __RC__) + call ESMF_AttributeSet(aero, name='wavelength_for_aerosol_optics', value=0.0, __RC__) mieTable_pointer = transfer(c_loc(self), [1]) call ESMF_AttributeSet(aero, name='mieTable_pointer', valueList=mieTable_pointer, itemCount=size(mieTable_pointer), __RC__) @@ -593,10 +585,12 @@ subroutine Initialize (GC, import, export, clock, RC) allocate(aerosol_names(self%nbins), __STAT__) aerosol_names(1) = 'CAphobic'//trim(comp_name) aerosol_names(2) = 'CAphilic'//trim(comp_name) - call ESMF_AttributeSet(aero, name='internal_varaible_name', valueList=aerosol_names, & + call ESMF_AttributeSet(aero, name='internal_variable_name', valueList=aerosol_names, & itemCount=size(aerosol_names), __RC__) call ESMF_MethodAdd(AERO, label='aerosol_optics', userRoutine=aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='monochromatic_aerosol_optics', userRoutine=monochromatic_aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='get_mixR', userRoutine=get_mixR, __RC__) RETURN_(ESMF_SUCCESS) @@ -695,13 +689,14 @@ 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 :: biomass_src, terpene_src, biofuel_src, & + real, dimension(:,:), allocatable :: biomass_src, biofuel_src, biogvoc_src, & eocant1_src, eocant2_src, oc_ship_src, aviation_lto_src, aviation_cds_src, & aviation_crs_src, biomass_src_ real, dimension(:,:,:), allocatable :: emissions_point integer, pointer, dimension(:) :: iPoint, jPoint character (len=ESMF_MAXSTR) :: fname ! file name for point source emissions character(len=2) :: GCsuffix + logical :: fileExists real, pointer, dimension(:,:,:) :: intPtr_phobic, intPtr_philic @@ -771,7 +766,6 @@ subroutine Run1 (GC, import, export, clock, RC) ! Implicit allocation with Fortran 2003 if (trim(comp_name) == 'CA.oc') then biomass_src = OC_BIOMASS - terpene_src = OC_TERPENE biofuel_src = OC_BIOFUEL eocant1_src = OC_ANTEOC1 eocant2_src = OC_ANTEOC2 @@ -779,6 +773,9 @@ subroutine Run1 (GC, import, export, clock, RC) aviation_lto_src = OC_AVIATION_LTO aviation_cds_src = OC_AVIATION_CDS aviation_crs_src = OC_AVIATION_CRS + allocate(biogvoc_src, mold=OC_MTPA, __STAT__) + biogvoc_src = 0.0 + biogvoc_src = ((OC_MTPA + OC_MTPO + OC_LIMO) * self%fMonoterpenes) + (OC_ISOPRENE * self%fIsoprene) else if (trim(comp_name) == 'CA.bc') then biomass_src = BC_BIOMASS biofuel_src = BC_BIOFUEL @@ -788,11 +785,14 @@ subroutine Run1 (GC, import, export, clock, RC) aviation_lto_src = BC_AVIATION_LTO aviation_cds_src = BC_AVIATION_CDS aviation_crs_src = BC_AVIATION_CRS - allocate(terpene_src, mold=BC_BIOMASS, __STAT__) - terpene_src = 1.0 + allocate(biogvoc_src, mold=BC_BIOMASS, __STAT__) +! Black carbon has no biogvoc_src, so we set it to zero. +! biogvoc_src is still needed for the call to CAEmissions, however it +! effectivly does nothing since we set all its values to zero. + biogvoc_src = 0.0 else if (trim(comp_name) == 'CA.br') then biomass_src = BRC_BIOMASS - terpene_src = BRC_TERPENE + biogvoc_src = BRC_TERPENE biofuel_src = BRC_BIOFUEL eocant1_src = BRC_ANTEBRC1 eocant2_src = BRC_ANTEBRC2 @@ -804,7 +804,7 @@ subroutine Run1 (GC, import, export, clock, RC) ! As a safety check, where value is undefined set to 0 where(1.01*biomass_src > MAPL_UNDEF) biomass_src = 0. - where(1.01*terpene_src > MAPL_UNDEF) terpene_src = 0. + where(1.01*biogvoc_src > MAPL_UNDEF) biogvoc_src = 0. where(1.01*biofuel_src > MAPL_UNDEF) biofuel_src = 0. where(1.01*eocant1_src > MAPL_UNDEF) eocant1_src = 0. where(1.01*eocant2_src > MAPL_UNDEF) eocant2_src = 0. @@ -828,21 +828,28 @@ subroutine Run1 (GC, import, export, clock, RC) nhms, self%cdt) end if - call CAEmission (self%diag_MieTable(self%instance), self%km, self%nbins, self%cdt, MAPL_GRAV, GCsuffix, self%ratPOM, & - self%fTerpene, aviation_lto_src, aviation_cds_src, aviation_crs_src, self%fHydrophobic, & - zpbl, t, airdens, rh2, intPtr_philic, intPtr_phobic, delp, self%aviation_layers, biomass_src, & - terpene_src, eocant1_src, eocant2_src, oc_ship_src, biofuel_src, & + call CAEmission (self%diag_MieTable(self%instance), self%km, self%nbins, self%cdt, & + MAPL_GRAV, GCsuffix, self%ratPOM, aviation_lto_src, aviation_cds_src, & + aviation_crs_src, self%fHydrophobic, zpbl, t, airdens, rh2, & + intPtr_philic, intPtr_phobic, delp, self%aviation_layers, biomass_src, & + biogvoc_src, eocant1_src, eocant2_src, oc_ship_src, biofuel_src, & CAEM, CAEMAN, CAEMBB, CAEMBF, CAEMBG, __RC__ ) ! Read any pointwise emissions, if requested ! ------------------------------------------ if(self%doing_point_emissions) then call StrTemplate(fname, self%point_emissions_srcfilen, xid='unknown', & - nymd=nymd, nhms=120000 ) - call ReadPointEmissions (nymd, fname, self%nPts, self%pLat, self%pLon, & - self%pBase, self%pTop, self%pEmis, self%pStart, & - self%pEnd, label='source', __RC__) - endif + nymd=nymd, nhms=120000 ) + inquire( file=fname, exist=fileExists) + if (fileExists) then + call ReadPointEmissions (nymd, fname, self%nPts, self%pLat, self%pLon, & + self%pBase, self%pTop, self%pEmis, self%pStart, & + self%pEnd, label='source', __RC__) + else if (.not. fileExists) then + if(mapl_am_i_root()) print*,'GOCART2G ',trim(comp_name),': ',trim(fname),' not found; proceeding.' + self%nPts = -1 ! set this back to -1 so the "if (self%nPts > 0)" conditional is not exercised. + end if + end if ! Get indices for point emissions ! ------------------------------- @@ -958,7 +965,7 @@ subroutine Run2 (GC, import, export, clock, RC) intPtr_philic = intPtr_philic + self%cdt * pSOA_VOC/airdens if (associated(CAPSOA)) & - CAPSOA = CAPSOA+sum(self%cdt*pSOA_VOC*delp/airdens/MAPL_GRAV, 3) + CAPSOA = sum(pSOA_VOC*delp/airdens/MAPL_GRAV, 3) end if if (trim(comp_name) == 'CA.br') then @@ -967,7 +974,7 @@ subroutine Run2 (GC, import, export, clock, RC) intPtr_philic = intPtr_philic + self%cdt * pSOA_VOC/airdens if (associated(CAPSOA)) & - CAPSOA = sum(self%cdt*pSOA_VOC*delp/airdens/MAPL_GRAV, 3) + CAPSOA = sum(pSOA_VOC*delp/airdens/MAPL_GRAV, 3) end if ! Ad Hoc transfer of hydrophobic to hydrophilic aerosols @@ -981,9 +988,9 @@ subroutine Run2 (GC, import, export, clock, RC) call MAPL_VarSpecGet(InternalSpec(n), SHORT_NAME=short_name, __RC__) call MAPL_GetPointer(internal, NAME=short_name, ptr=int_ptr, __RC__) - call Chem_Settling2Gorig (self%km, self%klid, self%rhFlag, n, int_ptr, MAPL_GRAV, delp, & - self%radius(n)*1.e-6, self%rhop(n), self%cdt, t, airdens, & - rh2, zle, CASD, __RC__) + 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, CASD, __RC__) end do ! CA Deposition @@ -1027,34 +1034,13 @@ subroutine Run2 (GC, import, export, clock, RC) channels=self%diag_MieTable(self%instance)%channels*1.0e-9, & 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=rh2, u=u, v=v, delp=delp, sfcmass=CASMASS, colmass=CACMASS, & - mass=CAMASS, exttau=CAEXTTAU, scatau=CASCATAU, fluxu=CAFLUXU, fluxv=CAFLUXV, & + tmpu=t, rhoa=airdens, rh=rh2, u=u, v=v, delp=delp, ple=ple, tropp=tropp, & + sfcmass=CASMASS, colmass=CACMASS, mass=CAMASS,& + exttau=CAEXTTAU,stexttau=CASTEXTTAU, scatau=CASCATAU, stscatau=CASTSCATAU,& + fluxu=CAFLUXU, fluxv=CAFLUXV, & conc=CACONC, extcoef=CAEXTCOEF, scacoef=CASCACOEF, angstrom=CAANGSTR, aerindx=CAAERIDX,& NO3nFlag=.false., __RC__) -if (trim(comp_name) == 'CA.oc') then - if(mapl_am_i_root()) print*,'CA2G Run2 E sum(OCphobic) = ',sum(intPtr_phobic) - if(mapl_am_i_root()) print*,'CA2G Run2 E sum(OCphilic) = ',sum(intPtr_philic) -! if(mapl_am_i_root()) print*,'CA2G Run2 E array OCphobic = ',CAphobic -! if(mapl_am_i_root()) print*,'CA2G Run2 E array OCphilic = ',CAphilic -!if(mapl_am_i_root()) print*,'CA2G OC CASMASS = ',sum(CASMASS) -!if(mapl_am_i_root()) print*,'CA2G OC CAMASS = ',sum(CAMASS) -!if(mapl_am_i_root()) print*,'CA2G OC CAEXTTAU = ',sum(CAEXTTAU) -!if(mapl_am_i_root()) print*,'CA2G OC CASCATAU = ',sum(CASCATAU) -else if (trim(comp_name) == 'CA.bc') then - if(mapl_am_i_root()) print*,'CA2G Run2 E sum(BCphobic) = ',sum(intPtr_phobic) - if(mapl_am_i_root()) print*,'CA2G Run2 E sum(BCphilic) = ',sum(intPtr_philic) -! if(mapl_am_i_root()) print*,'CA2G Run2 E array BCphobic = ',CAphobic -! if(mapl_am_i_root()) print*,'CA2G Run2 E array BCphilic = ',CAphilic -!if(mapl_am_i_root()) print*,'CA2G BC CASMASS = ',sum(CASMASS) -!if(mapl_am_i_root()) print*,'CA2G BC CAMASS = ',sum(CAMASS) -!if(mapl_am_i_root()) print*,'CA2G BC CAEXTTAU = ',sum(CAEXTTAU) -!if(mapl_am_i_root()) print*,'CA2G BC CASCATAU = ',sum(CASCATAU) -else if (trim(comp_name) == 'CA.br') then - if(mapl_am_i_root()) print*,'CA2G Run2 E sum(BRphobic) = ',sum(intPtr_phobic) - if(mapl_am_i_root()) print*,'CA2G Run2 E sum(BRphilic) = ',sum(intPtr_philic) -end if - RETURN_(ESMF_SUCCESS) @@ -1172,9 +1158,9 @@ subroutine aerosol_optics(state, rc) ! Get aerosol names ! ----------------- - call ESMF_AttributeGet (state, name='internal_varaible_name', itemCount=nbins, __RC__) + call ESMF_AttributeGet (state, name='internal_variable_name', itemCount=nbins, __RC__) allocate (aerosol_names(nbins), __STAT__) - call ESMF_AttributeGet (state, name='internal_varaible_name', valueList=aerosol_names, __RC__) + call ESMF_AttributeGet (state, name='internal_variable_name', valueList=aerosol_names, __RC__) ! Radiation band ! -------------- @@ -1295,6 +1281,138 @@ end subroutine mie_ end subroutine aerosol_optics +!------------------------------------------------------------------------------------- + subroutine monochromatic_aerosol_optics(state, rc) + + implicit none + +! !ARGUMENTS: + type (ESMF_State) :: state + integer, intent(out) :: rc + +! !Local + real, dimension(:,:,:), pointer :: ple, rh + real, dimension(:,:), pointer :: var + real, dimension(:,:,:), pointer :: q + real, dimension(:,:,:,:), pointer :: q_4d + integer, allocatable :: opaque_self(:) + type(C_PTR) :: address + type(CA2G_GridComp), pointer :: self + + character (len=ESMF_MAXSTR) :: fld_name + type(ESMF_Field) :: fld + character (len=ESMF_MAXSTR),allocatable :: aerosol_names(:) + + real, dimension(:,:,:), allocatable :: tau_s, tau ! (lon:,lat:,lev:) + real :: x + integer :: instance + integer :: n, nbins + integer :: i1, j1, i2, j2, km + real :: wavelength, mieTable_index + integer :: i, j, k + + __Iam__('CA2G::monochromatic_aerosol_optics') + +! Begin... + +! Mie Table instance/index +! ------------------------ + call ESMF_AttributeGet(state, name='mie_table_instance', value=instance, __RC__) + +! Get aerosol names +! ----------------- + call ESMF_AttributeGet (state, name='internal_variable_name', itemCount=nbins, __RC__) + allocate (aerosol_names(nbins), __STAT__) + call ESMF_AttributeGet (state, name='internal_variable_name', valueList=aerosol_names, __RC__) + +! Radiation wavelength +! -------------------- + call ESMF_AttributeGet(state, name='wavelength_for_aerosol_optics', value=wavelength, __RC__) + +! Get wavelength index for Mie Table +! ---------------------------------- +! Channel values are 4.7e-7 5.5e-7 6.7e-7 8.7e-7 [meter]. Their indices are 1,2,3,4 respectively. + if ((wavelength .ge. 4.69e-7) .and. (wavelength .le. 4.71e-7)) then + mieTable_index = 1. + else if ((wavelength .ge. 5.49e-7) .and. (wavelength .le. 5.51e-7)) then + mieTable_index = 2. + else if ((wavelength .ge. 6.69e-7) .and. (wavelength .le. 6.71e-7)) then + mieTable_index = 3. + else if ((wavelength .ge. 8.68e-7) .and. (wavelength .le. 8.71e-7)) then + mieTable_index = 4. + else + print*,trim(Iam),' : wavelengths of ',wavelength,' is an invalid value.' + return + end if + +! 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__) +! call MAPL_GetPointer (state, ple, 'PLE', __RC__) + + i1 = lbound(ple, 1); i2 = ubound(ple, 1) + j1 = lbound(ple, 2); j2 = ubound(ple, 2) + km = ubound(ple, 3) + +! Relative humidity +! ----------------- + call ESMF_AttributeGet(state, name='relative_humidity_for_aerosol_optics', value=fld_name, __RC__) + call MAPL_GetPointer(state, rh, trim(fld_name), __RC__) +! call MAPL_GetPointer (state, rh, 'RH2', __RC__) + + allocate(tau_s(i1:i2, j1:j2, km), & + tau(i1:i2, j1:j2, km), __STAT__) + tau_s = 0. + tau = 0. + + allocate(q_4d(i1:i2, j1:j2, km, nbins), __STAT__) + + do n = 1, nbins + call ESMF_StateGet (state, trim(aerosol_names(n)), field=fld, __RC__) + call ESMF_FieldGet (fld, farrayPtr=q, __RC__) + + do k = 1, km + do j = j1, j2 + do i = i1, i2 + x = (ple(i,j,k) - ple(i,j,k-1))/MAPL_GRAV + q_4d(i,j,k,n) = x * q(i,j,k) + end do + end do + end do + end do + + call ESMF_AttributeGet(state, name='mieTable_pointer', itemCount=n, __RC__) + allocate (opaque_self(n), __STAT__) + call ESMF_AttributeGet(state, name='mieTable_pointer', valueList=opaque_self, __RC__) + + address = transfer(opaque_self, address) + call c_f_pointer(address, self) + + do n = 1, nbins + do i = 1, i2 + do j = 1, j2 + do k = 1, km + call Chem_MieQuery(self%diag_MieTable(instance), n, mieTable_index, q_4d(i,j,k,n), rh(i,j,k), tau(i,j,k), __RC__) + tau_s(i,j,k) = tau_s(i,j,k) + tau(i,j,k) + end do + end do + end do + end do + + call ESMF_AttributeGet(state, name='monochromatic_extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(state, var, trim(fld_name), __RC__) + var = sum(tau_s, dim=3) + end if + + deallocate(q_4d, __STAT__) + + RETURN_(ESMF_SUCCESS) + + end subroutine monochromatic_aerosol_optics + + end module CA2G_GridCompMod diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc index 9bf8c9e6..eb5c29b0 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_ExtData.rc @@ -36,10 +36,7 @@ climOCSV002 'kg m-2 s-1' Y N 0 0.0 1.0 # ORGANIC CARBON # --------------- # Biomass burning -- QFED-v2.x -OC_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none none biomass ExtData/PIESA/sfc/QFED/NRT/v2.5r1_0.1_deg/Y%y4/M%m2/qfed2.emis_oc.006.%y4%m2%d2.nc4 - -# Terpene emission -OC_TERPENE NA Y Y %y4-%m2-%d2t12:00:00 none none terpene ExtData/PIESA/sfc/geia.terpene_biogenic.x144_y91_t12.1971.nc +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 @@ -63,7 +60,7 @@ 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 none biomass ExtData/PIESA/sfc/QFED/NRT/v2.5r1_0.1_deg/Y%y4/M%m2/qfed2.emis_bc.006.%y4%m2%d2.nc4 +BC_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.778 biomass ExtData/PIESA/sfc/QFED/NRT/v2.5r1_0.1_deg/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 @@ -84,7 +81,7 @@ BC_AVIATION_CRS NA Y Y %y4-%m2-%d2t12:00:00 none none bc_aviation ExtData/PIESA # BROWN CARBON # ------------ # Biomass burning -- QFED-v2.x -BRC_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none none biomass ExtData/PIESA/sfc/QFED/NRT/v2.5r1_0.1_deg/Y%y4/M%m2/qfed2.emis_oc.006.%y4%m2%d2.nc4 +BRC_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.778 biomass ExtData/PIESA/sfc/QFED/NRT/v2.5r1_0.1_deg/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 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc index f0b0744e..ffb721e2 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_StateSpecs.rc @@ -10,6 +10,7 @@ category: IMPORT FROCEAN | 1 | xy | N | | fraction_of_ocean FRACI | 1 | xy | N | | ice_covered_fraction_of_tile LWI | 1 | xy | N | | land-ocean-ice_mask + TROPP | Pa | xy | N | | tropopause_pressure_based_on_blended_estimate U10M | m s-1 | xy | N | | 10-meter_eastward_wind V10M | m s-1 | xy | N | | 10-meter_northward_wind USTAR | m s-1 | xy | N | | surface_velocity_scale @@ -35,7 +36,10 @@ category: IMPORT pSOA_BIOB_VOC | kg m-3 s-1 | xyz | C | | SOA from Anthropogenic and biomass burning VOC #........................................................................................ OC_BIOMASS | 1 | xy | N | | biomass burning emissions - OC_TERPENE | 1 | xy | N | | terpene emissions + OC_ISOPRENE | 1 | xy | N | | source species + OC_MTPA | 1 | xy | N | | source species + OC_MTPO | 1 | xy | N | | source species + OC_LIMO | 1 | xy | N | | source species OC_BIOFUEL | 1 | xy | N | | biofuel emissions OC_ANTEOC1 | 1 | xy | N | | anthropogenic BF emissions OC_ANTEOC2 | 1 | xy | N | | anthropogenic FF emissions @@ -69,8 +73,8 @@ category: EXPORT #---------------------------------------------------------------------------------------- CAMASS* | kg kg-1 | xyz | C | | Carbonaceous Aerosol Mass Mixing Ratio CACONC* | kg m-3 | xyz | C | | Carbonaceous Aerosol Mass Concentration - CAEXTCOEF* | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Extinction Coefficient [550 nm] - CASCACOEF* | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Scattering Coefficient [550 nm] + CAEXTCOEF* | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Extinction Coefficient + CASCACOEF* | m-1 | xyz | C | size(self%wavelengths_profile) | Carbonaceous Aerosol Scattering Coefficient #...........|............|.....|.....|.......|............................................ CAEM* | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Emission (Bin %d) CASD* | kg m-2 s-1 | xy | N | nbins | Carbonaceous Aerosol Sedimentation (Bin %d) @@ -85,8 +89,10 @@ category: EXPORT CAPSOA* | kg m-2 s-1 | xy | N | | Carbonaceous Aerosol SOA Production CASMASS* | kg m-3 | xy | N | | Carbonaceous Aerosol Surface Mass Concentration CACMASS* | kg m-2 | xy | N | | Carbonaceous Aerosol Column Mass Density - CAEXTTAU* | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Extinction AOT [550 nm] - CASCATAU* | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Scattering AOT [550 nm] + CAEXTTAU* | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Extinction AOT + CASTEXTTAU*| 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Extinction AOT Stratosphere + CASCATAU* | 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Scattering AOT + CASTSCATAU*| 1 | xy | N | size(self%wavelengths_vertint) | Carbonaceous Aerosol Scattering AOT Stratosphere CAANGSTR* | 1 | xy | N | | Carbonaceous Aerosol Angstrom parameter [470-870 nm] CAFLUXU* | kg m-1 s-1 | xy | N | | Carbonaceous Aerosol column u-wind mass flux CAFLUXV* | kg m-1 s-1 | xy | N | | Carbonaceous Aerosol column v-wind mass flux diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc similarity index 100% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_CA.bc.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.bc.rc diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc similarity index 91% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_CA.br.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc index 6597d78d..c54e32b8 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_CA.br.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.br.rc @@ -2,7 +2,6 @@ # Resource file for BR parameters. # - aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc @@ -13,7 +12,7 @@ aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 terpene_emission_fraction: 0.1 # Ratio of POM/BRC -> convert source masses from carbon to POM -pom_brc_ratio: 1.4 +pom_ca_ratio: 1.8 # Initially hydrophobic portion hydrophobic_fraction: 0.5 @@ -35,9 +34,6 @@ molecular_weight: 0.18 0.18 # Number of particles per kg mass fnum: 9.76e17 9.76e17 -# Number median radius [um] -particle_radius_number: 0.0212 0.0212 - # Sigma of lognormal number distribution sigma: 2.20 2.20 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc new file mode 100755 index 00000000..a77217df --- /dev/null +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_instance_CA.oc.rc @@ -0,0 +1,43 @@ +# +# Resource file for Organic Carbon parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_OC.v1_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of biogenic VOCs emissions for SOA production +monoterpenes_emission_fraction: 0.05 +isoprene_emission_fraction: 0.03 + +# Ratio of POM/OC -> convert source masses from carbon to POM +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 + +# Dry particle density [kg m-3] +particle_density: 1800 1800 + +# Molecular weight of species [kg mole-1] +molecular_weight: 0.18 0.18 + +# Number of particles per kg mass +fnum: 9.76e17 9.76e17 + +# Sigma of lognormal number distribution +sigma: 2.20 2.20 + +pressure_lid_in_hPa: 0.01 + +nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_GridComp_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_GridComp_CA.br.rc deleted file mode 100644 index 783db70b..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_GridComp_CA.br.rc +++ /dev/null @@ -1,46 +0,0 @@ -# -# Resource file for BR parameters. -# - - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc -aerosol_monochromatic_optics_wavelength: 470 550 670 870 ! units: nm -n_channels: 4 -r_channels: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 - -# Ratio of POM/BRC -> convert source masses from carbon to POM -pom_brc_ratio: 1.4 - -# Initially hydrophobic portion -hydrophobic_fraction: 0.5 - -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) -fscav: 0.0 0.4 - -# particle radius -particle_radius_microns: 0.35 0.35 - -# Dry particle density [kg m-3] -particle_density: 1800 1800 - -# Molecular weight of species [kg mole-1] -molecular_weight: 0.18 0.18 - -# Number of particles per kg mass -fnum: 9.76e17 9.76e17 - -# Number median radius [um] -particle_radius_number: 0.0212 0.0212 - -# Sigma of lognormal number distribution -sigma: 2.20 2.20 - -nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_GridComp_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_instance_CA.bc.rc similarity index 82% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_GridComp_CA.bc.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_instance_CA.bc.rc index a21ce542..37fdb8bf 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_GridComp_CA.bc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_instance_CA.bc.rc @@ -5,10 +5,7 @@ nbins: 2 aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BC.v1_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 @@ -20,7 +17,7 @@ hydrophobic_fraction: 0.8 fscav: 0.0 0.4 # Dry particle density [kg m-3] -particle_density: 1000 1000 +particle_density: 1800 1800 # Molecular weight of species [kg mole-1] molecular_weight: 0.18 0.18 @@ -29,9 +26,10 @@ molecular_weight: 0.18 0.18 fnum: 1.50e19 1.50e19 # Number median radius [um] -particle_radius_microns: 0.0118 0.0118 +particle_radius_microns: 0.35 0.35 rhFlag: 0 +particle_density: 1800 1800 # Sigma of lognormal number distribution sigma: 2.0 2.0 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_GridComp_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_instance_CA.br.rc similarity index 82% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_GridComp_CA.br.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_instance_CA.br.rc index e8da1014..2eb90b0f 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_GridComp_CA.br.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_instance_CA.br.rc @@ -2,13 +2,8 @@ # Resource file for BR parameters. # - aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc -aerosol_monochromatic_optics_wavelength: 470 550 670 870 ! units: nm -n_channels: 4 -r_channels: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 @@ -17,7 +12,7 @@ aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 terpene_emission_fraction: 0.1 # Ratio of POM/BRC -> convert source masses from carbon to POM -pom_brc_ratio: 1.4 +pom_brc_ratio: 1.8 # Initially hydrophobic portion hydrophobic_fraction: 0.5 @@ -26,7 +21,7 @@ hydrophobic_fraction: 0.5 fscav: 0.0 0.4 # particle radius -particle_radius_microns: 0.0212 0.0212 +particle_radius_microns: 0.35 0.35 rhFlag: 0 @@ -42,4 +37,6 @@ fnum: 9.76e17 9.76e17 # Sigma of lognormal number distribution sigma: 2.20 2.20 +pressure_lid_in_hPa: 0.01 + nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_instance_CA.oc.rc similarity index 81% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_CA.oc.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_instance_CA.oc.rc index f40266d1..1b88bf7e 100755 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CA2G_GridComp_CA.oc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_instance_CA.oc.rc @@ -8,8 +8,9 @@ aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 +# Fraction of biogenic VOCs emissions for SOA production +monoterpenes_emission_fraction: 0.05 +isoprene_emission_fraction: 0.03 # Ratio of POM/OC -> convert source masses from carbon to POM pom_oc_ratio: 1.4 @@ -17,8 +18,6 @@ pom_oc_ratio: 1.4 # particle radius particle_radius_microns: 0.35 0.35 -particle_density: 1800 1800 - rhFlag: 0 # Initially hydrophobic portion @@ -41,6 +40,4 @@ sigma: 2.20 2.20 pressure_lid_in_hPa: 0.01 -#point_emissions_srcfilen: /gpfsm/dnb32/esherman/gocartRefactor/RC/CA2G_point_src_test.rc - nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_GridComp_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_GridComp_CA.oc.rc deleted file mode 100755 index e01f0a31..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_GridComp_CA.oc.rc +++ /dev/null @@ -1,46 +0,0 @@ -# -# Resource file for Organic Carbon parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_OC.v1_3.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 - -# Ratio of POM/OC -> convert source masses from carbon to POM -pom_oc_ratio: 1.4 - -# particle radius -particle_radius_microns: 0.0212 0.0212 - -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 - -# Dry particle density [kg m-3] -particle_density: 1800 1800 - -# Molecular weight of species [kg mole-1] -molecular_weight: 0.18 0.18 - -# Number of particles per kg mass -fnum: 9.76e17 9.76e17 - -# Sigma of lognormal number distribution -sigma: 2.20 2.20 - -pressure_lid_in_hPa: 0.01 - - -nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_GridComp_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_instance_CA.bc.rc similarity index 82% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_GridComp_CA.bc.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_instance_CA.bc.rc index 5f3c74c9..37fdb8bf 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_GridComp_CA.bc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_instance_CA.bc.rc @@ -5,10 +5,7 @@ nbins: 2 aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BC.v1_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 @@ -20,7 +17,7 @@ hydrophobic_fraction: 0.8 fscav: 0.0 0.4 # Dry particle density [kg m-3] -particle_density: 1000 1000 +particle_density: 1800 1800 # Molecular weight of species [kg mole-1] molecular_weight: 0.18 0.18 @@ -29,9 +26,10 @@ molecular_weight: 0.18 0.18 fnum: 1.50e19 1.50e19 # Number median radius [um] -particle_radius_microns: 0.0118 0.0118 +particle_radius_microns: 0.35 0.35 rhFlag: 0 +particle_density: 1800 1800 # Sigma of lognormal number distribution sigma: 2.0 2.0 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_GridComp_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_instance_CA.br.rc similarity index 82% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_GridComp_CA.br.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_instance_CA.br.rc index e8da1014..2eb90b0f 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_GridComp_CA.br.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_instance_CA.br.rc @@ -2,13 +2,8 @@ # Resource file for BR parameters. # - aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc -aerosol_monochromatic_optics_wavelength: 470 550 670 870 ! units: nm -n_channels: 4 -r_channels: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 @@ -17,7 +12,7 @@ aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 terpene_emission_fraction: 0.1 # Ratio of POM/BRC -> convert source masses from carbon to POM -pom_brc_ratio: 1.4 +pom_brc_ratio: 1.8 # Initially hydrophobic portion hydrophobic_fraction: 0.5 @@ -26,7 +21,7 @@ hydrophobic_fraction: 0.5 fscav: 0.0 0.4 # particle radius -particle_radius_microns: 0.0212 0.0212 +particle_radius_microns: 0.35 0.35 rhFlag: 0 @@ -42,4 +37,6 @@ fnum: 9.76e17 9.76e17 # Sigma of lognormal number distribution sigma: 2.20 2.20 +pressure_lid_in_hPa: 0.01 + nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_GridComp_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_instance_CA.oc.rc similarity index 81% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_GridComp_CA.oc.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_instance_CA.oc.rc index d03a5b3c..1b88bf7e 100755 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C1/CA2G_GridComp_CA.oc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_instance_CA.oc.rc @@ -3,16 +3,14 @@ # aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_OC.v1_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 +# Fraction of biogenic VOCs emissions for SOA production +monoterpenes_emission_fraction: 0.05 +isoprene_emission_fraction: 0.03 # Ratio of POM/OC -> convert source masses from carbon to POM pom_oc_ratio: 1.4 @@ -20,8 +18,6 @@ pom_oc_ratio: 1.4 # particle radius particle_radius_microns: 0.35 0.35 -particle_density: 1800 1800 - rhFlag: 0 # Initially hydrophobic portion @@ -44,5 +40,4 @@ sigma: 2.20 2.20 pressure_lid_in_hPa: 0.01 - nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_GridComp_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_GridComp_CA.br.rc deleted file mode 100644 index 1f33737f..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_GridComp_CA.br.rc +++ /dev/null @@ -1,43 +0,0 @@ -# -# Resource file for BR parameters. -# - - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc -aerosol_monochromatic_optics_wavelength: 470 550 670 870 ! units: nm -n_channels: 4 -r_channels: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 - -# Ratio of POM/BRC -> convert source masses from carbon to POM -pom_brc_ratio: 1.4 - -# Initially hydrophobic portion -hydrophobic_fraction: 0.5 - -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) -fscav: 0.0 0.4 - -# particle radius -particle_radius_microns: 0.0212 0.0212 - -# Dry particle density [kg m-3] -particle_density: 1800 1800 - -# Molecular weight of species [kg mole-1] -molecular_weight: 0.18 0.18 - -# Number of particles per kg mass -fnum: 9.76e17 9.76e17 - -# Sigma of lognormal number distribution -sigma: 2.20 2.20 - -nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_GridComp_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_instance_CA.bc.rc similarity index 82% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_GridComp_CA.bc.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_instance_CA.bc.rc index 5f3c74c9..37fdb8bf 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_GridComp_CA.bc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_instance_CA.bc.rc @@ -5,10 +5,7 @@ nbins: 2 aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BC.v1_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 @@ -20,7 +17,7 @@ hydrophobic_fraction: 0.8 fscav: 0.0 0.4 # Dry particle density [kg m-3] -particle_density: 1000 1000 +particle_density: 1800 1800 # Molecular weight of species [kg mole-1] molecular_weight: 0.18 0.18 @@ -29,9 +26,10 @@ molecular_weight: 0.18 0.18 fnum: 1.50e19 1.50e19 # Number median radius [um] -particle_radius_microns: 0.0118 0.0118 +particle_radius_microns: 0.35 0.35 rhFlag: 0 +particle_density: 1800 1800 # Sigma of lognormal number distribution sigma: 2.0 2.0 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_GridComp_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_instance_CA.br.rc similarity index 82% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_GridComp_CA.br.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_instance_CA.br.rc index e8da1014..2eb90b0f 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_GridComp_CA.br.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_instance_CA.br.rc @@ -2,13 +2,8 @@ # Resource file for BR parameters. # - aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc -aerosol_monochromatic_optics_wavelength: 470 550 670 870 ! units: nm -n_channels: 4 -r_channels: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 @@ -17,7 +12,7 @@ aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 terpene_emission_fraction: 0.1 # Ratio of POM/BRC -> convert source masses from carbon to POM -pom_brc_ratio: 1.4 +pom_brc_ratio: 1.8 # Initially hydrophobic portion hydrophobic_fraction: 0.5 @@ -26,7 +21,7 @@ hydrophobic_fraction: 0.5 fscav: 0.0 0.4 # particle radius -particle_radius_microns: 0.0212 0.0212 +particle_radius_microns: 0.35 0.35 rhFlag: 0 @@ -42,4 +37,6 @@ fnum: 9.76e17 9.76e17 # Sigma of lognormal number distribution sigma: 2.20 2.20 +pressure_lid_in_hPa: 0.01 + nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_GridComp_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_instance_CA.oc.rc similarity index 79% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_GridComp_CA.oc.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_instance_CA.oc.rc index bf221f19..1b88bf7e 100755 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_GridComp_CA.oc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMIP/CA2G_instance_CA.oc.rc @@ -3,22 +3,20 @@ # aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_OC.v1_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 +# Fraction of biogenic VOCs emissions for SOA production +monoterpenes_emission_fraction: 0.05 +isoprene_emission_fraction: 0.03 # Ratio of POM/OC -> convert source masses from carbon to POM pom_oc_ratio: 1.4 # particle radius -particle_radius_microns: 0.0212 0.0212 +particle_radius_microns: 0.35 0.35 rhFlag: 0 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/CA2G_GridComp/CMakeLists.txt index 058652f9..2e2fafc4 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_GridComp Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES MAPL GA_Environment Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) mapl_acg (${this} CA2G_StateSpecs.rc IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_GridComp_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_instance_CA.bc.rc similarity index 82% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_GridComp_CA.bc.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_instance_CA.bc.rc index 22cb3687..37fdb8bf 100644 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/CCMI_REF-C2/CA2G_GridComp_CA.bc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_instance_CA.bc.rc @@ -5,10 +5,7 @@ nbins: 2 aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BC.v1_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 @@ -16,13 +13,11 @@ aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 # Initially hydrophobic portion hydrophobic_fraction: 0.8 -rhFlag: 0 - # Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) fscav: 0.0 0.4 # Dry particle density [kg m-3] -particle_density: 1000 1000 +particle_density: 1800 1800 # Molecular weight of species [kg mole-1] molecular_weight: 0.18 0.18 @@ -31,7 +26,10 @@ molecular_weight: 0.18 0.18 fnum: 1.50e19 1.50e19 # Number median radius [um] -particle_radius_microns: 0.0118 0.0118 +particle_radius_microns: 0.35 0.35 + +rhFlag: 0 +particle_density: 1800 1800 # Sigma of lognormal number distribution sigma: 2.0 2.0 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_instance_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_instance_CA.br.rc new file mode 100644 index 00000000..2eb90b0f --- /dev/null +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_instance_CA.br.rc @@ -0,0 +1,42 @@ +# +# Resource file for BR parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of terpene emissions for SOA production +terpene_emission_fraction: 0.1 + +# Ratio of POM/BRC -> convert source masses from carbon to POM +pom_brc_ratio: 1.8 + +# Initially hydrophobic portion +hydrophobic_fraction: 0.5 + +# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) +fscav: 0.0 0.4 + +# particle radius +particle_radius_microns: 0.35 0.35 + +rhFlag: 0 + +# Dry particle density [kg m-3] +particle_density: 1800 1800 + +# Molecular weight of species [kg mole-1] +molecular_weight: 0.18 0.18 + +# Number of particles per kg mass +fnum: 9.76e17 9.76e17 + +# Sigma of lognormal number distribution +sigma: 2.20 2.20 + +pressure_lid_in_hPa: 0.01 + +nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_GridComp_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_instance_CA.oc.rc similarity index 79% rename from ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_GridComp_CA.oc.rc rename to ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_instance_CA.oc.rc index bf221f19..1b88bf7e 100755 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_GridComp_CA.oc.rc +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2-DD/CA2G_instance_CA.oc.rc @@ -3,22 +3,20 @@ # aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_OC.v1_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 +# Fraction of biogenic VOCs emissions for SOA production +monoterpenes_emission_fraction: 0.05 +isoprene_emission_fraction: 0.03 # Ratio of POM/OC -> convert source masses from carbon to POM pom_oc_ratio: 1.4 # particle radius -particle_radius_microns: 0.0212 0.0212 +particle_radius_microns: 0.35 0.35 rhFlag: 0 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_GridComp_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_GridComp_CA.bc.rc deleted file mode 100644 index 5f3c74c9..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_GridComp_CA.bc.rc +++ /dev/null @@ -1,40 +0,0 @@ -# -# Resource file for Black Carbon parameters. -# - -nbins: 2 - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BC.v1_3.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -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 - -# Dry particle density [kg m-3] -particle_density: 1000 1000 - -# Molecular weight of species [kg mole-1] -molecular_weight: 0.18 0.18 - -# Number of particles per kg mass -fnum: 1.50e19 1.50e19 - -# Number median radius [um] -particle_radius_microns: 0.0118 0.0118 - -rhFlag: 0 - -# Sigma of lognormal number distribution -sigma: 2.0 2.0 - -pressure_lid_in_hPa: 0.01 - diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_GridComp_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_GridComp_CA.oc.rc deleted file mode 100755 index 537d543a..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_GridComp_CA.oc.rc +++ /dev/null @@ -1,45 +0,0 @@ -# -# Resource file for Organic Carbon parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_OC.v1_3.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 - -# Ratio of POM/OC -> convert source masses from carbon to POM -pom_oc_ratio: 1.4 - -# particle radius -particle_radius_microns: 0.0212 0.0212 - -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 - -# Dry particle density [kg m-3] -particle_density: 1800 1800 - -# Molecular weight of species [kg mole-1] -molecular_weight: 0.18 0.18 - -# Number of particles per kg mass -fnum: 9.76e17 9.76e17 - -# Sigma of lognormal number distribution -sigma: 2.20 2.20 - -pressure_lid_in_hPa: 0.01 - -nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_instance_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_instance_CA.bc.rc new file mode 100644 index 00000000..37fdb8bf --- /dev/null +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_instance_CA.bc.rc @@ -0,0 +1,38 @@ +# +# Resource file for Black Carbon parameters. +# + +nbins: 2 + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BC.v1_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BC.v1_3.nc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +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 + +# Dry particle density [kg m-3] +particle_density: 1800 1800 + +# Molecular weight of species [kg mole-1] +molecular_weight: 0.18 0.18 + +# Number of particles per kg mass +fnum: 1.50e19 1.50e19 + +# Number median radius [um] +particle_radius_microns: 0.35 0.35 + +rhFlag: 0 +particle_density: 1800 1800 + +# Sigma of lognormal number distribution +sigma: 2.0 2.0 + +pressure_lid_in_hPa: 0.01 + diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_instance_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_instance_CA.br.rc new file mode 100644 index 00000000..2eb90b0f --- /dev/null +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_instance_CA.br.rc @@ -0,0 +1,42 @@ +# +# Resource file for BR parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of terpene emissions for SOA production +terpene_emission_fraction: 0.1 + +# Ratio of POM/BRC -> convert source masses from carbon to POM +pom_brc_ratio: 1.8 + +# Initially hydrophobic portion +hydrophobic_fraction: 0.5 + +# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) +fscav: 0.0 0.4 + +# particle radius +particle_radius_microns: 0.35 0.35 + +rhFlag: 0 + +# Dry particle density [kg m-3] +particle_density: 1800 1800 + +# Molecular weight of species [kg mole-1] +molecular_weight: 0.18 0.18 + +# Number of particles per kg mass +fnum: 9.76e17 9.76e17 + +# Sigma of lognormal number distribution +sigma: 2.20 2.20 + +pressure_lid_in_hPa: 0.01 + +nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_instance_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_instance_CA.oc.rc new file mode 100755 index 00000000..1b88bf7e --- /dev/null +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/MERRA2/CA2G_instance_CA.oc.rc @@ -0,0 +1,43 @@ +# +# Resource file for Organic Carbon parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_OC.v1_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of biogenic VOCs emissions for SOA production +monoterpenes_emission_fraction: 0.05 +isoprene_emission_fraction: 0.03 + +# Ratio of POM/OC -> convert source masses from carbon to POM +pom_oc_ratio: 1.4 + +# 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 + +# Dry particle density [kg m-3] +particle_density: 1800 1800 + +# Molecular weight of species [kg mole-1] +molecular_weight: 0.18 0.18 + +# Number of particles per kg mass +fnum: 9.76e17 9.76e17 + +# Sigma of lognormal number distribution +sigma: 2.20 2.20 + +pressure_lid_in_hPa: 0.01 + +nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_GridComp_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_GridComp_CA.bc.rc deleted file mode 100644 index 5f3c74c9..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_GridComp_CA.bc.rc +++ /dev/null @@ -1,40 +0,0 @@ -# -# Resource file for Black Carbon parameters. -# - -nbins: 2 - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BC.v1_3.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -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 - -# Dry particle density [kg m-3] -particle_density: 1000 1000 - -# Molecular weight of species [kg mole-1] -molecular_weight: 0.18 0.18 - -# Number of particles per kg mass -fnum: 1.50e19 1.50e19 - -# Number median radius [um] -particle_radius_microns: 0.0118 0.0118 - -rhFlag: 0 - -# Sigma of lognormal number distribution -sigma: 2.0 2.0 - -pressure_lid_in_hPa: 0.01 - diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_GridComp_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_GridComp_CA.br.rc deleted file mode 100644 index e8da1014..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_GridComp_CA.br.rc +++ /dev/null @@ -1,45 +0,0 @@ -# -# Resource file for BR parameters. -# - - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc -aerosol_monochromatic_optics_wavelength: 470 550 670 870 ! units: nm -n_channels: 4 -r_channels: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 - -# Ratio of POM/BRC -> convert source masses from carbon to POM -pom_brc_ratio: 1.4 - -# Initially hydrophobic portion -hydrophobic_fraction: 0.5 - -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) -fscav: 0.0 0.4 - -# particle radius -particle_radius_microns: 0.0212 0.0212 - -rhFlag: 0 - -# Dry particle density [kg m-3] -particle_density: 1800 1800 - -# Molecular weight of species [kg mole-1] -molecular_weight: 0.18 0.18 - -# Number of particles per kg mass -fnum: 9.76e17 9.76e17 - -# Sigma of lognormal number distribution -sigma: 2.20 2.20 - -nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_GridComp_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_GridComp_CA.oc.rc deleted file mode 100755 index 537d543a..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_GridComp_CA.oc.rc +++ /dev/null @@ -1,45 +0,0 @@ -# -# Resource file for Organic Carbon parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_OC.v1_3.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 - -# Ratio of POM/OC -> convert source masses from carbon to POM -pom_oc_ratio: 1.4 - -# particle radius -particle_radius_microns: 0.0212 0.0212 - -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 - -# Dry particle density [kg m-3] -particle_density: 1800 1800 - -# Molecular weight of species [kg mole-1] -molecular_weight: 0.18 0.18 - -# Number of particles per kg mass -fnum: 9.76e17 9.76e17 - -# Sigma of lognormal number distribution -sigma: 2.20 2.20 - -pressure_lid_in_hPa: 0.01 - -nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_instance_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_instance_CA.bc.rc new file mode 100644 index 00000000..37fdb8bf --- /dev/null +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_instance_CA.bc.rc @@ -0,0 +1,38 @@ +# +# Resource file for Black Carbon parameters. +# + +nbins: 2 + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BC.v1_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BC.v1_3.nc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +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 + +# Dry particle density [kg m-3] +particle_density: 1800 1800 + +# Molecular weight of species [kg mole-1] +molecular_weight: 0.18 0.18 + +# Number of particles per kg mass +fnum: 1.50e19 1.50e19 + +# Number median radius [um] +particle_radius_microns: 0.35 0.35 + +rhFlag: 0 +particle_density: 1800 1800 + +# Sigma of lognormal number distribution +sigma: 2.0 2.0 + +pressure_lid_in_hPa: 0.01 + diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_instance_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_instance_CA.br.rc new file mode 100644 index 00000000..2eb90b0f --- /dev/null +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_instance_CA.br.rc @@ -0,0 +1,42 @@ +# +# Resource file for BR parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of terpene emissions for SOA production +terpene_emission_fraction: 0.1 + +# Ratio of POM/BRC -> convert source masses from carbon to POM +pom_brc_ratio: 1.8 + +# Initially hydrophobic portion +hydrophobic_fraction: 0.5 + +# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) +fscav: 0.0 0.4 + +# particle radius +particle_radius_microns: 0.35 0.35 + +rhFlag: 0 + +# Dry particle density [kg m-3] +particle_density: 1800 1800 + +# Molecular weight of species [kg mole-1] +molecular_weight: 0.18 0.18 + +# Number of particles per kg mass +fnum: 9.76e17 9.76e17 + +# Sigma of lognormal number distribution +sigma: 2.20 2.20 + +pressure_lid_in_hPa: 0.01 + +nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_instance_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_instance_CA.oc.rc new file mode 100755 index 00000000..1b88bf7e --- /dev/null +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/NR/CA2G_instance_CA.oc.rc @@ -0,0 +1,43 @@ +# +# Resource file for Organic Carbon parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_OC.v1_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of biogenic VOCs emissions for SOA production +monoterpenes_emission_fraction: 0.05 +isoprene_emission_fraction: 0.03 + +# Ratio of POM/OC -> convert source masses from carbon to POM +pom_oc_ratio: 1.4 + +# 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 + +# Dry particle density [kg m-3] +particle_density: 1800 1800 + +# Molecular weight of species [kg mole-1] +molecular_weight: 0.18 0.18 + +# Number of particles per kg mass +fnum: 9.76e17 9.76e17 + +# Sigma of lognormal number distribution +sigma: 2.20 2.20 + +pressure_lid_in_hPa: 0.01 + +nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_GridComp_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_GridComp_CA.bc.rc deleted file mode 100644 index 34232536..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_GridComp_CA.bc.rc +++ /dev/null @@ -1,40 +0,0 @@ -# -# Resource file for Black Carbon parameters. -# - -nbins: 2 - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BC.v1_3.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -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 - -# Dry particle density [kg m-3] -particle_density: 1000 1000 - -# Molecular weight of species [kg mole-1] -molecular_weight: 0.18 0.18 - -# Number of particles per kg mass -fnum: 1.50e19 1.50e19 - -# Number median radius [um] -particle_radius_microns: 0.0118 0.0118 - -rhFlag: 0 - -# Sigma of lognormal number distribution -sigma: 2.0 2.0 - -pressure_lid_in_hPa: 0.01 - diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_GridComp_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_GridComp_CA.br.rc deleted file mode 100644 index e8da1014..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_GridComp_CA.br.rc +++ /dev/null @@ -1,45 +0,0 @@ -# -# Resource file for BR parameters. -# - - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc -aerosol_monochromatic_optics_wavelength: 470 550 670 870 ! units: nm -n_channels: 4 -r_channels: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 - -# Ratio of POM/BRC -> convert source masses from carbon to POM -pom_brc_ratio: 1.4 - -# Initially hydrophobic portion -hydrophobic_fraction: 0.5 - -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) -fscav: 0.0 0.4 - -# particle radius -particle_radius_microns: 0.0212 0.0212 - -rhFlag: 0 - -# Dry particle density [kg m-3] -particle_density: 1800 1800 - -# Molecular weight of species [kg mole-1] -molecular_weight: 0.18 0.18 - -# Number of particles per kg mass -fnum: 9.76e17 9.76e17 - -# Sigma of lognormal number distribution -sigma: 2.20 2.20 - -nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_GridComp_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_GridComp_CA.oc.rc deleted file mode 100755 index bf221f19..00000000 --- a/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_GridComp_CA.oc.rc +++ /dev/null @@ -1,45 +0,0 @@ -# -# Resource file for Organic Carbon parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_OC.v1_3.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of terpene emissions for SOA production -terpene_emission_fraction: 0.1 - -# Ratio of POM/OC -> convert source masses from carbon to POM -pom_oc_ratio: 1.4 - -# particle radius -particle_radius_microns: 0.0212 0.0212 - -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 - -# Dry particle density [kg m-3] -particle_density: 1800 1800 - -# Molecular weight of species [kg mole-1] -molecular_weight: 0.18 0.18 - -# Number of particles per kg mass -fnum: 9.76e17 9.76e17 - -# Sigma of lognormal number distribution -sigma: 2.20 2.20 - -pressure_lid_in_hPa: 0.01 - -nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_instance_CA.bc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_instance_CA.bc.rc new file mode 100644 index 00000000..37fdb8bf --- /dev/null +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_instance_CA.bc.rc @@ -0,0 +1,38 @@ +# +# Resource file for Black Carbon parameters. +# + +nbins: 2 + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BC.v1_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BC.v1_3.nc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +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 + +# Dry particle density [kg m-3] +particle_density: 1800 1800 + +# Molecular weight of species [kg mole-1] +molecular_weight: 0.18 0.18 + +# Number of particles per kg mass +fnum: 1.50e19 1.50e19 + +# Number median radius [um] +particle_radius_microns: 0.35 0.35 + +rhFlag: 0 +particle_density: 1800 1800 + +# Sigma of lognormal number distribution +sigma: 2.0 2.0 + +pressure_lid_in_hPa: 0.01 + diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_instance_CA.br.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_instance_CA.br.rc new file mode 100644 index 00000000..2eb90b0f --- /dev/null +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_instance_CA.br.rc @@ -0,0 +1,42 @@ +# +# Resource file for BR parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_BRC.v1_5.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_BRC.v1_5.nc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of terpene emissions for SOA production +terpene_emission_fraction: 0.1 + +# Ratio of POM/BRC -> convert source masses from carbon to POM +pom_brc_ratio: 1.8 + +# Initially hydrophobic portion +hydrophobic_fraction: 0.5 + +# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) +fscav: 0.0 0.4 + +# particle radius +particle_radius_microns: 0.35 0.35 + +rhFlag: 0 + +# Dry particle density [kg m-3] +particle_density: 1800 1800 + +# Molecular weight of species [kg mole-1] +molecular_weight: 0.18 0.18 + +# Number of particles per kg mass +fnum: 9.76e17 9.76e17 + +# Sigma of lognormal number distribution +sigma: 2.20 2.20 + +pressure_lid_in_hPa: 0.01 + +nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_instance_CA.oc.rc b/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_instance_CA.oc.rc new file mode 100755 index 00000000..1b88bf7e --- /dev/null +++ b/ESMF/GOCART2G_GridComp/CA2G_GridComp/PIESA/CA2G_instance_CA.oc.rc @@ -0,0 +1,43 @@ +# +# Resource file for Organic Carbon parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_OC.v1_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_OC.v1_3.nc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of biogenic VOCs emissions for SOA production +monoterpenes_emission_fraction: 0.05 +isoprene_emission_fraction: 0.03 + +# Ratio of POM/OC -> convert source masses from carbon to POM +pom_oc_ratio: 1.4 + +# 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 + +# Dry particle density [kg m-3] +particle_density: 1800 1800 + +# Molecular weight of species [kg mole-1] +molecular_weight: 0.18 0.18 + +# Number of particles per kg mass +fnum: 9.76e17 9.76e17 + +# Sigma of lognormal number distribution +sigma: 2.20 2.20 + +pressure_lid_in_hPa: 0.01 + +nbins: 2 diff --git a/ESMF/GOCART2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/CMakeLists.txt index ae0cdd9a..eea75125 100644 --- a/ESMF/GOCART2G_GridComp/CMakeLists.txt +++ b/ESMF/GOCART2G_GridComp/CMakeLists.txt @@ -1,7 +1,7 @@ esma_set_this () set (alldirs - GA_GridComp + GA_Environment DU2G_GridComp SS2G_GridComp CA2G_GridComp diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C1/DU2G_GridComp_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C1/DU2G_GridComp_DU.rc deleted file mode 100644 index 6389405c..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C1/DU2G_GridComp_DU.rc +++ /dev/null @@ -1,43 +0,0 @@ -# -# Resource file Dust parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc - -aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 - -radius_lower: 0.1 1.0 1.8 3.0 6.0 - -radius_upper: 1.0 1.8 3.0 6.0 10.0 - -source_fraction: 0.1 0.25 0.25 0.25 0.25 - -# units [kg/m-3] -particle_density: 2500. 2650. 2650. 2650. 2650. - -# Resolution dependent tuning constant for emissions (a,b,c,d,e,f) -Ch_DU: 0.2 0.2 0.08 0.08 0.08 0.067 - -# Scavenging efficiency per bin [km-1] -fscav: 0.2 0.2 0.2 0.2 0.2 # - -# 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: .false. - -nbins: 5 - -pressure_lid_in_hPa: 0.01 - - diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C1/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C1/DU2G_GridComp_ExtData.rc index e1846dbb..b2c202ff 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C1/DU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C1/DU2G_GridComp_ExtData.rc @@ -4,6 +4,15 @@ PrimaryExports%% # Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | # -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| DU_SRC NA N Y - none none du_src ExtData/PIESA/sfc/gocart.dust_source.v5a.x1152_y721.nc +#DU_SRC NA N Y - 0.0 2.0 du_src /discover/nobackup/adarmeno/projects/k14/data/australia.dust_source.v5a.x1152_y721.nc +DU_CLAY NA N Y - none none clay /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SILT NA N Y - none none silt /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SAND NA N Y - none none sand /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_TEXTURE NA N V - none none texture /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_category.x1152_y721_t1.nc4 +DU_VEG NA N V - none none domveg /discover/nobackup/adarmeno/projects/soils/GLDAS/veg20.x1152_y721_t1.nc4 +DU_Z0 NA N Y - none none roughness /discover/nobackup/adarmeno/projects/k14/arlems-roughness.x1151_y720_t1.nc4 + +DU_GVF NA N Y %y4-%m2-%d2t12:00:00 none none gvf /discover/nobackup/projects/gmao/share/gmao_ops/fvInput/g5chem/sfc/NDVI/QVI/qvi-1.0.r3/0.1/QVI/yearly/qvi.006.%y4.nc4 # DU data - 3D climdu001 'kg kg-1' Y N 0 0.0 1.0 du001 ExtData/PIESA/L72/aero_clm/dR_MERRA-AA-r2.aer_Nv.2003_2014.2008clm.nc4 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C1/DU2G_instance_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C1/DU2G_instance_DU.rc new file mode 100644 index 00000000..a8d24c14 --- /dev/null +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C1/DU2G_instance_DU.rc @@ -0,0 +1,58 @@ +# +# Resource file Dust parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc +aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc + +particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 + +radius_lower: 0.1 1.0 1.8 3.0 6.0 + +radius_upper: 1.0 1.8 3.0 6.0 10.0 + +# units [kg/m-3] +particle_density: 2500. 2650. 2650. 2650. 2650. + +# Emission scheme +# --------------- +emission_scheme: ginoux +source_fraction: 0.0435465 0.106903 0.220117 0.484606 0.144828 +Ch_DU: 0.2 0.2 0.08 0.15 0.08 0.067 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) +#Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 #original values +#source_fraction: 0.1 0.25 0.25 0.25 0.25 +#---------------- +#emission_scheme: k14 +#source_fraction: 0.043 0.106 0.219 0.485 0.144 +#Ch_DU: 0.02 0.02 0.02 0.0161 0.015 0.015 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) + +# Threshold friction velocity parameter 'gamma' +uts_gamma: 1.65e-4 + +# Formulation of the clay and silt factor in K14 that modulates the strength of the dust emissions +clayFlag: 1 # 0 - original K14, 1 - I&K2017, 2 - I&K2017 + +# soil mosture scaling factor +soil_moisture_factor: 0.8 + +# clay fraction scaling factor +soil_clay_factor: 1.0 + +# Scavenging efficiency per bin [km-1] +fscav: 0.2 0.2 0.2 0.2 0.2 + +# 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. + +nbins: 5 + +pressure_lid_in_hPa: 0.01 + diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C2/DU2G_GridComp_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C2/DU2G_GridComp_DU.rc deleted file mode 100644 index 6389405c..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C2/DU2G_GridComp_DU.rc +++ /dev/null @@ -1,43 +0,0 @@ -# -# Resource file Dust parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc - -aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 - -radius_lower: 0.1 1.0 1.8 3.0 6.0 - -radius_upper: 1.0 1.8 3.0 6.0 10.0 - -source_fraction: 0.1 0.25 0.25 0.25 0.25 - -# units [kg/m-3] -particle_density: 2500. 2650. 2650. 2650. 2650. - -# Resolution dependent tuning constant for emissions (a,b,c,d,e,f) -Ch_DU: 0.2 0.2 0.08 0.08 0.08 0.067 - -# Scavenging efficiency per bin [km-1] -fscav: 0.2 0.2 0.2 0.2 0.2 # - -# 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: .false. - -nbins: 5 - -pressure_lid_in_hPa: 0.01 - - diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C2/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C2/DU2G_GridComp_ExtData.rc index e1846dbb..b2c202ff 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C2/DU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C2/DU2G_GridComp_ExtData.rc @@ -4,6 +4,15 @@ PrimaryExports%% # Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | # -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| DU_SRC NA N Y - none none du_src ExtData/PIESA/sfc/gocart.dust_source.v5a.x1152_y721.nc +#DU_SRC NA N Y - 0.0 2.0 du_src /discover/nobackup/adarmeno/projects/k14/data/australia.dust_source.v5a.x1152_y721.nc +DU_CLAY NA N Y - none none clay /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SILT NA N Y - none none silt /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SAND NA N Y - none none sand /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_TEXTURE NA N V - none none texture /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_category.x1152_y721_t1.nc4 +DU_VEG NA N V - none none domveg /discover/nobackup/adarmeno/projects/soils/GLDAS/veg20.x1152_y721_t1.nc4 +DU_Z0 NA N Y - none none roughness /discover/nobackup/adarmeno/projects/k14/arlems-roughness.x1151_y720_t1.nc4 + +DU_GVF NA N Y %y4-%m2-%d2t12:00:00 none none gvf /discover/nobackup/projects/gmao/share/gmao_ops/fvInput/g5chem/sfc/NDVI/QVI/qvi-1.0.r3/0.1/QVI/yearly/qvi.006.%y4.nc4 # DU data - 3D climdu001 'kg kg-1' Y N 0 0.0 1.0 du001 ExtData/PIESA/L72/aero_clm/dR_MERRA-AA-r2.aer_Nv.2003_2014.2008clm.nc4 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C2/DU2G_instance_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C2/DU2G_instance_DU.rc new file mode 100644 index 00000000..a8d24c14 --- /dev/null +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CCMI_REF-C2/DU2G_instance_DU.rc @@ -0,0 +1,58 @@ +# +# Resource file Dust parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc +aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc + +particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 + +radius_lower: 0.1 1.0 1.8 3.0 6.0 + +radius_upper: 1.0 1.8 3.0 6.0 10.0 + +# units [kg/m-3] +particle_density: 2500. 2650. 2650. 2650. 2650. + +# Emission scheme +# --------------- +emission_scheme: ginoux +source_fraction: 0.0435465 0.106903 0.220117 0.484606 0.144828 +Ch_DU: 0.2 0.2 0.08 0.15 0.08 0.067 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) +#Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 #original values +#source_fraction: 0.1 0.25 0.25 0.25 0.25 +#---------------- +#emission_scheme: k14 +#source_fraction: 0.043 0.106 0.219 0.485 0.144 +#Ch_DU: 0.02 0.02 0.02 0.0161 0.015 0.015 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) + +# Threshold friction velocity parameter 'gamma' +uts_gamma: 1.65e-4 + +# Formulation of the clay and silt factor in K14 that modulates the strength of the dust emissions +clayFlag: 1 # 0 - original K14, 1 - I&K2017, 2 - I&K2017 + +# soil mosture scaling factor +soil_moisture_factor: 0.8 + +# clay fraction scaling factor +soil_clay_factor: 1.0 + +# Scavenging efficiency per bin [km-1] +fscav: 0.2 0.2 0.2 0.2 0.2 + +# 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. + +nbins: 5 + +pressure_lid_in_hPa: 0.01 + diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMIP/DU2G_GridComp_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMIP/DU2G_GridComp_DU.rc deleted file mode 100644 index 6389405c..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMIP/DU2G_GridComp_DU.rc +++ /dev/null @@ -1,43 +0,0 @@ -# -# Resource file Dust parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc - -aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 - -radius_lower: 0.1 1.0 1.8 3.0 6.0 - -radius_upper: 1.0 1.8 3.0 6.0 10.0 - -source_fraction: 0.1 0.25 0.25 0.25 0.25 - -# units [kg/m-3] -particle_density: 2500. 2650. 2650. 2650. 2650. - -# Resolution dependent tuning constant for emissions (a,b,c,d,e,f) -Ch_DU: 0.2 0.2 0.08 0.08 0.08 0.067 - -# Scavenging efficiency per bin [km-1] -fscav: 0.2 0.2 0.2 0.2 0.2 # - -# 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: .false. - -nbins: 5 - -pressure_lid_in_hPa: 0.01 - - diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMIP/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMIP/DU2G_GridComp_ExtData.rc index 2867324d..b2c202ff 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMIP/DU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMIP/DU2G_GridComp_ExtData.rc @@ -3,7 +3,16 @@ 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/CMIP/sfc/DU/gocart.dust_source.v5a_1x1inp.x360_y181.nc +DU_SRC NA N Y - none none du_src ExtData/PIESA/sfc/gocart.dust_source.v5a.x1152_y721.nc +#DU_SRC NA N Y - 0.0 2.0 du_src /discover/nobackup/adarmeno/projects/k14/data/australia.dust_source.v5a.x1152_y721.nc +DU_CLAY NA N Y - none none clay /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SILT NA N Y - none none silt /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SAND NA N Y - none none sand /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_TEXTURE NA N V - none none texture /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_category.x1152_y721_t1.nc4 +DU_VEG NA N V - none none domveg /discover/nobackup/adarmeno/projects/soils/GLDAS/veg20.x1152_y721_t1.nc4 +DU_Z0 NA N Y - none none roughness /discover/nobackup/adarmeno/projects/k14/arlems-roughness.x1151_y720_t1.nc4 + +DU_GVF NA N Y %y4-%m2-%d2t12:00:00 none none gvf /discover/nobackup/projects/gmao/share/gmao_ops/fvInput/g5chem/sfc/NDVI/QVI/qvi-1.0.r3/0.1/QVI/yearly/qvi.006.%y4.nc4 # DU data - 3D climdu001 'kg kg-1' Y N 0 0.0 1.0 du001 ExtData/PIESA/L72/aero_clm/dR_MERRA-AA-r2.aer_Nv.2003_2014.2008clm.nc4 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMIP/DU2G_instance_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMIP/DU2G_instance_DU.rc new file mode 100644 index 00000000..a8d24c14 --- /dev/null +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMIP/DU2G_instance_DU.rc @@ -0,0 +1,58 @@ +# +# Resource file Dust parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc +aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc + +particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 + +radius_lower: 0.1 1.0 1.8 3.0 6.0 + +radius_upper: 1.0 1.8 3.0 6.0 10.0 + +# units [kg/m-3] +particle_density: 2500. 2650. 2650. 2650. 2650. + +# Emission scheme +# --------------- +emission_scheme: ginoux +source_fraction: 0.0435465 0.106903 0.220117 0.484606 0.144828 +Ch_DU: 0.2 0.2 0.08 0.15 0.08 0.067 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) +#Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 #original values +#source_fraction: 0.1 0.25 0.25 0.25 0.25 +#---------------- +#emission_scheme: k14 +#source_fraction: 0.043 0.106 0.219 0.485 0.144 +#Ch_DU: 0.02 0.02 0.02 0.0161 0.015 0.015 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) + +# Threshold friction velocity parameter 'gamma' +uts_gamma: 1.65e-4 + +# Formulation of the clay and silt factor in K14 that modulates the strength of the dust emissions +clayFlag: 1 # 0 - original K14, 1 - I&K2017, 2 - I&K2017 + +# soil mosture scaling factor +soil_moisture_factor: 0.8 + +# clay fraction scaling factor +soil_clay_factor: 1.0 + +# Scavenging efficiency per bin [km-1] +fscav: 0.2 0.2 0.2 0.2 0.2 + +# 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. + +nbins: 5 + +pressure_lid_in_hPa: 0.01 + diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMakeLists.txt index 9d51b052..9003d93b 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMakeLists.txt +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/CMakeLists.txt @@ -2,7 +2,7 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES GA_GridComp MAPL Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES GA_Environment MAPL Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) mapl_acg (${this} DU2G_StateSpecs.rc IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 index e20b1e8a..96e4c315 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridCompMod.F90 @@ -16,7 +16,7 @@ module DU2G_GridCompMod use iso_c_binding, only: c_loc, c_f_pointer, c_ptr use GOCART2G_Process ! GOCART2G process library - use GA_GridCompMod + use GA_EnvironmentMod use MAPL_StringTemplate, only: StrTemplate implicit none @@ -38,19 +38,12 @@ module DU2G_GridCompMod integer, parameter :: NHRES = 6 -! !Supported dust schemes - enum, bind(C) - enumerator :: DUST_SCHEME_DATA = 0 - enumerator :: DUST_SCHEME_GOCART - enumerator :: DUST_SCHEME_FENGSHA - end enum - ! !Dust state - type, extends(GA_GridComp) :: DU2G_GridComp - real, allocatable :: rlow(:) ! particle radius lower bound [um] - real, allocatable :: rup(:) ! particle radius upper bound [um] + type, extends(GA_Environment) :: DU2G_GridComp + real, allocatable :: rlow(:) ! particle effective radius lower bound [um] + real, allocatable :: rup(:) ! particle effective radius upper bound [um] real, allocatable :: sfrac(:) ! fraction of total source - real, allocatable :: sdist(:) ! aerosol fractional size distribution [1] + real, allocatable :: sdist(:) ! FENGSHA aerosol fractional size distribution [1] real :: alpha ! FENGSHA scaling factor real :: gamma ! FENGSHA tuning exponent real :: kvhmax ! FENGSHA max. vertical/horizontal mass flux ratio [1] @@ -59,6 +52,10 @@ module DU2G_GridCompMod logical :: maringFlag=.false. ! maring settling velocity correction integer :: day_save = -1 character(len=:), allocatable :: emission_scheme ! emission scheme selector + integer :: clayFlag ! clay and silt term in K14 + real :: f_swc ! soil mosture scaling factor + real :: f_scl ! clay content scaling factor + real :: uts_gamma ! threshold friction velocity parameter 'gamma' ! !Workspae for point emissions logical :: doing_point_emissions = .false. character(len=255) :: point_emissions_srcfilen ! filename for pointwise emissions @@ -133,15 +130,15 @@ subroutine SetServices (GC, RC) ! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'DU2G_GridComp_'//trim(COMP_NAME)//'.rc', rc=status) + call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) if (status /= 0) then - if (mapl_am_i_root()) print*,'DU2G_GridComp_'//trim(COMP_NAME)//'.rc does not exist! Loading DU2G_GridComp_DU.rc instead' - call ESMF_ConfigLoadFile (cfg, 'DU2G_GridComp_DU.rc', __RC__) + if (mapl_am_i_root()) print*,'DU2G_instance_'//trim(COMP_NAME)//'.rc does not exist! Loading DU2G_GridComp_DU.rc instead' + call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_DU.rc', __RC__) end if ! process generic config items - call self%GA_GridComp%load_from_config(cfg, universal_cfg, __RC__) + call self%GA_Environment%load_from_config(cfg, universal_cfg, __RC__) allocate(self%sfrac(self%nbins), self%rlow(self%nbins), self%rup(self%nbins), __STAT__) ! process DU-specific items @@ -150,8 +147,16 @@ subroutine SetServices (GC, RC) call ESMF_ConfigGetAttribute (cfg, self%Ch_DU_res, label='Ch_DU:', __RC__) call ESMF_ConfigGetAttribute (cfg, self%rlow, label='radius_lower:', __RC__) call ESMF_ConfigGetAttribute (cfg, self%rup, label='radius_upper:', __RC__) + call ESMF_ConfigGetAttribute (cfg, emission_scheme, label='emission_scheme:', default='ginoux', __RC__) self%emission_scheme = ESMF_UtilStringLowerCase(trim(emission_scheme), __RC__) + + ! Test if our scheme is allowed, if so, print it out + _ASSERT(any(self%emission_scheme == [character(len=7) :: 'ginoux','k14','fengsha']), "Error. Unallowed emission scheme: "//trim(self%emission_scheme)//". Allowed: ginoux, k14, fengsha") + if (MAPL_AM_I_ROOT()) then + write (*,*) trim(Iam)//": Dust emission scheme is "//trim(self%emission_scheme) + end if + 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 @@ -160,13 +165,23 @@ subroutine SetServices (GC, RC) self%doing_point_emissions = .true. ! we are good to go end if -! read FENGSHA-specific parameters +! read scheme-specific parameters ! -------------------------------- - if (self%emission_scheme == 'fengsha') then - 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__) - end if + 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__) + case ('k14') + call ESMF_ConfigGetAttribute (cfg, self%clayFlag, label='clayFlag:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%f_swc, label='soil_moisture_factor:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%f_scl, label='soil_clay_factor:', __RC__) + call ESMF_ConfigGetAttribute (cfg, self%uts_gamma, label='uts_gamma:', __RC__) + case ('ginoux') + ! nothing to do + case default + _ASSERT_RC(.false., "Unallowed emission scheme: "//trim(self%emission_scheme)//". Allowed: ginoux, k14, fengsha", ESMF_RC_NOT_IMPL) + end select ! Is DU data driven? ! ------------------ @@ -270,10 +285,10 @@ subroutine SetServices (GC, RC) ! ---------------------- if (.not. data_driven) then #include "DU2G_Export___.h" -#include "DU2G_Internal___.h" associate (scheme => self%emission_scheme) #include "DU2G_Import___.h" end associate +#include "DU2G_Internal___.h" end if ! This state holds fields needed by radiation @@ -286,16 +301,6 @@ subroutine SetServices (GC, RC) vlocation = MAPL_VLocationCenter, & datatype = MAPL_StateItem, __RC__) -! This state is needed by MOIST - It will contain aerosols -! ---------------------------------------------------------- - call MAPL_AddExportSpec (GC, & - short_name = trim(COMP_NAME)//'_AERO_ACI', & - long_name = 'aerosol_cloud_interaction_aerosols_from_'//trim(COMP_NAME), & - units = 'kg kg-1', & - dims = MAPL_DimsHorzVert, & - vlocation = MAPL_VLocationCenter, & - datatype = MAPL_StateItem, __RC__) - ! This bundle is needed by surface for snow albedo modification ! by aerosol settling and deposition ! ~~~DEVELOPERS NOTE~~~ Change to StateItem when possible @@ -348,7 +353,7 @@ subroutine Initialize (GC, import, export, clock, RC) type (MAPL_MetaComp), pointer :: MAPL type (ESMF_Grid) :: grid type (ESMF_State) :: internal - type (ESMF_State) :: aero, aero_aci + type (ESMF_State) :: aero type (ESMF_State) :: providerState type (ESMF_Config) :: cfg type (ESMF_Config) :: universal_cfg @@ -394,7 +399,7 @@ subroutine Initialize (GC, import, export, clock, RC) ! Dust emission tuning coefficient [kg s2 m-5]. NOT bin specific. ! --------------------------------------------------------------- self%Ch_DU = Chem_UtilResVal(dims(1), dims(2), self%Ch_DU_res(:), __RC__) - self%Ch_DU = self%Ch_DU * 1.00E-09 + self%Ch_DU = self%Ch_DU * 1.0e-9 ! Dust emission size distribution for FENGSHA ! --------------------------------------------------------------- @@ -417,11 +422,11 @@ subroutine Initialize (GC, import, export, clock, RC) ! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'DU2G_GridComp_'//trim(COMP_NAME)//'.rc', RC=STATUS) + call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_'//trim(COMP_NAME)//'.rc', RC=STATUS) if (status /= 0) then - if (mapl_am_i_root()) print*,'DU2G_GridComp_'//trim(COMP_NAME)//'.rc does not exist! & - loading DU2G_GridComp_DU.rc instead' - call ESMF_ConfigLoadFile (cfg, 'DU2G_GridComp_DU.rc', __RC__) + if (mapl_am_i_root()) print*,'DU2G_instance_'//trim(COMP_NAME)//'.rc does not exist! & + loading DU2G_instance_DU.rc instead' + call ESMF_ConfigLoadFile (cfg, 'DU2G_instance_DU.rc', __RC__) end if ! Call Generic Initialize @@ -457,13 +462,11 @@ subroutine Initialize (GC, import, export, clock, RC) ! Fill AERO States with dust fields ! ------------------------------------ call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO' , aero , __RC__) - call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO_ACI', aero_aci, __RC__) call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO_DP' , Bundle_DP, __RC__) call ESMF_StateGet (internal, 'DU', field, __RC__) fld = MAPL_FieldCreate (field, 'DU', __RC__) call MAPL_StateAdd (aero, fld, __RC__) - call MAPL_StateAdd (aero_aci, fld, __RC__) if (.not. data_driven) then ! Set klid @@ -544,18 +547,19 @@ subroutine Initialize (GC, import, export, clock, RC) label="aerosol_monochromatic_optics_file:", __RC__ ) call ESMF_ConfigGetAttribute (cfg, self%diag_MieTable(instance)%nmom, label="n_moments:", default=0, __RC__) - i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_monochromatic_optics_wavelength:', __RC__) + i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:', __RC__) self%diag_MieTable(instance)%nch = i allocate (self%diag_MieTable(instance)%channels(self%diag_MieTable(instance)%nch), __STAT__ ) call ESMF_ConfigGetAttribute (universal_cfg, self%diag_MieTable(instance)%channels, & - label= "aerosol_monochromatic_optics_wavelength:", __RC__) + label= "aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:", __RC__) allocate (self%diag_MieTable(instance)%mie_aerosol, __STAT__) self%diag_MieTable(instance)%mie_aerosol = Chem_MieTableCreate (self%diag_MieTable(instance)%optics_file, __RC__ ) call Chem_MieTableRead (self%diag_MieTable(instance)%mie_aerosol, self%diag_MieTable(instance)%nch, & - self%diag_MieTable(instance)%channels, rc=status, nmom=self%diag_MieTable(instance)%nmom) + self%diag_MieTable(instance)%channels*1.e-9, rc=status, nmom=self%diag_MieTable(instance)%nmom) VERIFY_(status) + ! Mie Table instance/index call ESMF_AttributeSet (aero, name='mie_table_instance', value=instance, __RC__) @@ -571,16 +575,21 @@ 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 add_aero (aero, label='monochromatic_extinction_in_air_due_to_ambient_aerosol', label2='monochromatic_EXT', & + grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='sum_of_internalState_aerosol', label2='aerosolSum', grid=grid, typekind=MAPL_R4, __RC__) - call ESMF_AttributeSet(aero, name='band_for_aerosol_optics', value=0, __RC__) - call ESMF_AttributeSet(aero, name='wavelength_for_aerosol_optics', value=0, __RC__) + call ESMF_AttributeSet (aero, name='band_for_aerosol_optics', value=0, __RC__) + call ESMF_AttributeSet (aero, name='wavelength_for_aerosol_optics', value=0., __RC__) mieTable_pointer = transfer(c_loc(self), [1]) - call ESMF_AttributeSet(aero, name='mieTable_pointer', valueList=mieTable_pointer, itemCount=size(mieTable_pointer), __RC__) + call ESMF_AttributeSet (aero, name='mieTable_pointer', valueList=mieTable_pointer, itemCount=size(mieTable_pointer), __RC__) - call ESMF_AttributeSet(aero, name='internal_varaible_name', value='DU', __RC__) + call ESMF_AttributeSet (aero, name='internal_variable_name', value='DU', __RC__) call ESMF_MethodAdd (aero, label='aerosol_optics', userRoutine=aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='monochromatic_aerosol_optics', userRoutine=monochromatic_aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='get_mixR', userRoutine=get_mixR, __RC__) RETURN_(ESMF_SUCCESS) @@ -618,7 +627,6 @@ subroutine Run (GC, import, export, clock, rc) !***************************************************************************** ! Begin... -!if(mapl_am_i_root()) print*,'DU2G Run BEGIN' ! Get my name and set-up traceback handle ! --------------------------------------- @@ -684,9 +692,16 @@ subroutine Run1 (GC, import, export, clock, RC) real, dimension(:,:,:), allocatable :: emissions_point character (len=ESMF_MAXSTR) :: fname ! file name for point source emissions integer, pointer, dimension(:) :: iPoint, jPoint - -integer :: n - + logical :: fileExists + real :: qmax, qmin + integer :: n, ijl + real, dimension(:,:), allocatable :: z_ + real, dimension(:,:), allocatable :: ustar_ + real, dimension(:,:), allocatable :: ustar_t_ + real, dimension(:,:), allocatable :: ustar_ts_ + real, dimension(:,:), allocatable :: R_ + real, dimension(:,:), allocatable :: H_w_ + real, dimension(:,:), allocatable :: f_erod_ #include "DU2G_DeclarePointer___.h" @@ -725,41 +740,75 @@ subroutine Run1 (GC, import, export, clock, RC) #include "DU2G_GetPointer___.h" end associate -do n=1,5 - if(mapl_am_i_root()) print*,'n = ', n,' : Run1 B DU2G sum(du00n) = ',sum(DU(:,:,:,n)) -end do +! Set du_src to 0 where undefined +! -------------------------------- + where (1.01*du_src > MAPL_UNDEF) du_src = 0. ! Get dimensions ! --------------- import_shape = shape(wet1) i2 = import_shape(1) j2 = import_shape(2) + ijl = ( i2 - 1 + 1 ) * ( j2 - 1 + 1 ) allocate(emissions(i2,j2,self%km,self%nbins), __STAT__) emissions = 0.0 allocate(emissions_point, mold=delp, __STAT__) emissions_point = 0.0 - allocate(emissions_surface(i2,j2,self%nbins), __STAT__) !if use mold, then crashes. Compiler issue? + allocate(emissions_surface(i2,j2,self%nbins), __STAT__) emissions_surface = 0.0 ! Get surface gridded emissions ! ----------------------------- select case (self%emission_scheme) - 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__) - case ('ginoux') -! Set du_src to 0 where undefined -! -------------------------------- - where (1.01*du_src > MAPL_UNDEF) du_src = 0. - - call DustEmissionGOCART2G(self%radius*1.e-6, frlake, wet1, lwi, u10m, v10m, & - self%Ch_DU, du_src, MAPL_GRAV, & - emissions_surface, __RC__) - case default - _ASSERT_RC(.false.,'missing dust emission scheme',ESMF_RC_NOT_IMPL) + + case ('k14') + allocate(ustar_, mold=U10M, __STAT__) + allocate(ustar_t_, mold=U10M, __STAT__) + allocate(ustar_ts_, mold=U10M, __STAT__) + allocate(R_, mold=U10M, __STAT__) + allocate(H_w_, mold=U10M, __STAT__) + allocate(f_erod_, mold=U10M, __STAT__) + allocate(z_, mold=U10M, __STAT__) + + z_ = 10.0 ! wind is at 10m + + call DustEmissionK14( self%km, tsoil1, wcsf, rhos, & + du_z0, z_, u10n, v10n, ustar, & + frland, asnow, & + du_src, & + du_sand, du_silt, du_clay, & + du_texture, du_veg, du_gvf, & + self%f_swc, self%f_scl, self%uts_gamma, & + MAPL_UNDEF, MAPL_GRAV, MAPL_KARMAN, & + self%clayFlag, self%Ch_DU/1.e-9, & + emissions_surface, & + ustar_, & + ustar_t_, & + ustar_ts_, & + R_, H_w_, f_erod_, & + __RC__ ) + + + if (associated(DU_UST)) DU_UST = ustar_ + if (associated(DU_UST_T)) DU_UST_T = ustar_t_ + if (associated(DU_UST_T)) DU_UST_T = ustar_ts_ + if (associated(DU_DPC)) DU_DPC = R_ + if (associated(DU_SMC)) DU_SMC = H_w_ + 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__) + case ('ginoux') + + call DustEmissionGOCART2G(self%radius*1.e-6, frlake, wet1, lwi, u10m, v10m, & + self%Ch_DU, du_src, MAPL_GRAV, & + emissions_surface, __RC__) + case default + _ASSERT_RC(.false.,'missing dust emission scheme. Allowed: ginoux, fengsha, k14',ESMF_RC_NOT_IMPL) end select ! Read point emissions file once per day @@ -769,9 +818,15 @@ subroutine Run1 (GC, import, export, clock, RC) self%day_save = idd call StrTemplate(fname, self%point_emissions_srcfilen, xid='unknown', & nymd=nymd, nhms=120000 ) - call ReadPointEmissions (nymd, fname, self%nPts, self%pLat, self%pLon, & - self%pBase, self%pTop, self%pEmis, self%pStart, & - self%pEnd, label='source', __RC__) + inquire( file=fname, exist=fileExists) + if (fileExists) then + call ReadPointEmissions (nymd, fname, self%nPts, self%pLat, self%pLon, & + self%pBase, self%pTop, self%pEmis, self%pStart, & + self%pEnd, label='source', __RC__) + else if (.not. fileExists) then + if(mapl_am_i_root()) print*,'GOCART2G ',trim(comp_name),': ',trim(fname),' not found; proceeding.' + self%nPts = -1 ! set this back to -1 so the "if (self%nPts > 0)" conditional is not exercised. + end if end if end if @@ -811,10 +866,6 @@ subroutine Run1 (GC, import, export, clock, RC) deallocate(iPoint, jPoint, __STAT__) end if -do n=1,5 - if(mapl_am_i_root()) print*,'n = ', n,' : Run1 E DU2G sum(du00n) = ',sum(DU(:,:,:,n)) -end do - RETURN_(ESMF_SUCCESS) end subroutine Run1 @@ -882,24 +933,18 @@ subroutine Run2 (GC, import, export, clock, RC) #include "DU2G_GetPointer___.h" end associate -do n=1,5 - if(mapl_am_i_root()) print*,'n = ', n,' : Run2 B DU2G sum(du00n) = ',sum(DU(:,:,:,n)) -end do - allocate(dqa, mold=wet1, __STAT__) allocate(drydepositionfrequency, mold=wet1, __STAT__) ! Dust Settling ! ------------- do n = 1, self%nbins - call Chem_Settling2Gorig (self%km, self%klid, self%rhFlag, n, DU(:,:,:,n), MAPL_GRAV, delp, & - self%radius(n)*1.e-6, self%rhop(n), self%cdt, t, airdens, & - rh2, zle, DUSD, correctionMaring=self%maringFlag, __RC__) - end do + 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__) -do n=1,5 - if(mapl_am_i_root()) print*,'n = ', n,' : Run2 chemset DU2G sum(du00n) = ',sum(DU(:,:,:,n)) -end do + + end do ! Dust Deposition ! ---------------- @@ -919,31 +964,25 @@ subroutine Run2 (GC, import, export, clock, RC) end if end do -do n=1,5 - if(mapl_am_i_root()) print*,'n = ', n,' : Run2 drydep DU2G sum(du00n) = ',sum(DU(:,:,:,n)) -end do ! Dust Large-scale Wet Removal ! ---------------------------- KIN = .TRUE. do n = 1, self%nbins - fwet = 0.3 + fwet = 0.8 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 -do n=1,5 - if(mapl_am_i_root()) print*,'n = ', n,' : Run2 E DU2G sum(du00n) = ',sum(DU(:,:,:,n)) -end do - ! Compute diagnostics ! ------------------- ! Certain variables are multiplied by 1.0e-9 to convert from nanometers to meters call Aero_Compute_Diags (self%diag_MieTable(self%instance), self%km, self%klid, 1, self%nbins, self%rlow, & self%rup, self%diag_MieTable(self%instance)%channels*1.0e-9, self%wavelengths_profile*1.0e-9, & self%wavelengths_vertint*1.0e-9, DU, MAPL_GRAV, t, airdens, & - rh2, u, v, delp, DUSMASS, DUCMASS, DUMASS, DUEXTTAU, DUSCATAU, & + rh2, u, v, delp, ple,tropp, & + DUSMASS, DUCMASS, DUMASS, DUEXTTAU, DUSTEXTTAU, DUSCATAU,DUSTSCATAU, & DUSMASS25, DUCMASS25, DUMASS25, DUEXTT25, DUSCAT25, & DUFLUXU, DUFLUXV, DUCONC, DUEXTCOEF, DUSCACOEF, & DUEXTTFM, DUSCATFM, DUANGSTR, DUAERIDX, NO3nFlag=.false., __RC__ ) @@ -1168,5 +1207,131 @@ end subroutine mie_ end subroutine aerosol_optics +!------------------------------------------------------------------------------------- + subroutine monochromatic_aerosol_optics(state, rc) + + implicit none + +! !ARGUMENTS: + type (ESMF_State) :: state + integer, intent(out) :: rc + +! !Local + real, dimension(:,:,:), pointer :: ple, rh + real, dimension(:,:), pointer :: var + real, dimension(:,:,:,:), pointer :: q, q_4d + integer, allocatable :: opaque_self(:) + type(C_PTR) :: address + type(DU2G_GridComp), pointer :: self + + character (len=ESMF_MAXSTR) :: fld_name + type(ESMF_Field) :: fld + + real, dimension(:,:,:), allocatable :: tau_s, tau, x ! (lon:,lat:,lev:) + integer :: instance + integer :: n, nbins, k + integer :: i1, j1, i2, j2, km, i, j + real :: wavelength, mieTable_index + + __Iam__('DU2G::monochromatic_aerosol_optics') + +! Begin... + +! Mie Table instance/index +! ------------------------ + call ESMF_AttributeGet (state, name='mie_table_instance', value=instance, __RC__) + +! Radiation band +! -------------- + wavelength = 0. + call ESMF_AttributeGet (state, name='wavelength_for_aerosol_optics', value=wavelength, __RC__) + +! Get wavelength index for Mie Table +! Channel values are 4.7e-7 5.5e-7 6.7e-7 8.7e-7 [meter]. Their indices are 1,2,3,4 respectively. + if ((wavelength .ge. 4.69e-7) .and. (wavelength .le. 4.71e-7)) then + mieTable_index = 1. + else if ((wavelength .ge. 5.49e-7) .and. (wavelength .le. 5.51e-7)) then + mieTable_index = 2. + else if ((wavelength .ge. 6.69e-7) .and. (wavelength .le. 6.71e-7)) then + mieTable_index = 3. + else if ((wavelength .ge. 8.68e-7) .and. (wavelength .le. 8.71e-7)) then + mieTable_index = 4. + else + print*,trim(Iam),' : wavelength of ',wavelength,' is an invalid value.' + return + end if + +! 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__) + +! call MAPL_GetPointer (state, ple, 'PLE', __RC__) + + i1 = lbound(ple, 1); i2 = ubound(ple, 1) + j1 = lbound(ple, 2); j2 = ubound(ple, 2) + km = ubound(ple, 3) + +! Relative humidity +! ----------------- + call ESMF_AttributeGet (state, name='relative_humidity_for_aerosol_optics', value=fld_name, __RC__) + call MAPL_GetPointer (state, rh, trim(fld_name), __RC__) + +! call MAPL_GetPointer (state, rh, 'RH2', __RC__) + + allocate(tau_s(i1:i2, j1:j2, km), & + tau(i1:i2, j1:j2, km), & + x(i1:i2, j1:j2, km), __STAT__) + tau_s = 0. + tau = 0. + + call ESMF_StateGet (state, 'DU', field=fld, __RC__) + call ESMF_FieldGet (fld, farrayPtr=q, __RC__) + + nbins = size(q,4) + + allocate(q_4d(i1:i2, j1:j2, km, nbins), __STAT__) + q_4d = 0. + + do n = 1, nbins + do k = 1, km + x(:,:,k) = (PLE(:,:,k) - PLE(:,:,k-1)) / MAPL_GRAV + q_4d(:,:,k,n) = x(:,:,k) * q(:,:,k,n) + end do + end do + + call ESMF_AttributeGet(state, name='mieTable_pointer', itemCount=n, __RC__) + allocate (opaque_self(n), __STAT__) + call ESMF_AttributeGet(state, name='mieTable_pointer', valueList=opaque_self, __RC__) + + address = transfer(opaque_self, address) + call c_f_pointer(address, self) + + do n = 1, nbins + do i = 1, i2 + do j = 1, j2 + do k = 1, km + call Chem_MieQuery(self%diag_MieTable(instance), n, mieTable_index, q_4d(i,j,k,n), rh(i,j,k), tau(i,j,k), __RC__) +! call Chem_MieQuery(self%diag_MieTable(instance), n, mieTable_index, q_4d(:,:,:,n), rh, tau, __RC__) + tau_s(i,j,k) = tau_s(i,j,k) + tau(i,j,k) +! tau_s = tau_s + tau + end do + end do + end do + end do + + call ESMF_AttributeGet (state, name='monochromatic_extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = sum(tau_s, dim=3) + end if + + deallocate(q_4d, __STAT__) + + RETURN_(ESMF_SUCCESS) + + end subroutine monochromatic_aerosol_optics + + end module DU2G_GridCompMod diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_DU.data.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_DU.data.rc deleted file mode 100644 index 59749955..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_DU.data.rc +++ /dev/null @@ -1,45 +0,0 @@ -# -# Resource file Dust parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc - -aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc -aerosol_monochromatic_optics_wavelength: 470 550 670 870 ! units: nm - -particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 - -radius_lower: 0.1 1.0 1.8 3.0 6.0 - -radius_upper: 1.0 1.8 3.0 6.0 10.0 - -source_fraction: 0.1 0.25 0.25 0.25 0.25 - -# units [kg/m-3] -soil_density: 2500. 2650. 2650. 2650. 2650. - -# Resolution dependent tuning constant for emissions (a,b,c,d,e,f) -Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 - -# Scavenging efficiency per bin [km-1] -fscav: 0.2 0.2 0.2 0.2 0.2 # - -# 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. - -n_channels: 4 - -r_channels: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 - -nbins: 5 - -#point_emissions_srcfilen: /gpfsm/dnb32/esherman/GOCART_REFACTOR_develop1/RC/dust_point_src_test.rc - diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_DU.rc deleted file mode 100644 index 87254f2b..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_DU.rc +++ /dev/null @@ -1,49 +0,0 @@ -# -# Resource file Dust parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc -aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc - -particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 - -radius_lower: 0.1 1.0 1.8 3.0 6.0 - -radius_upper: 1.0 1.8 3.0 6.0 10.0 - -source_fraction: 0.1 0.25 0.25 0.25 0.25 - -# units [kg/m-3] -particle_density: 2500. 2650. 2650. 2650. 2650. - -# Resolution dependent tuning constant for emissions (a,b,c,d,e,f) -Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 - -# Scavenging efficiency per bin [km-1] -fscav: 0.2 0.2 0.2 0.2 0.2 # - -# 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. - -nbins: 5 - -pressure_lid_in_hPa: 0.01 - -# Emissions methods -emission_scheme: Ginoux # available schemes: Ginoux, FENGSHA - -# FENGSHA settings -alpha: 0.3 -gamma: 1.3 -vertical_to_horizontal_flux_ratio_limit: 2.e-04 - -#point_emissions_srcfilen: /gpfsm/dnb32/esherman/gocartRefactor/RC/CA2G_point_src_test.rc - diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc index e1846dbb..b2c202ff 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_GridComp_ExtData.rc @@ -4,6 +4,15 @@ PrimaryExports%% # Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | # -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| DU_SRC NA N Y - none none du_src ExtData/PIESA/sfc/gocart.dust_source.v5a.x1152_y721.nc +#DU_SRC NA N Y - 0.0 2.0 du_src /discover/nobackup/adarmeno/projects/k14/data/australia.dust_source.v5a.x1152_y721.nc +DU_CLAY NA N Y - none none clay /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SILT NA N Y - none none silt /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SAND NA N Y - none none sand /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_TEXTURE NA N V - none none texture /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_category.x1152_y721_t1.nc4 +DU_VEG NA N V - none none domveg /discover/nobackup/adarmeno/projects/soils/GLDAS/veg20.x1152_y721_t1.nc4 +DU_Z0 NA N Y - none none roughness /discover/nobackup/adarmeno/projects/k14/arlems-roughness.x1151_y720_t1.nc4 + +DU_GVF NA N Y %y4-%m2-%d2t12:00:00 none none gvf /discover/nobackup/projects/gmao/share/gmao_ops/fvInput/g5chem/sfc/NDVI/QVI/qvi-1.0.r3/0.1/QVI/yearly/qvi.006.%y4.nc4 # DU data - 3D climdu001 'kg kg-1' Y N 0 0.0 1.0 du001 ExtData/PIESA/L72/aero_clm/dR_MERRA-AA-r2.aer_Nv.2003_2014.2008clm.nc4 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_Registry.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_Registry.rc deleted file mode 100644 index a57b9289..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_Registry.rc +++ /dev/null @@ -1,115 +0,0 @@ -# -# This the GOCART Grid Component Registry. It defines Import, -# Internal and Export states for this component as well as -# any -# -# !REVISION HISTORY: -# 16Aug2006 da Silva First Version -# -# ----------------------------------------------------------------- - - COMP_NAME: DU2G - -# Only change the Registry version when major structural changes -# occurs, not changes in content -# -------------------------------------------------------------- - GEOS_REGISTRY_VERSION: 1.00 - - -# ------------|------------|-----|---|----|---|---|-----|--------------------------------- -# Short | | | V |Item|Intervl| Sub | Long -# Name | Units | Dim |Loc|Type| R | A |Tiles| Name -# ------------|------------|-----|---|----|---|---|-----|--------------------------------- - DUMASS | kg kg-1 | xyz | C | | | | | Dust Mass Mixing Ratio __ENSEMBLE__ - DUMASS25 | kg kg-1 | xyz | C | | | | | Dust Mass Mixing Ratio - PM 2.5 __ENSEMBLE__ - DUCONC | kg m-3 | xyz | C | | | | | Dust Mass Concentration __ENSEMBLE__ - DUEXTCOEF | m-1 | xyz | C | | | | | Dust Extinction Coefficient [550 nm] __ENSEMBLE__ - DUSCACOEF | m-1 | xyz | C | | | | | Dust Scattering Coefficient [550 nm] __ENSEMBLE__ -# ............|............|.....|...|....|...|...|.....|.................................. - DUEM001 | kg m-2 s-1 | xy | | | | | | Dust Emission Bin 001 __ENSEMBLE__ - DUEM002 | kg m-2 s-1 | xy | | | | | | Dust Emission Bin 002 __ENSEMBLE__ - DUEM003 | kg m-2 s-1 | xy | | | | | | Dust Emission Bin 003 __ENSEMBLE__ - DUEM004 | kg m-2 s-1 | xy | | | | | | Dust Emission Bin 004 __ENSEMBLE__ - DUEM005 | kg m-2 s-1 | xy | | | | | | Dust Emission Bin 005 __ENSEMBLE__ - DUSD001 | kg m-2 s-1 | xy | | | | | | Dust Sedimentation Bin 001 __ENSEMBLE__ - DUSD002 | kg m-2 s-1 | xy | | | | | | Dust Sedimentation Bin 002 __ENSEMBLE__ - DUSD003 | kg m-2 s-1 | xy | | | | | | Dust Sedimentation Bin 003 __ENSEMBLE__ - DUSD004 | kg m-2 s-1 | xy | | | | | | Dust Sedimentation Bin 004 __ENSEMBLE__ - DUSD005 | kg m-2 s-1 | xy | | | | | | Dust Sedimentation Bin 005 __ENSEMBLE__ - DUDP001 | kg m-2 s-1 | xy | | | | | | Dust Dry Deposition Bin 001 __ENSEMBLE__ - DUDP002 | kg m-2 s-1 | xy | | | | | | Dust Dry Deposition Bin 002 __ENSEMBLE__ - DUDP003 | kg m-2 s-1 | xy | | | | | | Dust Dry Deposition Bin 003 __ENSEMBLE__ - DUDP004 | kg m-2 s-1 | xy | | | | | | Dust Dry Deposition Bin 004 __ENSEMBLE__ - DUDP005 | kg m-2 s-1 | xy | | | | | | Dust Dry Deposition Bin 005 __ENSEMBLE__ - DUWT001 | kg m-2 s-1 | xy | | | | | | Dust Wet Deposition Bin 001 __ENSEMBLE__ - DUWT002 | kg m-2 s-1 | xy | | | | | | Dust Wet Deposition Bin 002 __ENSEMBLE__ - DUWT003 | kg m-2 s-1 | xy | | | | | | Dust Wet Deposition Bin 003 __ENSEMBLE__ - DUWT004 | kg m-2 s-1 | xy | | | | | | Dust Wet Deposition Bin 004 __ENSEMBLE__ - DUWT005 | kg m-2 s-1 | xy | | | | | | Dust Wet Deposition Bin 005 __ENSEMBLE__ - DUSV001 | kg m-2 s-1 | xy | | | | | | Dust Convective Scavenging Bin 001 __ENSEMBLE__ - DUSV002 | kg m-2 s-1 | xy | | | | | | Dust Convective Scavenging Bin 002 __ENSEMBLE__ - DUSV003 | kg m-2 s-1 | xy | | | | | | Dust Convective Scavenging Bin 003 __ENSEMBLE__ - DUSV004 | kg m-2 s-1 | xy | | | | | | Dust Convective Scavenging Bin 004 __ENSEMBLE__ - DUSV005 | kg m-2 s-1 | xy | | | | | | Dust Convective Scavenging Bin 005 __ENSEMBLE__ - DUSMASS | kg m-3 | xy | | | | | | Dust Surface Mass Concentration __ENSEMBLE__ - DUCMASS | kg m-2 | xy | | | | | | Dust Column Mass Density __ENSEMBLE__ - DUEXTTAU | 1 | xy | | | | | | Dust Extinction AOT [550 nm] __ENSEMBLE__ - DUSCATAU | 1 | xy | | | | | | Dust Scattering AOT [550 nm] __ENSEMBLE__ - DUSMASS25 | kg m-3 | xy | | | | | | Dust Surface Mass Concentration - PM 2.5 __ENSEMBLE__ - DUCMASS25 | kg m-2 | xy | | | | | | Dust Column Mass Density - PM 2.5 __ENSEMBLE__ - DUEXTT25 | 1 | xy | | | | | | Dust Extinction AOT [550 nm] - PM 2.5 __ENSEMBLE__ - DUSCAT25 | 1 | xy | | | | | | Dust Scattering AOT [550 nm] - PM 2.5 __ENSEMBLE__ - DUAERIDX | 1 | xy | | | | | | Dust TOMS UV Aerosol Index __ENSEMBLE__ - DUFLUXU | kg m-1 s-1 | xy | | | | | | Dust column u-wind mass flux __ENSEMBLE__ - DUFLUXV | kg m-1 s-1 | xy | | | | | | Dust column v-wind mass flux __ENSEMBLE__ - DUEXTTFM | 1 | xy | | | | | | Dust Extinction AOT [550 nm] - PM 1.0 um __ENSEMBLE__ - DUSCATFM | 1 | xy | | | | | | Dust Scattering AOT [550 nm] - PM 1.0 um __ENSEMBLE__ - DUANGSTR | 1 | xy | | | | | | Dust Angstrom parameter [470-870 nm] __ENSEMBLE__ -# ------------|------------|-----|---|----|---|---|-----|--------------------------------- - DUMASSash | kg kg-1 | xyz | C | | | | | Dust Mass Mixing Ratio ash - DUMASS25ash | kg kg-1 | xyz | C | | | | | Dust Mass Mixing Ratio - PM 2.5 ash - DUCONCash | kg m-3 | xyz | C | | | | | Dust Mass Concentration ash - DUEXTCOEFash | m-1 | xyz | C | | | | | Dust Extinction Coefficient [550 nm] ash - DUSCACOEFash | m-1 | xyz | C | | | | | Dust Scattering Coefficient [550 nm] ash -# ............|............|.....|...|....|...|...|.....|.................................. - DUEM001ash | kg m-2 s-1 | xy | | | | | | Dust Emission Bin 001 ash - DUEM002ash | kg m-2 s-1 | xy | | | | | | Dust Emission Bin 002 ash - DUEM003ash | kg m-2 s-1 | xy | | | | | | Dust Emission Bin 003 ash - DUEM004ash | kg m-2 s-1 | xy | | | | | | Dust Emission Bin 004 ash - DUEM005ash | kg m-2 s-1 | xy | | | | | | Dust Emission Bin 005 ash - DUSD001ash | kg m-2 s-1 | xy | | | | | | Dust Sedimentation Bin 001 ash - DUSD002ash | kg m-2 s-1 | xy | | | | | | Dust Sedimentation Bin 002 ash - DUSD003ash | kg m-2 s-1 | xy | | | | | | Dust Sedimentation Bin 003 ash - DUSD004ash | kg m-2 s-1 | xy | | | | | | Dust Sedimentation Bin 004 ash - DUSD005ash | kg m-2 s-1 | xy | | | | | | Dust Sedimentation Bin 005 ash - DUDP001ash | kg m-2 s-1 | xy | | | | | | Dust Dry Deposition Bin 001 ash - DUDP002ash | kg m-2 s-1 | xy | | | | | | Dust Dry Deposition Bin 002 ash - DUDP003ash | kg m-2 s-1 | xy | | | | | | Dust Dry Deposition Bin 003 ash - DUDP004ash | kg m-2 s-1 | xy | | | | | | Dust Dry Deposition Bin 004 ash - DUDP005ash | kg m-2 s-1 | xy | | | | | | Dust Dry Deposition Bin 005 ash - DUWT001ash | kg m-2 s-1 | xy | | | | | | Dust Wet Deposition Bin 001 ash - DUWT002ash | kg m-2 s-1 | xy | | | | | | Dust Wet Deposition Bin 002 ash - DUWT003ash | kg m-2 s-1 | xy | | | | | | Dust Wet Deposition Bin 003 ash - DUWT004ash | kg m-2 s-1 | xy | | | | | | Dust Wet Deposition Bin 004 ash - DUWT005ash | kg m-2 s-1 | xy | | | | | | Dust Wet Deposition Bin 005 ash - DUSV001ash | kg m-2 s-1 | xy | | | | | | Dust Convective Scavenging Bin 001 ash - DUSV002ash | kg m-2 s-1 | xy | | | | | | Dust Convective Scavenging Bin 002 ash - DUSV003ash | kg m-2 s-1 | xy | | | | | | Dust Convective Scavenging Bin 003 ash - DUSV004ash | kg m-2 s-1 | xy | | | | | | Dust Convective Scavenging Bin 004 ash - DUSV005ash | kg m-2 s-1 | xy | | | | | | Dust Convective Scavenging Bin 005 ash - DUSMASSash | kg m-3 | xy | | | | | | Dust Surface Mass Concentration ash - DUCMASSash | kg m-2 | xy | | | | | | Dust Column Mass Density ash - DUEXTTAUash | 1 | xy | | | | | | Dust Extinction AOT [550 nm] ash - DUSCATAUash | 1 | xy | | | | | | Dust Scattering AOT [550 nm] ash - DUSMASS25ash | kg m-3 | xy | | | | | | Dust Surface Mass Concentration - PM 2.5 ash - DUCMASS25ash | kg m-2 | xy | | | | | | Dust Column Mass Density - PM 2.5 ash - DUEXTT25ash | 1 | xy | | | | | | Dust Extinction AOT [550 nm] - PM 2.5 ash - DUSCAT25ash | 1 | xy | | | | | | Dust Scattering AOT [550 nm] - PM 2.5 ash - DUAERIDXash | 1 | xy | | | | | | Dust TOMS UV Aerosol Index ash - DUFLUXUash | kg m-1 s-1 | xy | | | | | | Dust column u-wind mass flux ash - DUFLUXVash | kg m-1 s-1 | xy | | | | | | Dust column v-wind mass flux ash - DUEXTTFMash | 1 | xy | | | | | | Dust Extinction AOT [550 nm] - PM 1.0 um ash - DUSCATFMash | 1 | xy | | | | | | Dust Scattering AOT [550 nm] - PM 1.0 um ash - DUANGSTRash | 1 | xy | | | | | | Dust Angstrom parameter [470-870 nm] ash -# ------------|------------|-----|---|----|---|---|-----|--------------------------------- - diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc index 2aad7660..1b4d6a3a 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_StateSpecs.rc @@ -2,84 +2,104 @@ schema_version: 2.0.0 component: DU category: IMPORT -#---------------------------------------------------------------------------------------- -# VARIABLE | DIMENSIONS| Additional Metadata -#---------------------------------------------------------------------------------------- - NAME | UNITS | DIMS | VLOC| COND | LONG NAME -#---------------------------------------------------------------------------------------- - DU_SRC | 1 | xy | N | scheme == 'ginoux' | erod - dust emissions - DU_CLAY | 1 | xy | N | scheme == 'fengsha' | volume_fraction_of_clay_in_soil - DU_SAND | 1 | xy | N | scheme == 'fengsha' | volume_fraction_of_sand_in_soil - DU_SILT | 1 | xy | N | scheme == 'fengsha' | volume_fraction_of_silt_in_soil - DU_RDRAG | m-1 | xy | N | scheme == 'fengsha' | drag_partition - DU_SSM | 1 | xy | N | scheme == 'fengsha' | sediment_supply_map - DU_UTHRES | m s-1 | xy | N | scheme == 'fengsha' | surface_dry_threshold_velocity - FRSNOW | 1 | xy | N | scheme == 'fengsha' | surface_snow_area_fraction - SLC | 1 | xy | N | scheme == 'fengsha' | liquid_water_content_of_soil_layer - WET1 | 1 | xy | N | | surface_soil_wetness - LWI | 1 | xy | N | | land-ocean-ice_mask - FRLAKE | 1 | xy | N | | fraction_of_lake - U10M | m s-1 | xy | N | | 10-meter_eastward_wind - V10M | m s-1 | xy | N | | 10-meter_northward_wind - AREA | m^2 | xy | N | | agrid_cell_area - USTAR | m s-1 | xy | N | | equivalent_neutral_10-meter_northward_wind - CN_PRCP |kg/m^2/s| xy | N | | surface_conv._rain_flux_needed_by_land - NCN_PRCP |kg/m^2/s| xy | N | | Non-convective precipitation - ZPBL | m | xy | N | | planetary_boundary_layer_height - SH | w m-2 | xy | N | | sensible_heat_flux_from_turbulence - Z0H | m | xy | N | | surface_roughness_for_heat +#------------------------------------------------------------------------------------------ +# VARIABLE | DIMENSIONS | Additional Metadata +#------------------------------------------------------------------------------------------ + NAME | UNITS | DIMS | VLOC | COND | LONG NAME +#------------------------------------------------------------------------------------------ + DU_SRC | 1 | xy | N | scheme == 'ginoux' .OR. scheme == 'k14' | erod - dust emissions + DU_Z0 | 1 | xy | N | scheme == 'k14' | aerodynamic_surface_roughness_for_aeolian_processes + DU_GVF | 1 | xy | N | scheme == 'k14' | GVF + DU_SAND | 1 | xy | N | scheme == 'fengsha' .OR. scheme == 'k14' | volume_fraction_of_sand_in_soil + DU_SILT | 1 | xy | N | scheme == 'fengsha' .OR. scheme == 'k14' | volume_fraction_of_silt_in_soil + DU_CLAY | 1 | xy | N | scheme == 'fengsha' .OR. scheme == 'k14' | volume_fraction_of_clay_in_soil + DU_RDRAG | m-1 | xy | N | scheme == 'fengsha' | drag_partition + DU_SSM | 1 | xy | N | scheme == 'fengsha' | sediment_supply_map + DU_UTHRES | m s-1 | xy | N | scheme == 'fengsha' | surface_dry_threshold_velocity + FRSNOW | 1 | xy | N | scheme == 'fengsha' | surface_snow_area_fraction + SLC | 1 | xy | N | scheme == 'fengsha' | liquid_water_content_of_soil_layer + DU_TEXTURE | 1 | xy | N | scheme == 'k14' | soil_texture + DU_VEG | 1 | xy | N | scheme == 'k14' | vegetation_type + FRLAKE | 1 | xy | N | | fraction_of_lake + FRLAND | 1 | xy | N | scheme == 'k14' | fraction_of_land + ASNOW | 1 | xy | N | scheme == 'k14' | snow_covered_fraction_of_land + WET1 | 1 | xy | N | | surface_soil_wetness + LWI | 1 | xy | N | | land-ocean-ice_mask + TROPP | Pa | xy | N | | tropopause_pressure_based_on_blended_estimate + U10M | m s-1 | xy | N | | 10-meter_eastward_wind + V10M | m s-1 | xy | N | | 10-meter_northward_wind + U10N | m s-1 | xy | N | scheme == 'k14' | equivalent_neutral_10-meter_eastward_wind + V10N | m s-1 | xy | N | scheme == 'k14' | equivalent_neutral_10-meter_northward_wind + AREA | m^2 | xy | N | | agrid_cell_area + USTAR | m s-1 | xy | N | | equivalent_neutral_10-meter_northward_wind + CN_PRCP | kg/m^2/s | xy | N | | surface_conv._rain_flux_needed_by_land + NCN_PRCP | kg/m^2/s | xy | N | | Non-convective precipitation + ZPBL | m | xy | N | | planetary_boundary_layer_height + SH | w m-2 | xy | N | | sensible_heat_flux_from_turbulence + Z0H | m | xy | N | | surface_roughness_for_heat + WCSF | m3 m-3 | xy | N | scheme == 'k14' | water_surface_layer + TSOIL1 | K | xy | N | scheme == 'k14' | soil_temperatures_layer_1 + RHOS | kg m-3 | xy | N | scheme == 'k14' | air_density_at_surface #........................................................................................ - AIRDENS | kg/m^3 | xyz | C | | moist_air_density - DELP | Pa | xyz | C | | pressure_thickness - RH2 | 1 | xyz | C | | Rel_Hum_after_moist - T | K | xyz | C | | air_temperature - ZLE | m | xyz | E | | geopotential_height - PLE | Pa | xyz | E | | air_pressure - PFL_LSAN | kg/m2/s| xyz | E | | 3D_flux_of_liquid_nonconvective_precipitation - PFI_LSAN | kg/m2/s| xyz | E | | 3D_flux_of_ice_nonconvective_precipitation - U | m s-1 | xyz | C | | eastward_wind - V | m s-1 | xyz | C | | northward_wind + AIRDENS | kg/m^3 | xyz | C | | moist_air_density + DELP | Pa | xyz | C | | pressure_thickness + RH2 | 1 | xyz | C | | Rel_Hum_after_moist + T | K | xyz | C | | air_temperature + ZLE | m | xyz | E | | geopotential_height + PLE | Pa | xyz | E | | air_pressure + PFL_LSAN | kg/m2/s | xyz | E | | 3D_flux_of_liquid_nonconvective_precipitation + PFI_LSAN | kg/m2/s | xyz | E | | 3D_flux_of_ice_nonconvective_precipitation + U | m s-1 | xyz | C | | eastward_wind + V | m s-1 | xyz | C | | northward_wind category: EXPORT #---------------------------------------------------------------------------------------- -# VARIABLE | DIMENSIONS | Additional Metadata +# 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 [550 nm] - DUSCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Dust Scattering Coefficient [550 nm] + 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 #........................................................................................ - 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 [550 nm] - DUSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Dust Scattering AOT [550 nm] - 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 [550 nm] - PM 2.5 - DUSCAT25 | 1 | xy | N | size(self%wavelengths_vertint) | Dust Scattering AOT [550 nm] - 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 [550 nm] - PM 1.0 um - DUSCATFM | 1 | xy | N | size(self%wavelengths_vertint) | Dust Scattering AOT [550 nm] - 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) + 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 -#---------------------------------------------------------------------------------------- -# VARIABLE | DIMENSION | Additional Metadata -#---------------------------------------------------------------------------------------- - NAME | UNITS | DIMS | VLOC | UNGRIDDED | RESTART | ADD2EXPORT | FRIENDLYTO | LONG NAME -#---------------------------------------------------------------------------------------- - DU |kg kg-1| xyz | C | self%nbins | MAPL_RestartOptional | T | DYNAMICS:TURBULENCE:MOIST | Dust Mixing Ratio (Bin %d) +#-------------------------------------------------------------------------------------------------------------------- +# VARIABLE | DIMENSION | Additional Metadata +#-------------------------------------------------------------------------------------------------------------------- + NAME | UNITS | DIMS | VLOC | UNGRIDDED | RESTART | ADD2EXPORT | FRIENDLYTO | LONG NAME +#-------------------------------------------------------------------------------------------------------------------- + DU |kg kg-1| xyz | C | self%nbins | MAPL_RestartOptional | T | DYNAMICS:TURBULENCE:MOIST | Dust Mixing Ratio (Bin %d) diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc new file mode 100644 index 00000000..b77d2992 --- /dev/null +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/DU2G_instance_DU.rc @@ -0,0 +1,62 @@ +# +# Resource file Dust parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc +aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc + +particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 + +radius_lower: 0.1 1.0 1.8 3.0 6.0 + +radius_upper: 1.0 1.8 3.0 6.0 10.0 + +# units [kg/m-3] +particle_density: 2500. 2650. 2650. 2650. 2650. + +# Emission scheme +# --------------- +emission_scheme: ginoux +source_fraction: 0.0435465 0.106903 0.220117 0.484606 0.144828 +Ch_DU: 0.2 0.2 0.08 0.15 0.08 0.067 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) +#Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 #original values +#source_fraction: 0.1 0.25 0.25 0.25 0.25 +#---------------- +#emission_scheme: k14 +#source_fraction: 0.043 0.106 0.219 0.485 0.144 +#Ch_DU: 0.02 0.02 0.02 0.0161 0.015 0.015 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) + +# Threshold friction velocity parameter 'gamma' +uts_gamma: 1.65e-4 + +# Formulation of the clay and silt factor in K14 that modulates the strength of the dust emissions +clayFlag: 1 # 0 - original K14, 1 - I&K2017, 2 - I&K2017 + +# soil mosture scaling factor +soil_moisture_factor: 0.8 + +# clay fraction scaling factor +soil_clay_factor: 1.0 + +# Scavenging efficiency per bin [km-1] +fscav: 0.2 0.2 0.2 0.2 0.2 + +# 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. + +nbins: 5 + +pressure_lid_in_hPa: 0.01 + +# FENGSHA settings +alpha: 0.3 +gamma: 1.3 +vertical_to_horizontal_flux_ratio_limit: 2.e-04 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2-DD/DU2G_GridComp_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2-DD/DU2G_GridComp_DU.rc deleted file mode 100644 index 6389405c..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2-DD/DU2G_GridComp_DU.rc +++ /dev/null @@ -1,43 +0,0 @@ -# -# Resource file Dust parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc - -aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 - -radius_lower: 0.1 1.0 1.8 3.0 6.0 - -radius_upper: 1.0 1.8 3.0 6.0 10.0 - -source_fraction: 0.1 0.25 0.25 0.25 0.25 - -# units [kg/m-3] -particle_density: 2500. 2650. 2650. 2650. 2650. - -# Resolution dependent tuning constant for emissions (a,b,c,d,e,f) -Ch_DU: 0.2 0.2 0.08 0.08 0.08 0.067 - -# Scavenging efficiency per bin [km-1] -fscav: 0.2 0.2 0.2 0.2 0.2 # - -# 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: .false. - -nbins: 5 - -pressure_lid_in_hPa: 0.01 - - diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2-DD/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2-DD/DU2G_GridComp_ExtData.rc index e1846dbb..b2c202ff 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2-DD/DU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2-DD/DU2G_GridComp_ExtData.rc @@ -4,6 +4,15 @@ PrimaryExports%% # Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | # -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| DU_SRC NA N Y - none none du_src ExtData/PIESA/sfc/gocart.dust_source.v5a.x1152_y721.nc +#DU_SRC NA N Y - 0.0 2.0 du_src /discover/nobackup/adarmeno/projects/k14/data/australia.dust_source.v5a.x1152_y721.nc +DU_CLAY NA N Y - none none clay /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SILT NA N Y - none none silt /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SAND NA N Y - none none sand /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_TEXTURE NA N V - none none texture /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_category.x1152_y721_t1.nc4 +DU_VEG NA N V - none none domveg /discover/nobackup/adarmeno/projects/soils/GLDAS/veg20.x1152_y721_t1.nc4 +DU_Z0 NA N Y - none none roughness /discover/nobackup/adarmeno/projects/k14/arlems-roughness.x1151_y720_t1.nc4 + +DU_GVF NA N Y %y4-%m2-%d2t12:00:00 none none gvf /discover/nobackup/projects/gmao/share/gmao_ops/fvInput/g5chem/sfc/NDVI/QVI/qvi-1.0.r3/0.1/QVI/yearly/qvi.006.%y4.nc4 # DU data - 3D climdu001 'kg kg-1' Y N 0 0.0 1.0 du001 ExtData/PIESA/L72/aero_clm/dR_MERRA-AA-r2.aer_Nv.2003_2014.2008clm.nc4 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2-DD/DU2G_instance_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2-DD/DU2G_instance_DU.rc new file mode 100644 index 00000000..a8d24c14 --- /dev/null +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2-DD/DU2G_instance_DU.rc @@ -0,0 +1,58 @@ +# +# Resource file Dust parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc +aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc + +particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 + +radius_lower: 0.1 1.0 1.8 3.0 6.0 + +radius_upper: 1.0 1.8 3.0 6.0 10.0 + +# units [kg/m-3] +particle_density: 2500. 2650. 2650. 2650. 2650. + +# Emission scheme +# --------------- +emission_scheme: ginoux +source_fraction: 0.0435465 0.106903 0.220117 0.484606 0.144828 +Ch_DU: 0.2 0.2 0.08 0.15 0.08 0.067 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) +#Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 #original values +#source_fraction: 0.1 0.25 0.25 0.25 0.25 +#---------------- +#emission_scheme: k14 +#source_fraction: 0.043 0.106 0.219 0.485 0.144 +#Ch_DU: 0.02 0.02 0.02 0.0161 0.015 0.015 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) + +# Threshold friction velocity parameter 'gamma' +uts_gamma: 1.65e-4 + +# Formulation of the clay and silt factor in K14 that modulates the strength of the dust emissions +clayFlag: 1 # 0 - original K14, 1 - I&K2017, 2 - I&K2017 + +# soil mosture scaling factor +soil_moisture_factor: 0.8 + +# clay fraction scaling factor +soil_clay_factor: 1.0 + +# Scavenging efficiency per bin [km-1] +fscav: 0.2 0.2 0.2 0.2 0.2 + +# 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. + +nbins: 5 + +pressure_lid_in_hPa: 0.01 + diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2/DU2G_GridComp_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2/DU2G_GridComp_DU.rc deleted file mode 100644 index fe6c04a9..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2/DU2G_GridComp_DU.rc +++ /dev/null @@ -1,43 +0,0 @@ -# -# Resource file Dust parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc - -aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 - -radius_lower: 0.1 1.0 1.8 3.0 6.0 - -radius_upper: 1.0 1.8 3.0 6.0 10.0 - -source_fraction: 0.1 0.25 0.25 0.25 0.25 - -# units [kg/m-3] -particle_density: 2500. 2650. 2650. 2650. 2650. - -# Resolution dependent tuning constant for emissions (a,b,c,d,e,f) -Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 - -# Scavenging efficiency per bin [km-1] -fscav: 0.2 0.2 0.2 0.2 0.2 # - -# 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. - -nbins: 5 - -pressure_lid_in_hPa: 0.01 - - diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2/DU2G_GridComp_ExtData.rc index e1846dbb..b2c202ff 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2/DU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2/DU2G_GridComp_ExtData.rc @@ -4,6 +4,15 @@ PrimaryExports%% # Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | # -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| DU_SRC NA N Y - none none du_src ExtData/PIESA/sfc/gocart.dust_source.v5a.x1152_y721.nc +#DU_SRC NA N Y - 0.0 2.0 du_src /discover/nobackup/adarmeno/projects/k14/data/australia.dust_source.v5a.x1152_y721.nc +DU_CLAY NA N Y - none none clay /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SILT NA N Y - none none silt /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SAND NA N Y - none none sand /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_TEXTURE NA N V - none none texture /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_category.x1152_y721_t1.nc4 +DU_VEG NA N V - none none domveg /discover/nobackup/adarmeno/projects/soils/GLDAS/veg20.x1152_y721_t1.nc4 +DU_Z0 NA N Y - none none roughness /discover/nobackup/adarmeno/projects/k14/arlems-roughness.x1151_y720_t1.nc4 + +DU_GVF NA N Y %y4-%m2-%d2t12:00:00 none none gvf /discover/nobackup/projects/gmao/share/gmao_ops/fvInput/g5chem/sfc/NDVI/QVI/qvi-1.0.r3/0.1/QVI/yearly/qvi.006.%y4.nc4 # DU data - 3D climdu001 'kg kg-1' Y N 0 0.0 1.0 du001 ExtData/PIESA/L72/aero_clm/dR_MERRA-AA-r2.aer_Nv.2003_2014.2008clm.nc4 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2/DU2G_instance_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2/DU2G_instance_DU.rc new file mode 100644 index 00000000..68c99a86 --- /dev/null +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/MERRA2/DU2G_instance_DU.rc @@ -0,0 +1,58 @@ +# +# Resource file Dust parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc +aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc + +particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 + +radius_lower: 0.1 1.0 1.8 3.0 6.0 + +radius_upper: 1.0 1.8 3.0 6.0 10.0 + +# units [kg/m-3] +particle_density: 2500. 2650. 2650. 2650. 2650. + +# Emission scheme +# --------------- +emission_scheme: ginoux +source_fraction: 0.0435465 0.106903 0.220117 0.484606 0.144828 +Ch_DU: 0.2 0.2 0.08 0.15 0.08 0.067 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) +#Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 #original values +#source_fraction: 0.1 0.25 0.25 0.25 0.25 +#---------------- +#emission_scheme: k14 +#source_fraction: 0.043 0.106 0.219 0.485 0.144 +#Ch_DU: 0.02 0.02 0.02 0.0161 0.015 0.015 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) + +# Threshold friction velocity parameter 'gamma' +uts_gamma: 1.65e-4 + +# Formulation of the clay and silt factor in K14 that modulates the strength of the dust emissions +clayFlag: 1 # 0 - original K14, 1 - I&K2017, 2 - I&K2017 + +# soil mosture scaling factor +soil_moisture_factor: 0.8 + +# clay fraction scaling factor +soil_clay_factor: 1.0 + +# Scavenging efficiency per bin [km-1] +fscav: 0.2 0.2 0.2 0.2 0.2 + +# 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. + +nbins: 5 + +pressure_lid_in_hPa: 0.01 + diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/NR/DU2G_GridComp_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/NR/DU2G_GridComp_DU.rc deleted file mode 100644 index fdfab083..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/NR/DU2G_GridComp_DU.rc +++ /dev/null @@ -1,43 +0,0 @@ -# -# Resource file Dust parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc - -aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 - -radius_lower: 0.1 1.0 1.8 3.0 6.0 - -radius_upper: 1.0 1.8 3.0 6.0 10.0 - -source_fraction: 0.1 0.25 0.25 0.25 0.25 - -# units [kg/m-3] -particle_density: 2500. 2650. 2650. 2650. 2650. - -# Resolution dependent tuning constant for emissions (a,b,c,d,e,f) -Ch_DU: 0.2 0.2 0.08 0.08 0.08 0.067 - -# Scavenging efficiency per bin [km-1] -fscav: 0.2 0.2 0.2 0.2 0.2 # - -# 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. - -nbins: 5 - -pressure_lid_in_hPa: 0.01 - - diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/NR/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/NR/DU2G_GridComp_ExtData.rc index e1846dbb..b2c202ff 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/NR/DU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/NR/DU2G_GridComp_ExtData.rc @@ -4,6 +4,15 @@ PrimaryExports%% # Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | # -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| DU_SRC NA N Y - none none du_src ExtData/PIESA/sfc/gocart.dust_source.v5a.x1152_y721.nc +#DU_SRC NA N Y - 0.0 2.0 du_src /discover/nobackup/adarmeno/projects/k14/data/australia.dust_source.v5a.x1152_y721.nc +DU_CLAY NA N Y - none none clay /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SILT NA N Y - none none silt /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SAND NA N Y - none none sand /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_TEXTURE NA N V - none none texture /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_category.x1152_y721_t1.nc4 +DU_VEG NA N V - none none domveg /discover/nobackup/adarmeno/projects/soils/GLDAS/veg20.x1152_y721_t1.nc4 +DU_Z0 NA N Y - none none roughness /discover/nobackup/adarmeno/projects/k14/arlems-roughness.x1151_y720_t1.nc4 + +DU_GVF NA N Y %y4-%m2-%d2t12:00:00 none none gvf /discover/nobackup/projects/gmao/share/gmao_ops/fvInput/g5chem/sfc/NDVI/QVI/qvi-1.0.r3/0.1/QVI/yearly/qvi.006.%y4.nc4 # DU data - 3D climdu001 'kg kg-1' Y N 0 0.0 1.0 du001 ExtData/PIESA/L72/aero_clm/dR_MERRA-AA-r2.aer_Nv.2003_2014.2008clm.nc4 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/NR/DU2G_instance_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/NR/DU2G_instance_DU.rc new file mode 100644 index 00000000..a8d24c14 --- /dev/null +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/NR/DU2G_instance_DU.rc @@ -0,0 +1,58 @@ +# +# Resource file Dust parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc +aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc + +particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 + +radius_lower: 0.1 1.0 1.8 3.0 6.0 + +radius_upper: 1.0 1.8 3.0 6.0 10.0 + +# units [kg/m-3] +particle_density: 2500. 2650. 2650. 2650. 2650. + +# Emission scheme +# --------------- +emission_scheme: ginoux +source_fraction: 0.0435465 0.106903 0.220117 0.484606 0.144828 +Ch_DU: 0.2 0.2 0.08 0.15 0.08 0.067 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) +#Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 #original values +#source_fraction: 0.1 0.25 0.25 0.25 0.25 +#---------------- +#emission_scheme: k14 +#source_fraction: 0.043 0.106 0.219 0.485 0.144 +#Ch_DU: 0.02 0.02 0.02 0.0161 0.015 0.015 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) + +# Threshold friction velocity parameter 'gamma' +uts_gamma: 1.65e-4 + +# Formulation of the clay and silt factor in K14 that modulates the strength of the dust emissions +clayFlag: 1 # 0 - original K14, 1 - I&K2017, 2 - I&K2017 + +# soil mosture scaling factor +soil_moisture_factor: 0.8 + +# clay fraction scaling factor +soil_clay_factor: 1.0 + +# Scavenging efficiency per bin [km-1] +fscav: 0.2 0.2 0.2 0.2 0.2 + +# 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. + +nbins: 5 + +pressure_lid_in_hPa: 0.01 + diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/PIESA/DU2G_GridComp_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/PIESA/DU2G_GridComp_DU.rc deleted file mode 100644 index 99d3a7ac..00000000 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/PIESA/DU2G_GridComp_DU.rc +++ /dev/null @@ -1,43 +0,0 @@ -# -# Resource file Dust parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc - -aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 - -radius_lower: 0.1 1.0 1.8 3.0 6.0 - -radius_upper: 1.0 1.8 3.0 6.0 10.0 - -source_fraction: 0.1 0.25 0.25 0.25 0.25 - -# units [kg/m-3] -particle_density: 2500. 2650. 2650. 2650. 2650. - -# Resolution dependent tuning constant for emissions (a,b,c,d,e,f) -Ch_DU: 0.2 0.112 0.095 0.08 0.08 0.067 - -# Scavenging efficiency per bin [km-1] -fscav: 0.2 0.2 0.2 0.2 0.2 # - -# 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. - -nbins: 5 - -pressure_lid_in_hPa: 0.01 - - diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/PIESA/DU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/PIESA/DU2G_GridComp_ExtData.rc index e1846dbb..b2c202ff 100644 --- a/ESMF/GOCART2G_GridComp/DU2G_GridComp/PIESA/DU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/PIESA/DU2G_GridComp_ExtData.rc @@ -4,6 +4,15 @@ PrimaryExports%% # Name | Units | Clim | Method | Time Template | Factor | Factor | File | Template | # -------------|-------|-------|--------|----------------------|--------|--------|-------------|----------| DU_SRC NA N Y - none none du_src ExtData/PIESA/sfc/gocart.dust_source.v5a.x1152_y721.nc +#DU_SRC NA N Y - 0.0 2.0 du_src /discover/nobackup/adarmeno/projects/k14/data/australia.dust_source.v5a.x1152_y721.nc +DU_CLAY NA N Y - none none clay /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SILT NA N Y - none none silt /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_SAND NA N Y - none none sand /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_texture.x1152_y721_t1.nc4 +DU_TEXTURE NA N V - none none texture /discover/nobackup/adarmeno/projects/soils/GLDAS/_gldas-fao.soil_category.x1152_y721_t1.nc4 +DU_VEG NA N V - none none domveg /discover/nobackup/adarmeno/projects/soils/GLDAS/veg20.x1152_y721_t1.nc4 +DU_Z0 NA N Y - none none roughness /discover/nobackup/adarmeno/projects/k14/arlems-roughness.x1151_y720_t1.nc4 + +DU_GVF NA N Y %y4-%m2-%d2t12:00:00 none none gvf /discover/nobackup/projects/gmao/share/gmao_ops/fvInput/g5chem/sfc/NDVI/QVI/qvi-1.0.r3/0.1/QVI/yearly/qvi.006.%y4.nc4 # DU data - 3D climdu001 'kg kg-1' Y N 0 0.0 1.0 du001 ExtData/PIESA/L72/aero_clm/dR_MERRA-AA-r2.aer_Nv.2003_2014.2008clm.nc4 diff --git a/ESMF/GOCART2G_GridComp/DU2G_GridComp/PIESA/DU2G_instance_DU.rc b/ESMF/GOCART2G_GridComp/DU2G_GridComp/PIESA/DU2G_instance_DU.rc new file mode 100644 index 00000000..a8d24c14 --- /dev/null +++ b/ESMF/GOCART2G_GridComp/DU2G_GridComp/PIESA/DU2G_instance_DU.rc @@ -0,0 +1,58 @@ +# +# Resource file Dust parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_DU.v15_3.RRTMG.nc +aerosol_monochromatic_optics_file:ExtData/AeroCom/x/optics_DU.v15_3.nc + +particle_radius_microns: 0.73 1.4 2.4 4.5 8.0 + +radius_lower: 0.1 1.0 1.8 3.0 6.0 + +radius_upper: 1.0 1.8 3.0 6.0 10.0 + +# units [kg/m-3] +particle_density: 2500. 2650. 2650. 2650. 2650. + +# Emission scheme +# --------------- +emission_scheme: ginoux +source_fraction: 0.0435465 0.106903 0.220117 0.484606 0.144828 +Ch_DU: 0.2 0.2 0.08 0.15 0.08 0.067 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) +#Ch_DU: 0.2 0.2 0.07 0.07 0.07 0.056 #original values +#source_fraction: 0.1 0.25 0.25 0.25 0.25 +#---------------- +#emission_scheme: k14 +#source_fraction: 0.043 0.106 0.219 0.485 0.144 +#Ch_DU: 0.02 0.02 0.02 0.0161 0.015 0.015 # resolution dependent tuning constant for emissions (a,b,c,d,e,f) + +# Threshold friction velocity parameter 'gamma' +uts_gamma: 1.65e-4 + +# Formulation of the clay and silt factor in K14 that modulates the strength of the dust emissions +clayFlag: 1 # 0 - original K14, 1 - I&K2017, 2 - I&K2017 + +# soil mosture scaling factor +soil_moisture_factor: 0.8 + +# clay fraction scaling factor +soil_clay_factor: 1.0 + +# Scavenging efficiency per bin [km-1] +fscav: 0.2 0.2 0.2 0.2 0.2 + +# 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. + +nbins: 5 + +pressure_lid_in_hPa: 0.01 + diff --git a/ESMF/GOCART2G_GridComp/GA_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/GA_Environment/CMakeLists.txt similarity index 100% rename from ESMF/GOCART2G_GridComp/GA_GridComp/CMakeLists.txt rename to ESMF/GOCART2G_GridComp/GA_Environment/CMakeLists.txt diff --git a/ESMF/GOCART2G_GridComp/GA_GridComp/GA_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90 similarity index 94% rename from ESMF/GOCART2G_GridComp/GA_GridComp/GA_GridCompMod.F90 rename to ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90 index b7a5ab49..487f493f 100644 --- a/ESMF/GOCART2G_GridComp/GA_GridComp/GA_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/GA_Environment/GA_EnvironmentMod.F90 @@ -1,6 +1,6 @@ #include "MAPL_Generic.h" -module GA_GridCompMod +module GA_EnvironmentMod use ESMF use MAPL @@ -9,9 +9,9 @@ module GA_GridCompMod implicit none private - public :: GA_GridComp + public :: GA_Environment - type :: GA_GridComp + type :: GA_Environment type(Chem_Mie), dimension(2) :: rad_MieTable, diag_MieTable real, allocatable :: radius(:) ! particle effective radius [um] real, allocatable :: rhop(:) ! soil class density [kg m-3] @@ -30,7 +30,7 @@ module GA_GridCompMod real, allocatable :: wavelengths_vertint(:) ! wavelengths for vertically integrated aop [nm] contains procedure :: load_from_config - end type GA_GridComp + end type GA_Environment !LOCALS @@ -42,7 +42,7 @@ module GA_GridCompMod subroutine load_from_config(self, cfg, universal_cfg, rc) - class(GA_GridComp), intent(inout) :: self + class(GA_Environment), intent(inout) :: self type(ESMF_Config), intent(inout) :: cfg type(ESMF_Config), intent(inout) :: universal_cfg integer, optional, intent(out) :: rc @@ -74,4 +74,4 @@ subroutine load_from_config(self, cfg, universal_cfg, rc) end subroutine load_from_config -end module GA_GridCompMod +end module GA_EnvironmentMod diff --git a/ESMF/GOCART2G_GridComp/GOCART2G_GridComp.rc b/ESMF/GOCART2G_GridComp/GOCART2G_GridComp.rc index bbd7a3be..79d5d8f3 100644 --- a/ESMF/GOCART2G_GridComp/GOCART2G_GridComp.rc +++ b/ESMF/GOCART2G_GridComp/GOCART2G_GridComp.rc @@ -28,7 +28,7 @@ PASSIVE_INSTANCES_SS: ACTIVE_INSTANCES_SU: SU #SU.data PASSIVE_INSTANCES_SU: -ACTIVE_INSTANCES_CA: CA.oc CA.bc #CA.br #CA.oc.data CA.bc.datac +ACTIVE_INSTANCES_CA: CA.oc CA.bc CA.br #CA.oc.data CA.bc.datac PASSIVE_INSTANCES_CA: ACTIVE_INSTANCES_NI: NI #NI.data @@ -36,10 +36,8 @@ PASSIVE_INSTANCES_NI: # Set optics parameters # --------------------- -aerosol_monochromatic_optics_wavelength: 470 550 670 870 # units:nm - -wavelengths_for_profile_aop_in_nm: 470 550 870 -wavelengths_for_vertically_integrated_aop_in_nm: 470 550 670 870 - +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 diff --git a/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 index 15b1625b..3b5bd054 100644 --- a/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/GOCART2G_GridCompMod.F90 @@ -144,20 +144,20 @@ subroutine SetServices (GC, RC) ! Retrieve wavelengths from GOCART2G_GridComp.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:', __RC__) + n_wavelengths_diagmie = ESMF_ConfigGetLen (myCF, label='aerosol_monochromatic_optics_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__) 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:', __RC__) + call ESMF_ConfigGetAttribute (myCF, wavelengths_diagmie, label='aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:', __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:', __RC__) + call MAPL_ConfigSetAttribute (cf, wavelengths_diagmie, label='aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:', __RC__) ! Get instances to determine what children will be born ! ----------------------------------------------------- @@ -181,28 +181,17 @@ subroutine SetServices (GC, RC) ! Define EXPORT states -! This state is needed by radiation - It will contain -! aerosols and aerosol optics +! This state is needed by radiation and moist. It contains +! aerosols and callback methods ! -------------------------------------------------------- call MAPL_AddExportSpec(GC, & - short_name = 'AERO_RAD', & + short_name = 'AERO', & long_name = 'aerosol_mass_mixing_ratios_ng', & units = 'kg kg-1', & dims = MAPL_DimsHorzVert, & vlocation = MAPL_VLocationCenter, & datatype = MAPL_StateItem, __RC__) -! This state is needed by MOIST - It will contain -! aerosols -! -------------------------------------------------------- - call MAPL_AddExportSpec(GC, & - short_name = 'AERO_ACI', & - long_name = 'aerosol_cloud_interaction_ng', & - units = 'kg kg-1', & - dims = MAPL_DimsHorzVert, & - vlocation = MAPL_VLocationCenter, & - datatype = MAPL_StateItem, __RC__) - ! This bundle is needed by surface for snow albedo modification ! by aerosol settling and deposition ! -------------------------------------------------------- @@ -214,49 +203,6 @@ subroutine SetServices (GC, RC) datatype = MAPL_BundleItem, __RC__) -! Set children's variables as exports from GOCART2G -! to satisfy connections in GEOS_ChemGridComp.F90. -! Currently only supports one instance. -! ------------------------------------------------- - call MAPL_AddExportSpec(GC, & - short_name = 'DU', & - child_id = self%DU%instances(1)%id, __RC__) - - call MAPL_AddExportSpec(GC, & - short_name = 'SS', & - child_id = self%SS%instances(1)%id, __RC__) - - call MAPL_AddExportSpec(GC, & - short_name = 'NO3an1', & - child_id = self%NI%instances(1)%id, __RC__) - - call MAPL_AddExportSpec(GC, & - short_name = 'NO3an2', & - child_id = self%NI%instances(1)%id, __RC__) - - call MAPL_AddExportSpec(GC, & - short_name = 'NO3an3', & - child_id = self%NI%instances(1)%id, __RC__) - - call MAPL_AddExportSpec(GC, & - short_name = 'SO4', & - child_id = self%SU%instances(1)%id, __RC__) - -! CA %instances(n) pertains to the instances specified in GOCART2G_GridComp.rc - call MAPL_AddExportSpec(GC, & - short_name = 'CAphobicCA.oc', & - child_id = self%CA%instances(1)%id, __RC__) - call MAPL_AddExportSpec(GC, & - short_name = 'CAphilicCA.oc', & - child_id = self%CA%instances(1)%id, __RC__) - - call MAPL_AddExportSpec(GC, & - short_name = 'CAphobicCA.bc', & - child_id = self%CA%instances(2)%id, __RC__) - call MAPL_AddExportSpec(GC, & - short_name = 'CAphilicCA.bc', & - child_id = self%CA%instances(2)%id, __RC__) - #include "GOCART2G_Export___.h" @@ -325,14 +271,15 @@ subroutine Initialize (GC, import, export, clock, RC) type (ESMF_Grid) :: grid type (ESMF_Config) :: CF - type (ESMF_State) :: aero, aero_aci + type (ESMF_State) :: aero type (ESMF_FieldBundle) :: aero_dp type (GOCART_State), pointer :: self type (wrap_) :: wrap integer :: n_modes - integer, parameter :: n_gocart_modes = 13 + integer, parameter :: n_gocart_modes = 14 + integer :: dims(3) character(len=ESMF_MAXSTR) :: aero_aci_modes(n_gocart_modes) real :: f_aci_seasalt, maxclean, ccntuning @@ -357,6 +304,8 @@ subroutine Initialize (GC, import, export, clock, RC) ! ----------------------------------- call MAPL_GetObjectFromGC (GC, MAPL, __RC__) + call MAPL_GridGet ( grid, localCellCountPerDim=dims, __RC__ ) + ! Call Generic Initialize ! ---------------------------------------- call MAPL_GenericInitialize (GC, import, export, clock, __RC__) @@ -377,9 +326,8 @@ subroutine Initialize (GC, import, export, clock, RC) ! Fill AERO_RAD, AERO_ACI, and AERO_DP with the children's states ! --------------------------------------------------------------- - call ESMF_StateGet (export, 'AERO_RAD' , aero , __RC__) - call ESMF_StateGet (export, 'AERO_ACI' , aero_aci , __RC__) - call ESMF_StateGet (export, 'AERO_DP' , aero_dp , __RC__) + call ESMF_StateGet (export, 'AERO', aero, __RC__) + call ESMF_StateGet (export, 'AERO_DP', aero_dp, __RC__) ! Add children's AERO states to GOCART2G's AERO states @@ -394,18 +342,53 @@ subroutine Initialize (GC, import, export, clock, RC) ! Begin AERO_RAD ! -------------- ! Add variables to AERO_RAD state. Used in aerosol optics calculations - 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 add_aero (aero, label='extinction_in_air_due_to_ambient_aerosol', label2='EXT', grid=grid, typekind=MAPL_R4, __RC__) - call add_aero (aero, label='single_scattering_albedo_of_ambient_aerosol', label2='SSA', 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_AttributeSet(aero, name='band_for_aerosol_optics', value=0, __RC__) - -! Attach method to create a Bundle of aerosol fields used in GAAS + 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 add_aero (aero, label='extinction_in_air_due_to_ambient_aerosol', label2='EXT', & + grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='single_scattering_albedo_of_ambient_aerosol', label2='SSA', & + 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 add_aero (aero, label='monochromatic_extinction_in_air_due_to_ambient_aerosol', & + label2='monochromatic_EXT', grid=grid, typekind=MAPL_R4, __RC__) + +! Used in get_mixRatioSum + call add_aero (aero, label='sum_of_internalState_aerosol_DU', label2='aerosolSumDU', & + grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='sum_of_internalState_aerosol_SS', label2='aerosolSumSS', & + grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='sum_of_internalState_aerosol_NI', label2='aerosolSumNI', & + grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='sum_of_internalState_aerosol_CA.oc', label2='aerosolSumCA.oc', & + grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='sum_of_internalState_aerosol_CA.bc', label2='aerosolSumCA.bc', & + grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='sum_of_internalState_aerosol_CA.br', label2='aerosolSumCA.br', & + grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='sum_of_internalState_aerosol_SU', label2='aerosolSumSU', & + grid=grid, typekind=MAPL_R4, __RC__) + + call ESMF_AttributeSet(aero, name='band_for_aerosol_optics', value=0, __RC__) + call ESMF_AttributeSet(aero, name='wavelength_for_aerosol_optics', value=0., __RC__) + 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__) + call ESMF_AttributeSet(aero, name='km', value=dims(3), __RC__) + +! Attach method to return sum of aerosols. Used in GAAS. + call ESMF_MethodAdd (aero, label='get_mixRatioSum', userRoutine=get_mixRatioSum, __RC__) + +! Attach method to create a Bundle of aerosol fields. Used in GAAS. call ESMF_MethodAdd (aero, label='serialize_bundle', userRoutine=serialize_bundle, __RC__) -! Attach the aerosol optics method used in Radiation +! Attach the monochromatic aerosol optics method. Used in GAAS. + call ESMF_MethodAdd (aero, label='get_monochromatic_aop', & + userRoutine=get_monochromatic_aop, __RC__) + +! Attach the aerosol optics method. Used in Radiation. call ESMF_MethodAdd (aero, label='run_aerosol_optics', userRoutine=run_aerosol_optics, __RC__) ! This attribute indicates if the aerosol optics method is implemented or not. @@ -413,54 +396,52 @@ subroutine Initialize (GC, import, export, clock, RC) ! explicitly set to true. call ESMF_AttributeSet(aero, name='implements_aerosol_optics_method', value=.true., __RC__) -! Begin AERO_ACI -! -------------- +! Begin adding necessary aerosol cloud interaction information +! ------------------------------------------------------------ aero_aci_modes = (/'du001 ', 'du002 ', 'du003 ', & 'du004 ', 'du005 ', & 'ss001 ', 'ss002 ', 'ss003 ', & 'sulforg01', 'sulforg02', 'sulforg03', & - 'bcphilic ', 'ocphilic '/) + 'bcphilic ', 'ocphilic ', 'brcphilic'/) n_modes = size(aero_aci_modes) - call ESMF_AttributeSet(aero_aci, name='number_of_aerosol_modes', value=n_modes, __RC__) - call ESMF_AttributeSet(aero_aci, name='aerosol_modes', itemcount=n_modes, valuelist=aero_aci_modes, __RC__) + call ESMF_AttributeSet(aero, name='number_of_aerosol_modes', value=n_modes, __RC__) + call ESMF_AttributeSet(aero, name='aerosol_modes', itemcount=n_modes, valuelist=aero_aci_modes, __RC__) ! max mixing ratio before switching to "polluted" size distributions call ESMF_ConfigGetAttribute(CF, maxclean, default=1.0e-9, label='MAXCLEAN:', __RC__) - call ESMF_AttributeSet(aero_aci, name='max_q_clean', value=maxclean, __RC__) + call ESMF_AttributeSet(aero, name='max_q_clean', value=maxclean, __RC__) call ESMF_ConfigGetAttribute(CF, CCNtuning, default=1.8, label='CCNTUNING:', __RC__) - call ESMF_AttributeSet(aero_aci, name='ccn_tuning', value=CCNtuning, __RC__) + call ESMF_AttributeSet(aero, name='ccn_tuning', value=CCNtuning, __RC__) call ESMF_ConfigGetAttribute( CF, CLDMICRO, Label='CLDMICRO:', default="1MOMENT", RC=STATUS) - call ESMF_AttributeSet(aero_aci, name='cldmicro', value=CLDMICRO, __RC__) + call ESMF_AttributeSet(aero, name='cldmicro', value=CLDMICRO, __RC__) ! scaling factor for sea salt if(adjustl(CLDMICRO)=="2MOMENT") then call ESMF_ConfigGetAttribute(CF, f_aci_seasalt, default=4.0, label='SS_SCALE:', __RC__) - call ESMF_AttributeSet(aero_aci, name='seasalt_scaling_factor', value=f_aci_seasalt, __RC__) + call ESMF_AttributeSet(aero, name='seasalt_scaling_factor', value=f_aci_seasalt, __RC__) else - ! scaling factor for sea salt call ESMF_ConfigGetAttribute(CF, f_aci_seasalt, default=14.0, label='SS_SCALE:', __RC__) - call ESMF_AttributeSet(aero_aci, name='seasalt_scaling_factor', value=f_aci_seasalt, __RC__) + call ESMF_AttributeSet(aero, name='seasalt_scaling_factor', value=f_aci_seasalt, __RC__) endif -! Add variables to AERO_ACI state. - call add_aero (aero_aci, label='air_pressure', label2='PLE', grid=grid, typekind=MAPL_R4, __RC__) - call add_aero (aero_aci, label='air_temperature', label2='T', grid=grid, typekind=MAPL_R4, __RC__) - call add_aero (aero_aci, label='fraction_of_land_type', label2='FRLAND', grid=grid, typekind=MAPL_R4, __RC__) - call add_aero (aero_aci, label='width_of_aerosol_mode', label2='SIGMA', grid=grid, typekind=MAPL_R4, __RC__) - call add_aero (aero_aci, label='aerosol_number_concentration',label2='NUM', grid=grid, typekind=MAPL_R4, __RC__) - call add_aero (aero_aci, label='aerosol_dry_size', label2='DGN', grid=grid, typekind=MAPL_R4, __RC__) - call add_aero (aero_aci, label='aerosol_density', label2='density', grid=grid, typekind=MAPL_R4, __RC__) - call add_aero (aero_aci, label='aerosol_hygroscopicity', label2='KAPPA', grid=grid, typekind=MAPL_R4, __RC__) - call add_aero (aero_aci, label='fraction_of_dust_aerosol', label2='FDUST', grid=grid, typekind=MAPL_R4, __RC__) - call add_aero (aero_aci, label='fraction_of_soot_aerosol', label2='FSOOT', grid=grid, typekind=MAPL_R4, __RC__) - call add_aero (aero_aci, label='fraction_of_organic_aerosol', label2='FORGANIC', grid=grid, typekind=MAPL_R4, __RC__) +! Add variables to AERO state + call add_aero (aero, label='air_temperature', label2='T', grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='fraction_of_land_type', label2='FRLAND', grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='width_of_aerosol_mode', label2='SIGMA', grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='aerosol_number_concentration', label2='NUM', grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='aerosol_dry_size', label2='DGN', grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='aerosol_density', label2='density', grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='aerosol_hygroscopicity', label2='KAPPA', grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='fraction_of_dust_aerosol', label2='FDUST', grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='fraction_of_soot_aerosol', label2='FSOOT', grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='fraction_of_organic_aerosol', label2='FORGANIC', grid=grid, typekind=MAPL_R4, __RC__) ! Attach the aerosol optics method - call ESMF_MethodAdd(aero_aci, label='aerosol_activation_properties', userRoutine=aerosol_activation_properties, __RC__) + call ESMF_MethodAdd(aero, label='aerosol_activation_properties', userRoutine=aerosol_activation_properties, __RC__) RETURN_(ESMF_SUCCESS) @@ -475,21 +456,17 @@ subroutine add_aero_states_(instances) integer :: i integer :: id integer :: fieldCount - __Iam__('Initialize::ad_aero_states_') + __Iam__('Initialize::add_aero_states_') do i = 1, size(instances) if (.not. instances(i)%is_active) cycle id = instances(i)%id call ESMF_GridCompGet (gcs(id), __RC__ ) - call ESMF_StateGet (gex(id), trim(instances(i)%name)//'_AERO', child_state, __RC__) call ESMF_StateAdd (aero, [child_state], __RC__) if (instances(i)%name(1:2) /= 'NI') then - call ESMF_StateGet (gex(id), trim(instances(i)%name)//'_AERO_ACI', child_state, __RC__) - call ESMF_StateAdd (aero_ACI, [child_state], __RC__) - call ESMF_StateGet (gex(id), trim(instances(i)%name)//'_AERO_DP', child_bundle, __RC__) call ESMF_FieldBundleGet (child_bundle, fieldCount=fieldCount, __RC__) allocate (fieldList(fieldCount), __STAT__) @@ -601,33 +578,38 @@ subroutine Run2 (GC, import, export, clock, RC) real, pointer, dimension(:,:) :: LATS real, pointer, dimension(:,:) :: LONS - real, pointer, dimension(:,:,:) :: duexttau, duscatau, & + real, pointer, dimension(:,:,:) :: duexttau, dustexttau, & + duscatau, dustscatau, & duextt25, duscat25, & duexttfm, duscatfm real, pointer, dimension(:,:) :: duangstr, dusmass, & dusmass25 - real, pointer, dimension(:,:,:) :: ssexttau, ssscatau, & + real, pointer, dimension(:,:,:) :: ssexttau, ssstexttau, & + ssscatau, ssstscatau, & ssextt25, ssscat25, & ssexttfm, ssscatfm real, pointer, dimension(:,:) :: ssangstr, sssmass, & sssmass25 - real, pointer, dimension(:,:,:) :: niexttau, niscatau, & + real, pointer, dimension(:,:,:) :: niexttau, nistexttau, & + niscatau, nistscatau, & niextt25, niscat25, & niexttfm, niscatfm real, pointer, dimension(:,:) :: niangstr, nismass, & nismass25 real, pointer, dimension(:,:) :: nh4smass - real, pointer, dimension(:,:,:) :: suexttau, suscatau + real, pointer, dimension(:,:,:) :: suexttau, sustexttau, & + suscatau, sustscatau real, pointer, dimension(:,:) :: suangstr, so4smass - real, pointer, dimension(:,:,:) :: bcexttau, bcscatau + real, pointer, dimension(:,:,:) :: bcexttau, bcstexttau, bcscatau, bcstscatau real, pointer, dimension(:,:) :: bcangstr, bcsmass - real, pointer, dimension(:,:,:) :: ocexttau, ocscatau + real, pointer, dimension(:,:,:) :: ocexttau, ocstexttau, ocscatau, ocstscatau real, pointer, dimension(:,:) :: ocangstr, ocsmass - real, pointer, dimension(:,:,:) :: brexttau, brscatau + real, pointer, dimension(:,:,:) :: brexttau, brstexttau, brscatau, brstscatau real, pointer, dimension(:,:) :: brangstr, brsmass real, pointer, dimension(:,:,:) :: pso4 real, allocatable :: tau1(:,:), tau2(:,:) real :: c1, c2, c3 + integer :: ind550 #include "GOCART2G_DeclarePointer___.h" @@ -660,7 +642,9 @@ subroutine Run2 (GC, import, export, clock, RC) #include "GOCART2G_GetPointer___.h" if(associated(totexttau)) totexttau = 0. + if(associated(totstexttau)) totstexttau = 0. if(associated(totscatau)) totscatau = 0. + if(associated(totstscatau)) totstscatau = 0. if(associated(totextt25)) totextt25 = 0. if(associated(totscat25)) totscat25 = 0. if(associated(totexttfm)) totexttfm = 0. @@ -684,11 +668,25 @@ subroutine Run2 (GC, import, export, clock, RC) end if end do - ! Compute total aerosol diagnostic values for export ! -------------------------------------------------- if(associated(totangstr)) then - totangstr(:,:) = 0.0 + ind550 = 0 + do w = 1, size(self%wavelengths_vertint) ! find index for 550nm to compute total angstrom + if ((self%wavelengths_vertint(w)*1.e-9 .ge. 5.49e-7) .and. & + (self%wavelengths_vertint(w)*1.e-9 .le. 5.51e-7)) then + ind550 = w + exit + end if + end do + + if (ind550 == 0) then + print*,trim(Iam),' : 550nm wavelengths is not present in GOCART2G_GridComp.rc.',& + ' Cannot produce TOTANGSTR variable without 550nm wavelength.' + VERIFY_(100) + end if + + totangstr = 0.0 allocate(tau1(SIZE(LATS,1), SIZE(LATS,2)), & tau2(SIZE(LATS,1), SIZE(LATS,2)), __STAT__) @@ -703,7 +701,9 @@ subroutine Run2 (GC, import, export, clock, RC) do n = 1, size(self%DU%instances) if ((self%DU%instances(n)%is_active) .and. (index(self%DU%instances(n)%name, 'data') == 0 )) then call MAPL_GetPointer (gex(self%DU%instances(n)%id), duexttau, 'DUEXTTAU', __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), 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__) @@ -713,7 +713,9 @@ subroutine Run2 (GC, import, export, clock, RC) ! Iterate over the wavelengths do w = 1, size(self%wavelengths_vertint) if(associated(totexttau) .and. associated(duexttau)) totexttau(:,:,w) = totexttau(:,:,w)+duexttau(:,:,w) + if(associated(totstexttau) .and. associated(dustexttau)) totstexttau(:,:,w) = totstexttau(:,:,w)+dustexttau(:,:,w) if(associated(totscatau) .and. associated(duscatau)) totscatau(:,:,w) = totscatau(:,:,w)+duscatau(:,:,w) + if(associated(totstscatau) .and. associated(dustscatau)) totstscatau(:,:,w) = totstscatau(:,:,w)+dustscatau(:,:,w) if(associated(totextt25) .and. associated(duextt25)) totextt25(:,:,w) = totextt25(:,:,w)+duextt25(:,:,w) if(associated(totscat25) .and. associated(duscat25)) totscat25(:,:,w) = totscat25(:,:,w)+duscat25(:,:,w) if(associated(totexttfm) .and. associated(duexttfm)) totexttfm(:,:,w) = totexttfm(:,:,w)+duexttfm(:,:,w) @@ -730,8 +732,8 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(pm25_rh50) .and. associated(dusmass25)) pm25_rh50 = pm25_rh50 + dusmass25 if(associated(totangstr) .and. associated(duexttau) .and. associated(duangstr)) then - tau1 = tau1 + duexttau(:,:,2)*exp(c1*duangstr) - tau2 = tau2 + duexttau(:,:,2)*exp(c2*duangstr) + tau1 = tau1 + duexttau(:,:,ind550)*exp(c1*duangstr) + tau2 = tau2 + duexttau(:,:,ind550)*exp(c2*duangstr) end if end if end do @@ -740,7 +742,9 @@ subroutine Run2 (GC, import, export, clock, RC) do n = 1, size(self%SS%instances) if ((self%SS%instances(n)%is_active) .and. (index(self%SS%instances(n)%name, 'data') == 0 )) then call MAPL_GetPointer (gex(self%SS%instances(n)%id), ssexttau, 'SSEXTTAU', __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), 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__) @@ -750,7 +754,9 @@ subroutine Run2 (GC, import, export, clock, RC) ! Iterate over the wavelengths do w = 1, size(self%wavelengths_vertint) if(associated(totexttau) .and. associated(ssexttau)) totexttau(:,:,w) = totexttau(:,:,w)+ssexttau(:,:,w) + if(associated(totstexttau) .and. associated(ssstexttau)) totstexttau(:,:,w) = totstexttau(:,:,w)+ssstexttau(:,:,w) if(associated(totscatau) .and. associated(ssscatau)) totscatau(:,:,w) = totscatau(:,:,w)+ssscatau(:,:,w) + if(associated(totstscatau) .and. associated(ssstscatau)) totstscatau(:,:,w) = totstscatau(:,:,w)+ssstscatau(:,:,w) if(associated(totextt25) .and. associated(ssextt25)) totextt25(:,:,w) = totextt25(:,:,w)+ssextt25(:,:,w) if(associated(totscat25) .and. associated(ssscat25)) totscat25(:,:,w) = totscat25(:,:,w)+ssscat25(:,:,w) if(associated(totexttfm) .and. associated(ssexttfm)) totexttfm(:,:,w) = totexttfm(:,:,w)+ssexttfm(:,:,w) @@ -767,8 +773,8 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(pm25_rh50) .and. associated(sssmass25)) pm25_rh50 = pm25_rh50 + 2.42*sssmass25 if(associated(totangstr) .and. associated(ssexttau) .and. associated(ssangstr)) then - tau1 = tau1 + ssexttau(:,:,2)*exp(c1*ssangstr) - tau2 = tau2 + ssexttau(:,:,2)*exp(c2*ssangstr) + tau1 = tau1 + ssexttau(:,:,ind550)*exp(c1*ssangstr) + tau2 = tau2 + ssexttau(:,:,ind550)*exp(c2*ssangstr) end if end if end do @@ -777,7 +783,9 @@ subroutine Run2 (GC, import, export, clock, RC) do n = 1, size(self%NI%instances) if ((self%NI%instances(n)%is_active) .and. (index(self%NI%instances(n)%name, 'data') == 0 )) then call MAPL_GetPointer (gex(self%NI%instances(n)%id), niexttau, 'NIEXTTAU', __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), 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__) @@ -787,7 +795,9 @@ subroutine Run2 (GC, import, export, clock, RC) ! Iterate over the wavelengths do w = 1, size(self%wavelengths_vertint) if(associated(totexttau) .and. associated(niexttau)) totexttau(:,:,w) = totexttau(:,:,w)+niexttau(:,:,w) + if(associated(totstexttau) .and. associated(nistexttau)) totstexttau(:,:,w) = totstexttau(:,:,w)+nistexttau(:,:,w) if(associated(totscatau) .and. associated(niscatau)) totscatau(:,:,w) = totscatau(:,:,w)+niscatau(:,:,w) + if(associated(totstscatau) .and. associated(nistscatau)) totstscatau(:,:,w) = totstscatau(:,:,w)+nistscatau(:,:,w) if(associated(totextt25) .and. associated(niextt25)) totextt25(:,:,w) = totextt25(:,:,w)+niextt25(:,:,w) if(associated(totscat25) .and. associated(niscat25)) totscat25(:,:,w) = totscat25(:,:,w)+niscat25(:,:,w) if(associated(totexttfm) .and. associated(niexttfm)) totexttfm(:,:,w) = totexttfm(:,:,w)+niexttfm(:,:,w) @@ -805,8 +815,8 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(pm25_rh50) .and. associated(nismass25) .and. associated(nh4smass)) pm25_rh50 = pm25_rh50 + 1.51*(nismass25 + nh4smass) if(associated(totangstr) .and. associated(niexttau) .and. associated(niangstr)) then - tau1 = tau1 + niexttau(:,:,2)*exp(c1*niangstr) - tau2 = tau2 + niexttau(:,:,2)*exp(c2*niangstr) + tau1 = tau1 + niexttau(:,:,ind550)*exp(c1*niangstr) + tau2 = tau2 + niexttau(:,:,ind550)*exp(c2*niangstr) end if end if end do @@ -815,13 +825,17 @@ 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), 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__) call MAPL_GetPointer (gex(self%SU%instances(n)%id), suangstr, 'SUANGSTR', __RC__) ! Iterate over the wavelengths do w = 1, size(self%wavelengths_vertint) if(associated(totexttau) .and. associated(suexttau)) totexttau(:,:,w) = totexttau(:,:,w)+suexttau(:,:,w) + if(associated(totstexttau) .and. associated(sustexttau)) totstexttau(:,:,w) = totstexttau(:,:,w)+sustexttau(:,:,w) if(associated(totscatau) .and. associated(suscatau)) totscatau(:,:,w) = totscatau(:,:,w)+suscatau(:,:,w) + if(associated(totstscatau) .and. associated(sustscatau)) totstscatau(:,:,w) = totstscatau(:,:,w)+sustscatau(:,:,w) if(associated(totextt25) .and. associated(suexttau)) totextt25(:,:,w) = totextt25(:,:,w)+suexttau(:,:,w) if(associated(totscat25) .and. associated(suscatau)) totscat25(:,:,w) = totscat25(:,:,w)+suscatau(:,:,w) if(associated(totexttfm) .and. associated(suexttau)) totexttfm(:,:,w) = totexttfm(:,:,w)+suexttau(:,:,w) @@ -832,7 +846,7 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(pso4tot) .and. associated(pso4)) pso4tot = pso4tot + pso4 call MAPL_GetPointer (gex(self%SU%instances(n)%id), so4smass, 'SO4SMASS', __RC__) - if ((self%NI%instances(1)%is_active) .and. (index(self%NI%instances(1)%name, 'data') == 0 )) then ! Nitrates currently only support one active instance. We check the NI gridded component because SO4MASS can be altered by NI chemistry. + if ((self%SU%instances(1)%is_active) .and. (index(self%SU%instances(1)%name, 'data') == 0 )) then ! Nitrates currently only support one active instance. We check the NI gridded component because SO4MASS can be altered by NI chemistry. if(associated(pm) .and. associated(so4smass)) pm = pm + so4smass if(associated(pm25) .and. associated(so4smass)) pm25 = pm25 + so4smass if(associated(pm_rh35) .and. associated(so4smass)) pm_rh35 = pm_rh35 + 1.33*so4smass @@ -849,8 +863,8 @@ subroutine Run2 (GC, import, export, clock, RC) end if if(associated(totangstr) .and. associated(suexttau) .and. associated(suangstr)) then -! tau1 = tau1 + suexttau(:,:,2)*exp(c1*suangstr) -! tau2 = tau2 + suexttau(:,:,2)*exp(c2*suangstr) + tau1 = tau1 + suexttau(:,:,ind550)*exp(c1*suangstr) + tau2 = tau2 + suexttau(:,:,ind550)*exp(c2*suangstr) end if end if end do @@ -862,13 +876,17 @@ subroutine Run2 (GC, import, export, clock, RC) .and. (index(self%CA%instances(n)%name, 'CA.bc') > 0)) then call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcexttau, 'CAEXTTAUCA.bc', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcstexttau, 'CASTEXTTAUCA.bc', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcscatau, 'CASCATAUCA.bc', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcstscatau, 'CASTSCATAUCA.bc', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), bcangstr, 'CAANGSTRCA.bc', __RC__) ! Iterate over the wavelengths do w = 1, size(self%wavelengths_vertint) if(associated(totexttau) .and. associated(bcexttau)) totexttau(:,:,w) = totexttau(:,:,w)+bcexttau(:,:,w) + if(associated(totstexttau) .and. associated(bcstexttau)) totstexttau(:,:,w) = totstexttau(:,:,w)+bcstexttau(:,:,w) if(associated(totscatau) .and. associated(bcscatau)) totscatau(:,:,w) = totscatau(:,:,w)+bcscatau(:,:,w) + if(associated(totstscatau) .and. associated(bcstscatau)) totstscatau(:,:,w) = totstscatau(:,:,w)+bcstscatau(:,:,w) if(associated(totextt25) .and. associated(bcexttau)) totextt25(:,:,w) = totextt25(:,:,w)+bcexttau(:,:,w) if(associated(totscat25) .and. associated(bcscatau)) totscat25(:,:,w) = totscat25(:,:,w)+bcscatau(:,:,w) if(associated(totexttfm) .and. associated(bcexttau)) totexttfm(:,:,w) = totexttfm(:,:,w)+bcexttau(:,:,w) @@ -884,20 +902,24 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(pm25_rh50) .and. associated(bcsmass)) pm25_rh50 = pm25_rh50 + bcsmass if(associated(totangstr) .and. associated(bcexttau) .and. associated(bcangstr)) then - tau1 = tau1 + bcexttau(:,:,2)*exp(c1*bcangstr) - tau2 = tau2 + bcexttau(:,:,2)*exp(c2*bcangstr) + tau1 = tau1 + bcexttau(:,:,ind550)*exp(c1*bcangstr) + tau2 = tau2 + bcexttau(:,:,ind550)*exp(c2*bcangstr) end if else if ((self%CA%instances(n)%is_active) .and. (index(self%CA%instances(n)%name, 'data') == 0 ) & .and. (index(self%CA%instances(n)%name, 'CA.oc') > 0)) then call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocexttau, 'CAEXTTAUCA.oc', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocstexttau, 'CASTEXTTAUCA.oc', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocscatau, 'CASCATAUCA.oc', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocstscatau, 'CASTSCATAUCA.oc', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), ocangstr, 'CAANGSTRCA.oc', __RC__) ! Iterate over the wavelengths do w = 1, size(self%wavelengths_vertint) if(associated(totexttau) .and. associated(ocexttau)) totexttau(:,:,w) = totexttau(:,:,w)+ocexttau(:,:,w) + if(associated(totstexttau) .and. associated(ocstexttau)) totstexttau(:,:,w) = totstexttau(:,:,w)+ocstexttau(:,:,w) if(associated(totscatau) .and. associated(ocscatau)) totscatau(:,:,w) = totscatau(:,:,w)+ocscatau(:,:,w) + if(associated(totstscatau) .and. associated(ocstscatau)) totstscatau(:,:,w) = totstscatau(:,:,w)+ocstscatau(:,:,w) if(associated(totextt25) .and. associated(ocexttau)) totextt25(:,:,w) = totextt25(:,:,w)+ocexttau(:,:,w) if(associated(totscat25) .and. associated(ocscatau)) totscat25(:,:,w) = totscat25(:,:,w)+ocscatau(:,:,w) if(associated(totexttfm) .and. associated(ocexttau)) totexttfm(:,:,w) = totexttfm(:,:,w)+ocexttau(:,:,w) @@ -913,20 +935,24 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(pm25_rh50) .and. associated(ocsmass)) pm25_rh50 = pm25_rh50 + 1.24*ocsmass ! if(associated(totangstr) .and. associated(ocexttau) .and. associated(ocangstr)) then - tau1 = tau1 + ocexttau(:,:,2)*exp(c1*ocangstr) - tau2 = tau2 + ocexttau(:,:,2)*exp(c2*ocangstr) + tau1 = tau1 + ocexttau(:,:,ind550)*exp(c1*ocangstr) + tau2 = tau2 + ocexttau(:,:,ind550)*exp(c2*ocangstr) end if else if ((self%CA%instances(n)%is_active) .and. (index(self%CA%instances(n)%name, 'data') == 0 ) & .and. (index(self%CA%instances(n)%name, 'CA.br') > 0)) then call MAPL_GetPointer (gex(self%CA%instances(n)%id), brexttau, 'CAEXTTAUCA.br', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), brstexttau, 'CASTEXTTAUCA.br', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), brscatau, 'CASCATAUCA.br', __RC__) + call MAPL_GetPointer (gex(self%CA%instances(n)%id), brstscatau, 'CASTSCATAUCA.br', __RC__) call MAPL_GetPointer (gex(self%CA%instances(n)%id), brangstr, 'CAANGSTRCA.br', __RC__) ! Iterate over the wavelengths do w = 1, size(self%wavelengths_vertint) if(associated(totexttau) .and. associated(brexttau)) totexttau(:,:,w) = totexttau(:,:,w)+brexttau(:,:,w) + if(associated(totstexttau) .and. associated(brstexttau)) totstexttau(:,:,w) = totstexttau(:,:,w)+brstexttau(:,:,w) if(associated(totscatau) .and. associated(brscatau)) totscatau(:,:,w) = totscatau(:,:,w)+brscatau(:,:,w) + if(associated(totstscatau) .and. associated(brstscatau)) totstscatau(:,:,w) = totstscatau(:,:,w)+brstscatau(:,:,w) if(associated(totextt25) .and. associated(brexttau)) totextt25(:,:,w) = totextt25(:,:,w)+brexttau(:,:,w) if(associated(totscat25) .and. associated(brscatau)) totscat25(:,:,w) = totscat25(:,:,w)+brscatau(:,:,w) if(associated(totexttfm) .and. associated(brexttau)) totexttfm(:,:,w) = totexttfm(:,:,w)+brexttau(:,:,w) @@ -942,8 +968,8 @@ subroutine Run2 (GC, import, export, clock, RC) if(associated(pm25_rh50) .and. associated(brsmass)) pm25_rh50 = pm25_rh50 + 1.24*brsmass ! if(associated(totangstr) .and. associated(brexttau) .and. associated(brangstr)) then - tau1 = tau1 + brexttau(:,:,2)*exp(c1*brangstr) - tau2 = tau2 + brexttau(:,:,2)*exp(c2*brangstr) + tau1 = tau1 + brexttau(:,:,ind550)*exp(c1*brangstr) + tau2 = tau2 + brexttau(:,:,ind550)*exp(c2*brangstr) end if end if end do @@ -1118,9 +1144,9 @@ subroutine serialize_bundle (state, rc) do i = 1, n if (itemTypes(i) /= ESMF_StateItem_State) cycle ! exclude non-states call ESMF_StateGet (state, trim(itemList(i)), child_state, __RC__) - call ESMF_AttributeGet (child_state, name='internal_varaible_name', itemCount=nbins, __RC__) + call ESMF_AttributeGet (child_state, name='internal_variable_name', itemCount=nbins, __RC__) allocate (aeroName(nbins), __STAT__) - call ESMF_AttributeGet (child_state, name='internal_varaible_name', valueList=aeroName, __RC__) + call ESMF_AttributeGet (child_state, name='internal_variable_name', valueList=aeroName, __RC__) do b = 1, size(aeroName) @@ -1138,7 +1164,7 @@ subroutine serialize_bundle (state, rc) ptr3d => orig_ptr(:,:,:,j) serializedField = ESMF_FieldCreate (grid=grid, datacopyFlag=ESMF_DATACOPY_REFERENCE, & farrayPtr=ptr3d, name=trim(aeroName(b))//trim(binIndexstr), __RC__) - call MAPL_FieldBundleAdd (bundle, serializedField, __RC__) + call MAPL_FieldBundleAdd (bundle, serializedField, __RC__) ! probably need to add a flag to allow for adding multilple fields of the same name. end do ! do j end if ! if (rank end do ! do b @@ -1314,8 +1340,6 @@ end subroutine run_aerosol_optics !===================================================================================================== -!#if 0 - subroutine aerosol_activation_properties(state, rc) implicit none @@ -1325,7 +1349,6 @@ subroutine aerosol_activation_properties(state, rc) type(ESMF_State) :: state integer, intent(out) :: rc - ! Local ! --------- character(len=ESMF_MAXSTR) :: mode ! mode name @@ -1339,10 +1362,9 @@ subroutine aerosol_activation_properties(state, rc) real, dimension(:,:,:), pointer :: f ! correction factor for sea salt - real, dimension(:,:,:), pointer :: q ! aerosol mass mixing ratio - real, dimension(:,:,:), pointer :: q_ ! aerosol mass mixing ratio (temporary) - real, dimension(:,:,:,:), pointer :: ptr_4d ! aerosol mass mixing ratio (temporary) - + real, dimension(:,:,:), allocatable :: q ! aerosol mass mixing ratio + real, dimension(:,:,:,:), pointer :: ptr_4d ! aerosol mass mixing ratio (temporary) + real, dimension(:,:,:), pointer :: ptr_3d ! aerosol mass mixing ratio (temporary) real, dimension(:,:,:), pointer :: num ! number concentration of aerosol particles real, dimension(:,:,:), pointer :: diameter ! dry size of aerosol @@ -1362,6 +1384,7 @@ subroutine aerosol_activation_properties(state, rc) integer :: i2, j2, km integer :: b, i, j, n, aerosol_bin + integer :: varNameLen character (len=ESMF_MAXSTR), allocatable :: itemList(:), aeroList(:) type (ESMF_StateItem_Flag), allocatable :: itemTypes(:) @@ -1374,7 +1397,7 @@ subroutine aerosol_activation_properties(state, rc) real, parameter :: densDU = 1700.0 real, parameter :: densBC = 1600.0 real, parameter :: densOC = 900.0 - real, parameter :: densBRC = 900.0 + real, parameter :: densBR = 900.0 real, parameter :: k_SO4 = 0.65 real, parameter :: k_ORG = 0.20 @@ -1382,7 +1405,7 @@ subroutine aerosol_activation_properties(state, rc) real, parameter :: k_DU = 0.0001 real, parameter :: k_BC = 0.0001 real, parameter :: k_OC = 0.0001 - real, parameter :: k_BRC = 0.0001 + real, parameter :: k_BR = 0.0001 integer, parameter :: UNKNOWN_AEROSOL_MODE = 2015 @@ -1399,19 +1422,19 @@ subroutine aerosol_activation_properties(state, rc) b=0 do i = 1, n - if (itemTypes(i) == ESMF_StateItem_State) then - b = b + 1 - end if + if ((itemTypes(i) == ESMF_StateItem_State) .and. (trim(itemList(i)(1:2)) /= 'NI')) then + b = b + 1 + end if end do allocate (aeroList(b), __STAT__) j = 1 do i = 1, n - if (itemTypes(i) == ESMF_StateItem_State) then - aeroList(j) = trim(itemList(i)) - j = j + 1 - end if + if ((itemTypes(i) == ESMF_StateItem_State) .and. (trim(itemList(i)(1:2)) /= 'NI')) then + aeroList(j) = trim(itemList(i)) + j = j + 1 + end if end do ! Aerosol mode @@ -1425,7 +1448,7 @@ subroutine aerosol_activation_properties(state, rc) ! Pressure at layer edges ! ------------------------ - call ESMF_AttributeGet(state, name='air_pressure', value=fld_name, __RC__) + call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) call MAPL_GetPointer(state, ple, trim(fld_name), __RC__) ! Temperature @@ -1475,9 +1498,8 @@ subroutine aerosol_activation_properties(state, rc) mode_ = trim(mode) mode_ = ESMF_UtilStringLowerCase(mode_, __RC__) - allocate(q(i2,j2,km), q_(i2,j2,km), __STAT__) + allocate(q(i2,j2,km), __STAT__) q = 0.0 - q_ = 0.0 if (index(mode_, 'du00') > 0) then ! Dust ! dust is mapped one-to-one @@ -1486,8 +1508,8 @@ subroutine aerosol_activation_properties(state, rc) read (mode_(3:len(mode_)),*) aerosol_bin call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) call MAPL_GetPointer(child_state, ptr_4d, 'DU', __RC__) - q_ = ptr_4d(:,:,:,aerosol_bin) - q = q + q_ + q = q + ptr_4d(:,:,:,aerosol_bin) + ptr_3d => ptr_4d(:,:,:,aerosol_bin) hygroscopicity = k_DU density = densDU @@ -1501,8 +1523,8 @@ subroutine aerosol_activation_properties(state, rc) call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) call MAPL_GetPointer(child_state, ptr_4d, 'SS', __RC__) do j = 1, ubound(ptr_4d, 4) - q_ = ptr_4d(:,:,:,j) - q = q + q_ + q = q + ptr_4d(:,:,:,j) + ptr_3d => ptr_4d(:,:,:,j) end do ! temperature correction over the ocean @@ -1525,24 +1547,27 @@ subroutine aerosol_activation_properties(state, rc) do i = 1, size(aeroList) if (index(aeroList(i), 'SU') > 0) then call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) - call MAPL_GetPointer(child_state, q_, 'SO4', __RC__) - q = q + q_ - hygroscopicity = k_SO4 * q_ + hygroscopicity - density = densSO4 * q_ + density + call MAPL_GetPointer(child_state, ptr_3d, 'SO4', __RC__) + q = q + ptr_3d + hygroscopicity = k_SO4 * ptr_3d + hygroscopicity + density = densSO4 * ptr_3d + density end if if (index(aeroList(i), 'CA.oc') > 0) then call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) - call MAPL_GetPointer(child_state, q_, 'CAphilicCA.oc', __RC__) - q = q + q_ - hygroscopicity = k_ORG * q_ + hygroscopicity - density = densORG * q_ + density + varNameLen = len_trim(aeroList(i)) +! the '5' refers to '_AERO', which we want to remove to get the CA component name (e.g. CA.oc, or CA.oc.data) + varNameLen = varNameLen - 5 + call MAPL_GetPointer(child_state, ptr_3d, 'CAphilic'//aeroList(i)(1:varNameLen), __RC__) + q = q + ptr_3d + hygroscopicity = k_ORG * ptr_3d + hygroscopicity + density = densORG * ptr_3d + density end if ! required by the aap_(...) if((adjustl(cld_micro)/="2MOMENT") .and. (index(aeroList(i), 'SU') > 0)) then ! maintained for compatibility with the single moment call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) - call MAPL_GetPointer(child_state, q_, 'SO4', __RC__) + call MAPL_GetPointer(child_state, ptr_3d, 'SO4', __RC__) end if end do @@ -1561,8 +1586,11 @@ subroutine aerosol_activation_properties(state, rc) do i = 1, size(aeroList) if (index(aeroList(i), 'CA.bc') > 0) then call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) - call MAPL_GetPointer(child_state, q_, 'CAphilicCA.bc', __RC__) - q = q + q_ + varNameLen = len_trim(aeroList(i)) +! the '5' refers to '_AERO', which we want to remove to get the CA component name (e.g. CA.bc, or CA.bc.data) + varNameLen = varNameLen - 5 + call MAPL_GetPointer(child_state, ptr_3d, 'CAphilic'//aeroList(i)(1:varNameLen), __RC__) + q = q + ptr_3d hygroscopicity = k_BC density = densBC end if @@ -1572,12 +1600,30 @@ subroutine aerosol_activation_properties(state, rc) do i = 1, size(aeroList) if (index(aeroList(i), 'CA.oc') > 0) then call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) - call MAPL_GetPointer(child_state, q_, 'CAphilicCA.oc', __RC__) - q = q + q_ + varNameLen = len_trim(aeroList(i)) +! the '5' refers to '_AERO', which we want to remove to get the CA component name (e.g. CA.oc, or CA.oc.data) + varNameLen = varNameLen - 5 + call MAPL_GetPointer(child_state, ptr_3d, 'CAphilic'//aeroList(i)(1:varNameLen), __RC__) + q = q + ptr_3d hygroscopicity = k_OC density = densOC end if end do + + else if (index(mode_, 'brcphilic') > 0) then ! Organic Carbon + do i = 1, size(aeroList) + if (index(aeroList(i), 'CA.br') > 0) then + call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) + varNameLen = len_trim(aeroList(i)) +! the '5' refers to '_AERO', which we want to remove to get the CA component name (e.g. CA.bc, or CA.bc.data) + varNameLen = varNameLen - 5 + call MAPL_GetPointer(child_state, ptr_3d, 'CAphilic'//aeroList(i)(1:varNameLen), __RC__) + q = q + ptr_3d + hygroscopicity = k_BR + density = densBR + end if + end do + end if !(index(mode_, 'du00') > 0) then ! Obtain aerosol activation properties of this aerosol mode @@ -1591,7 +1637,7 @@ subroutine aerosol_activation_properties(state, rc) f_soot, & f_organic, & density, & - q_, & + ptr_3d, & 1, i2, 1, j2, km, & __RC__) @@ -1805,12 +1851,19 @@ subroutine aap_(mode, q, num, diameter, sigma, f_dust, f_soot, f_organic, dens_, f_soot = 1.0 diameter = 0.0118*2e-6 num = q / ((MAPL_PI/6.0) * densBC * diameter*diameter*diameter * exp(4.5*sigma*sigma)) + case ('ocphilic') sigma = log(2.2) f_organic = 1.0 diameter = 0.0212*2.0e-6 num = q / ((MAPL_PI/6.0) * densOrg * diameter*diameter*diameter * exp(4.5*sigma*sigma)) + case ('brcphilic') + sigma = log(2.2) + f_organic = 1.0 + diameter = 0.0212*2.0e-6 + num = q / ((MAPL_PI/6.0) * densOrg * diameter*diameter*diameter * exp(4.5*sigma*sigma)) + case default __raise__(UNKNOWN_AEROSOL_MODE,"Unknown aerosol mode used in the GOCART aerosol activation properties method: "//trim(mode)) @@ -1821,8 +1874,6 @@ subroutine aap_(mode, q, num, diameter, sigma, f_dust, f_soot, f_organic, dens_, end subroutine aap_ - - subroutine ocean_correction_(f, f_land, t_air_sfc, ss_scale, i1, i2, j1, j2, km) implicit none @@ -1863,4 +1914,304 @@ end subroutine ocean_correction_ end subroutine aerosol_activation_properties + +!=================================================================================== + subroutine get_monochromatic_aop (state, rc) + + implicit none + +! !ARGUMENTS: + type (ESMF_State) :: state + integer, intent(out) :: rc + +! !Local + real, dimension(:,:,:), pointer :: ple + real, dimension(:,:,:), pointer :: rh + real, dimension(:,:), pointer :: var + + character (len=ESMF_MAXSTR) :: fld_name + + real, dimension(:,:),pointer :: tau_ ! (lon:,lat:,lev:) + real, dimension(:,:), allocatable :: tau ! (lon:,lat:,lev:) + + integer :: i, n, b, j + integer :: i1, j1, i2, j2, km + real :: wavelength + + character (len=ESMF_MAXSTR), allocatable :: itemList(:), aeroList(:) + type (ESMF_State) :: child_state + real, pointer, dimension(:,:,:) :: as_ptr_3d + + type (ESMF_StateItem_Flag), allocatable :: itemTypes(:) + + __Iam__('GOCART2G::get_monochromatic_aop') + +! Description: Used in GAAS gridded component to provide aerosol properties +!----------------------------------------------------------------------------------- +! Begin... + +! Radiation band +! -------------- + call ESMF_AttributeGet(state, name='wavelength_for_aerosol_optics', value=wavelength, __RC__) + +! Relative humidity +! ----------------- + call ESMF_AttributeGet(state, name='relative_humidity_for_aerosol_optics', value=fld_name, __RC__) + call MAPL_GetPointer(state, RH, trim(fld_name), __RC__) + +! Pressure at layer edges +! ------------------------ + call ESMF_AttributeGet(state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) + call MAPL_GetPointer(state, PLE, trim(fld_name), __RC__) + + i1 = lbound(ple, 1); i2 = ubound(ple, 1) + j1 = lbound(ple, 2); j2 = ubound(ple, 2) + km = ubound(ple, 3) + + allocate(tau(i1:i2,j1:j2), __STAT__) + tau = 0.0 + +! Get list of child states within state and add to aeroList +! --------------------------------------------------------- + call ESMF_StateGet (state, itemCount=n, __RC__) + allocate (itemList(n), __STAT__) + allocate (itemTypes(n), __STAT__) + call ESMF_StateGet (state, itemNameList=itemList, itemTypeList=itemTypes, __RC__) + + b=0 + do i = 1, n + if (itemTypes(i) == ESMF_StateItem_State) then + b = b + 1 + end if + end do + + allocate (aeroList(b), __STAT__) + + j = 1 + do i = 1, n + if (itemTypes(i) == ESMF_StateItem_State) then + aeroList(j) = trim(itemList(i)) + j = j + 1 + end if + end do + +! ! Get aerosol optic properties from children + do i = 1, size(aeroList) + call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) + +! ! set RH in child's aero state + call ESMF_AttributeGet(child_state, name='relative_humidity_for_aerosol_optics', value=fld_name, __RC__) + + if (fld_name /= '') then + call MAPL_GetPointer(child_state, as_ptr_3d, trim(fld_name), __RC__) + as_ptr_3d = rh + end if + +! ! set PLE in child's aero state + call ESMF_AttributeGet(child_state, name='air_pressure_for_aerosol_optics', value=fld_name, __RC__) + + if (fld_name /= '') then + call MAPL_GetPointer(child_state, as_ptr_3d, trim(fld_name), __RC__) + as_ptr_3d = ple + end if + +! ! set wavelength in child's aero state + call ESMF_AttributeSet(child_state, name='wavelength_for_aerosol_optics', value=wavelength, __RC__) + +! ! execute the aerosol optics method + call ESMF_MethodExecute(child_state, label="monochromatic_aerosol_optics", __RC__) + +! ! Retrieve extinction from each child + call ESMF_AttributeGet(child_state, name='monochromatic_extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(child_state, tau_, trim(fld_name), __RC__) + end if + +! ! Sum aerosol optic properties from each child + tau = tau + tau_ + end do + +! ! Set ext, ssa, asy to equal the sum of ext, ssa, asy from the children. This is what is passed to radiation. + call ESMF_AttributeGet(state, name='monochromatic_extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(state, var, trim(fld_name), __RC__) + var = tau + end if + + deallocate(tau, __STAT__) + + RETURN_(ESMF_SUCCESS) + + end subroutine get_monochromatic_aop + + +!=================================================================================== + subroutine get_mixRatioSum (state, rc) + + implicit none + +! !ARGUMENTS: + type (ESMF_State) :: state + integer, intent(out) :: rc + +! !Local + character (len=ESMF_MAXSTR), allocatable :: itemList(:), aeroList(:) + character (len=ESMF_MAXSTR) :: aeroName + character (len=ESMF_MAXSTR) :: fld_name + + real, pointer, dimension(:,:,:) :: var + real, dimension(:,:,:), allocatable :: aeroOut + type (ESMF_StateItem_Flag), allocatable :: itemTypes(:) + + integer :: b, i, n, j, im, jm, km + + __Iam__('GOCART2G::get_mixRatioSum') + +! Description: Used in GAAS gridded component to provide sum of aerosol mixing ratio +!-------------------------------------------------------------------------------------- +! Begin... + + call ESMF_AttributeGet(state, name='aerosolName', value=aeroName, __RC__) + call ESMF_AttributeGet(state, name='im', value=im, __RC__) + call ESMF_AttributeGet(state, name='jm', value=jm, __RC__) + call ESMF_AttributeGet(state, name='km', value=km, __RC__) + + allocate(aeroOut(im,jm,km), __STAT__) + aeroOut = 0.0 + +! Get list of child states within state and add to aeroList +! --------------------------------------------------------- + call ESMF_StateGet (state, itemCount=n, __RC__) + allocate (itemList(n), __STAT__) + allocate (itemTypes(n), __STAT__) + call ESMF_StateGet (state, itemNameList=itemList, itemTypeList=itemTypes, __RC__) + + b=0 + do i = 1, n + if (itemTypes(i) == ESMF_StateItem_State) then + b = b + 1 + end if + end do + + allocate (aeroList(b), __STAT__) + + j = 1 + do i = 1, n + if (itemTypes(i) == ESMF_StateItem_State) then + aeroList(j) = trim(itemList(i)) + j = j + 1 + end if + end do + + +! Retrieve summed aerosol mixing ratios from active instances + select case (trim(aeroName)) + case ('dust') + call getAerosolSum ('DU', state, aeroList, aeroOut, __RC__) + + call ESMF_AttributeGet (state, name='sum_of_internalState_aerosol_DU', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = aeroOut + end if + + case ('seasalt') + call getAerosolSum ('SS', state, aeroList, aeroOut, __RC__) + + call ESMF_AttributeGet (state, name='sum_of_internalState_aerosol_SS', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = aeroOut + end if + + case ('organicCarbon') + call getAerosolSum ('CA.oc', state, aeroList, aeroOut, __RC__) + + call ESMF_AttributeGet (state, name='sum_of_internalState_aerosol_CA.oc', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = aeroOut + end if + + case ('blackCarbon') + call getAerosolSum ('CA.bc', state, aeroList, aeroOut, __RC__) + + call ESMF_AttributeGet (state, name='sum_of_internalState_aerosol_CA.bc', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = aeroOut + end if + + case ('brownCarbon') + call getAerosolSum ('CA.br', state, aeroList, aeroOut, __RC__) + + call ESMF_AttributeGet (state, name='sum_of_internalState_aerosol_CA.br', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = aeroOut + end if + + case ('sulfate') + call getAerosolSum ('SU', state, aeroList, aeroOut, __RC__) + + call ESMF_AttributeGet (state, name='sum_of_internalState_aerosol_SU', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = aeroOut + end if + + case ('nitrate') + call getAerosolSum ('NI', state, aeroList, aeroOut, __RC__) + + call ESMF_AttributeGet (state, name='sum_of_internalState_aerosol_NI', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = aeroOut + end if + + case default + print *,"Invalid aerosolName of '",trim(aeroName), "' in GOCART2G::get_mixRatioSum" + end select + +contains + subroutine getAerosolSum (aeroToken, state, aeroList, aeroOut, rc) + + implicit none + +! !ARGUMENTS: + character (len=*), intent(in) :: aeroToken + type (ESMF_State), intent(in) :: state + character (len=ESMF_MAXSTR), intent(in) :: aeroList(:) + real, dimension(:,:,:), intent(out) :: aeroOut + integer, optional, intent(out) :: rc + +! !LOCALS: + integer :: i, endInd + character (len=ESMF_MAXSTR) :: fld_name + type (ESMF_State) :: child_state + real, pointer, dimension(:,:,:) :: ptr3d + + +! Begin... + + endInd = len_trim(aeroToken) + + do i = 1, size(aeroList) + if (trim(aeroList(i)(1:endInd)) == trim(aeroToken)) then + call ESMF_StateGet(state, trim(aeroList(i)), child_state, __RC__) + call ESMF_MethodExecute(child_state, label="get_mixR", __RC__) + call ESMF_AttributeGet(child_state, name='sum_of_internalState_aerosol', & + value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(child_state, ptr3d, trim(fld_name), __RC__) + end if + aeroOut = aeroOut + ptr3d + end if + end do + + end subroutine getAerosolSum + + end subroutine get_mixRatioSum + + end module GOCART2G_GridCompMod diff --git a/ESMF/GOCART2G_GridComp/GOCART2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/GOCART2G_StateSpecs.rc index bed19a37..ad87aa53 100644 --- a/ESMF/GOCART2G_GridComp/GOCART2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/GOCART2G_StateSpecs.rc @@ -19,7 +19,9 @@ category: EXPORT 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 diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_NI.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/CMIP/NI2G_instance_NI.rc similarity index 100% rename from ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_NI.rc rename to ESMF/GOCART2G_GridComp/NI2G_GridComp/CMIP/NI2G_instance_NI.rc diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/NI2G_GridComp/CMakeLists.txt index 1c6b46ba..bf4c5c38 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_GridComp MAPL Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES GA_Environment MAPL Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) mapl_acg (${this} NI2G_StateSpecs.rc IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/CMIP/NI2G_GridComp_NI.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/MERRA2/NI2G_instance_NI.rc similarity index 90% rename from ESMF/GOCART2G_GridComp/NI2G_GridComp/CMIP/NI2G_GridComp_NI.rc rename to ESMF/GOCART2G_GridComp/NI2G_GridComp/MERRA2/NI2G_instance_NI.rc index b6a6d357..ba1052e9 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/CMIP/NI2G_GridComp_NI.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/MERRA2/NI2G_instance_NI.rc @@ -5,10 +5,7 @@ nbins: 5 aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_NI.v2_5.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_NI.v2_5.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 -n_channels: 4 # Scavenging efficiency per bin [km-1] fscav: 0.0 0.4 0.4 0.4 0.4 diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 index a64b77c8..27bf3b29 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridCompMod.F90 @@ -16,7 +16,7 @@ module NI2G_GridCompMod use iso_c_binding, only: c_loc, c_f_pointer, c_ptr use GOCART2G_Process ! GOCART2G process library - use GA_GridCompMod + use GA_EnvironmentMod implicit none private @@ -47,7 +47,7 @@ module NI2G_GridCompMod !=========================================================================== ! !Nitrate state - type, extends(GA_GridComp) :: NI2G_GridComp + type, extends(GA_Environment) :: NI2G_GridComp logical :: first logical :: recycle_HNO3 = .false. real, allocatable :: xhno3(:,:,:) ! buffer for NITRATE_HNO3 [kg/(m^2 sec)] @@ -106,8 +106,6 @@ subroutine SetServices ( GC, RC ) call ESMF_GridCompGet (GC, NAME=COMP_NAME, config=universal_cfg, __RC__) Iam = trim(COMP_NAME) // '::' // Iam -if(mapl_am_i_root()) print*,trim(comp_name),' SetServices BEGIN' - ! Wrap internal state for storing in GC ! ------------------------------------- allocate (self, __STAT__) @@ -116,14 +114,14 @@ subroutine SetServices ( GC, RC ) ! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'NI2G_GridComp_'//trim(COMP_NAME)//'.rc', rc=status) + call ESMF_ConfigLoadFile (cfg, 'NI2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) if (status /= 0) then - if (mapl_am_i_root()) print*,'NI2G_GridComp_'//trim(COMP_NAME)//'.rc does not exist! Loading NI2G_GridComp_NI.rc instead' - call ESMF_ConfigLoadFile (cfg, 'NI2G_GridComp_NI.rc', __RC__) + if (mapl_am_i_root()) print*,'NI2G_instance_'//trim(COMP_NAME)//'.rc does not exist! Loading NI2G_instance_NI.rc instead' + call ESMF_ConfigLoadFile (cfg, 'NI2G_instance_NI.rc', __RC__) end if ! process generic config items - call self%GA_GridComp%load_from_config( cfg, universal_cfg, __RC__) + call self%GA_Environment%load_from_config( cfg, universal_cfg, __RC__) ! Is NI data driven? ! ------------------ @@ -247,8 +245,6 @@ subroutine SetServices ( GC, RC ) ! ---------------------------------- call MAPL_GenericSetServices (GC, __RC__) -if(mapl_am_i_root()) print*,trim(comp_name),' SetServices END' - RETURN_(ESMF_SUCCESS) end subroutine SetServices @@ -352,11 +348,11 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! Load resource file and get number of bins ! ------------------------------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'NI2G_GridComp_'//trim(COMP_NAME)//'.rc', rc=status) + call ESMF_ConfigLoadFile (cfg, 'NI2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) if (status /= 0) then - if (mapl_am_i_root()) print*,'NI2G_GridComp_'//trim(COMP_NAME)//'.rc does not exist! & - loading NI2G_GridComp_NI.rc instead' - call ESMF_ConfigLoadFile( cfg, 'NI2G_GridComp_NI.rc', __RC__) + if (mapl_am_i_root()) print*,'NI2G_instance_'//trim(COMP_NAME)//'.rc does not exist! & + loading NI2G_instance_NI.rc instead' + call ESMF_ConfigLoadFile( cfg, 'NI2G_instance_NI.rc', __RC__) end if self%first = .true. @@ -513,16 +509,16 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) label="aerosol_monochromatic_optics_file:", __RC__ ) call ESMF_ConfigGetAttribute (cfg, self%diag_MieTable(instance)%nmom, label="n_moments:", default=0, __RC__) - i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_monochromatic_optics_wavelength:', __RC__) + i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:', __RC__) self%diag_MieTable(instance)%nch = i allocate (self%diag_MieTable(instance)%channels(self%diag_MieTable(instance)%nch), __STAT__ ) call ESMF_ConfigGetAttribute (universal_cfg, self%diag_MieTable(instance)%channels, & - label= "aerosol_monochromatic_optics_wavelength:", __RC__) + label= "aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:", __RC__) allocate (self%diag_MieTable(instance)%mie_aerosol, __STAT__) self%diag_MieTable(instance)%mie_aerosol = Chem_MieTableCreate (self%diag_MieTable(instance)%optics_file, __RC__ ) call Chem_MieTableRead (self%diag_MieTable(instance)%mie_aerosol, self%diag_MieTable(instance)%nch, & - self%diag_MieTable(instance)%channels, rc=status, nmom=self%diag_MieTable(instance)%nmom) + self%diag_MieTable(instance)%channels*1.e-9, rc=status, nmom=self%diag_MieTable(instance)%nmom) VERIFY_(status) ! Mie Table instance/index @@ -539,21 +535,26 @@ 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 add_aero (aero, label='monochromatic_extinction_in_air_due_to_ambient_aerosol', & + label2='monochromatic_EXT', grid=grid, typekind=MAPL_R4,__RC__) + call add_aero (aero, label='sum_of_internalState_aerosol', label2='aerosolSum', grid=grid, typekind=MAPL_R4, __RC__) - call ESMF_AttributeSet(aero, name='band_for_aerosol_optics', value=0, __RC__) + call ESMF_AttributeSet (aero, name='band_for_aerosol_optics', value=0, __RC__) + call ESMF_AttributeSet (aero, name='wavelength_for_aerosol_optics', value=0., __RC__) mieTable_pointer = transfer(c_loc(self), [1]) - call ESMF_AttributeSet(aero, name='mieTable_pointer', valueList=mieTable_pointer, itemCount=size(mieTable_pointer), __RC__) + call ESMF_AttributeSet (aero, name='mieTable_pointer', valueList=mieTable_pointer, itemCount=size(mieTable_pointer), __RC__) -! call ESMF_AttributeSet(aero, name='internal_varaible_name', value='SS', __RC__) allocate(aerosol_names(3), __STAT__) aerosol_names(1) = 'NO3an1' aerosol_names(2) = 'NO3an2' aerosol_names(3) = 'NO3an3' - call ESMF_AttributeSet(aero, name='internal_varaible_name', valueList=aerosol_names, & - itemCount=size(aerosol_names), __RC__) + call ESMF_AttributeSet (aero, name='internal_variable_name', valueList=aerosol_names, & + itemCount=size(aerosol_names), __RC__) - call ESMF_MethodAdd(AERO, label='aerosol_optics', userRoutine=aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='aerosol_optics', userRoutine=aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='monochromatic_aerosol_optics', userRoutine=monochromatic_aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='get_mixR', userRoutine=get_mixR, __RC__) RETURN_(ESMF_SUCCESS) @@ -674,8 +675,6 @@ subroutine Run1 (GC, import, export, clock, RC) VERIFY_(STATUS) self => wrap%ptr -!if(mapl_am_i_root()) print*,'NI2G Run1 BEGIN sum(self%xhno3) = ',sum(self%xhno3) - ! NH3 Emissions ! ------------- if (associated(NH3EM)) then @@ -704,15 +703,6 @@ subroutine Run1 (GC, import, export, clock, RC) if (associated(EMI_NH3_OC)) & NH3(:,:,self%km) = NH3(:,:,self%km)+self%cdt*MAPL_GRAV/delp(:,:,self%km)*EMI_NH3_OC - -!if(mapl_am_i_root()) print*,'NI2G sum(DU)',sum(DU) - -!if(mapl_am_i_root()) print*,'NI2G Run1 END sum(NH3) = ',sum(NH3) -!if(mapl_am_i_root()) print*,'NI2G Run1 END sum(NH4a) = ',sum(NH4a) -!if(mapl_am_i_root()) print*,'NI2G Run1 END sum(self%xhno3) = ',sum(self%xhno3) -!if(mapl_am_i_root()) print*,trim(comp_name),'2G Run1 END' - - RETURN_(ESMF_SUCCESS) end subroutine Run1 @@ -756,8 +746,7 @@ subroutine Run2 (GC, import, export, clock, RC) logical :: alarm_is_ringing integer :: rhFlag - -integer :: i,j + integer :: i, j #include "NI2G_DeclarePointer___.h" @@ -804,72 +793,24 @@ subroutine Run2 (GC, import, export, clock, RC) if (alarm_is_ringing) then self%xhno3 = NITRATE_HNO3 call ESMF_AlarmRingerOff(alarm, __RC__) -if(mapl_am_i_root()) print*,'NI2G recycle alarm TRUE' -if(mapl_am_i_root()) print*,'NI recycle alarm sum(self%xhno3)',sum(self%xhno3) end if -!if(mapl_am_i_root()) print*,'NI2G Run2 BEGIN sum(NH3) = ',sum(NH3) -!if(mapl_am_i_root()) print*,'NI2G Run2 BEGIN sum(NH4a) = ',sum(NH4a) -!if(mapl_am_i_root()) print*,'NI2G Run2 BEGIN sum(hno3) = ',sum(nitrate_hno3) -!if(mapl_am_i_root()) print*,'NI2G Run2 BEGIN before sum(self%xhno3) = ',sum(self%xhno3) -!if(mapl_am_i_root()) print*,'NI2G sum(DU) = ',sum(DU) -!if(mapl_am_i_root()) print*,'NI2G sum(SS) = ',sum(SS) - -! This could be in incorrect alarm. This alarm is currently for HNO3_RECYCLE_ALARM, but a -! new alarm might need to be created just for this GC, or all of gocart2g? -!RUN_ALARM: if (alarm_is_ringing) then - if (associated(NIPNO3AQ)) NIPNO3AQ(:,:) = 0. if (associated(NIPNH4AQ)) NIPNH4AQ(:,:) = 0. if (associated(NIPNH3AQ)) NIPNH3AQ(:,:) = 0. -!if(mapl_am_i_root()) print*,'NI2G before thermo sum(NH3) = ',sum(NH3) -!if(mapl_am_i_root()) print*,'NI2G before thermo sum(NO3an1) = ',sum(NO3an1) -!if(mapl_am_i_root()) print*,'NI2G before thermo sum(NH4a) = ',sum(NH4a) -!if(mapl_am_i_root()) print*,'NI2G before sum(SO4) = ',sum(SO4) - - call NIthermo (self%km, self%klid, self%cdt, MAPL_GRAV, delp, airdens, t, rh2, fMassHNO3, MAPL_AIRMW, & - SO4, NH3, NO3an1, NH4a, self%xhno3, NIPNO3AQ, NIPNH4AQ, NIPNH3AQ, __RC__) - -!if(mapl_am_i_root()) print*,'NI2G after thermo sum(NH3) = ',sum(NH3) -!if(mapl_am_i_root()) print*,'NI2G after thermo sum(NO3an1) = ',sum(NO3an1) -!if(mapl_am_i_root()) print*,'NI2G after thermo sum(NO3an2) = ',sum(NO3an2) -!if(mapl_am_i_root()) print*,'NI2G after thermo sum(NO3an3) = ',sum(NO3an3) -!if(mapl_am_i_root()) print*,'NI2G after thermo sum(NH4a) = ',sum(NH4a) -!if(mapl_am_i_root()) print*,'NI2G after thermo sum(xhno3) = ',sum(self%xhno3) -!if(mapl_am_i_root()) print*,'NI2G sum(NIPNO3AQ) = ',sum(NIPNO3AQ) -!if(mapl_am_i_root()) print*,'NI2G sum(NIPNH4AQ) = ',sum(NIPNH4AQ) -!if(mapl_am_i_root()) print*,'NI2G sum(NIPNH3AQ) = ',sum(NIPNH3AQ) - -!if(mapl_am_i_root()) print*,'NI2G self%fnumDU = ',self%fnumDU -!if(mapl_am_i_root()) print*,'NI2G self%fnumSS = ',self%fnumSS -!if(mapl_am_i_root()) print*,'NI2G self%rmedDU = ',self%rmedDU*1.e-6 -!if(mapl_am_i_root()) print*,'NI2G self%rmedSS = ',self%rmedSS*1.e-6 - - call NIheterogenousChem (NIHT, self%xhno3, MAPL_AVOGAD, MAPL_AIRMW, MAPL_PI, MAPL_RUNIV/1000., & - airdens, t, rh2, delp, DU, SS, self%rmedDU*1.e-6, self%rmedSS*1.e-6, & - self%fnumDU, self%fnumSS, 5, 5, self%km, self%klid, self%cdt, MAPL_GRAV, fMassHNO3, & - fMassNO3, NO3an1, NO3an2, NO3an3, HNO3CONC, HNO3SMASS, & - HNO3CMASS, __RC__) - -!if(mapl_am_i_root()) print*,'NI2G sum(NIHT(:,:,1)) = ',sum(NIHT(:,:,1)) -!if(mapl_am_i_root()) print*,'NI2G sum(NIHT(:,:,2)) = ',sum(NIHT(:,:,2)) -!if(mapl_am_i_root()) print*,'NI2G sum(NIHT(:,:,3)) = ',sum(NIHT(:,:,3)) -!if(mapl_am_i_root()) print*,'NI2G sum(NO3an1) = ',sum(NO3an1) -!if(mapl_am_i_root()) print*,'NI2G sum(NO3an2) = ',sum(NO3an2) -!if(mapl_am_i_root()) print*,'NI2G sum(NO3an3) = ',sum(NO3an3) -!if(mapl_am_i_root()) print*,'NI2G sum(HNO3CONC) = ',sum(HNO3CONC) -!if(mapl_am_i_root()) print*,'NI2G sum(HNO3SMASS) = ',sum(HNO3SMASS) -!if(mapl_am_i_root()) print*,'NI2G sum(HNO3CMASS) = ',sum(HNO3CMASS) - -!if(mapl_am_i_root()) print*,'NI2G after hetchem sum(NH3) = ',sum(NH3) -!if(mapl_am_i_root()) print*,'NI2G after hetchem sum(NH4a) = ',sum(NH4a) -!if(mapl_am_i_root()) print*,'NI2G after hetchem sum(NO3an1) = ',sum(NO3an1) -!if(mapl_am_i_root()) print*,'NI2G after hetchem sum(NO3an2) = ',sum(NO3an2) -!if(mapl_am_i_root()) print*,'NI2G after hetchem sum(NO3an3) = ',sum(NO3an3) -!if(mapl_am_i_root()) print*,'NI2G after hetchem sum(xhno3) = ',sum(self%xhno3) - -!if(mapl_am_i_root()) print*,'NI2G NH4a array = ',NH4a + call NIthermo (self%km, self%klid, self%cdt, MAPL_GRAV, delp, airdens, & + t, rh2, fMassHNO3, MAPL_AIRMW, SO4, NH3, NO3an1, NH4a, & + self%xhno3, NIPNO3AQ, NIPNH4AQ, NIPNH3AQ, __RC__) + + + call NIheterogenousChem (NIHT, self%xhno3, MAPL_UNDEF, MAPL_AVOGAD, MAPL_AIRMW, & + MAPL_PI, MAPL_RUNIV/1000., airdens, t, rh2, delp, DU, & + SS, self%rmedDU*1.e-6, self%rmedSS*1.e-6, & + self%fnumDU, self%fnumSS, 5, 5, self%km, self%klid, & + self%cdt, MAPL_GRAV, fMassHNO3, fMassNO3, NO3an1, NO3an2, & + NO3an3, HNO3CONC, HNO3SMASS, HNO3CMASS, __RC__) + ! NI Settling ! ----------- @@ -878,67 +819,54 @@ subroutine Run2 (GC, import, export, clock, RC) ! 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__) - -!if(mapl_am_i_root()) print*,'NI2G sum(NH4SD) = ',sum(NH4SD) -!if(mapl_am_i_root()) print*,'NI2G sum(NH4a) = ',sum(NH4a) -!if(mapl_am_i_root()) print*,'NI2G NH4a array = ',NH4a -!if(mapl_am_i_root()) print*,'NI2G NH4SD array = ',NH4SD - +! 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__) ! Nitrate bin 1 - settles like ammonium sulfate (rhflag = 3) rhflag = 3 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__) -!if(mapl_am_i_root()) print*,'NI2G sum(NISD(:,:,1)) = ',sum(NISD(:,:,1)) -!if(mapl_am_i_root()) print*,'NI2G sum(NO3an1) = ',sum(NO3an1) +! 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__) ! Nitrate bin 2 - settles like sea salt (rhflag = 2) rhflag = 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__) -!if(mapl_am_i_root()) print*,'NI2G sum(NISD(:,:,2)) = ',sum(NISD(:,:,2)) -!if(mapl_am_i_root()) print*,'NI2G sum(NO3an2) = ',sum(NO3an2) +! 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__) ! Nitrate bin 1 - settles like dust (rhflag = 0) rhflag = 0 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__) -!if(mapl_am_i_root()) print*,'NI2G sum(NISD(:,:,3)) = ',sum(NISD(:,:,3)) -!if(mapl_am_i_root()) print*,'NI2G ChemSet sum(NO3an3) = ',sum(NO3an3) - - -!if(mapl_am_i_root()) print*,'NI2G after chemset sum(NH3) = ',sum(NH3) -!if(mapl_am_i_root()) print*,'NI2G after chemset sum(NH4a) = ',sum(NH4a) +! 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__) ! NI Deposition ! ----------- drydepositionfrequency = 0. call DryDeposition(self%km, t, airdens, zle, lwi, ustar, zpbl, sh,& MAPL_KARMAN, cpd, MAPL_GRAV, z0h, drydepositionfrequency, __RC__ ) -!if(mapl_am_i_root()) print"(g25.17)",'NI2G drydep = ',drydepositionfrequency -!if(mapl_am_i_root()) print*,'NI2G NH3 array = ',NH3 -!if(mapl_am_i_root()) print*,'NI2G lwi array = ',lwi ! NH3 dqa = 0. -! where (abs(lwi - OCEAN) < 0.5) -! dqa = max(0.0, NH3(:,:,self%km)*(1.-exp(-10.0*drydepositionfrequency*self%cdt))) -! elsewhere -! dqa = max(0.0, NH3(:,:,self%km)*(1.-exp( -3.0*drydepositionfrequency*self%cdt))) -! end where - do i=1,ubound(lwi,1) do j =1,ubound(lwi,2) if (abs(lwi(i,j) - OCEAN) < 0.5) then @@ -951,41 +879,28 @@ subroutine Run2 (GC, import, export, clock, RC) NH3(:,:,self%km) = NH3(:,:,self%km) - dqa if( associated(NH3DP) ) NH3DP = dqa*delp(:,:,self%km)/MAPL_GRAV/self%cdt -!if(mapl_am_i_root()) print*,'NI2G sum(NH3) = ',sum(NH3) -!if(mapl_am_i_root()) print*,'NI2G sum(NH3DP) = ',sum(NH3DP) -!if(mapl_am_i_root()) print*,'NI2G dqa array = ',dqa -!if(mapl_am_i_root()) print"(g25.17)",'NI2G NH3 array = ',NH3 - ! NH4a dqa = 0. dqa = max(0.0, NH4a(:,:,self%km)*(1.-exp(-drydepositionfrequency*self%cdt))) NH4a(:,:,self%km) = NH4a(:,:,self%km) - dqa if( associated(NH4DP) ) NH4DP = dqa*delp(:,:,self%km)/MAPL_GRAV/self%cdt -!if(mapl_am_i_root()) print*,'NI2G sum(NH4a) = ',sum(NH4a) -!if(mapl_am_i_root()) print*,'NI2G sum(NH4DP) = ',sum(NH4DP) ! NO3anx dqa = 0. dqa = max(0.0, NO3an1(:,:,self%km)*(1.-exp(-drydepositionfrequency*self%cdt))) NO3an1(:,:,self%km) = NO3an1(:,:,self%km) - dqa if( associated(NIDP) ) NIDP(:,:,1) = dqa*delp(:,:,self%km)/MAPL_GRAV/self%cdt -!if(mapl_am_i_root()) print*,'NI2G sum(NO3an1) = ',sum(NO3an1) -!if(mapl_am_i_root()) print*,'NI2G sum(NIDP(:,:,1)) = ',sum(NIDP(:,:,1)) dqa = 0. dqa = max(0.0, NO3an2(:,:,self%km)*(1.-exp(-drydepositionfrequency*self%cdt))) NO3an2(:,:,self%km) = NO3an2(:,:,self%km) - dqa if( associated(NIDP) ) NIDP(:,:,2) = dqa*delp(:,:,self%km)/MAPL_GRAV/self%cdt -!if(mapl_am_i_root()) print*,'NI2G sum(NO3an2) = ',sum(NO3an2) -!if(mapl_am_i_root()) print*,'NI2G sum(NIDP(:,:,2)) = ',sum(NIDP(:,:,2)) dqa = 0. dqa = max(0.0, NO3an3(:,:,self%km)*(1.-exp(-drydepositionfrequency*self%cdt))) NO3an3(:,:,self%km) = NO3an3(:,:,self%km) - dqa if( associated(NIDP) ) NIDP(:,:,3) = dqa*delp(:,:,self%km)/MAPL_GRAV/self%cdt -!if(mapl_am_i_root()) print*,'NI2G DryDep sum(NO3an3) = ',sum(NO3an3) -!if(mapl_am_i_root()) print*,'NI2G sum(NIDP(:,:,3)) = ',sum(NIDP(:,:,3)) ! NI Large-scale Wet Removal ! -------------------------- @@ -1001,8 +916,6 @@ subroutine Run2 (GC, import, export, clock, RC) KIN, MAPL_GRAV, fwet, NH3, ple, t, airdens, & pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, fluxWT_ptr, __RC__) if (associated(NH3WT)) NH3WT = fluxWT_ptr(:,:,1) -!if(mapl_am_i_root()) print*,'NI2G sum(NH3WT) = ',sum(NH3WT) -!if(mapl_am_i_root()) print*,'NI2G sum(NH3) = ',sum(NH3) ! NH4a KIN = .true. @@ -1017,29 +930,24 @@ subroutine Run2 (GC, import, export, clock, RC) if (allocated(fluxoutWT)) then deallocate(fluxoutWT, __STAT__) end if -!if(mapl_am_i_root()) print*,'NI2G sum(NH4WT) = ',sum(NH4WT) -!if(mapl_am_i_root()) print*,'NI2G sum(NH4) = ',sum(NH4a) 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, & pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, NIWT, __RC__) -!if(mapl_am_i_root()) print*,'NI2G sum(NIWT(:,:,1)) = ',sum(NIWT(:,:,1)) + 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, & pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, NIWT, __RC__) -!if(mapl_am_i_root()) print*,'NI2G sum(NIWT(:,:,2)) = ',sum(NIWT(:,:,2)) 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, & pfl_lsan, pfi_lsan, cn_prcp, ncn_prcp, NIWT, __RC__) -!if(mapl_am_i_root()) print*,'NI2G sum(NIWT(:,:,3)) = ',sum(NIWT(:,:,3)) -!if(mapl_am_i_root()) print*,'NI2G WetRemoval sum(NO3an3) = ',sum(NO3an3) ! Compute desired output diagnostics ! ---------------------------------- @@ -1052,11 +960,8 @@ subroutine Run2 (GC, import, export, clock, RC) 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=rh2, u=u, v=v, & - delp=delp, sfcmass=NH4SMASS, colmass=NH4CMASS, mass=NH4MASS, conc=NH4CONC, __RC__) -!if(mapl_am_i_root()) print*,'NI2G sum(NH4SMASS) = ',sum(NH4SMASS) -!if(mapl_am_i_root()) print*,'NI2G sum(NH4CMASS) = ',sum(NH4CMASS) -!if(mapl_am_i_root()) print*,'NI2G sum(NH4MASS) = ',sum(NH4MASS) -!if(mapl_am_i_root()) print*,'NI2G sum(NH4CONC) = ',sum(NH4CONC) + delp=delp, ple=ple, tropp=tropp,& + sfcmass=NH4SMASS, colmass=NH4CMASS, mass=NH4MASS, conc=NH4CONC, __RC__) aerosol(:,:,:,1) = NH3 call Aero_Compute_Diags (mie_table=self%diag_MieTable(self%instance), km=self%km, klid=self%klid, nbegin=1, & @@ -1064,11 +969,8 @@ subroutine Run2 (GC, import, export, clock, RC) 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=rh2, u=u, v=v, & - delp=delp, sfcmass=NH3SMASS, colmass=NH3CMASS, mass=NH3MASS, conc=NH3CONC, __RC__) -!if(mapl_am_i_root()) print*,'NI2G sum(NH3SMASS) = ',sum(NH3SMASS) -!if(mapl_am_i_root()) print*,'NI2G sum(NH3CMASS) = ',sum(NH3CMASS) -!if(mapl_am_i_root()) print*,'NI2G sum(NH3MASS) = ',sum(NH3MASS) -!if(mapl_am_i_root()) print*,'NI2G sum(NH3CONC) = ',sum(NH3CONC) + delp=delp, ple=ple, tropp=tropp,& + sfcmass=NH3SMASS, colmass=NH3CMASS, mass=NH3MASS, conc=NH3CONC, __RC__) aerosol(:,:,:,1) = NO3an1 call Aero_Compute_Diags (mie_table=self%diag_MieTable(self%instance), km=self%km, klid=self%klid, nbegin=1, & @@ -1076,15 +978,11 @@ subroutine Run2 (GC, import, export, clock, RC) 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=rh2, u=u, v=v, & - delp=delp, sfcmass=NISMASS25, colmass=NICMASS25, mass=NIMASS25, conc=NICONC25, & + delp=delp, ple=ple, tropp=tropp,& + sfcmass=NISMASS25, colmass=NICMASS25, mass=NIMASS25, conc=NICONC25, & exttau25=NIEXTT25, scatau25=NISCAT25, exttaufm=NIEXTTFM, scataufm=NISCATFM, & NO3nFlag=.true., __RC__) -!if(mapl_am_i_root()) print*,'NI2G sum(NISMASS25) = ',sum(NISMASS25) -!if(mapl_am_i_root()) print*,'NI2G sum(NICMASS25) = ',sum(NICMASS25) -!if(mapl_am_i_root()) print*,'NI2G sum(NIMASS25) = ',sum(NIMASS25) -!if(mapl_am_i_root()) print*,'NI2G sum(NICONC25) = ',sum(NICONC25) -!#if 0 aerosol(:,:,:,1) = NO3an1 aerosol(:,:,:,2) = NO3an2 aerosol(:,:,:,3) = NO3an3 @@ -1093,28 +991,10 @@ subroutine Run2 (GC, import, export, clock, RC) 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=rh2, u=u, v=v, & - delp=delp, sfcmass=NISMASS, colmass=NICMASS, mass=NIMASS, conc=NICONC, & - exttau=NIEXTTAU, scatau=NISCATAU, & + delp=delp, ple=ple, tropp=tropp,sfcmass=NISMASS, colmass=NICMASS, mass=NIMASS, conc=NICONC, & + exttau=NIEXTTAU, stexttau=NISTEXTTAU,scatau=NISCATAU, stscatau=NISTSCATAU,& fluxu=NIFLUXU, fluxv=NIFLUXV, extcoef=NIEXTCOEF, scacoef=NISCACOEF, & angstrom=NIANGSTR, __RC__ ) -!#endif -!if(mapl_am_i_root()) print*,'NI2G sum(NIEXTTAU) = ',sum(NIEXTTAU) -!if(mapl_am_i_root()) print*,'NI2G sum(NISCATAU) = ',sum(NISCATAU) -!if(mapl_am_i_root()) print*,'NI2G sum(NIMASS) = ',sum(NIMASS) -!if(mapl_am_i_root()) print*,'NI2G sum(NIFLUXU) = ',sum(NIFLUXU) - -!if(mapl_am_i_root()) print*,'NI2G Run2 END sum(NIANGSTR) = ',sum(NIANGSTR) -if(mapl_am_i_root()) print*,'NI2G Run2 END sum(NH3) = ',sum(NH3) -if(mapl_am_i_root()) print*,'NI2G Run2 END sum(NH4a) = ',sum(NH4a) -!if(mapl_am_i_root()) print*,'NI2G Run2 END sum(self%xhno3) = ',sum(self%xhno3) - -!if(mapl_am_i_root()) print*,'NI2G Run2 END array NH3 = ',NH3 -!if(mapl_am_i_root()) print*,'NI2G Run2 END array NH4a = ',NH4a -if(mapl_am_i_root()) print*,'NI2G Run2 END sum(NO3an1) = ',sum(NO3an1) -if(mapl_am_i_root()) print*,'NI2G Run2 END sum(NO3an2) = ',sum(NO3an2) -if(mapl_am_i_root()) print*,'NI2G Run2 END sum(NO3an3) = ',sum(NO3an3) - - RETURN_(ESMF_SUCCESS) @@ -1176,8 +1056,6 @@ subroutine Run_data (GC, IMPORT, EXPORT, INTERNAL, RC) call MAPL_GetPointer (import, name='climNO3an3', ptr=ptr3d_imp, __RC__) ptr3d_int = ptr3d_imp -if(mapl_am_i_root())print*,'NI2G Run_data END' - RETURN_(ESMF_SUCCESS) end subroutine Run_data @@ -1226,9 +1104,9 @@ subroutine aerosol_optics(state, rc) ! Get aerosol names ! ----------------- - call ESMF_AttributeGet (state, name='internal_varaible_name', itemCount=nbins, __RC__) + call ESMF_AttributeGet (state, name='internal_variable_name', itemCount=nbins, __RC__) allocate (aerosol_names(nbins), __STAT__) - call ESMF_AttributeGet (state, name='internal_varaible_name', valueList=aerosol_names, __RC__) + call ESMF_AttributeGet (state, name='internal_variable_name', valueList=aerosol_names, __RC__) ! Radiation band ! -------------- @@ -1350,4 +1228,137 @@ end subroutine mie_ end subroutine aerosol_optics +!------------------------------------------------------------------------------------- + + subroutine monochromatic_aerosol_optics(state, rc) + + implicit none + +! !ARGUMENTS: + type (ESMF_State) :: state + integer, intent(out) :: rc + +! !Local + real, dimension(:,:,:), pointer :: ple, rh + real, dimension(:,:), pointer :: var + real, dimension(:,:,:), pointer :: q + real, dimension(:,:,:,:), pointer :: q_4d + integer, allocatable :: opaque_self(:) + type(C_PTR) :: address + type(NI2G_GridComp), pointer :: self + + character (len=ESMF_MAXSTR) :: fld_name + type(ESMF_Field) :: fld + character (len=ESMF_MAXSTR),allocatable :: aerosol_names(:) + + real, dimension(:,:,:), allocatable :: tau_s, tau ! (lon:,lat:,lev:) + real :: x + integer :: instance + integer :: n, nbins + integer :: i1, j1, i2, j2, km + real :: wavelength, mieTable_index + integer :: i, j, k + + __Iam__('NI2G:: monochromatic_aerosol_optics') + +! Begin... + +! Mie Table instance/index +! ------------------------ + call ESMF_AttributeGet(state, name='mie_table_instance', value=instance, __RC__) + +! Get aerosol names +! ----------------- + call ESMF_AttributeGet (state, name='internal_variable_name', itemCount=nbins, __RC__) + allocate (aerosol_names(nbins), __STAT__) + call ESMF_AttributeGet (state, name='internal_variable_name', valueList=aerosol_names, __RC__) + +! Radiation band +! -------------- + call ESMF_AttributeGet(state, name='wavelength_for_aerosol_optics', value=wavelength, __RC__) + +! Get wavelength index for Mie Table +! ---------------------------------- +! Channel values are 4.7e-7 5.5e-7 6.7e-7 8.7e-7 [meter]. Their indices are 1,2,3,4 respectively. + if ((wavelength .ge. 4.69e-7) .and. (wavelength .le. 4.71e-7)) then + mieTable_index = 1. + else if ((wavelength .ge. 5.49e-7) .and. (wavelength .le. 5.51e-7)) then + mieTable_index = 2. + else if ((wavelength .ge. 6.69e-7) .and. (wavelength .le. 6.71e-7)) then + mieTable_index = 3. + else if ((wavelength .ge. 8.68e-7) .and. (wavelength .le. 8.71e-7)) then + mieTable_index = 4. + else + print*,trim(Iam),' : wavelength of ',wavelength,' is an invalid value.' + return + end if + +! 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__) +! call MAPL_GetPointer (state, ple, 'PLE', __RC__) + + i1 = lbound(ple, 1); i2 = ubound(ple, 1) + j1 = lbound(ple, 2); j2 = ubound(ple, 2) + km = ubound(ple, 3) + +! Relative humidity +! ----------------- + call ESMF_AttributeGet(state, name='relative_humidity_for_aerosol_optics', value=fld_name, __RC__) + call MAPL_GetPointer(state, rh, trim(fld_name), __RC__) +! call MAPL_GetPointer (state, rh, 'RH2', __RC__) + + allocate(tau_s(i1:i2, j1:j2, km), & + tau(i1:i2, j1:j2, km), __STAT__) + tau_s = 0.0 + tau = 0.0 + + allocate(q_4d(i1:i2, j1:j2, km, nbins), __STAT__) + + do n = 1, nbins + call ESMF_StateGet (state, trim(aerosol_names(n)), field=fld, __RC__) + call ESMF_FieldGet (fld, farrayPtr=q, __RC__) + + do k = 1, km + do j = j1, j2 + do i = i1, i2 + x = ((ple(i,j,k) - ple(i,j,k-1))*0.01)*(100./MAPL_GRAV) + q_4d(i,j,k,n) = x * q(i,j,k) + end do + end do + end do + end do + + call ESMF_AttributeGet(state, name='mieTable_pointer', itemCount=n, __RC__) + allocate (opaque_self(n), __STAT__) + call ESMF_AttributeGet(state, name='mieTable_pointer', valueList=opaque_self, __RC__) + + address = transfer(opaque_self, address) + call c_f_pointer(address, self) + + do n = 1, nbins + do i = 1, i2 + do j = 1, j2 + do k = 1, km + call Chem_MieQuery(self%diag_MieTable(instance), n, mieTable_index, q_4d(i,j,k,n), rh(i,j,k), tau(i,j,k), __RC__) + tau_s(i,j,k) = tau_s(i,j,k) + tau(i,j,k) + end do + end do + end do + end do + + call ESMF_AttributeGet(state, name='monochromatic_extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(state, var, trim(fld_name), __RC__) + var = sum(tau_s, dim=3) + end if + + deallocate(q_4d, __STAT__) + + RETURN_(ESMF_SUCCESS) + + end subroutine monochromatic_aerosol_optics + + end module NI2G_GridCompMod diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc index 71af1971..6c0f9648 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_GridComp_ExtData.rc @@ -14,7 +14,7 @@ climNO3an3 'kg kg-1' N Y F0 none none NO3AN3 /home/adasilva/ #climNO3an3 'kg kg-1' Y Y %y4-%m2-%d2T12:00:00 none none NO3AN3 /home/adasilva/opendap/fp/das/Y2017/M02/D01/GEOS.fp.asm.inst3_3d_aer_Nv.20170201_0000.V01.nc4 # ======= Nitrate Sources ======== -EMI_NH3_BB 'kg m-2 s-1' N Y %y4-%m2-%d2T12:00:00 none none biomass ExtData/PIESA/sfc/QFED/NRT/v2.5r1_0.1_deg/Y%y4/M%m2/qfed2.emis_nh3.006.%y4%m2%d2.nc4 +EMI_NH3_BB 'kg m-2 s-1' N Y %y4-%m2-%d2T12:00:00 none 0.778 biomass ExtData/PIESA/sfc/QFED/NRT/v2.5r1_0.1_deg/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 ExtData/PIESA/sfc/HTAP/v2.2/htap-v2.2.emis_nh3.agriculture.x3600_y1800_t12.2010.nc4 EMI_NH3_EN 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis ExtData/PIESA/sfc/HTAP/v2.2/htap-v2.2.emis_nh3.energy.x3600_y1800_t12.2010.nc4 EMI_NH3_IN 'kg m-2 s-1' Y Y %y4-%m2-%d2T12:00:00 none none nh3_emis ExtData/PIESA/sfc/HTAP/v2.2/htap-v2.2.emis_nh3.industry.x3600_y1800_t12.2010.nc4 diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc index 75ec8fff..3cd5d6ff 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_StateSpecs.rc @@ -8,6 +8,7 @@ category: IMPORT NAME | UNITS | DIMS | VLOC | UNGRIDDED | LONG NAME #---------------------------------------------------------------------------------------- LWI | 1 | xy | N | | land-ocean-ice_mask + TROPP | Pa | xy | N | | tropopause_pressure_based_on_blended_estimate USTAR | m s-1 | xy | N | | surface_velocity_scale ZPBL | m | xy | N | | planetary_boundary_layer_height SH | w m-2 | xy | N | | sensible_heat_flux_from_turbulence @@ -54,8 +55,8 @@ 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 [PM2.5] - NIEXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Nitrate Extinction Coefficient [550 nm] - NISCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Nitrate Scattering Coefficient [550 nm] + 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 @@ -83,12 +84,14 @@ category: EXPORT 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 [550 nm] - PM 1.0 um - NISCATFM | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Scattering AOT [550 nm] - PM 1.0 um - NIEXTT25 | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Extinction AOT [550 nm] - PM 2.5 um - NISCAT25 | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Scattering AOT [550 nm] - PM 2.5 um - NIEXTTAU | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Extinction AOT [550 nm] - NISCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Nitrate Scattering AOT [550 nm] + 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 diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/MERRA2/NI2G_GridComp_NI.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc similarity index 90% rename from ESMF/GOCART2G_GridComp/NI2G_GridComp/MERRA2/NI2G_GridComp_NI.rc rename to ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc index b6a6d357..ba1052e9 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/MERRA2/NI2G_GridComp_NI.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NI2G_instance_NI.rc @@ -5,10 +5,7 @@ nbins: 5 aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_NI.v2_5.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_NI.v2_5.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 -n_channels: 4 # Scavenging efficiency per bin [km-1] fscav: 0.0 0.4 0.4 0.4 0.4 diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/PIESA/NI2G_GridComp_NI.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NR/NI2G_instance_NI.rc similarity index 90% rename from ESMF/GOCART2G_GridComp/NI2G_GridComp/PIESA/NI2G_GridComp_NI.rc rename to ESMF/GOCART2G_GridComp/NI2G_GridComp/NR/NI2G_instance_NI.rc index b6a6d357..ba1052e9 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/PIESA/NI2G_GridComp_NI.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/NR/NI2G_instance_NI.rc @@ -5,10 +5,7 @@ nbins: 5 aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_NI.v2_5.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_NI.v2_5.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 -n_channels: 4 # Scavenging efficiency per bin [km-1] fscav: 0.0 0.4 0.4 0.4 0.4 diff --git a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NR/NI2G_GridComp_NI.rc b/ESMF/GOCART2G_GridComp/NI2G_GridComp/PIESA/NI2G_instance_NI.rc similarity index 90% rename from ESMF/GOCART2G_GridComp/NI2G_GridComp/NR/NI2G_GridComp_NI.rc rename to ESMF/GOCART2G_GridComp/NI2G_GridComp/PIESA/NI2G_instance_NI.rc index b6a6d357..ba1052e9 100644 --- a/ESMF/GOCART2G_GridComp/NI2G_GridComp/NR/NI2G_GridComp_NI.rc +++ b/ESMF/GOCART2G_GridComp/NI2G_GridComp/PIESA/NI2G_instance_NI.rc @@ -5,10 +5,7 @@ nbins: 5 aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_NI.v2_5.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_NI.v2_5.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 -n_channels: 4 # Scavenging efficiency per bin [km-1] fscav: 0.0 0.4 0.4 0.4 0.4 diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_SS.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMIP/SS2G_instance_SS.rc similarity index 100% rename from ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_SS.rc rename to ESMF/GOCART2G_GridComp/SS2G_GridComp/CMIP/SS2G_instance_SS.rc diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMakeLists.txt index c3c6a8ed..3035cece 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMakeLists.txt +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMakeLists.txt @@ -2,7 +2,7 @@ esma_set_this () esma_add_library (${this} SRCS ${this}Mod.F90 - DEPENDENCIES MAPL GA_GridComp Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) + DEPENDENCIES MAPL GA_Environment Chem_Shared2G Process_Library esmf NetCDF::NetCDF_Fortran) mapl_acg (${this} SS2G_StateSpecs.rc IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMIP/SS2G_GridComp_SS.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2-DD/SS2G_instance_SS.rc similarity index 93% rename from ESMF/GOCART2G_GridComp/SS2G_GridComp/CMIP/SS2G_GridComp_SS.rc rename to ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2-DD/SS2G_instance_SS.rc index ac99208a..8a9104a7 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/CMIP/SS2G_GridComp_SS.rc +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2-DD/SS2G_instance_SS.rc @@ -3,10 +3,7 @@ # aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SS.v3_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SS.v3_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 particle_radius_microns: 0.079 0.316 1.119 2.818 7.772 diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2-DD/SS2G_GridComp_SS.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2/SS2G_instance_SS.rc similarity index 93% rename from ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2-DD/SS2G_GridComp_SS.rc rename to ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2/SS2G_instance_SS.rc index ac99208a..8a9104a7 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2-DD/SS2G_GridComp_SS.rc +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2/SS2G_instance_SS.rc @@ -3,10 +3,7 @@ # aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SS.v3_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SS.v3_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 particle_radius_microns: 0.079 0.316 1.119 2.818 7.772 diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2/SS2G_GridComp_SS.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/NR/SS2G_instance_SS.rc similarity index 93% rename from ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2/SS2G_GridComp_SS.rc rename to ESMF/GOCART2G_GridComp/SS2G_GridComp/NR/SS2G_instance_SS.rc index ac99208a..8a9104a7 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/MERRA2/SS2G_GridComp_SS.rc +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/NR/SS2G_instance_SS.rc @@ -3,10 +3,7 @@ # aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SS.v3_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SS.v3_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 particle_radius_microns: 0.079 0.316 1.119 2.818 7.772 diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/PIESA/SS2G_GridComp_SS.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/PIESA/SS2G_GridComp_SS.rc deleted file mode 100644 index ac99208a..00000000 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/PIESA/SS2G_GridComp_SS.rc +++ /dev/null @@ -1,46 +0,0 @@ -# -# Resource file Sea Salt parameters -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SS.v3_3.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SS.v3_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 - -particle_radius_microns: 0.079 0.316 1.119 2.818 7.772 - -radius_lower: 0.03 0.1 0.5 1.5 5.0 - -radius_upper: 0.1 0.5 1.5 5.0 10.0 - -particle_density: 2200. 2200. 2200. 2200. 2200. - -# Scavenging efficiency per bin [km-1] -fscav: 0.4 0.4 0.4 0.4 0.4 - -# Emissions methods and scaling -emission_scheme: 3 # 1 for Gong 2003, 2 for ... -emission_scale: 0.613 0.613 0.613 0.429 0.429 0.429 # a global scaling factor -sstEmisFlag: 2 # Apply a correction to emissions based on SST (see code) -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 - -# Number of particles per kg mass -fnum: 3.017e17 1.085e16 1.207e14 9.391e12 2.922e11 - -# Number median radius [um] -particle_radius_number: 0.066 0.176 0.885 2.061 6.901 - -nbins: 5 - -pressure_lid_in_hPa: 0.01 - - diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/NR/SS2G_GridComp_SS.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/PIESA/SS2G_instance_SS.rc similarity index 93% rename from ESMF/GOCART2G_GridComp/SS2G_GridComp/NR/SS2G_GridComp_SS.rc rename to ESMF/GOCART2G_GridComp/SS2G_GridComp/PIESA/SS2G_instance_SS.rc index ac99208a..8a9104a7 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/NR/SS2G_GridComp_SS.rc +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/PIESA/SS2G_instance_SS.rc @@ -3,10 +3,7 @@ # aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SS.v3_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SS.v3_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 ! units: nm -n_channels: 4 particle_radius_microns: 0.079 0.316 1.119 2.818 7.772 diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 index 388be356..dcd532a8 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridCompMod.F90 @@ -16,7 +16,7 @@ module SS2G_GridCompMod use iso_c_binding, only: c_loc, c_f_pointer, c_ptr use GOCART2G_Process ! GOCART2G process library - use GA_GridCompMod + use GA_EnvironmentMod implicit none private @@ -41,7 +41,7 @@ module SS2G_GridCompMod integer, parameter :: NHRES = 6 ! !Sea Salt state - type, extends(GA_GridComp) :: SS2G_GridComp + type, extends(GA_Environment) :: SS2G_GridComp real, allocatable :: rlow(:) ! particle effective radius lower bound [um] real, allocatable :: rup(:) ! particle effective radius upper bound [um] real, allocatable :: rmed(:) ! number median radius [um] @@ -115,14 +115,14 @@ subroutine SetServices ( GC, RC ) ! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'SS2G_GridComp_'//trim(COMP_NAME)//'.rc', rc=status) + call ESMF_ConfigLoadFile (cfg, 'SS2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) if (status /= 0) then - if (mapl_am_i_root()) print*,'SS2G_GridComp_'//trim(COMP_NAME)//'.rc does not exist! loading SS2G_GridComp_SS.data.rc instead' - call ESMF_ConfigLoadFile (cfg, 'SS2G_GridComp_SS.rc', __RC__) + if (mapl_am_i_root()) print*,'SS2G_instance_'//trim(COMP_NAME)//'.rc does not exist! loading SS2G_instance_SS.rc instead' + call ESMF_ConfigLoadFile (cfg, 'SS2G_instance_SS.rc', __RC__) end if ! process generic config items - call self%GA_GridComp%load_from_config( cfg, universal_cfg, __RC__) + call self%GA_Environment%load_from_config( cfg, universal_cfg, __RC__) allocate(self%rlow(self%nbins), self%rup(self%nbins), self%rmed(self%nbins), __STAT__) @@ -254,16 +254,6 @@ subroutine SetServices ( GC, RC ) VLOCATION = MAPL_VLocationCenter, & DATATYPE = MAPL_StateItem, __RC__) -! This state is needed by MOIST - It will contain aerosols -! ---------------------------------------------------------- - call MAPL_AddExportSpec(GC, & - SHORT_NAME = trim(COMP_NAME)//'_AERO_ACI', & - LONG_NAME = 'aerosol_cloud_interaction_aerosols_from_'//trim(COMP_NAME), & - UNITS = 'kg kg-1', & - DIMS = MAPL_DimsHorzVert, & - VLOCATION = MAPL_VLocationCenter, & - DATATYPE = MAPL_StateItem, __RC__) - ! This bundle is needed by surface for snow albedo modification ! by aerosol settling and deposition ! DEVELOPMENT NOTE - Change to StateItem in future @@ -317,7 +307,7 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) type (MAPL_MetaComp), pointer :: MAPL type (ESMF_Grid) :: grid type (ESMF_State) :: internal - type (ESMF_State) :: aero, aero_aci + type (ESMF_State) :: aero type (ESMF_State) :: providerState type (ESMF_Config) :: cfg, universal_cfg type (ESMF_FieldBundle) :: Bundle_DP @@ -379,11 +369,11 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! Load resource file and get number of bins ! ------------------------------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'SS2G_GridComp_'//trim(COMP_NAME)//'.rc', rc=status) + call ESMF_ConfigLoadFile (cfg, 'SS2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) if (status /= 0) then - if (mapl_am_i_root()) print*,'SS2G_GridComp_'//trim(COMP_NAME)//'.rc does not exist! & - loading SS2G_GridComp_SS.rc instead' - call ESMF_ConfigLoadFile( cfg, 'SS2G_GridComp_SS.rc', __RC__) + if (mapl_am_i_root()) print*,'SS2G_instance_'//trim(COMP_NAME)//'.rc does not exist! & + loading SS2G_instance_SS.rc instead' + call ESMF_ConfigLoadFile( cfg, 'SS2G_instance_SS.rc', __RC__) end if ! Call Generic Initialize @@ -419,14 +409,12 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! Fill AERO State with sea salt fields ! ---------------------------------------- call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO' , aero , __RC__) - call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO_ACI', aero_aci, __RC__) call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO_DP' , Bundle_DP, __RC__) call ESMF_StateGet (internal, 'SS', field, __RC__) call ESMF_AttributeSet(field, NAME='klid', value=self%klid, __RC__) fld = MAPL_FieldCreate (field, 'SS', __RC__) call MAPL_StateAdd (aero, fld, __RC__) - call MAPL_StateAdd (aero_aci, fld, __RC__) if (.not. data_driven) then ! Set klid @@ -506,16 +494,16 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) call ESMF_ConfigGetAttribute (cfg, self%diag_MieTable(instance)%optics_file, & label="aerosol_monochromatic_optics_file:", __RC__ ) call ESMF_ConfigGetAttribute (cfg, self%diag_MieTable(instance)%nmom, label="n_moments:", default=0, __RC__) - i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_monochromatic_optics_wavelength:', __RC__) + i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:', __RC__) self%diag_MieTable(instance)%nch = i allocate (self%diag_MieTable(instance)%channels(self%diag_MieTable(instance)%nch), __STAT__ ) call ESMF_ConfigGetAttribute (universal_cfg, self%diag_MieTable(instance)%channels, & - label= "aerosol_monochromatic_optics_wavelength:", __RC__) + label= "aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:", __RC__) allocate (self%diag_MieTable(instance)%mie_aerosol, __STAT__) self%diag_MieTable(instance)%mie_aerosol = Chem_MieTableCreate (self%diag_MieTable(instance)%optics_file, __RC__ ) call Chem_MieTableRead (self%diag_MieTable(instance)%mie_aerosol, self%diag_MieTable(instance)%nch, & - self%diag_MieTable(instance)%channels, rc=status, nmom=self%diag_MieTable(instance)%nmom) + self%diag_MieTable(instance)%channels*1.e-9, rc=status, nmom=self%diag_MieTable(instance)%nmom) VERIFY_(status) ! Mie Table instance/index @@ -532,15 +520,21 @@ 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 add_aero (aero, label='monochromatic_extinction_in_air_due_to_ambient_aerosol', & + label2='monochromatic_EXT', grid=grid, typekind=MAPL_R4,__RC__) + call add_aero (aero, label='sum_of_internalState_aerosol', label2='aerosolSum', grid=grid, typekind=MAPL_R4, __RC__) - call ESMF_AttributeSet(aero, name='band_for_aerosol_optics', value=0, __RC__) + call ESMF_AttributeSet (aero, name='band_for_aerosol_optics', value=0, __RC__) + call ESMF_AttributeSet (aero, name='wavelength_for_aerosol_optics', value=0., __RC__) mieTable_pointer = transfer(c_loc(self), [1]) - call ESMF_AttributeSet(aero, name='mieTable_pointer', valueList=mieTable_pointer, itemCount=size(mieTable_pointer), __RC__) + call ESMF_AttributeSet (aero, name='mieTable_pointer', valueList=mieTable_pointer, itemCount=size(mieTable_pointer), __RC__) - call ESMF_AttributeSet(aero, name='internal_varaible_name', value='SS', __RC__) + call ESMF_AttributeSet (aero, name='internal_variable_name', value='SS', __RC__) - call ESMF_MethodAdd(AERO, label='aerosol_optics', userRoutine=aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='aerosol_optics', userRoutine=aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='monochromatic_aerosol_optics', userRoutine=monochromatic_aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='get_mixR', userRoutine=get_mixR, __RC__) ! Mask to prevent emissions from the Great Lakes and the Caspian Sea ! ------------------------------------------------------------------ @@ -799,9 +793,9 @@ subroutine Run2 (GC, import, export, clock, RC) ! Sea Salt Settling ! ----------------- do n = 1, self%nbins - call Chem_Settling2Gorig (self%km, self%klid, self%rhFlag, n, SS(:,:,:,n), MAPL_GRAV, delp, & - self%radius(n)*1.e-6, self%rhop(n), self%cdt, t, airdens, & - rh2, zle, SSSD, __RC__) + 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__) end do ! Deposition @@ -839,18 +833,12 @@ subroutine Run2 (GC, import, export, clock, RC) ! Certain variables are multiplied by 1.0e-9 to convert from nanometers to meters call Aero_Compute_Diags (self%diag_MieTable(self%instance), self%km, self%klid, 1, self%nbins, self%rlow, & self%rup, self%diag_MieTable(self%instance)%channels*1.0e-9, self%wavelengths_profile*1.0e-9, & - self%wavelengths_vertint*1.0e-9, SS, MAPL_GRAV, t, airdens, & - rh2, u, v, delp, SSSMASS, SSCMASS, SSMASS, SSEXTTAU, SSSCATAU, & + self%wavelengths_vertint*1.0e-9, SS, MAPL_GRAV, t, airdens,rh2, u, v, & + delp, ple, tropp,SSSMASS, SSCMASS, SSMASS, SSEXTTAU,SSSTEXTTAU, SSSCATAU,SSSTSCATAU, & SSSMASS25, SSCMASS25, SSMASS25, SSEXTT25, SSSCAT25, & SSFLUXU, SSFLUXV, SSCONC, SSEXTCOEF, SSSCACOEF, & SSEXTTFM, SSSCATFM ,SSANGSTR, SSAERIDX, NO3nFlag=.false.,__RC__) - if (mapl_am_i_root()) then - do n = 1, size(SS, 4) - print*,'n = ', n,' : Run2 E SS2G sum(ss00n) = ',sum(SS(:,:,:,n)) - end do - end if - RETURN_(ESMF_SUCCESS) end subroutine Run2 @@ -985,7 +973,7 @@ subroutine aerosol_optics(state, rc) asy_s(i1:i2, j1:j2, km), & x(i1:i2, j1:j2, km), __STAT__) - call ESMF_AttributeGet(state, name='internal_varaible_name', value=int_fld_name, __RC__) + call ESMF_AttributeGet(state, name='internal_variable_name', value=int_fld_name, __RC__) call ESMF_StateGet (state, trim(int_fld_name), field=fld, __RC__) !add as attribute - dont hard code? call ESMF_FieldGet (fld, farrayPtr=q, __RC__) @@ -1075,5 +1063,131 @@ end subroutine mie_ end subroutine aerosol_optics +!------------------------------------------------------------------------------------- + subroutine monochromatic_aerosol_optics(state, rc) + + implicit none + +! !ARGUMENTS: + type (ESMF_State) :: state + integer, intent(out) :: rc + +! !Local + real, dimension(:,:,:), pointer :: ple, rh + real, dimension(:,:), pointer :: var + real, dimension(:,:,:,:), pointer :: q, q_4d + integer, allocatable :: opaque_self(:) + type(C_PTR) :: address + type(SS2G_GridComp), pointer :: self + + character (len=ESMF_MAXSTR) :: fld_name + type(ESMF_Field) :: fld + + real, dimension(:,:,:), allocatable :: tau_s, tau, x ! (lon:,lat:,lev:) + integer :: instance + integer :: n, nbins, k + integer :: i1, j1, i2, j2, km, i, j + real :: wavelength, mieTable_index + + __Iam__('SS2G::monochromatic_aerosol_optics') + +! Begin... + +! Mie Table instance/index +! ------------------------ + call ESMF_AttributeGet (state, name='mie_table_instance', value=instance, __RC__) + +! Radiation band +! -------------- + wavelength = 0. + call ESMF_AttributeGet (state, name='wavelength_for_aerosol_optics', value=wavelength, __RC__) + +! Get wavelength index for Mie Table +! ---------------------------------- +! Channel values are 4.7e-7 5.5e-7 6.7e-7 8.7e-7 [meter]. Their indices are 1,2,3,4 respectively. + if ((wavelength .ge. 4.69e-7) .and. (wavelength .le. 4.71e-7)) then + mieTable_index = 1. + else if ((wavelength .ge. 5.49e-7) .and. (wavelength .le. 5.51e-7)) then + mieTable_index = 2. + else if ((wavelength .ge. 6.69e-7) .and. (wavelength .le. 6.71e-7)) then + mieTable_index = 3. + else if ((wavelength .ge. 8.68e-7) .and. (wavelength .le. 8.71e-7)) then + mieTable_index = 4. + else + print*,trim(Iam),' : wavelength of ',wavelength,' is an invalid value.' + return + end if + +! 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__) + +! call MAPL_GetPointer (state, ple, 'PLE', __RC__) + + i1 = lbound(ple, 1); i2 = ubound(ple, 1) + j1 = lbound(ple, 2); j2 = ubound(ple, 2) + km = ubound(ple, 3) + +! Relative humidity +! ----------------- + call ESMF_AttributeGet (state, name='relative_humidity_for_aerosol_optics', value=fld_name, __RC__) + call MAPL_GetPointer (state, rh, trim(fld_name), __RC__) + +! call MAPL_GetPointer (state, rh, 'RH2', __RC__) + + allocate(tau_s(i1:i2, j1:j2, km), & + tau(i1:i2, j1:j2, km), & + x(i1:i2, j1:j2, km), __STAT__) + tau_s = 0. + tau = 0. + + call ESMF_StateGet (state, 'SS', field=fld, __RC__) + call ESMF_FieldGet (fld, farrayPtr=q, __RC__) + + nbins = size(q,4) + + allocate(q_4d(i1:i2, j1:j2, km, nbins), __STAT__) + q_4d = 0. + + do n = 1, nbins + do k = 1, km + x(:,:,k) = (PLE(:,:,k) - PLE(:,:,k-1)) / MAPL_GRAV + q_4d(:,:,k,n) = x(:,:,k) * q(:,:,k,n) + end do + end do + + call ESMF_AttributeGet(state, name='mieTable_pointer', itemCount=n, __RC__) + allocate (opaque_self(n), __STAT__) + call ESMF_AttributeGet(state, name='mieTable_pointer', valueList=opaque_self, __RC__) + + address = transfer(opaque_self, address) + call c_f_pointer(address, self) + + do n = 1, nbins + do i = 1, i2 + do j = 1, j2 + do k = 1, km + call Chem_MieQuery(self%diag_MieTable(instance), n, mieTable_index, q_4d(i,j,k,n), rh(i,j,k), tau(i,j,k), __RC__) + tau_s = tau_s + tau + tau = 0. + end do + end do + end do + end do + + call ESMF_AttributeGet (state, name='monochromatic_extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, var, trim(fld_name), __RC__) + var = sum(tau_s, dim=3) + end if + + deallocate(q_4d, __STAT__) + + RETURN_(ESMF_SUCCESS) + + end subroutine monochromatic_aerosol_optics + + end module SS2G_GridCompMod diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_SS.data.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_SS.data.rc deleted file mode 100755 index 0beb49e7..00000000 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_GridComp_SS.data.rc +++ /dev/null @@ -1,54 +0,0 @@ -# -# Resource file for SS parameters. -# - -bins: 5 - - -variable_table:: - -# Name Units Long Name -# ----- ------ ---------------------- -ss001 'kg kg-1' 'Sea Salt Mixing Ratio (bin001)' -ss002 'kg kg-1' 'Sea Salt Mixing Ratio (bin002)' -ss003 'kg kg-1' 'Sea Salt Mixing Ratio (bin003)' -ss004 'kg kg-1' 'Sea Salt Mixing Ratio (bin004)' -ss005 'kg kg-1' 'Sea Salt Mixing Ratio (bin005)' -:: - - -OPTICS_FILE: ExtData/MERRA2/x/opticsBands_SS.v3_3.RRTMG.nc - -NUM_BANDS: 30 - - -particle_radius: 0.079 0.316 1.119 2.818 7.772 - -radius_lower: 0.03 0.1 0.5 1.5 5.0 - -radius_upper: 0.1 0.5 1.5 5.0 10.0 - -SS_density: 2200. 2200. 2200. 2200. 2200. - -# Scavenging efficiency per bin [km-1] -fscav: 0.4 0.4 0.4 0.4 0.4 # - -# Emissions methods and scaling -emission_scheme: 3 # 1 for Gong 2003, 2 for ... -emission_scale: 0.875 0.875 0.875 0.612 0.612 0.612 # a global scaling factor -sstemisFlag: 2 # Apply a correction to emissions based on SST (see code) -hoppelFlag: 0 # Apply Hoppel correction (set non-zero, see Fan and Toon 2011) -weibullFlag: 0 # 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 - -# Number of particles per kg mass -fnum: 3.017e17 1.085e16 1.207e14 9.391e12 2.922e11 - -# Number median radius [um] -particle_radius_number: 0.066 0.176 0.885 2.061 6.901 diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc index 871a2bdc..19715f16 100644 --- a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_StateSpecs.rc @@ -10,6 +10,7 @@ category: IMPORT FROCEAN | 1 | xy | N | | fraction_of_ocean FRACI | 1 | xy | N | | ice_covered_fraction_of_tile LWI | 1 | xy | N | | land-ocean-ice_mask + TROPP | Pa | xy | N | | tropopause_pressure_based_on_blended_estimate U10M | m s-1 | xy | N | | 10-meter_eastward_wind V10M | m s-1 | xy | N | | 10-meter_northward_wind USTAR | m s-1 | xy | N | | surface_velocity_scale @@ -43,8 +44,8 @@ category: EXPORT 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 [550 nm] - SSSCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | Sea Salt Scattering Coefficient [550 nm] + 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) @@ -53,12 +54,14 @@ category: EXPORT 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 [550 nm] - SSSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Scattering AOT [550 nm] + 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 [550 nm] - PM 2.5 - SSSCAT25 | 1 | xy | N | size(self%wavelengths_vertint) | Sea Salt Scattering AOT [550 nm] - 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 diff --git a/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc new file mode 100644 index 00000000..8a9104a7 --- /dev/null +++ b/ESMF/GOCART2G_GridComp/SS2G_GridComp/SS2G_instance_SS.rc @@ -0,0 +1,43 @@ +# +# Resource file Sea Salt parameters +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SS.v3_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SS.v3_3.nc + +particle_radius_microns: 0.079 0.316 1.119 2.818 7.772 + +radius_lower: 0.03 0.1 0.5 1.5 5.0 + +radius_upper: 0.1 0.5 1.5 5.0 10.0 + +particle_density: 2200. 2200. 2200. 2200. 2200. + +# Scavenging efficiency per bin [km-1] +fscav: 0.4 0.4 0.4 0.4 0.4 + +# Emissions methods and scaling +emission_scheme: 3 # 1 for Gong 2003, 2 for ... +emission_scale: 0.613 0.613 0.613 0.429 0.429 0.429 # a global scaling factor +sstEmisFlag: 2 # Apply a correction to emissions based on SST (see code) +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 + +# Number of particles per kg mass +fnum: 3.017e17 1.085e16 1.207e14 9.391e12 2.922e11 + +# Number median radius [um] +particle_radius_number: 0.066 0.176 0.885 2.061 6.901 + +nbins: 5 + +pressure_lid_in_hPa: 0.01 + + diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C1/SU2G_GridComp_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C1/SU2G_instance_SU.rc similarity index 89% rename from ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C1/SU2G_GridComp_SU.rc rename to ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C1/SU2G_instance_SU.rc index 565dce5c..a669822b 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C1/SU2G_GridComp_SU.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C1/SU2G_instance_SU.rc @@ -3,15 +3,12 @@ # aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 -n_channels: 4 nbins: 4 # Volcanic pointwise sources -volcano_srcfilen: ExtData/PIESA/sfc/volcanic_v7/so2_volcanic_emissions_Carns.%y4%m2%d2.rc +volcano_srcfilen: ExtData/PIESA/sfc/volcanic_CARN_1978-2020_v202005/so2_volcanic_emissions_CARN_v202005.degassing_only.rc # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C2/SU2G_GridComp_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C2/SU2G_instance_SU.rc similarity index 89% rename from ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C2/SU2G_GridComp_SU.rc rename to ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C2/SU2G_instance_SU.rc index 565dce5c..a669822b 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C2/SU2G_GridComp_SU.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/CCMI_REF-C2/SU2G_instance_SU.rc @@ -3,15 +3,12 @@ # aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 -n_channels: 4 nbins: 4 # Volcanic pointwise sources -volcano_srcfilen: ExtData/PIESA/sfc/volcanic_v7/so2_volcanic_emissions_Carns.%y4%m2%d2.rc +volcano_srcfilen: ExtData/PIESA/sfc/volcanic_CARN_1978-2020_v202005/so2_volcanic_emissions_CARN_v202005.degassing_only.rc # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/CMIP/SU2G_GridComp_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/CMIP/SU2G_instance_SU.rc similarity index 89% rename from ESMF/GOCART2G_GridComp/SU2G_GridComp/CMIP/SU2G_GridComp_SU.rc rename to ESMF/GOCART2G_GridComp/SU2G_GridComp/CMIP/SU2G_instance_SU.rc index 565dce5c..a669822b 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/CMIP/SU2G_GridComp_SU.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/CMIP/SU2G_instance_SU.rc @@ -3,15 +3,12 @@ # aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 -n_channels: 4 nbins: 4 # Volcanic pointwise sources -volcano_srcfilen: ExtData/PIESA/sfc/volcanic_v7/so2_volcanic_emissions_Carns.%y4%m2%d2.rc +volcano_srcfilen: ExtData/PIESA/sfc/volcanic_CARN_1978-2020_v202005/so2_volcanic_emissions_CARN_v202005.degassing_only.rc # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/CMakeLists.txt b/ESMF/GOCART2G_GridComp/SU2G_GridComp/CMakeLists.txt index 704cca94..cebb839a 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_GridComp MAPL Chem_Shared2G Process_Library) + DEPENDENCIES GA_Environment MAPL Chem_Shared2G Process_Library) mapl_acg (${this} SU2G_StateSpecs.rc IMPORT_SPECS EXPORT_SPECS INTERNAL_SPECS diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2-DD/SU2G_GridComp_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2-DD/SU2G_instance_SU.rc similarity index 89% rename from ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2-DD/SU2G_GridComp_SU.rc rename to ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2-DD/SU2G_instance_SU.rc index 565dce5c..a669822b 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2-DD/SU2G_GridComp_SU.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2-DD/SU2G_instance_SU.rc @@ -3,15 +3,12 @@ # aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc - aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 -n_channels: 4 nbins: 4 # Volcanic pointwise sources -volcano_srcfilen: ExtData/PIESA/sfc/volcanic_v7/so2_volcanic_emissions_Carns.%y4%m2%d2.rc +volcano_srcfilen: ExtData/PIESA/sfc/volcanic_CARN_1978-2020_v202005/so2_volcanic_emissions_CARN_v202005.degassing_only.rc # Heights [m] of LTO, CDS and CRS aviation emissions layers aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2/SU2G_GridComp_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2/SU2G_GridComp_SU.rc deleted file mode 100644 index 565dce5c..00000000 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2/SU2G_GridComp_SU.rc +++ /dev/null @@ -1,60 +0,0 @@ -# -# Resource file for Sulfer parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 -n_channels: 4 - -nbins: 4 - -# Volcanic pointwise sources -volcano_srcfilen: ExtData/PIESA/sfc/volcanic_v7/so2_volcanic_emissions_Carns.%y4%m2%d2.rc - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of anthropogenic emissions that are SO4 -so4_anthropogenic_fraction: 0.03 - -# Aircraft emission factor: go from kg fuel to kg SO2 -aircraft_fuel_emission_factor: 0.0008 - -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) -fscav: 0.0 0.0 0.4 0.4 - -# 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 - -pressure_lid_in_hPa: 0.01 - -# Molecular weight of species [kg mole-1] -molecular_weight: -1 -1 0.132 -1 - -# Number of particles per kg mass -fnum: -1 -1 9.01e16 -1 - -# Number median radius [um] -particle_radius_number: -1 -1 0.0695 -1 - -# Sigma of lognormal number distribution -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. - diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2/SU2G_instance_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2/SU2G_instance_SU.rc new file mode 100644 index 00000000..a669822b --- /dev/null +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/MERRA2/SU2G_instance_SU.rc @@ -0,0 +1,57 @@ +# +# Resource file for Sulfer parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc + +nbins: 4 + +# Volcanic pointwise sources +volcano_srcfilen: ExtData/PIESA/sfc/volcanic_CARN_1978-2020_v202005/so2_volcanic_emissions_CARN_v202005.degassing_only.rc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of anthropogenic emissions that are SO4 +so4_anthropogenic_fraction: 0.03 + +# Aircraft emission factor: go from kg fuel to kg SO2 +aircraft_fuel_emission_factor: 0.0008 + +# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) +fscav: 0.0 0.0 0.4 0.4 + +# 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 + +pressure_lid_in_hPa: 0.01 + +# Molecular weight of species [kg mole-1] +molecular_weight: -1 -1 0.132 -1 + +# Number of particles per kg mass +fnum: -1 -1 9.01e16 -1 + +# Number median radius [um] +particle_radius_number: -1 -1 0.0695 -1 + +# Sigma of lognormal number distribution +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. + diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/NR/SU2G_GridComp_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/NR/SU2G_GridComp_SU.rc deleted file mode 100644 index 565dce5c..00000000 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/NR/SU2G_GridComp_SU.rc +++ /dev/null @@ -1,60 +0,0 @@ -# -# Resource file for Sulfer parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 -n_channels: 4 - -nbins: 4 - -# Volcanic pointwise sources -volcano_srcfilen: ExtData/PIESA/sfc/volcanic_v7/so2_volcanic_emissions_Carns.%y4%m2%d2.rc - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of anthropogenic emissions that are SO4 -so4_anthropogenic_fraction: 0.03 - -# Aircraft emission factor: go from kg fuel to kg SO2 -aircraft_fuel_emission_factor: 0.0008 - -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) -fscav: 0.0 0.0 0.4 0.4 - -# 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 - -pressure_lid_in_hPa: 0.01 - -# Molecular weight of species [kg mole-1] -molecular_weight: -1 -1 0.132 -1 - -# Number of particles per kg mass -fnum: -1 -1 9.01e16 -1 - -# Number median radius [um] -particle_radius_number: -1 -1 0.0695 -1 - -# Sigma of lognormal number distribution -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. - diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/NR/SU2G_instance_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/NR/SU2G_instance_SU.rc new file mode 100644 index 00000000..a669822b --- /dev/null +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/NR/SU2G_instance_SU.rc @@ -0,0 +1,57 @@ +# +# Resource file for Sulfer parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc + +nbins: 4 + +# Volcanic pointwise sources +volcano_srcfilen: ExtData/PIESA/sfc/volcanic_CARN_1978-2020_v202005/so2_volcanic_emissions_CARN_v202005.degassing_only.rc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of anthropogenic emissions that are SO4 +so4_anthropogenic_fraction: 0.03 + +# Aircraft emission factor: go from kg fuel to kg SO2 +aircraft_fuel_emission_factor: 0.0008 + +# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) +fscav: 0.0 0.0 0.4 0.4 + +# 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 + +pressure_lid_in_hPa: 0.01 + +# Molecular weight of species [kg mole-1] +molecular_weight: -1 -1 0.132 -1 + +# Number of particles per kg mass +fnum: -1 -1 9.01e16 -1 + +# Number median radius [um] +particle_radius_number: -1 -1 0.0695 -1 + +# Sigma of lognormal number distribution +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. + diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/PIESA/SU2G_GridComp_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/PIESA/SU2G_GridComp_SU.rc deleted file mode 100644 index 565dce5c..00000000 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/PIESA/SU2G_GridComp_SU.rc +++ /dev/null @@ -1,60 +0,0 @@ -# -# Resource file for Sulfer parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc - -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc -aerosol_monochromatic_optics_wavelength: 4.7e-7 5.5e-7 6.7e-7 8.7e-7 -n_channels: 4 - -nbins: 4 - -# Volcanic pointwise sources -volcano_srcfilen: ExtData/PIESA/sfc/volcanic_v7/so2_volcanic_emissions_Carns.%y4%m2%d2.rc - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of anthropogenic emissions that are SO4 -so4_anthropogenic_fraction: 0.03 - -# Aircraft emission factor: go from kg fuel to kg SO2 -aircraft_fuel_emission_factor: 0.0008 - -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) -fscav: 0.0 0.0 0.4 0.4 - -# 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 - -pressure_lid_in_hPa: 0.01 - -# Molecular weight of species [kg mole-1] -molecular_weight: -1 -1 0.132 -1 - -# Number of particles per kg mass -fnum: -1 -1 9.01e16 -1 - -# Number median radius [um] -particle_radius_number: -1 -1 0.0695 -1 - -# Sigma of lognormal number distribution -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. - diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/PIESA/SU2G_instance_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/PIESA/SU2G_instance_SU.rc new file mode 100644 index 00000000..a669822b --- /dev/null +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/PIESA/SU2G_instance_SU.rc @@ -0,0 +1,57 @@ +# +# Resource file for Sulfer parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc + +nbins: 4 + +# Volcanic pointwise sources +volcano_srcfilen: ExtData/PIESA/sfc/volcanic_CARN_1978-2020_v202005/so2_volcanic_emissions_CARN_v202005.degassing_only.rc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of anthropogenic emissions that are SO4 +so4_anthropogenic_fraction: 0.03 + +# Aircraft emission factor: go from kg fuel to kg SO2 +aircraft_fuel_emission_factor: 0.0008 + +# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) +fscav: 0.0 0.0 0.4 0.4 + +# 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 + +pressure_lid_in_hPa: 0.01 + +# Molecular weight of species [kg mole-1] +molecular_weight: -1 -1 0.132 -1 + +# Number of particles per kg mass +fnum: -1 -1 9.01e16 -1 + +# Number median radius [um] +particle_radius_number: -1 -1 0.0695 -1 + +# Sigma of lognormal number distribution +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. + diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 index d2961932..516845e1 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridCompMod.F90 @@ -16,7 +16,7 @@ module SU2G_GridCompMod use iso_c_binding, only: c_loc, c_f_pointer, c_ptr use GOCART2G_Process ! GOCART2G process library - use GA_GridCompMod + use GA_EnvironmentMod use MAPL_StringTemplate, only: StrTemplate implicit none @@ -52,11 +52,8 @@ module SU2G_GridCompMod !EOP !=========================================================================== ! !Sulfer state - type, extends(GA_GridComp) :: SU2G_GridComp + type, extends(GA_Environment) :: SU2G_GridComp integer :: myDOW = -1 ! my Day of the week: Sun=1, Mon=2,...,Sat=7 - logical :: using_GMI_OH - logical :: using_GMI_NO3 - logical :: using_GMI_H2O2 logical :: diurnal_bb ! diurnal biomass burning integer :: nymd_last = -1 ! Previous nymd. Updated daily integer :: nymd_oxidants = -1 ! Update the oxidant files? @@ -144,8 +141,6 @@ subroutine SetServices ( GC, RC ) call ESMF_GridCompGet (GC, NAME=COMP_NAME, config=universal_cfg, __RC__) Iam = trim(COMP_NAME) // '::' // Iam -if(mapl_am_i_root()) print*,trim(comp_name),'2G SetServices BEGIN' - ! Wrap internal state for storing in GC ! ------------------------------------- allocate (self, __STAT__) @@ -154,21 +149,18 @@ subroutine SetServices ( GC, RC ) ! Load resource file ! ------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'SU2G_GridComp_'//trim(COMP_NAME)//'.rc', rc=status) + call ESMF_ConfigLoadFile (cfg, 'SU2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) if (status /= 0) then - if (mapl_am_i_root()) print*,'SU2G_GridComp_'//trim(COMP_NAME)//'.rc does not exist! loading SU2G_GridComp_SU.data.rc instead' - call ESMF_ConfigLoadFile (cfg, 'SU2G_GridComp_SU.rc', __RC__) + if (mapl_am_i_root()) print*,'SU2G_instance_'//trim(COMP_NAME)//'.rc does not exist! loading SU2G_instance_SU.rc instead' + call ESMF_ConfigLoadFile (cfg, 'SU2G_instance_SU.rc', __RC__) end if ! process generic config items - call self%GA_GridComp%load_from_config( cfg, universal_cfg, __RC__) + 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%using_GMI_H2O2, label='using_GMI_H2O2:', __RC__) - call ESMF_ConfigGetAttribute(cfg, self%using_GMI_OH, label='using_GMI_OH:', __RC__) - call ESMF_ConfigGetAttribute(cfg, self%using_GMI_NO3, label='using_GMI_NO3:', __RC__) call ESMF_ConfigGetAttribute(cfg, self%volcano_srcfilen, label='volcano_srcfilen:', __RC__) call ESMF_ConfigGetAttribute(cfg, self%eAircraftFuel, label='aircraft_fuel_emission_factor:', __RC__) call ESMF_ConfigGetAttribute(cfg, self%fSO4anth, label='so4_anthropogenic_fraction:', __RC__) @@ -327,16 +319,6 @@ subroutine SetServices ( GC, RC ) VLOCATION = MAPL_VLocationCenter, & DATATYPE = MAPL_StateItem, __RC__) -! This state is needed by MOIST - It will contain aerosols -! ---------------------------------------------------------- - call MAPL_AddExportSpec(GC, & - SHORT_NAME = trim(COMP_NAME)//'_AERO_ACI', & - LONG_NAME = 'aerosol_cloud_interaction_aerosols_from_'//trim(COMP_NAME), & - UNITS = 'kg kg-1', & - DIMS = MAPL_DimsHorzVert, & - VLOCATION = MAPL_VLocationCenter, & - DATATYPE = MAPL_StateItem, __RC__) - ! This bundle is needed by surface for snow albedo modification ! by aerosol settling and deposition ! DEVELOPMENT NOTE - Change to StateItem in future @@ -389,7 +371,7 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) type (MAPL_MetaComp), pointer :: MAPL type (ESMF_Grid) :: grid type (ESMF_State) :: internal - type (ESMF_State) :: aero, aero_aci + type (ESMF_State) :: aero type (ESMF_State) :: providerState type (ESMF_Config) :: cfg, universal_cfg type (ESMF_FieldBundle) :: Bundle_DP @@ -466,11 +448,11 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! Load resource file and get number of bins ! ------------------------------------------- cfg = ESMF_ConfigCreate (__RC__) - call ESMF_ConfigLoadFile (cfg, 'SU2G_GridComp_'//trim(COMP_NAME)//'.rc', rc=status) + call ESMF_ConfigLoadFile (cfg, 'SU2G_instance_'//trim(COMP_NAME)//'.rc', rc=status) if (status /= 0) then - if (mapl_am_i_root()) print*,'SU2G_GridComp_'//trim(COMP_NAME)//'.rc does not exist! & - loading SU2G_GridComp_SU.rc instead' - call ESMF_ConfigLoadFile( cfg, 'SU2G_GridComp_SU.rc', __RC__) + if (mapl_am_i_root()) print*,'SU2G_instance_'//trim(COMP_NAME)//'.rc does not exist! & + loading SU2G_instance_SU.rc instead' + call ESMF_ConfigLoadFile( cfg, 'SU2G_instance_SU.rc', __RC__) end if ! Call Generic Initialize @@ -543,14 +525,12 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) ! Fill AERO State with SO4 ! ---------------------------------------- call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO' , aero , __RC__) - call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO_ACI', aero_aci, __RC__) call ESMF_StateGet (export, trim(COMP_NAME)//'_AERO_DP' , Bundle_DP, __RC__) call ESMF_StateGet (internal, 'SO4', field, __RC__) call ESMF_AttributeSet(field, NAME='ScavengingFractionPerKm', VALUE=self%fscav(3), __RC__) fld = MAPL_FieldCreate (field, 'SO4', __RC__) call MAPL_StateAdd (aero, fld, __RC__) - call MAPL_StateAdd (aero_aci, fld, __RC__) if (.not. data_driven) then ! Set klid @@ -627,16 +607,16 @@ subroutine Initialize (GC, IMPORT, EXPORT, CLOCK, RC) label="aerosol_monochromatic_optics_file:", __RC__ ) call ESMF_ConfigGetAttribute (cfg, self%diag_MieTable(instance)%nmom, label="n_moments:", default=0, __RC__) - i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_monochromatic_optics_wavelength:', __RC__) + i = ESMF_ConfigGetLen (universal_cfg, label='aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:', __RC__) self%diag_MieTable(instance)%nch = i allocate (self%diag_MieTable(instance)%channels(self%diag_MieTable(instance)%nch), __STAT__ ) call ESMF_ConfigGetAttribute (universal_cfg, self%diag_MieTable(instance)%channels, & - label= "aerosol_monochromatic_optics_wavelength:", __RC__) + label= "aerosol_monochromatic_optics_wavelength_in_nm_from_LUT:", __RC__) allocate (self%diag_MieTable(instance)%mie_aerosol, __STAT__) self%diag_MieTable(instance)%mie_aerosol = Chem_MieTableCreate (self%diag_MieTable(instance)%optics_file, __RC__ ) call Chem_MieTableRead (self%diag_MieTable(instance)%mie_aerosol, self%diag_MieTable(instance)%nch, & - self%diag_MieTable(instance)%channels, rc=status, nmom=self%diag_MieTable(instance)%nmom) + self%diag_MieTable(instance)%channels*1.e-9, rc=status, nmom=self%diag_MieTable(instance)%nmom) VERIFY_(status) ! Mie Table instance/index @@ -653,15 +633,21 @@ 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 add_aero (aero, label='monochromatic_extinction_in_air_due_to_ambient_aerosol', & + label2='monochromatic_EXT', grid=grid, typekind=MAPL_R4, __RC__) + call add_aero (aero, label='sum_of_internalState_aerosol', label2='aerosolSum', grid=grid, typekind=MAPL_R4, __RC__) - call ESMF_AttributeSet(aero, name='band_for_aerosol_optics', value=0, __RC__) + call ESMF_AttributeSet (aero, name='band_for_aerosol_optics', value=0, __RC__) + call ESMF_AttributeSet (aero, name='wavelength_for_aerosol_optics', value=0., __RC__) mieTable_pointer = transfer(c_loc(self), [1]) - call ESMF_AttributeSet(aero, name='mieTable_pointer', valueList=mieTable_pointer, itemCount=size(mieTable_pointer), __RC__) + call ESMF_AttributeSet (aero, name='mieTable_pointer', valueList=mieTable_pointer, itemCount=size(mieTable_pointer), __RC__) - call ESMF_AttributeSet(aero, name='internal_varaible_name', value='SO4', __RC__) + call ESMF_AttributeSet (aero, name='internal_variable_name', value='SO4', __RC__) - call ESMF_MethodAdd(AERO, label='aerosol_optics', userRoutine=aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='aerosol_optics', userRoutine=aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='monochromatic_aerosol_optics', userRoutine=monochromatic_aerosol_optics, __RC__) + call ESMF_MethodAdd (aero, label='get_mixR', userRoutine=get_mixR, __RC__) RETURN_(ESMF_SUCCESS) @@ -767,6 +753,7 @@ subroutine Run1 (GC, import, export, clock, RC) integer, dimension(:), allocatable :: iPointVolc, jPointVolc, iPoint, jPoint real, dimension(:,:,:), allocatable :: emissions_point character (len=ESMF_MAXSTR) :: fname ! file name for point source emissions + logical :: fileExists real, pointer, dimension(:,:,:) :: dummyMSA => null() ! This is so the model can run without MSA enabled @@ -922,15 +909,24 @@ subroutine Run1 (GC, import, export, clock, RC) fMassDMS, SU_DMSO, dms, SUEM, nDMS, __RC__) end if +! Add source of OCS-produced SO2 +! ------------------------------ + SO2 = SO2 + pSO2_OCS*self%cdt + ! Read any pointwise emissions, if requested ! ------------------------------------------ if(self%doing_point_emissions) then call StrTemplate(fname, self%point_emissions_srcfilen, xid='unknown', & nymd=nymd, nhms=120000 ) - call ReadPointEmissions (nymd, fname, self%nPts, self%pLat, self%pLon, & - self%pBase, self%pTop, self%pEmis, self%pStart, & - self%pEnd, label='source', __RC__) - + inquire( file=fname, exist=fileExists) + if (fileExists) then + call ReadPointEmissions (nymd, fname, self%nPts, self%pLat, self%pLon, & + self%pBase, self%pTop, self%pEmis, self%pStart, & + self%pEnd, label='source', __RC__) + else if (.not. fileExists) then + if(mapl_am_i_root()) print*,'GOCART2G ',trim(comp_name),': ',trim(fname),' not found; proceeding.' + self%nPts = -1 ! set this back to -1 so the "if (self%nPts > 0)" conditional is not exercised. + end if endif ! Get indices for point emissions @@ -997,12 +993,11 @@ subroutine Run2 (GC, import, export, clock, RC) character(len=ESMF_MAXSTR) :: short_name real, pointer, dimension(:,:,:) :: int_ptr - real, pointer, dimension(:,:,:) :: oh, no3, h2o2 - real, dimension(:,:,:), allocatable :: xoh, xno3, xh2o2 + real, dimension(:,:,:), allocatable :: xoh, xno3, xh2o2 - real, dimension(:,:), allocatable :: drydepositionf - real, pointer, dimension(:,:,:) :: dummyMSA => null() ! this is so the model can run without MSA enabled - + real, dimension(:,:), allocatable :: drydepositionf + real, pointer, dimension(:,:,:) :: dummyMSA => null() ! this is so the model can run without MSA enabled + logical :: alarm_is_ringing #include "SU2G_DeclarePointer___.h" @@ -1045,13 +1040,12 @@ subroutine Run2 (GC, import, export, clock, RC) self => wrap%ptr call ESMF_ClockGetAlarm(clock, 'H2O2_RECYCLE_ALARM', alarm, __RC__) - self%recycle_h2o2 = ESMF_AlarmIsRinging(alarm, __RC__) - -! Get oxidant pointers from specified provider -! ---------------------------------------------- - call GetOxidant (self%using_GMI_OH, oh, 'OH', __RC__) - call GetOxidant (self%using_GMI_OH, no3, 'NO3', __RC__) - call GetOxidant (self%using_GMI_OH, h2o2, 'H2O2', __RC__) + alarm_is_ringing = ESMF_AlarmIsRinging(alarm, __RC__) +! recycle H2O2 every 3 hours + if (alarm_is_ringing) then + self%recycle_h2o2 = ESMF_AlarmIsRinging(alarm, __RC__) + call ESMF_AlarmRingerOff(alarm, __RC__) + end if allocate(xoh, mold=airdens, __STAT__) allocate(xno3, mold=airdens, __STAT__) @@ -1067,20 +1061,12 @@ subroutine Run2 (GC, import, export, clock, RC) xh2o2 = self%h2o2_init -!if(mapl_am_i_root()) print*,'SU2G Run2 sum(xh2o2) = ',sum(xh2o2) -!if(mapl_am_i_root()) print*,'SU2G Run2 sum(self%h2o2_init) = ',sum(self%h2o2_init) -!if(mapl_am_i_root()) print*,'SU2G Run2 sum(xoh) = ',sum(xoh) - call SulfateUpdateOxidants (nymd, nhms, LONS, LATS, airdens, self%km, self%cdt, & self%nymd_oxidants, MAPL_UNDEF, real(MAPL_RADIANS_TO_DEGREES), & MAPL_AVOGAD/1000., MAPL_PI, MAPL_AIRMW, & - oh, no3, h2o2, & + SU_OH, SU_NO3, SU_H2O2, & xoh, xno3, xh2o2, self%recycle_h2o2, __RC__) -!if(mapl_am_i_root()) print*,'SU2G Run2 UpdateOxidants sum(xh2o2) = ',sum(xh2o2) -!if(mapl_am_i_root()) print*,'SU2G Run2 UpdateOxidants sum(self%h2o2_init) = ',sum(self%h2o2_init) -!if(mapl_am_i_root()) print*,'SU2G Run2 UpdateOxidants sum(xoh) = ',sum(xoh) - ! SU Settling ! ----------- do n = 1, self%nbins @@ -1093,9 +1079,9 @@ subroutine Run2 (GC, import, export, clock, RC) call MAPL_VarSpecGet(InternalSpec(n), SHORT_NAME=short_name, __RC__) call MAPL_GetPointer(internal, NAME=short_name, ptr=int_ptr, __RC__) - call Chem_Settling2Gorig (self%km, self%klid, self%rhFlag, n, int_ptr, MAPL_GRAV, delp, & - self%radius(n)*1.e-6, self%rhop(n), self%cdt, t, airdens, & - rh2, zle, SUSD, __RC__) + 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 allocate(drydepositionf, mold=lwi, __STAT__) @@ -1113,12 +1099,6 @@ subroutine Run2 (GC, import, export, clock, RC) pso2, pmsa, pso4, pso4g, pso4aq, drydepositionf, & ! 3d diagnostics __RC__) -!if(mapl_am_i_root()) print*,'SU2G Run2 ChemDriver sum(xh2o2) = ',sum(xh2o2) -!if(mapl_am_i_root()) print*,'SU2G Run2 ChemDriver sum(self%h2o2_init) = ',sum(self%h2o2_init) -!if(mapl_am_i_root()) print*,'SU2G Run2 ChemDriver sum(xoh) = ',sum(xoh) -!if(mapl_am_i_root()) print*,'SU2G Run2 sum(SUPSO4aq) = ',sum(SUPSO4aq) -!if(mapl_am_i_root()) print*,'SU2G Run2 sum(SUPSO4g) = ',sum(SUPSO4g) - KIN = .true. call SU_Wet_Removal ( self%km, self%nbins, self%klid, self%cdt, kin, MAPL_GRAV, MAPL_AIRMW, & delp, fMassSO4, fMassSO2, & @@ -1126,55 +1106,21 @@ subroutine Run2 (GC, import, export, clock, RC) nDMS, nSO2, nSO4, nMSA, DMS, SO2, SO4, dummyMSA, & SUWT, SUPSO4, SUPSO4WT, PSO4, PSO4WET, __RC__ ) -!if(mapl_am_i_root()) print*,'SU2G Run2 WetRemoval sum(xh2o2) = ',sum(xh2o2) -!if(mapl_am_i_root()) print*,'SU2G Run2 WetRemoval sum(self%h2o2_init) = ',sum(self%h2o2_init) ! 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), & MAPL_GRAV, MAPL_PI, nSO4, self%diag_MieTable(self%instance), & self%diag_MieTable(self%instance)%channels*1.0e-9, & self%wavelengths_profile*1.0e-9, self%wavelengths_vertint*1.0e-9, & - t, airdens, delp, rh2, u, v, DMS, SO2, SO4, dummyMSA, & + t, airdens, delp, ple,tropp, rh2, u, v, DMS, SO2, SO4, dummyMSA, & DMSSMASS, DMSCMASS, & MSASMASS, MSACMASS, & SO2SMASS, SO2CMASS, & SO4SMASS, SO4CMASS, & - SUEXTTAU, SUSCATAU, SO4MASS, SUCONC, SUEXTCOEF, & + SUEXTTAU, SUSTEXTTAU,SUSCATAU,SUSTSCATAU, SO4MASS, SUCONC, SUEXTCOEF, & SUSCACOEF, SUANGSTR, SUFLUXU, SUFLUXV, SO4SAREA, SO4SNUM, __RC__) -!if(mapl_am_i_root()) print*,'SU2G Run2 E size(suexttau) = ',size(suexttau) -!if(mapl_am_i_root()) print*,'SU2G Run2 E size(suescaau) = ',size(suscatau) -!if(mapl_am_i_root()) print*,'SU2G Run2 E sum(suexttau) = ',sum(suexttau) -!if(mapl_am_i_root()) print*,'SU2G Run2 E sum(suescaau) = ',sum(suscatau) - -if(mapl_am_i_root()) print*,'SU2G Run2 E sum(SO2) = ',sum(SO2) -if(mapl_am_i_root()) print*,'SU2G Run2 E sum(SO4) = ',sum(SO4) -if(mapl_am_i_root()) print*,'SU2G Run2 E sum(DMS) = ',sum(DMS) -if (associated(dummyMSA)) then - if(mapl_am_i_root()) print*,'SU2G Run2 E sum(MSA) = ',sum(dummyMSA) -end if - RETURN_(ESMF_SUCCESS) - contains -!.................................................................. - subroutine GetOxidant (using_GMI, ptr, ptr_name, rc) - - logical, intent(in) :: using_GMI - real, pointer, dimension(:,:,:), intent(inout) :: ptr - character(len=*), intent(in) :: ptr_name - integer, optional, intent(out) :: rc - -! Begin... - rc = 0 - if (using_GMI) then - call MAPL_GetPointer(import, ptr, trim(ptr_name), __RC__) - else - call MAPL_GetPointer(import, ptr, 'SU_'//trim(ptr_name), __RC__) - end if - - end subroutine GetOxidant -!.................................................................. - end subroutine Run2 @@ -1215,8 +1161,6 @@ subroutine Run_data (GC, IMPORT, EXPORT, INTERNAL, RC) call ESMF_GridCompGet (GC, NAME=COMP_NAME, __RC__) Iam = trim(COMP_NAME) //'::'//Iam -if (mapl_am_I_root()) print*,trim(comp_name),' Run_data BEGIN' - ! Get my private internal state ! ------------------------------ call ESMF_UserCompGetInternalState(GC, 'SU2G_GridComp', wrap, STATUS) @@ -1229,8 +1173,6 @@ subroutine Run_data (GC, IMPORT, EXPORT, INTERNAL, RC) call MAPL_GetPointer (import, NAME='climSO4', ptr=ptr3d_imp, __RC__) ptr3d_int = ptr3d_imp -if (mapl_am_I_root()) print*,trim(comp_name),' Run_data END' - RETURN_(ESMF_SUCCESS) end subroutine Run_data @@ -1279,9 +1221,9 @@ subroutine aerosol_optics(state, rc) ! Get aerosol names ! ----------------- - call ESMF_AttributeGet (state, name='internal_varaible_name', itemCount=nbins, __RC__) + call ESMF_AttributeGet (state, name='internal_variable_name', itemCount=nbins, __RC__) allocate (aerosol_names(nbins), __STAT__) - call ESMF_AttributeGet (state, name='internal_varaible_name', valueList=aerosol_names, __RC__) + call ESMF_AttributeGet (state, name='internal_variable_name', valueList=aerosol_names, __RC__) ! Radiation band ! -------------- @@ -1404,5 +1346,137 @@ end subroutine mie_ end subroutine aerosol_optics +!----------------------------------------------------------------------------------- + subroutine monochromatic_aerosol_optics(state, rc) + + implicit none + +! !ARGUMENTS: + type (ESMF_State) :: state + integer, intent(out) :: rc + +! !Local + real, dimension(:,:,:), pointer :: ple, rh + real, dimension(:,:), pointer :: var + real, dimension(:,:,:), pointer :: q + real, dimension(:,:,:,:), pointer :: q_4d + integer, allocatable :: opaque_self(:) + type(C_PTR) :: address + type(SU2G_GridComp), pointer :: self + + character (len=ESMF_MAXSTR) :: fld_name + type(ESMF_Field) :: fld + character (len=ESMF_MAXSTR),allocatable :: aerosol_names(:) + + real, dimension(:,:,:), allocatable :: tau_s, tau ! (lon:,lat:,lev:) + real :: x + integer :: instance + integer :: n, nbins + integer :: i1, j1, i2, j2, km + real :: wavelength, mieTable_index + integer :: i, j, k + + __Iam__('SU2G::monochromatic_aerosol_optics') + +! Begin... + +! Mie Table instance/index +! ------------------------ + call ESMF_AttributeGet(state, name='mie_table_instance', value=instance, __RC__) + +! Get aerosol names +! ----------------- + call ESMF_AttributeGet (state, name='internal_variable_name', itemCount=nbins, __RC__) + allocate (aerosol_names(nbins), __STAT__) + call ESMF_AttributeGet (state, name='internal_variable_name', valueList=aerosol_names, __RC__) + +! Radiation band +! -------------- + call ESMF_AttributeGet(state, name='wavelength_for_aerosol_optics', value=wavelength, __RC__) + +! Get wavelength index for Mie Table +! ---------------------------------- +! Channel values are 4.7e-7 5.5e-7 6.7e-7 8.7e-7 [meter]. Their indices are 1,2,3,4 respectively. + if ((wavelength .ge. 4.69e-7) .and. (wavelength .le. 4.71e-7)) then + mieTable_index = 1. + else if ((wavelength .ge. 5.49e-7) .and. (wavelength .le. 5.51e-7)) then + mieTable_index = 2. + else if ((wavelength .ge. 6.69e-7) .and. (wavelength .le. 6.71e-7)) then + mieTable_index = 3. + else if ((wavelength .ge. 8.68e-7) .and. (wavelength .le. 8.71e-7)) then + mieTable_index = 4. + else + print*,trim(Iam),' : wavelengths of ',wavelength,' is an invalid value.' + return + end if + +! 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__) +! call MAPL_GetPointer (state, ple, 'PLE', __RC__) + + i1 = lbound(ple, 1); i2 = ubound(ple, 1) + j1 = lbound(ple, 2); j2 = ubound(ple, 2) + km = ubound(ple, 3) + +! Relative humidity +! ----------------- + call ESMF_AttributeGet(state, name='relative_humidity_for_aerosol_optics', value=fld_name, __RC__) + call MAPL_GetPointer(state, rh, trim(fld_name), __RC__) +! call MAPL_GetPointer (state, rh, 'RH2', __RC__) + + allocate(tau_s(i1:i2, j1:j2, km), & + tau(i1:i2, j1:j2, km), __STAT__) + tau_s = 0.0 + tau = 0.0 + + allocate(q_4d(i1:i2, j1:j2, km, nbins), __STAT__) + + do n = 1, nbins + call ESMF_StateGet (state, trim(aerosol_names(n)), field=fld, __RC__) + call ESMF_FieldGet (fld, farrayPtr=q, __RC__) + + do k = 1, km + do j = j1, j2 + do i = i1, i2 + x = (ple(i,j,k) - ple(i,j,k-1))/MAPL_GRAV + q_4d(i,j,k,n) = x * q(i,j,k) + end do + end do + end do + end do + + call ESMF_AttributeGet(state, name='mieTable_pointer', itemCount=n, __RC__) + allocate (opaque_self(n), __STAT__) + call ESMF_AttributeGet(state, name='mieTable_pointer', valueList=opaque_self, __RC__) + + address = transfer(opaque_self, address) + call c_f_pointer(address, self) + + do n = 1, nbins + do i = 1, i2 + do j = 1, j2 + do k = 1, km + call Chem_MieQuery(self%diag_MieTable(instance), n, mieTable_index, q_4d(i,j,k,n), rh(i,j,k), tau(i,j,k), __RC__) + tau_s(i,j,k) = tau_s(i,j,k) + tau(i,j,k) + end do + end do + end do + end do + + call ESMF_AttributeGet(state, name='monochromatic_extinction_in_air_due_to_ambient_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer(state, var, trim(fld_name), __RC__) + var = sum(tau_s, dim=3) + end if + + deallocate(q_4d, __STAT__) + + RETURN_(ESMF_SUCCESS) + + end subroutine monochromatic_aerosol_optics + + end module SU2G_GridCompMod diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc index f8881a00..56c7e28e 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_ExtData.rc @@ -33,11 +33,11 @@ climSUSV004 'kg m-2 s-1' Y N 0 0.0 1.0 #====== Sulfate Sources ================================================= # Biomass burning -- QFED-v2.x -SU_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none none biomass ExtData/PIESA/sfc/QFED/NRT/v2.5r1_0.1_deg/Y%y4/M%m2/qfed2.emis_so2.006.%y4%m2%d2.nc4 +SU_BIOMASS NA N Y %y4-%m2-%d2t12:00:00 none 0.778 biomass ExtData/PIESA/sfc/QFED/NRT/v2.5r1_0.1_deg/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 Y Y %y4-%m2-%d2t12:00:00 none none sanl1 ExtData/PIESA/sfc/HTAP/v2.2/htap-v2.2.emis_so2.surface.x3600_y1800_t12.2010.nc4 -SU_ANTHROL2 NA Y Y %y4-%m2-%d2t12:00:00 none none sanl2 ExtData/PIESA/sfc/HTAP/v2.2/htap-v2.2.emis_so2.elevated.x3600_y1800_t12.2010.nc4 +SU_ANTHROL1 NA N Y %y4-%m2-%d2t12:00:00 none none sanl1 ExtData/PIESA/sfc/HTAP_OMI_SO2/htapv2.2.emisso2.surface.x3600y1800t14.%y4.integrate.nc4 +SU_ANTHROL2 NA N Y %y4-%m2-%d2t12:00:00 none none sanl2 ExtData/PIESA/sfc/HTAP_OMI_SO2/htapv2.2.emisso2.elevated.x3600y1800t14.%y4.integrate.nc4 # Ship emissions SU_SHIPSO2 NA Y Y %y4-%m2-%d2t12:00:00 none none so2_ship ExtData/PIESA/sfc/HTAP/v2.2/htap-v2.2.emis_so2.ships.x3600_y1800_t12.2010.nc4 diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_SU.rc deleted file mode 100644 index f57b35bd..00000000 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_GridComp_SU.rc +++ /dev/null @@ -1,59 +0,0 @@ -# -# Resource file for Sulfer parameters. -# - -aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc -aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc - -nbins: 4 - -# Volcanic pointwise sources -volcano_srcfilen: ExtData/PIESA/sfc/volcanic_v7/so2_volcanic_emissions_Carns.%y4%m2%d2.rc - -# Heights [m] of LTO, CDS and CRS aviation emissions layers -aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 - -# Fraction of anthropogenic emissions that are SO4 -so4_anthropogenic_fraction: 0.03 - -# Aircraft emission factor: go from kg fuel to kg SO2 -aircraft_fuel_emission_factor: 0.0008 - -# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) -fscav: 0.0 0.0 0.4 0.4 - -# 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 - -pressure_lid_in_hPa: 0.01 - -# Molecular weight of species [kg mole-1] -molecular_weight: -1 -1 0.132 -1 - -# Number of particles per kg mass -fnum: -1 -1 9.01e16 -1 - -# Number median radius [um] -particle_radius_number: -1 -1 0.0695 -1 - -# Sigma of lognormal number distribution -sigma: -1 -1 2.03 -1 - -#point_emissions_srcfilen: /gpfsm/dnb32/esherman/gocartRefactor/RC/CA2G_point_src_test.rc - -# 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. - diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc index 103e38e2..9aa02423 100644 --- a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_StateSpecs.rc @@ -9,6 +9,7 @@ category: IMPORT #---------------------------------------------------------------------------------------- FROCEAN | 1 | xy | N | fraction_of_ocean LWI | 1 | xy | N | land-ocean-ice_mask + TROPP | Pa | xy | N | tropopause_pressure_based_on_blended_estimate U10M | m s-1 | xy | N | 10-meter_eastward_wind V10M | m s-1 | xy | N | 10-meter_northward_wind AREA | m^2 | xy | N | agrid_cell_area @@ -32,9 +33,9 @@ category: IMPORT FCLD | 1 | xyz | C | Cloud fraction for radiation pSO2_OCS | 1 | xyz | C | source species SU_AIRCRAFT | 1 | xyz | C | fuel source species -# SU_NO3 | 1 | xyz | C | climatological NO3 source -# SU_OH | 1 | xyz | C | climatological OH source -# SU_H2O2 | 1 | xyz | C | climatological H2O2 source + SU_NO3 | 1 | xyz | C | climatological NO3 source + SU_OH | 1 | xyz | C | climatological OH source + SU_H2O2 | 1 | xyz | C | climatological H2O2 source #........................................................................................ SU_BIOMASS | 1 | xy | N | biomass burning emissions SU_ANTHROL1 | 1 | xy | N | anthropogenic BF emissions @@ -83,14 +84,16 @@ 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 - SUEXTCOEF | m-1 | xyz | C | size(self%wavelengths_profile) | SO4 Extinction Coefficient [550 nm] - SUSCACOEF | m-1 | xyz | C | size(self%wavelengths_profile) | SO4 Scattering Coefficient [550 nm] + 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 [550 nm] - SUSCATAU | 1 | xy | N | size(self%wavelengths_vertint) | SO4 Scattering AOT [550 nm] + 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 diff --git a/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc new file mode 100644 index 00000000..a669822b --- /dev/null +++ b/ESMF/GOCART2G_GridComp/SU2G_GridComp/SU2G_instance_SU.rc @@ -0,0 +1,57 @@ +# +# Resource file for Sulfer parameters. +# + +aerosol_radBands_optics_file: ExtData/MERRA2/x/opticsBands_SU.v1_3.RRTMG.nc +aerosol_monochromatic_optics_file: ExtData/AeroCom/x/optics_SU.v1_3.nc + +nbins: 4 + +# Volcanic pointwise sources +volcano_srcfilen: ExtData/PIESA/sfc/volcanic_CARN_1978-2020_v202005/so2_volcanic_emissions_CARN_v202005.degassing_only.rc + +# Heights [m] of LTO, CDS and CRS aviation emissions layers +aviation_vertical_layers: 0.0 100.0 9.0e3 10.0e3 + +# Fraction of anthropogenic emissions that are SO4 +so4_anthropogenic_fraction: 0.03 + +# Aircraft emission factor: go from kg fuel to kg SO2 +aircraft_fuel_emission_factor: 0.0008 + +# Scavenging efficiency per bin [km-1] (NOT USED UNLESS RAS IS CALLED) +fscav: 0.0 0.0 0.4 0.4 + +# 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 + +pressure_lid_in_hPa: 0.01 + +# Molecular weight of species [kg mole-1] +molecular_weight: -1 -1 0.132 -1 + +# Number of particles per kg mass +fnum: -1 -1 9.01e16 -1 + +# Number median radius [um] +particle_radius_number: -1 -1 0.0695 -1 + +# Sigma of lognormal number distribution +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. + diff --git a/ESMF/GOCART_GridComp/NI_GridComp/NI_GridCompMod.F90 b/ESMF/GOCART_GridComp/NI_GridComp/NI_GridCompMod.F90 index e37f0ff4..2bc5e9e7 100644 --- a/ESMF/GOCART_GridComp/NI_GridComp/NI_GridCompMod.F90 +++ b/ESMF/GOCART_GridComp/NI_GridComp/NI_GridCompMod.F90 @@ -1343,18 +1343,21 @@ subroutine NI_GridCompRun2_ ( gcNI, w_c, impChem, expChem, & if(associated(NI_pnh4aq%data2d)) NI_pnh4aq%data2d(:,:) = 0. if(associated(NI_pnh3aq%data2d)) NI_pnh3aq%data2d(:,:) = 0. + ! RPMARES - thermodynamic module ! ------------------------------ ! Take as input GOCART provided SO4, model provided RH, ! and HNO3, NH3, NH4, and fine-mode nitrate (NO3an1). ! At present we update NH3, NH4, and NO3an1. ! Check we are running GOCART sulfate + nSO4 = -1 if(w_c%reg%doing_SU) then do n = w_c%reg%i_SU, w_c%reg%j_SU if(trim(w_c%reg%vname(n)) .eq. 'SO4') nSO4 = n enddo endif + do k = 1, km do j = j1, j2 do i = i1, i2 @@ -1531,7 +1534,6 @@ subroutine NI_GridCompRun2_ ( gcNI, w_c, impChem, expChem, & end do endif - ! NI Settling ! ----------- ! Because different bins having different swelling coefficients I need to @@ -1707,6 +1709,7 @@ subroutine NI_GridCompRun2_ ( gcNI, w_c, impChem, expChem, & if(associated(NI_conv(2)%data2d)) NI_conv(2)%data2d = -bcnv_(:,:,nNO3an2)/area_/icdt if(associated(NI_conv(3)%data2d)) NI_conv(3)%data2d = -bcnv_(:,:,nNO3an3)/area_/icdt + ! Clean up ! -------- deallocate(cmfmc_, qccu_, dtrain_, tc_, airmass_, & diff --git a/ESMF/GOCART_GridComp/OC_GridComp/OC_GridCompMod.F90 b/ESMF/GOCART_GridComp/OC_GridComp/OC_GridCompMod.F90 index 4d890d26..c31d9041 100644 --- a/ESMF/GOCART_GridComp/OC_GridComp/OC_GridCompMod.F90 +++ b/ESMF/GOCART_GridComp/OC_GridComp/OC_GridCompMod.F90 @@ -2200,7 +2200,7 @@ subroutine OC_GridCompRun2_ ( gcOC, w_c, impChem, expChem, & w_c%qa(n2)%data3d(i,j,k) = w_c%qa(n2)%data3d(i,j,k) + cdt*gcOC%psoa_anthro_voc(i,j,k)/rhoa(i,j,k) ! hydrophilic if ( associated(OC_pSOA%data2d)) & OC_pSOA%data2d(i,j) = OC_pSOA%data2d(i,j) & - + cdt*gcOC%psoa_anthro_voc(i,j,k)*w_c%delp(i,j,k)/rhoa(i,j,k)/grav + + gcOC%psoa_anthro_voc(i,j,k)*w_c%delp(i,j,k)/rhoa(i,j,k)/grav end do end do end do diff --git a/ESMF/Shared/Chem_AeroGeneric.F90 b/ESMF/Shared/Chem_AeroGeneric.F90 index f3057f96..9bb50624 100644 --- a/ESMF/Shared/Chem_AeroGeneric.F90 +++ b/ESMF/Shared/Chem_AeroGeneric.F90 @@ -30,6 +30,7 @@ module Chem_AeroGeneric public setZeroKlid public setZeroKlid4d public findKlid + public get_mixR ! ! !DESCRIPTION: ! @@ -75,7 +76,7 @@ subroutine add_aero (state, label, label2, grid, typekind, ptr, rc) field = MAPL_FieldCreateEmpty(trim(field_name), grid, __RC__) if (trim(field_name) == 'PLE') then call MAPL_FieldAllocCommit (field, dims=MAPL_DimsHorzVert, location=MAPL_VLocationEdge, typekind=typekind, hw=0, __RC__) - else if (trim(field_name) == 'FRLAND') then + 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__) @@ -356,6 +357,53 @@ subroutine findKlid (klid, plid, ple, rc) end subroutine findKlid +!=================================================================================== +!BOP +! !IROUTINE: get_mixR + subroutine get_mixR (state, rc) + +! !USES: + implicit none + +! !ARGUMENTS: + type (ESMF_State) :: state + integer, intent(out) :: rc + +! !LOCALS: + real, dimension(:,:,:), pointer :: ptr3d + real, dimension(:,:,:,:), pointer :: ptr4d + real, dimension(:,:,:), pointer :: aeroSum + character (len=ESMF_MAXSTR) :: fld_name + integer :: aeroN, i + character (len=ESMF_MAXSTR), allocatable :: aerosolNames(:) + integer :: status + +! Begin... + + call ESMF_AttributeGet(state, name='internal_variable_name', itemCount=aeroN, __RC__) + allocate (aerosolNames(aeroN), __STAT__) + call ESMF_AttributeGet(state, name='internal_variable_name', valueList=aerosolNames, __RC__) + +! Zero out previous aerosol sum value so it doesn't keep growing. + call ESMF_AttributeGet (state, name='sum_of_internalState_aerosol', value=fld_name, __RC__) + if (fld_name /= '') then + call MAPL_GetPointer (state, aeroSum, trim(fld_name), __RC__) + aeroSum = 0.0 + end if + + do i = 1, size(aerosolNames) + if ((aerosolNames(i) == 'DU') .or. (aerosolNames(i) == 'SS')) then + call MAPL_GetPointer (state, ptr4d, trim(aerosolNames(i)), __RC__) + aeroSum = sum(ptr4d, dim=4) !DU and SS only have 1 internal state variable so no need to =+ + else + call MAPL_GetPointer (state, ptr3d, trim(aerosolNames(i)), __RC__) + aeroSum = aeroSum + ptr3d + end if + end do + + end subroutine get_mixR + + end module Chem_AeroGeneric diff --git a/ESMF/Shared/g2g_rst_generator.py b/ESMF/Shared/g2g_rst_generator.py new file mode 100644 index 00000000..21401e24 --- /dev/null +++ b/ESMF/Shared/g2g_rst_generator.py @@ -0,0 +1,221 @@ +# -*- coding: utf-8 -*- + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Written by E. Sherman on 05/05/2021 + +# DESCRIPTION: This program will generate the necessary GOCART2G restart files +# if provided a legacy GOCART restart file (gocart_internal_rst). +# Every use-case has likely not been tested. If you have any issues +# please contact Elliot Sherman at elliot.m.sherman@nasa.gov. + + +# HOW TO USE: This script is meant to be run on NCCS Discover. Please load the +# following module "python/GEOSpyD/Ana2019.03_py3.7" to run. +# After loading the module, type the following in your terminal: +# "python3 g2g_rst_generator.py" and follow the prompts. +# +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +from netCDF4 import Dataset + +# prompt user for gocart restart file +# ----------------------------------- +gocart_rst = input("Path to gocart_internal_rst: ") + +# ask user if brown carbon is included in restart +# ------------------------------------------------ +answer = input("Is brown carbon included in the gocart_internal_rst? (yes/no): ") + +if answer.upper() == 'YES': + aeroList = ['du','ss','ni','su','caoc','cabc','cabr'] +if answer.upper() == 'NO': + aeroList = ['du','ss','ni','su','caoc','cabc'] + +# read original gocart restart +# ---------------------------- +dataOrig = Dataset(gocart_rst, mode='r') + +# function to create GOCART2G restarts +# ------------------------------------ +def createAeroRestart (dataOrig, aeroName): + + # create new restart file + # ----------------------- + data = Dataset(aeroName + '_internal_rst', mode='w', format='NETCDF4') + + # create dimensions + # ----------------- + if aeroName == 'du' or aeroName == 'ss': + unknown_dim1 = data.createDimension("unknown_dim1", None) + lat = data.createDimension("lat", dataOrig.dimensions['lat'].size) + lev = data.createDimension("lev", dataOrig.dimensions['lev'].size) + lon = data.createDimension("lon", dataOrig.dimensions['lon'].size) + time = data.createDimension("time", dataOrig.dimensions['time'].size) + + # create new lon variable + # ----------------------- + lon = data.createVariable("lon", "d", ("lon")) + lon.long_name = dataOrig.variables['lon'].long_name + lon.units = dataOrig.variables['lon'].units + # fill new lon with original lon's values + lon = data.variables['lon'] + lon[:] = dataOrig.variables['lon'][:] + + # create new lat variable + # ----------------------- + lat = data.createVariable("lat", "d", ("lat")) + lat.long_name = dataOrig.variables['lat'].long_name + lat.units = dataOrig.variables['lat'].units + # fill new lat with old lat's values + lat = data.variables['lat'] + lat[:] = dataOrig.variables['lat'][:] + + # create new lev variable + # ---------------------- + lev = data.createVariable("lev", "d", ("lev")) + lev.coordinate = dataOrig.variables['lev'].coordinate + lev.formulaTerms = dataOrig.variables['lev'].formulaTerms + lev.long_name = dataOrig.variables['lev'].long_name + lev.positive = dataOrig.variables['lev'].positive + lev.standard_name = dataOrig.variables['lev'].standard_name + lev.units = dataOrig.variables['lev'].units + # fill new lev with original lev's values + lev = data.variables['lev'] + lev[:] = dataOrig.variables['lev'][:] + + # create new time variable + # ------------------------- + time = data.createVariable("time", "d", ("time")) + time.units = dataOrig.variables['time'].units + time.long_name = "time" + # fill new time with original time's values + time = data.variables['time'] + time[:] = dataOrig.variables['time'][:] + + + # create new aerosol variable and fill with original aerosol values + # ----------------------------------------------------------------- + if aeroName == 'du': + aero1 = data.createVariable("DU", "f4", ("unknown_dim1","lev", "lat", "lon")) + aero1.long_name = "Dust Mixing Ratio All bins" + aero1.units = "kg kg-1" + + aero1 = data.variables['DU'] + aero1[0,:,:,:] = dataOrig.variables['du001'][:] + aero1[1,:,:,:] = dataOrig.variables['du002'][:] + aero1[2,:,:,:] = dataOrig.variables['du003'][:] + aero1[3,:,:,:] = dataOrig.variables['du004'][:] + aero1[4,:,:,:] = dataOrig.variables['du005'][:] + + elif aeroName == 'ss': + aero1 = data.createVariable("SS", "f4", ("unknown_dim1","lev", "lat", "lon")) + aero1.long_name = "Sea Salt Mixing Ratio All bins" + aero1.units = "kg kg-1" + + aero1 = data.variables['SS'] + aero1[0,:,:,:] = dataOrig.variables['ss001'][:] + aero1[1,:,:,:] = dataOrig.variables['ss002'][:] + aero1[2,:,:,:] = dataOrig.variables['ss003'][:] + aero1[3,:,:,:] = dataOrig.variables['ss004'][:] + aero1[4,:,:,:] = dataOrig.variables['ss005'][:] + + elif aeroName == 'ni': + aero1 = data.createVariable("NH3", "f4", ("lev", "lat", "lon")) + aero1.long_name = "Ammonia (NH3, gas phase)" + aero1.units = "kg kg-1" + aero2 = data.createVariable("NH4a", "f4", ("lev", "lat", "lon")) + aero2.long_name = "Ammonium ion (NH4+, aerosol phase)" + aero2.units = "kg kg-1" + aero3 = data.createVariable("NO3an1", "f4", ("lev", "lat", "lon")) + aero3.long_name = "Nitrate size bin 001" + aero3.units = "kg kg-1" + aero4 = data.createVariable("NO3an2", "f4", ("lev", "lat", "lon")) + aero4.long_name = "Nitrate size bin 002" + aero4.units = "kg kg-1" + aero5 = data.createVariable("NO3an3", "f4", ("lev", "lat", "lon")) + aero5.long_name = "Nitrate size bin 003" + aero5.units = "kg kg-1" + + aero1 = data.variables['NH3'] + aero1[:,:,:] = dataOrig.variables['NH3'][:] + aero2 = data.variables['NH4a'] + aero2[:,:,:] = dataOrig.variables['NH4a'][:] + aero3 = data.variables['NO3an1'] + aero3[:,:,:] = dataOrig.variables['NO3an1'][:] + aero4 = data.variables['NO3an2'] + aero4[:,:,:] = dataOrig.variables['NO3an2'][:] + aero5 = data.variables['NO3an3'] + aero5[:,:,:] = dataOrig.variables['NO3an3'][:] + + elif aeroName == 'su': + aero1 = data.createVariable("DMS", "f4", ("lev", "lat", "lon")) + aero1.long_name = "Dimethylsulphide" + aero1.units = "kg kg-1" + aero2 = data.createVariable("MSA", "f4", ("lev", "lat", "lon")) + aero2.long_name = "Methanesulphonic acid" + aero2.units = "kg kg-1" + aero3 = data.createVariable("SO2", "f4", ("lev", "lat", "lon")) + aero3.long_name = "Sulphur dioxide" + aero3.units = "kg kg-1" + aero4 = data.createVariable("SO4", "f4", ("lev", "lat", "lon")) + aero4.long_name = "Sulphate aerosol" + aero4.units = "kg kg-1" + + aero1 = data.variables['DMS'] + aero1[:,:,:] = dataOrig.variables['DMS'][:] + aero2 = data.variables['MSA'] + aero2[:,:,:] = dataOrig.variables['MSA'][:] + aero3 = data.variables['SO2'] + aero3[:,:,:] = dataOrig.variables['SO2'][:] + aero4 = data.variables['SO4'] + aero4[:,:,:] = dataOrig.variables['SO4'][:] + + elif aeroName == 'caoc': + aero1 = data.createVariable("CAphilicCA.oc", "f4", ("lev", "lat", "lon")) + aero1.long_name = "Hydrophilic Carbonaceous Aerosol" + aero1.units = "kg kg-1" + aero2 = data.createVariable("CAphobicCA.oc", "f4", ("lev", "lat", "lon")) + aero2.long_name = "Hydrophobic Carbonaceous Aerosol" + aero2.units = "kg kg-1" + + aero1 = data.variables['CAphilicCA.oc'] + aero1[:,:,:] = dataOrig.variables['OCphilic'][:] + aero2 = data.variables['CAphobicCA.oc'] + aero2[:,:,:] = dataOrig.variables['OCphobic'][:] + + elif aeroName == 'cabc': + aero1 = data.createVariable("CAphilicCA.bc", "f4", ("lev", "lat", "lon")) + aero1.long_name = "Hydrophilic Carbonaceous Aerosol" + aero1.units = "kg kg-1" + aero2 = data.createVariable("CAphobicCA.bc", "f4", ("lev", "lat", "lon")) + aero2.long_name = "Hydrophobic Carbonaceous Aerosol" + aero2.units = "kg kg-1" + + aero1 = data.variables['CAphilicCA.bc'] + aero1[:,:,:] = dataOrig.variables['BCphilic'][:] + aero2 = data.variables['CAphobicCA.bc'] + aero2[:,:,:] = dataOrig.variables['BCphobic'][:] + + elif aeroName == 'cabr': + aero1 = data.createVariable("CAphilicCA.br", "f4", ("lev", "lat", "lon")) + aero1.long_name = "Hydrophilic Carbonaceous Aerosol" + aero1.units = "kg kg-1" + aero2 = data.createVariable("CAphobicCA.br", "f4", ("lev", "lat", "lon")) + aero2.long_name = "Hydrophobic Carbonaceous Aerosol" + aero2.units = "kg kg-1" + + aero1 = data.variables['CAphilicCA.br'] + aero1[:,:,:] = dataOrig.variables['BRCphilic'][:] + aero2 = data.variables['CAphobicCA.br'] + aero2[:,:,:] = dataOrig.variables['BRCphobic'][:] + + # Close file + data.close() + +# Run the function and generate a restart for each aerosol +# -------------------------------------------------------- +for aeroName in aeroList: + createAeroRestart(dataOrig, aeroName) + + + diff --git a/Process_Library/GOCART2G_Process.F90 b/Process_Library/GOCART2G_Process.F90 index 6da813f2..2aff30a7 100644 --- a/Process_Library/GOCART2G_Process.F90 +++ b/Process_Library/GOCART2G_Process.F90 @@ -29,11 +29,14 @@ module GOCART2G_Process public DustAerosolDistributionKok public DustEmissionFENGSHA public DustEmissionGOCART2G + public DustEmissionK14 public DustFluxV2HRatioMB95 public moistureCorrectionFecan public soilMoistureConvertVol2Grav public DistributePointEmission public updatePointwiseEmissions + public Chem_Settling + public Chem_SettlingSimple public Chem_Settling2Gorig public Chem_SettlingSimpleOrig public DryDeposition @@ -536,6 +539,393 @@ subroutine DustEmissionGOCART2G(radius, fraclake, gwettop, oro, u10m, & end subroutine DustEmissionGOCART2G +!================================================================================== +!BOP +! !IROUTINE: DustEmissionK14 + + subroutine DustEmissionK14( km, t_soil, w_top, rho_air, & + z0, z, u_z, v_z, ustar, & + f_land, f_snow, & + f_src, & + f_sand, f_silt, f_clay, & + texture, vegetation, gvf, & + f_w, f_c, uts_gamma, & + UNDEF, GRAV, VON_KARMAN, & + opt_clay, Ch_DU, & + emissions, & + u, u_t, u_ts, & + R, H_w, f_erod, & + rc ) + +! !USES: + implicit none + +! !INPUT PARAMETERS: + integer, intent(in) :: km ! model levels + real, dimension(:,:), intent(in) :: rho_air ! air density + real, dimension(:,:), intent(in) :: w_top ! volumetric soil moisture in the top surface layer + real, dimension(:,:), intent(in) :: t_soil ! soil temperature + real, dimension(:,:), intent(in) :: z0 ! aeolian aerodynamic roughness length + real, dimension(:,:), intent(in) :: z, u_z, v_z! hight and wind at this height + real, dimension(:,:), intent(in) :: ustar ! friction velocity + real, dimension(:,:), intent(in) :: f_land ! land fraction + real, dimension(:,:), intent(in) :: f_snow ! snow fraction + real, dimension(:,:), intent(in) :: f_src ! dust source potential -- OBSOLETE + real, dimension(:,:), intent(in) :: f_sand ! sand fraction + real, dimension(:,:), intent(in) :: f_silt ! silt fraction + real, dimension(:,:), intent(in) :: f_clay ! clay fraction + real, dimension(:,:), intent(in) :: texture ! soil texture + real, dimension(:,:), intent(in) :: vegetation ! vegetation categories (IGBP) + real, dimension(:,:), intent(in) :: gvf ! vegetation fraction + + integer, intent(in) :: opt_clay ! controls which clay&silt emissions term to use + real, intent(in) :: Ch_DU ! dust emission tuning coefficient [kg/(sec^2 m^5)] + real, intent(in) :: f_w ! factor to scale down soil moisture in the top 5cm to soil moisture in the top 1cm + real, intent(in) :: f_c ! scale down the wet sieving clay fraction to get it more in line with dry sieving measurements + real, intent(in) :: uts_gamma ! threshold friction velocity parameter 'gamma' + real, intent(in) :: UNDEF ! paramter for undefined varaible + real, intent(in) :: GRAV ! gravity + real, intent(in) :: VON_KARMAN ! von karman constant + +! !OUTPUT PARAMETERS: + + real, dimension(:,:,:), intent(out) :: emissions ! mass flux of emitted dust particles + + real, dimension(:,:), intent(out) :: u ! aeolian friction velocity + real, dimension(:,:), intent(out) :: u_t ! threshold friction velocity + real, dimension(:,:), intent(out) :: u_ts ! threshold friction velocity over smooth surface + + real, dimension(:,:), intent(out) :: H_w ! soil mosture correction + real, dimension(:,:), intent(out) :: R ! drag partition correction + + real, dimension(:,:), intent(out) :: f_erod ! erodibility + + + integer, intent(out) :: rc ! Error return code: + ! 0 - all is well + ! 1 - + + character(len=*), parameter :: myname = 'DustEmissionK14' + +! !Local Variables + + real, dimension(:,:), allocatable :: w_g ! gravimetric soil moisture + real, dimension(:,:), allocatable :: w_gt ! threshold gravimetric soil moisture + + real, dimension(:,:), allocatable :: f_veg ! vegetation mask + real, dimension(:,:), allocatable :: clay ! 'corrected' clay fraction in '%' + real, dimension(:,:), allocatable :: silt ! 'corrected' silt fraction in '%' + real, dimension(:,:), allocatable :: k_gamma ! silt and clay term (gamma in K14 and I&K, 2017) + real, dimension(:,:), allocatable :: z0s ! smooth roughness length + + real, dimension(:,:), allocatable :: Dp_size ! typical size of soil particles for optimal saltation + real :: rho_p ! typical density of soil particles + + integer :: i, j, i1=1, i2, j1=1, j2, n + + real, parameter :: z0_valid = 0.08e-2 ! valid range of ARLEMS z0 is 0--0.08cm, z0 > 0.08cm is retreived but the data quality is low + real, parameter :: z0_max = 6.25 * z0_valid! maximum roughness over arid surfaces + real, parameter :: z0_ = 2.0e-4 ! representative aeolian aerodynamic roughness length z0 = 0.02cm + + real, parameter :: rho_water = 1000.0 ! water density, 'kg m-3' + real, parameter :: rho_soil_bulk = 1700.0 ! soil bulk density, 'kg m-3' + real, parameter :: rho_soil = 2500.0 ! soil particle density, 'kg m-3' + +! real, parameter :: f_w = 0.5 ! factor to scale down soil moisture in the top 5cm to soil moisture in the top 1cm +! real, parameter :: f_c = 0.7 ! scale down the wet sieving clay fraction to get it more in line with dry sieving measurements + + ! Shao et al. + real, parameter :: a_n = 0.0123 + real, parameter :: G = 1.65e-4 + + ! size of coarsest mode in the STATSGO/FAO soil type + real, parameter :: Dc_soil(12) = (/ 710e-6, 710e-6, 125e-6, & + 125e-6, 125e-6, 160e-6, & + 710e-6, 125e-6, 125e-6, & + 160e-6, 125e-6, 2e-6 /) + +! !DESCRIPTION: Computes the dust emissions for one time step +! +! !REVISION HISTORY: +! +! 15Aug2016, Darmenov - Initial implementation +! 15Dec2020, E.Sherman - Ported to GOCART2G process library + +!EOP +!------------------------------------------------------------------------- +! Begin... + rc = 0 + i2 = ubound(t_soil,1) + j2 = ubound(t_soil,2) + + allocate(w_g(i2,j2), w_gt(i2,j2), f_veg(i2,j2), clay(i2,j2), silt(i2,j2), k_gamma(i2,j2)) + allocate(z0s(i2,j2), Dp_size(i2,j2)) + + ! typical size of soil particles for optimal saltation is about 75e-6m + Dp_size = 75e-6 + + ! typical density of soil particles, e.g. quartz grains + rho_p = 2.65e3 + + ! threshold friction velocity over smooth surface + u_ts = UNDEF + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0)) + u_ts = sqrt(a_n * ( ((rho_p/rho_air) * GRAV * Dp_size) + uts_gamma / (rho_air * Dp_size))) + end where + +#if (0) + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 1) < 0.5) u_ts = u_ts * 1.176 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 2) < 0.5) u_ts = u_ts * 1.206 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 3) < 0.5) u_ts = u_ts * 1.234 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 4) < 0.5) u_ts = u_ts * 1.261 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 5) < 0.5) u_ts = u_ts * 1.272 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 6) < 0.5) u_ts = u_ts * 1.216 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 7) < 0.5) u_ts = u_ts * 1.211 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 8) < 0.5) u_ts = u_ts * 1.266 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 9) < 0.5) u_ts = u_ts * 1.222 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 10) < 0.5) u_ts = u_ts * 1.146 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 11) < 0.5) u_ts = u_ts * 1.271 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0) .and. abs(texture - 12) < 0.5) u_ts = u_ts * 1.216 +#endif + + ! gravimetric soil moisture : scaled down to represent the values in the top 1cm and converted to '%' + w_g = UNDEF + where (f_land > 0.0) +#if (1) + ! following Zender + ! Q_s_ = 0.489 - 0.126*f_sand + ! rho_soil_bulk = rho_soil*(1 - Q_s_) + ! w_g = 100 * f_w * (rho_water / rho_soil_bulk) * w_top + ! ...the equivalent one-liner + w_g = 100 * f_w * rho_water / rho_soil / (1.0 - (0.489 - 0.126*f_sand)) * w_top +#else + w_g = 100 * f_w * (rho_water / rho_soil_bulk) * w_top +#endif + end where + + ! soil moisture correction following Fecan + clay = UNDEF + silt = UNDEF + w_gt = UNDEF + where ((f_land > 0.0) .and. (f_clay <= 1.0) .and. (f_clay >= 0.0)) + clay = f_c * f_clay + silt = f_silt + (1.0-f_c)*f_clay ! move the excess clay to the silt fraction + + w_gt = 14.0*clay*clay + 17.0*clay ! w_gt in '%' + end where + + H_w = 1.0 +#if (1) + ! Fecan, 1999 + where ((f_land > 0.0) .and. (w_g > w_gt)) + H_w = sqrt(1.0 + 1.21*(w_g - w_gt)**0.68) + end where +#else + ! Shao, 1996 + where ((f_land > 0.0) .and. (w_top <= 1.0) .and. (w_top >= 0.0)) + H_w = exp(22.7*f_w *w_top) + end where +#endif + + + select case (opt_clay) + case (1) + ! following Ito and Kok, 2017 + k_gamma = 0.05 + + where ((f_land > 0.0) .and. (clay < 0.2) .and. (clay >= 0.05)) + k_gamma = clay + end where + + where ((f_land > 0.0) .and. (clay >= 0.2) .and. (clay <= 1.0)) + k_gamma = 0.2 + end where + case (2) + ! following Ito and Kok, 2017 + k_gamma = 1.0/1.4 + + where ((f_land > 0.0) .and. (clay < 0.2) .and. (clay >= 0.0)) + k_gamma = 1.0 / (1.4 - clay - silt) + end where + + where ((f_land > 0.0) .and. (clay >= 0.2) .and. (clay <= 1.0)) + k_gamma = 1.0 / (1.0 + clay - silt) + end where + case default + ! following Kok et al, 2014 + k_gamma = 0.0 + + where ((f_land > 0.0) .and. (clay <= 1.0) .and. (clay >= 0.0)) + k_gamma = clay + end where + end select + + + ! roughness over smooth surface + z0s = 125e-6 + do j = j1, j2 + do i = i1, i2 + if (texture(i,j) > 0 .and. texture(i,j) < 13) then + z0s(i,j) = Dc_soil(nint(texture(i,j))) + end if + end do + end do + + z0s = z0s / 30.0 ! z0s = MMD/x, where typically x is in the range 24--30; x=10 was recommended + ! as a more appropriate value for this parameter in a recent article + + ! drag partition correction + R = 1.0 + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > z0s)) +#if (1) + ! MacKinnon et al, 2004 + R = 1.0 - log(z0/z0s)/log(0.7 * (122.55/z0s)**0.8) +#else + ! King et al, 2005, Darmenova et al, 2009, and K14-S1 use the corrected MB expression + R = 1.0 - log(z0/z0s)/log(0.7 * (0.1/z0s)**0.8) +#endif + end where + + + ! *soil* friction velocity, see Equations 5, S.10, S11 in Kok et al, 2014 and the supplement paper + u = UNDEF + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0)) +#if (1) + u = ustar +#else + u = VON_KARMAN / log(z/z0) * sqrt(u_z*u_z + v_z*v_z) +#endif + u = R * u ! correction for roughness elements + end where + + + ! *soil* threshold friction velocity, Section 2.2 in Kok et al, 2014 + u_t = UNDEF + where ((f_land > 0.0) .and. (z0 < z0_max) .and. (z0 > 0.0)) + u_t = u_ts * H_w ! apply moisture correction + end where + + + ! erodibility + f_erod = UNDEF + where (f_land > 0.0) + f_erod = 1.0 + end where + + ! erodibility parameterization - Laurent et al., 2008 + where ((f_land > 0.0) .and. (z0 > 3.0e-5) .and. (z0 < z0_max)) + f_erod = 0.7304 - 0.0804*log10(100*z0) + end where + + ! bedrock + where (abs(texture - 15) < 0.5) f_erod = 0.0 + + + ! vegetation mask + f_veg = 0.0 + where ((f_land > 0.0) .and. abs(vegetation - 7) < 0.1) f_veg = 1.0 ! open shrublands +! where ((f_land > 0.0) .and. abs(vegetation - 9) < 0.1) f_veg = 1.0 ! savannas +! where ((f_land > 0.0) .and. abs(vegetation - 10) < 0.1) f_veg = 1.0 ! grasslands +! where ((f_land > 0.0) .and. abs(vegetation - 12) < 0.1) f_veg = 1.0 ! croplands + where ((f_land > 0.0) .and. abs(vegetation - 16) < 0.1) f_veg = 1.0 ! barren or sparsely vegetated + + ! vegetation mask: modulate with vegetation fraction + where (f_land > 0.0 .and. gvf >= 0.0 .and. gvf < 0.8) f_veg = f_veg * (1 - gvf) + + + ! final erodibility + f_erod = f_erod * f_veg * f_land * (1.0 - f_snow) + + ! ...kludge to deal with high emissions in Australia + where (f_src >= 0.0) f_erod = f_src * f_erod + + call VerticalDustFluxK14( i1, i2, j1, j2, km, & + u, u_t, rho_air, & + f_erod, k_gamma, & + emissions(:,:,1) ) + + ! duplicate dust emissions across the 3rd dimension for use in call to UpdateAerosolState + ! UpdateAerosolState expects surface dust emissions array of 3 dimensions(x, y, bin). + emissions(:,:,1) = emissions(:,:,1) * Ch_DU + do n = 2, size(emissions, dim=3) + emissions(:,:,n) = emissions(:,:,1) + end do + + end subroutine DustEmissionK14 + +!================================================================================== +!BOP +! !IROUTINE: VerticalDustFluxK14 + + subroutine VerticalDustFluxK14( i1, i2, j1, j2, km, & + u, u_t, rho_air, & + f_erod, k_gamma, & + emissions ) + +! !USES: + implicit none +! !INPUT PARAMETERS: + integer, intent(in) :: i1, i2, j1, j2, km + + real, dimension(:,:), intent(in) :: u ! friction velocity, 'm s-1' + real, dimension(:,:), intent(in) :: u_t ! threshold friction velocity, 'm s-1' + real, dimension(:,:), intent(in) :: rho_air ! air density, 'kg m-3' + real, dimension(:,:), intent(in) :: f_erod ! erodibility + real, dimension(:,:), intent(in) :: k_gamma ! clay and silt dependent term that modulates the emissions + +! !OUTPUT PARAMETERS: + real, intent(out) :: emissions(:,:) ! total vertical dust mass flux, 'kg m-2 s-1' + + character(len=*), parameter :: myname = 'VerticalDustFluxK14' + +! !Local Variables + integer :: i, j + real :: u_st ! standardized threshold friction velocity + real :: C_d ! dust emission coefficient + real :: f_ust ! numerical term + + ! parameters from Kok et al. (2012, 2014) + real, parameter :: rho_a0 = 1.225 ! standard atmospheric density at sea level, 'kg m-3' + real, parameter :: u_st0 = 0.16 ! the minimal value of u* for an optimally erodible soil, 'm s-1' + real, parameter :: C_d0 = 4.4e-5 ! C_d0 = (4.4 +/- 0.5)*1e-5 + real, parameter :: C_e = 2.0 ! C_e = 2.0 +/- 0.3 + real, parameter :: C_a = 2.7 ! C_a = 2.7 +/- 1.0 + +! !DESCRIPTION: Computes the dust emissions for one time step +! +! !REVISION HISTORY: +! +! 11Oct2011, Darmenov - For now use the GOCART emission scheme to +! calculate the total emission +! +!EOP +!------------------------------------------------------------------------- + + emissions = 0.0 ! total emission + + ! Vertical dust flux + ! ------------------ + do j = j1, j2 + do i = i1, i2 + + if ((f_erod(i,j) > 0.0) .and. (u(i,j) > u_t(i,j))) then + u_st = u_t(i,j) * sqrt(rho_air(i,j) / rho_a0) + u_st = max(u_st, u_st0) + + f_ust = (u_st - u_st0)/u_st0 + C_d = C_d0 * exp(-C_e * f_ust) + + emissions(i,j) = C_d * f_erod(i,j) * k_gamma(i,j) * rho_air(i,j) & + * ((u(i,j)*u(i,j) - u_t(i,j)*u_t(i,j)) / u_st) & + * (u(i,j) / u_t(i,j))**(C_a * f_ust) + end if + + end do + end do + + ! all done + end subroutine VerticalDustFluxK14 + !================================================================================== !BOP @@ -615,90 +1005,888 @@ subroutine DistributePointEmission(km, hghte, z_bot, z_top, & real, intent(in) :: emissions_point ![kg/kg] -! !OUTPUT PARAMETERS: - real, dimension(:), intent(out) :: point_column_emissions ![kg/kg] - integer, optional, intent(out) :: rc ! Error return code: +! !OUTPUT PARAMETERS: + real, dimension(:), intent(out) :: point_column_emissions ![kg/kg] + integer, optional, intent(out) :: rc ! Error return code: + + +! !DESCRIPTION: Distributes piont emissions uniformily in the vertical in height coordinates. +! +! !REVISION HISTORY: +! ??? A. Darmenov +! ??? P. Colarco +! ??2020 E.Sherman - ported to process library +! +! !Locals + integer :: k + integer :: k_bot, k_top + real :: z_ + real, dimension(km) :: z, dz, w_ !dz units = meters + +!EOP +!------------------------------------------------------------------------- +! Begin + +! z(1:km) = hghte(0:km-1) + z(1:km) = hghte(1:km) + + do k = km, 1, -1 +! dz(k) = hghte(k-1)-hghte(k) + dz(k) = hghte(k)-hghte(k+1) + end do + +! find the bottom level + do k = km, 1, -1 + if (z(k) >= z_bot) then + k_bot = k + exit + end if + end do + +! find the top level + do k = k_bot, 1, -1 + if (z(k) >= z_top) then + k_top = k + exit + end if + end do + +! find the weights + w_ = 0 + +! if (k_top > k_bot) then +! need to bail - something went wrong here +! end if + + if (k_bot == k_top) then + if (z_top == z_bot) then ! for non-explosive volcanic emissions + w_(k_bot) = tiny(0.) + else + w_(k_bot) = z_top - z_bot + end if + else + do k = k_bot, k_top, -1 + if ((k < k_bot) .and. (k > k_top)) then + w_(k) = dz(k) + else + if (k == k_bot) then + w_(k) = (z(k) - z_bot) + end if + + if (k == k_top) then + w_(k) = z_top - (z(k)-dz(k)) + end if + end if + end do + end if + +! distribute emissions in the vertical + point_column_emissions(:) = ((w_ / sum(w_)) * emissions_point) / area + + __RETURN__(__SUCCESS__) + 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) + +! !USES: + + implicit NONE + +! !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) + 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] + real, pointer, dimension(:,:,:), intent(in) :: rh ! relative humidity [1] + real, pointer, dimension(:,:,:), intent(in) :: hghte ! geopotential height [m] + real, pointer, dimension(:,:,:), intent(in) :: delp ! pressure level thickness [Pa] + +! !OUTPUT PARAMETERS: + + real, pointer, dimension(:,:), intent(inout) :: fluxout ! Mass lost by settling + ! to surface, kg/m2/s + integer, optional, intent(out) :: rc ! Error return code: + ! 0 - all is well + ! 1 - +! Optionally output the settling velocity calculated + real, pointer, optional, dimension(:,:,:) :: vsettleOut + +! Optionally correct the settling velocity following Maring et al, 2003 + logical, optional, intent(in) :: correctionMaring + + 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). +! +! !REVISION HISTORY: +! +! 17Sep2004 Colarco Strengthen sedimentation flux out at surface +! by setting removal to be valid from middle of +! surface layer +! 06Nov2003 Colarco Based on Ginoux +! 23Jan2003 da Silva Standardization +! +!EOP +!------------------------------------------------------------------------- + +! !Local Variables + integer :: i, j, k, n, dk + + real, parameter :: rhow = 1000. ! Density of water [kg m-3] + +! parameters from Maring et al, 2003 + real, parameter :: v_upwardMaring = 0.33e-2 ! upward velocity, [m s-1] + real, parameter :: diameterMaring = 7.30e-6 ! particle diameter, [m] + + integer :: i1=1, i2, j1=1, j2 + integer :: dims(3) + + real, pointer, dimension(:,:) :: hsurf + real(kind=DP), dimension(:,:), allocatable :: cmass_before, cmass_after + real, allocatable :: dz(:,:,:) + real, dimension(:,:,:), allocatable :: radius, rhop, qa + real, dimension(:,:,:), allocatable :: vsettle ! fall speed [m s-1] + real :: ONE_OVER_G + integer :: status + +!EOP +!------------------------------------------------------------------------- + +! Get dimensions +! --------------- + dims = shape(rhoa) + i2 = dims(1); j2 = dims(2) + + ONE_OVER_G = 1.0/grav + + hsurf => hghte(i1:i2,j1:j2,km) + + allocate(dz(i2,j2,km), radius(i2,j2,km), rhop(i2,j2,km), vsettle(i2,j2,km), qa(i2,j2,km)) + allocate(cmass_before(i2,j2), cmass_after(i2,j2)) + cmass_before = 0.d0 + cmass_after = 0.d0 + + qa = int_qa + + if(associated(fluxout)) fluxout(:,:) = 0.0 + +! Handle the fact that hghte may be in the range [1,km+1] or [0,km] +! ----------------------------------------------------------------- + dk = lbound(hghte,3) - 1 ! This is either 0 or 1 + +! Layer thickness from hydrostatic equation + k = km + dz(:,:,k) = hghte(:,:,k+dk)-hsurf(:,:) + do k = km-1, 1, -1 + dz(:,:,k) = hghte(:,:,k+dk) - hghte(:,:,k+dk+1) + enddo + +! If radius le 0 then get out + if(radiusInp .le. 0.) then + status = 100 + __RETURN__(STATUS) + end if + +! Find the column dry mass before sedimentation + do k = klid, km + do j = j1, j2 + do i = i1, i2 + cmass_before(i,j) = cmass_before(i,j) + qa(i,j,k) * delp(i,j,k) * ONE_OVER_G + enddo + enddo + enddo + +! Particle swelling + call ParticleSwelling(i1, i2, j1, j2, km, rh, radiusInp, rhopInp, radius, rhop, flag) + +! 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), & + tmpu(i,j,k), vsettle(i,j,k), grav) + end do + end do + end do + + if(present(correctionMaring)) then + if (correctionMaring) then + vsettle = max(1.0e-9, vsettle - v_upwardMaring) + endif + endif + + if(present(vsettleOut)) then + vsettleOut = vsettle + endif + +! Time integration + call SettlingSolver(i1, i2, j1, j2, km, cdt, delp, dz, vsettle, qa) + +! Find the column dry mass after sedimentation and thus the loss flux + do k = klid, km + do j = j1, j2 + do i = i1, i2 + cmass_after(i,j) = cmass_after(i,j) + qa(i,j,k) * delp(i,j,k) * ONE_OVER_G + enddo + enddo + enddo + + if( associated(fluxout) ) then + fluxout(:,:) = (cmass_before - cmass_after)/cdt + endif + + int_qa = qa + + __RETURN__(__SUCCESS__) + + end subroutine Chem_SettlingSimple + +!================================================================================== +!BOP +! !IROUTINE: Chem_Settling + + subroutine Chem_Settling ( km, klid, bin, flag, cdt, grav, & + radiusInp, rhopInp, int_qa, tmpu, & + rhoa, rh, hghte, delp, fluxout, & + vsettleOut, correctionMaring, 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 ! aerosol bin index + 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) :: 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] + real, pointer, dimension(:,:,:), intent(in) :: rh ! relative humidity [1] + real, pointer, dimension(:,:,:), intent(in) :: hghte ! geopotential height [m] + real, pointer, dimension(:,:,:), intent(in) :: delp ! pressure level thickness [Pa] + +! !OUTPUT PARAMETERS: + + real, pointer, dimension(:,:,:), intent(inout) :: fluxout ! Mass lost by settling + ! to surface, kg/m2/s + integer, optional, intent(out) :: rc ! Error return code: + ! 0 - all is well + ! 1 - +! Optionally output the settling velocity calculated + real, pointer, optional, dimension(:,:,:) :: vsettleOut + +! Optionally correct the settling velocity following Maring et al, 2003 + logical, optional, intent(in) :: correctionMaring + + character(len=*), parameter :: myname = 'Settling' + +! !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). +! +! !REVISION HISTORY: +! +! 21Apr2021 E.Sherman Ported to process library +! 15May2019 Darmenov Refactor and speed up code +! 17Sep2004 Colarco Strengthen sedimentation flux out at surface +! by setting removal to be valid from middle of +! surface layer +! 06Nov2003 Colarco Based on Ginoux +! 23Jan2003 da Silva Standardization +! +!EOP +!------------------------------------------------------------------------- + +! !Local Variables + integer :: i, j, k, n, dk + + real, parameter :: rhow = 1000. ! Density of water [kg m-3] + +! parameters from Maring et al, 2003 + real, parameter :: v_upwardMaring = 0.33e-2 ! upward velocity, [m s-1] + real, parameter :: diameterMaring = 7.30e-6 ! particle diameter, [m] + + integer :: i1=1, i2, j1=1, j2 + integer :: dims(3) + + real, pointer, dimension(:,:) :: hsurf + real(kind=DP), dimension(:,:), allocatable :: cmass_before, cmass_after + real, allocatable :: dz(:,:,:) + real, dimension(:,:,:), allocatable :: radius, rhop, qa + real, dimension(:,:,:), allocatable :: vsettle ! fall speed [m s-1] + real :: ONE_OVER_G + integer :: status + +!EOP +!------------------------------------------------------------------------- + +! Get dimensions +! --------------- + dims = shape(rhoa) + i2 = dims(1); j2 = dims(2) + + ONE_OVER_G = 1.0/grav + + hsurf => hghte(i1:i2,j1:j2,km) + + allocate(dz(i2,j2,km), radius(i2,j2,km), rhop(i2,j2,km), vsettle(i2,j2,km), qa(i2,j2,km)) + allocate(cmass_before(i2,j2), cmass_after(i2,j2)) + cmass_before = 0.d0 + cmass_after = 0.d0 + + qa = int_qa + + if(associated(fluxout)) fluxout(:,:,bin) = 0.0 + +! Handle the fact that hghte may be in the range [1,km+1] or [0,km] +! ----------------------------------------------------------------- + dk = lbound(hghte,3) - 1 ! This is either 0 or 1 + +! Layer thickness from hydrostatic equation + k = km + dz(:,:,k) = hghte(:,:,k+dk)-hsurf(:,:) + do k = km-1, 1, -1 + dz(:,:,k) = hghte(:,:,k+dk) - hghte(:,:,k+dk+1) + enddo + +! If radius le 0 then get out + if(radiusInp .le. 0.) then + status = 100 + __RETURN__(STATUS) + end if + +! Find the column dry mass before sedimentation + do k = klid, km + do j = j1, j2 + do i = i1, i2 + cmass_before(i,j) = cmass_before(i,j) + qa(i,j,k) * delp(i,j,k) * ONE_OVER_G + enddo + enddo + enddo + +! Particle swelling + call ParticleSwelling(i1, i2, j1, j2, km, rh, radiusInp, rhopInp, radius, rhop, flag) + +! 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), & + tmpu(i,j,k), vsettle(i,j,k), grav) + end do + end do + end do + + if(present(correctionMaring)) then + if (correctionMaring) then + vsettle = max(1.0e-9, vsettle - v_upwardMaring) + endif + endif + + if(present(vsettleOut)) then + vsettleOut = vsettle + endif + +! Time integration + call SettlingSolver(i1, i2, j1, j2, km, cdt, delp, dz, vsettle, qa) + +! Find the column dry mass after sedimentation and thus the loss flux + do k = klid, km + do j = j1, j2 + do i = i1, i2 + cmass_after(i,j) = cmass_after(i,j) + qa(i,j,k) * delp(i,j,k) * ONE_OVER_G + enddo + enddo + enddo + + if( associated(fluxout) ) then + fluxout(:,:,bin) = (cmass_before - cmass_after)/cdt + endif + + int_qa = qa + + __RETURN__(__SUCCESS__) + + end subroutine Chem_Settling + + +!================================================================================== +!BOP +! !IROUTINE: Chem_CalcVsetle + + subroutine Chem_CalcVsettle ( radius, rhop, rhoa, tmpu, & + vsettle, grav ) + +! !USES: + + implicit NONE + +! !INPUT PARAMETERS: + + real, intent(in) :: radius ! Particle radius [m] + real, intent(in) :: rhop ! Particle density [kg m-3] + real, intent(in) :: rhoa ! Layer air density [kg m-3] + real, intent(in) :: tmpu ! Layer temperature [K] + real, intent(in) :: grav ! Gravity [m s-2] + +! !OUTPUT PARAMETERS: + + real, intent(out) :: vsettle ! Layer fall speed [m s-1] + + character(len=*), parameter :: myname = 'Vsettle' + +! !DESCRIPTION: Calculates the aerosol settling velocity and Brownian diffusion +! coefficient +! Follows discussions in Seinfeld and Pandis, Pruppacher and +! Klett, and the coding in CARMA (Toon et al., 1988) +! Should work satisfactorily for al reasonable sized aerosols +! (up to Reynolds number 300) +! +! !REVISION HISTORY: +! +! 06Nov2003 Colarco Initial version. +! 23Jan2003 da Silva Standardization +! +!EOP +!------------------------------------------------------------------------- + +! !Local Variables + real :: rmu ! Dynamic viscosity [kg m-1 s-1] + real :: vt ! Thermal velocity of air molecule [m s-1] + real :: rmfp ! Air molecule mean free path [m] + real :: bpm ! Cunningham slip correction factor + real :: rkn ! Knudsen number + real :: re, x, y ! reynold's number and parameters + real, parameter :: kb = 1.3807e-23 ! Boltzmann constant [kg m2 s-1 K-1 mol-1] + real, parameter :: m_air = 4.8096e-26 ! Mass of air molecule [kg] + real, parameter :: pi = 3.141529265 + + real, parameter :: f_vt = 8*kb/pi/m_air + real, parameter :: f_diff_coef = kb/(6*pi) + real, parameter :: two_over_nine = 2./9. + + real, parameter :: a0 = -3.18657 + real, parameter :: a1 = 0.992696 + real, parameter :: a2 = -1.53193e-3 + real, parameter :: a3 = -9.870593e-4 + real, parameter :: a4 = -5.78878e-4 + real, parameter :: a5 = 8.55176e-5 + real, parameter :: a6 = -3.27815e-6 + + +! Dynamic viscosity from corrected Sutherland's Equation + rmu = 1.8325e-5*(416.16/(tmpu+120.))*(tmpu/296.16)**1.5 + +! Thermal velocity of air molecule + vt = sqrt(tmpu * f_vt) + +! Air molecule mean free path + rmfp = 2*rmu/(rhoa*vt) + +! Knudsen number + rkn = rmfp/radius + +! Cunningham slip correction factor +! bpm = 1. + 1.246*rkn + 0.42*rkn*exp(-0.87/rkn) +! linearized form, Binkowski and Shankar (equation A27, 1995) + bpm = 1 + 1.246*rkn + +! Brownian diffusion coefficient +! diff_coef = tmpu*bpm/(rmu*radius) * f_diff_coef + +! Fall speed (assumes Reynolds # < 0.01) + vsettle = two_over_nine*rhop*radius*radius*grav*bpm/rmu + +! Check the Reynold's number to see if we need a drag correction +! First guess at Reynold's number using Stoke's calculation + re = 2.*rhoa*radius*vsettle/rmu + +! If Re > 0.01 then apply drag correction following Pruppacher and +! Klett regime 2 (eq. 10-142). Assuming reasonable aerosols we +! do not consider that particle Re may exceed 300. + if(re .gt. 0.01) then + x = log(24.*re/bpm) + y = a0 + x*(a1 + x*(a2 + x*(a3 + x*(a4 + x*(a5 + a6*x))))) + re = exp(y)*bpm + vsettle = 0.5*rmu*re/(rhoa*radius) + endif + + end subroutine Chem_CalcVsettle + +!================================================================================== +!BOP +! !IROUTINE: SettlingSolver + + subroutine SettlingSolver(i1, i2, j1, j2, km, cdt, delp, dz, vs, qa) + + implicit none + + 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 + + real, dimension(i1:i2,j1:j2,km), intent(inout) :: qa + + + ! local + integer :: i, j, iit + integer :: nSubSteps + + real, dimension(i1:i2, j1:j2, km) :: tau + + real, dimension(km) :: dp_ + real, dimension(km) :: tau_ + + real :: dt, dt_cfl + + + tau = vs/dz + + do j = j1, j2 + do i = i1, i2 + + dp_ = delp(i,j,:) + tau_ = tau(i,j,:) + + dt_cfl = 1 / maxval(tau_) + + if (dt_cfl > cdt) then + ! no need for time sub-splitting + nSubSteps = 1 + dt = cdt + else + nSubSteps = ceiling(cdt / dt_cfl) + dt = cdt/nSubSteps + end if + + do iit = 1, nSubSteps + qa(i,j, 1) = qa(i,j, 1) * (1 - dt*tau_(1)) + qa(i,j,2:km) = qa(i,j,2:km) + ( (dp_(1:km-1)/dp_(2:km))*(dt*tau_(1:km-1))*qa(i,j,1:km-1) ) & + - dt*tau_(2:km)*qa(i,j,2:km) + end do + + enddo + enddo + + end subroutine SettlingSolver + +!================================================================================== +!BOP +! !IROUTINE: ParticleSwelling + + subroutine ParticleSwelling (i1, i2, j1, j2, km, rh, radius_dry, rhop_dry, radius, rhop, flag) + + implicit none + + integer, intent(in) :: i1, i2 + integer, intent(in) :: j1, j2 + integer, intent(in) :: km + + real, dimension(i1:i2,j1:j2,km), intent(in) :: rh + + integer, intent(in) :: flag + + real, intent(in) :: radius_dry + real, intent(in) :: rhop_dry + + real, dimension(i1:i2,j1:j2,km), intent(out) :: radius ! radius of the wet particle + real, dimension(i1:i2,j1:j2,km), intent(out) :: rhop ! density of the wet particle + + + select case (flag) + case (0) + radius = radius_dry + rhop = rhop_dry + + case (1) + call ParticleSwelling_Fitzgerald(i1, i2, j1, j2, km, rh, radius_dry, rhop_dry, radius, rhop) + + case (2) + call ParticleSwelling_Gerber(i1, i2, j1, j2, km, rh, radius_dry, rhop_dry, radius, rhop) + + case (3) + call ParticleSwelling_Gerber_AmmoniumSulfate(i1, i2, j1, j2, km, rh, radius_dry, rhop_dry, radius, rhop) + + case (4) + call ParticleSwelling_PK2007(i1, i2, j1, j2, km, rh, radius_dry, rhop_dry, radius, rhop) + + case default + radius = radius_dry + rhop = rhop_dry + end select + + end subroutine ParticleSwelling + + subroutine ParticleSwelling_Fitzgerald(i1, i2, j1, j2, km, rh, radius_dry, rhop_dry, radius, rhop) + + implicit none + + integer, intent(in) :: i1, i2 + integer, intent(in) :: j1, j2 + integer, intent(in) :: km + + real, dimension(i1:i2,j1:j2,km), intent(in) :: rh + + real, intent(in) :: radius_dry + real, intent(in) :: rhop_dry + + real, dimension(i1:i2,j1:j2,km), intent(out) :: radius ! radius of the wet particle + real, dimension(i1:i2,j1:j2,km), intent(out) :: rhop ! density of the wet particle + + + ! local + real, parameter :: rhow = 1000. ! density of water [kg m-3] + + ! the following parameters relate to the swelling of seasalt like particles + ! following Fitzgerald, Journal of Applied Meteorology, 1975. + real, parameter :: epsilon = 1. ! soluble fraction of deliqeuscing particle + real, parameter :: alphaNaCl = 1.35 + + real :: alpha, alpha1, alpharat, beta, theta, f1, f2 + real :: sat, rrat + + integer :: i, j, k + +! Adjust particle size for relative humidity effects, +! based on Fitzgerald, Journal of Applied Meteorology, 1975 + + do k = 1, km + do j = j1, j2 + do i = i1, i2 + + radius(i,j,k) = radius_dry + rhop(i,j,k) = rhop_dry + + sat = rh(i,j,k) + + if (sat > 0.80) then +! parameterization blows up for RH > 0.995, so set that as max +! rh needs to be scaled 0 - 1 + sat = min(0.995, sat) + +! Calculate the alpha and beta parameters for the wet particle +! relative to amonium sulfate + beta = exp( (0.00077*sat) / (1.009-sat) ) + + if(sat .le. 0.97) then + theta = 1.058 + else + theta = 1.058 - (0.0155*(sat-0.97)) /(1.02-sat**1.4) + endif + + alpha1 = 1.2*exp( (0.066*sat) / (theta-sat) ) + +! no need of this calculations, because epsilon == 1 +! f1 = 10.2 - 23.7*sat + 14.5*sat*sat +! f2 = -6.7 + 15.5*sat - 9.2*sat*sat +! alpharat = 1. - f1*(1.-epsilon) - f2*(1.-epsilon**2.) +! alpha = alphaNaCl * (alpha1*alpharat) +! instead, it is faster to do + alpha = alphaNaCl * alpha1 + + radius(i,j,k) = alpha * radius_dry**beta + + rrat = radius_dry/radius(i,j,k) + rrat = rrat*rrat*rrat + + rhop(i,j,k) = rrat*rhop_dry + (1 - rrat)*rhow + endif + + end do + end do + end do + + end subroutine ParticleSwelling_Fitzgerald + + subroutine ParticleSwelling_Gerber(i1, i2, j1, j2, km, rh, radius_dry, rhop_dry, radius, rhop) + + implicit none + + integer, intent(in) :: i1, i2 + integer, intent(in) :: j1, j2 + integer, intent(in) :: km + + real, dimension(i1:i2,j1:j2,km), intent(in) :: rh + + real, intent(in) :: radius_dry + real, intent(in) :: rhop_dry + + real, dimension(i1:i2,j1:j2,km), intent(out) :: radius ! radius of the wet particle + real, dimension(i1:i2,j1:j2,km), intent(out) :: rhop ! density of the wet particle + + + ! local + real, parameter :: rhow = 1000. ! density of water [kg m-3] + + ! parameters from Gerber 1985 (units require radius in cm, see the variable rcm) + real, parameter :: c1=0.7674, c2=3.079, c3=2.573e-11, c4=-1.424 + + real :: sat, rrat, rcm + + integer :: i, j, k + + ! Adjust the particle size for relative humidity effects, + ! based on Gerber 1985 + do k = 1, km + do j = j1, j2 + do i = i1, i2 + + sat = max(rh(i,j,k), tiny(1.0)) ! to avoid zero FPE + sat = min(0.995, sat) + + rcm = radius_dry*100. ! radius in 'cm' + + radius(i,j,k) = 0.01 * ( c1*rcm**c2 / (c3*rcm**c4-alog10(sat)) & + + rcm*rcm*rcm )**(1./3.) + + rrat = radius_dry/radius(i,j,k) + rrat = rrat*rrat*rrat + + rhop(i,j,k) = rrat*rhop_dry + (1 - rrat)*rhow + + end do + end do + end do + + end subroutine ParticleSwelling_Gerber + + subroutine ParticleSwelling_Gerber_AmmoniumSulfate(i1, i2, j1, j2, km, rh, radius_dry, rhop_dry, radius, rhop) + + implicit none + + integer, intent(in) :: i1, i2 + integer, intent(in) :: j1, j2 + integer, intent(in) :: km + + real, dimension(i1:i2,j1:j2,km), intent(in) :: rh + + real, intent(in) :: radius_dry + real, intent(in) :: rhop_dry + real, dimension(i1:i2,j1:j2,km), intent(out) :: radius ! radius of the wet particle + real, dimension(i1:i2,j1:j2,km), intent(out) :: rhop ! density of the wet particle + + + ! local + real, parameter :: rhow = 1000. ! density of water [kg m-3] + + ! parameters for ammonium sulfate from Gerber 1985 (units require radius in cm, see the variable rcm) + real, parameter :: SU_c1=0.4809, SU_c2=3.082, SU_c3=3.110e-11, SU_c4=-1.428 + + real :: sat, rrat, rcm + + integer :: i, j, k + + + ! Adjust the particle size for relative humidity effects, + ! based on Gerber parameterization for Ammonium Sulfate + + do k = 1, km + do j = j1, j2 + do i = i1, i2 + + sat = max(rh(i,j,k), tiny(1.0)) ! to avoid zero FPE + sat = min(0.995, sat) + + rcm = radius_dry*100. ! radius in 'cm' + radius(i,j,k) = 0.01 * ( SU_c1*rcm**SU_c2 / (SU_c3*rcm**SU_c4-alog10(sat)) & + + rcm*rcm*rcm )**(1./3.) + + rrat = radius_dry/radius(i,j,k) + rrat = rrat*rrat*rrat + + rhop(i,j,k) = rrat*rhop_dry + (1 - rrat)*rhow + + end do + end do + end do + + end subroutine ParticleSwelling_Gerber_AmmoniumSulfate + + subroutine ParticleSwelling_PK2007(i1, i2, j1, j2, km, rh, radius_dry, rhop_dry, radius, rhop) + + implicit none + + integer, intent(in) :: i1, i2 + integer, intent(in) :: j1, j2 + integer, intent(in) :: km + + real, dimension(i1:i2,j1:j2,km), intent(in) :: rh + + real, intent(in) :: radius_dry + real, intent(in) :: rhop_dry + + real, dimension(i1:i2,j1:j2,km), intent(out) :: radius ! radius of the wet particle + real, dimension(i1:i2,j1:j2,km), intent(out) :: rhop ! density of the wet particle -! !DESCRIPTION: Distributes piont emissions uniformily in the vertical in height coordinates. -! -! !REVISION HISTORY: -! ??? A. Darmenov -! ??? P. Colarco -! ??2020 E.Sherman - ported to process library -! -! !Locals - integer :: k - integer :: k_bot, k_top - real :: z_ - real, dimension(km) :: z, dz, w_ !dz units = meters + ! local + real, parameter :: rhow = 1000. ! density of water [kg m-3] -!EOP -!------------------------------------------------------------------------- -! Begin + real :: sat, rrat -! z(1:km) = hghte(0:km-1) - z(1:km) = hghte(1:km) + integer :: i, j, k - do k = km, 1, -1 -! dz(k) = hghte(k-1)-hghte(k) - dz(k) = hghte(k)-hghte(k+1) - end do -! find the bottom level - do k = km, 1, -1 - if (z(k) >= z_bot) then - k_bot = k - exit - end if - end do + ! Adjust the particle size for relative humidity effects, + ! based on Petters and Kreidenweis (ACP2007) parameterization -! find the top level - do k = k_bot, 1, -1 - if (z(k) >= z_top) then - k_top = k - exit - end if - end do + do k = 1, km + do j = j1, j2 + do i = i1, i2 -! find the weights - w_ = 0 + sat = rh(i,j,k) + sat = min(0.99, sat) -! if (k_top > k_bot) then -! need to bail - something went wrong here -! end if + radius(i,j,k) = radius_dry * (1+1.19*sat/(1-sat))**(1./3.) - if (k_bot == k_top) then - if (z_top == z_bot) then ! for non-explosive volcanic emissions - w_(k_bot) = tiny(0.) - else - w_(k_bot) = z_top - z_bot - end if - else - do k = k_bot, k_top, -1 - if ((k < k_bot) .and. (k > k_top)) then - w_(k) = dz(k) - else - if (k == k_bot) then - w_(k) = (z(k) - z_bot) - end if + rrat = radius_dry/radius(i,j,k) + rrat = rrat*rrat*rrat + + rhop(i,j,k) = rrat*rhop_dry + (1 - rrat)*rhow - if (k == k_top) then - w_(k) = z_top - (z(k)-dz(k)) - end if - end if end do - end if + end do + end do -! distribute emissions in the vertical - point_column_emissions(:) = ((w_ / sum(w_)) * emissions_point) / area + end subroutine ParticleSwelling_PK2007 - __RETURN__(__SUCCESS__) - end subroutine DistributePointEmission -!================================================================================== +!================================================================================== !BOP -! !IROUTINE: Chem_Settling2G +! !IROUTINE: Chem_Settling2Gorig subroutine Chem_Settling2Gorig (km, klid, flag, bin, int_qa, grav, delp, & radiusInp, rhopInp, cdt, tmpu, rhoa, & @@ -785,15 +1973,10 @@ subroutine Chem_Settling2Gorig (km, klid, flag, bin, int_qa, grav, delp, & ! Get dimensions ! --------------- -! nbins = size(radiusInp) dims = shape(rhoa) i2 = dims(1); j2 = dims(2) ijl = ( i2 - i1 + 1 ) * ( j2 - j1 + 1 ) -!print*,'nbins = ',nbins -!print*,'i2 = ',i2 -!print*,'j2 = ',j2 - gravDP = grav hsurf => hghte(i1:i2,j1:j2,km) @@ -942,8 +2125,6 @@ subroutine Chem_Settling2Gorig (km, klid, flag, bin, int_qa, grav, delp, & end do end do -! cmass_after = sum(qa / gravDP * delp,3) - ! Find the column dry mass after sedimentation and thus the loss flux do k = klid, km do j = j1, j2 @@ -967,7 +2148,7 @@ end subroutine Chem_Settling2Gorig !BOP ! -! !IROUTINE: Chem_CalcVsettle2G - Calculate the aerosol settling velocity +! !IROUTINE: Chem_CalcVsettle2Gorig - Calculate the aerosol settling velocity ! ! !INTERFACE: subroutine Chem_CalcVsettle2Gorig ( radius, rhop, rhoa, tmpu, grav, & @@ -1489,7 +2670,7 @@ subroutine DryDeposition ( km, tmpu, rhoa, hghte, oro, ustar, pblh, shflux, & end subroutine DryDeposition !==================================================================================== -! !IROUTINE: ObukhovLength - Calculate the Obukhov length scale stability parameter +! !IROUTINE: ObukhovLength2G - Calculate the Obukhov length scale stability parameter ! ! !INTERFACE: ! @@ -1543,7 +2724,6 @@ end subroutine ObukhovLength2G !BOP ! !IROUTINE: WetRemovalGOCART2G -!#if 0 subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, grav, fwet, & aerosol, ple, tmpu, rhoa, pfllsan, pfilsan, & precc, precl, fluxout, rc ) @@ -1656,7 +2836,6 @@ subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, allocate(fd(km,nbins),stat=ios) allocate(dc(nbins),stat=ios) -! if( associated(fluxout%data2d) ) fluxout%data2d(i1:i2,j1:j2) = 0.0 if( associated(fluxout) ) fluxout(i1:i2,j1:j2,bin_ind) = 0.0 ! Accumulate the 3-dimensional arrays of rhoa and pdog @@ -1710,7 +2889,6 @@ subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, ! Find the highest model layer experiencing rainout. Assumes no ! scavenging if T < 258 K LH = 0 -! do k = 1, km do k = klid, km if(dpfli(i,j,k) .gt. 0. ) then LH = k @@ -1774,12 +2952,9 @@ subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, endif effRemoval = fwet -! DC(n) = qa(n1+n-1)%data3d(i,j,k) * F * effRemoval *(1.-exp(-BT)) DC(n) = aerosol(i,j,k) * F * effRemoval *(1.-exp(-BT)) if (DC(n).lt.0.) DC(n) = 0. -! qa(n1+n-1)%data3d(i,j,k) = qa(n1+n-1)%data3d(i,j,k)-DC(n) aerosol(i,j,k) = aerosol(i,j,k)-DC(n) -! if (qa(n1+n-1)%data3d(i,j,k) .lt. 1.0E-32) qa(n1+n-1)%data3d(i,j,k) = 1.0E-32 if (aerosol(i,j,k) .lt. 1.0E-32) aerosol(i,j,k) = 1.0E-32 end do ! Flux down: unit is kg m-2 @@ -1809,9 +2984,6 @@ subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, 333 continue F = F0_ls / (1. + F0_ls*B0_ls*XL_ls/(Qmx*cdt/Td_ls)) - ! if (MAPL_AM_I_ROOT()) then - ! print *, 'hbianwdep WASHFmax =',F - ! endif if (F.lt.0.01) F = 0.01 !----------------------------------------------------------------------------- ! The following is to convert Q(k) from kgH2O/m3/sec to mm/sec in order @@ -1866,21 +3038,15 @@ subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, ! Adjust du level: do n = 1, nbins if ( KIN ) then -! DC(n) = qa(n1+n-1)%data3d(i,j,k) * F * (1.-exp(-BT)) DC(n) = aerosol(i,j,k) * F * (1.-exp(-BT)) else -! DC(n) = qa(n1+n-1)%data3d(i,j,k) * F * WASHFRAC DC(n) = aerosol(i,j,k) * F * WASHFRAC endif if (DC(n).lt.0.) DC(n) = 0. -! qa(n1+n-1)%data3d(i,j,k) = qa(n1+n-1)%data3d(i,j,k)-DC(n) aerosol(i,j,k) = aerosol(i,j,k)-DC(n) -! if (qa(n1+n-1)%data3d(i,j,k) .lt. 1.0E-32) & if (aerosol(i,j,k) .lt. 1.0E-32) & aerosol(i,j,k) = 1.0E-32 -! if( associated(fluxout%data2d) ) then if( associated(fluxout)) then -! fluxout%data2d(i,j) = fluxout%data2d(i,j)+DC(n)*pdog(i,j,k)/cdt fluxout(i,j,bin_ind) = fluxout(i,j,bin_ind)+DC(n)*pdog(i,j,k)/cdt endif @@ -1904,14 +3070,10 @@ subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, ! Adjust du level: do n = 1, nbins -! effRemoval = qa(n1+n-1)%fwet effRemoval = fwet -! DC(n) = qa(n1+n-1)%data3d(i,j,k) * F * effRemoval * (1.-exp(-BT)) DC(n) = aerosol(i,j,k) * F * effRemoval * (1.-exp(-BT)) if (DC(n).lt.0.) DC(n) = 0. -! qa(n1+n-1)%data3d(i,j,k) = qa(n1+n-1)%data3d(i,j,k)-DC(n) aerosol(i,j,k) = aerosol(i,j,k)-DC(n) -! if (qa(n1+n-1)%data3d(i,j,k) .lt. 1.0E-32) qa(n1+n-1)%data3d(i,j,k) = 1.0E-32 if (aerosol(i,j,k) .lt. 1.0E-32) aerosol(i,j,k) = 1.0E-32 end do @@ -1962,14 +3124,10 @@ subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, ! Adjust du level: do n = 1, nbins -! DC(n) = qa(n1+n-1)%data3d(i,j,k) * F * (1.-exp(-BT)) DC(n) = aerosol(i,j,k) * F * (1.-exp(-BT)) if (DC(n).lt.0.) DC(n) = 0. -! qa(n1+n-1)%data3d(i,j,k) = qa(n1+n-1)%data3d(i,j,k)-DC(n) aerosol(i,j,k) = aerosol(i,j,k)-DC(n) -! if (qa(n1+n-1)%data3d(i,j,k) .lt. 1.0E-32) & if (aerosol(i,j,k) .lt. 1.0E-32) & -! qa(n1+n-1)%data3d(i,j,k) = 1.0E-32 aerosol(i,j,k) = 1.0E-32 if( associated(fluxout)) then fluxout(i,j,bin_ind) = fluxout(i,j,bin_ind)+DC(n)*pdog(i,j,k)/cdt @@ -2000,11 +3158,8 @@ subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, ! Adjust tracer in the level do n = 1, nbins DC(n) = Fd(k-1,n) / pdog(i,j,k) * A -! qa(n1+n-1)%data3d(i,j,k) = qa(n1+n-1)%data3d(i,j,k) + DC(n) aerosol(i,j,k) = aerosol(i,j,k) + DC(n) -! qa(n1+n-1)%data3d(i,j,k) = max(qa(n1+n-1)%data3d(i,j,k),1.e-32) aerosol(i,j,k) = max(aerosol(i,j,k),1.e-32) -! Adjust the flux out of the bottom of the layer Fd(k,n) = Fd(k,n) - DC(n)*pdog(i,j,k) end do @@ -2015,9 +3170,7 @@ subroutine WetRemovalGOCART2G ( km, klid, n1, n2, bin_ind, cdt, aero_type, kin, do n = 1, nbins -! if( associated(fluxout%data2d) ) then if( associated(fluxout)) then -! fluxout%data2d(i,j) = fluxout%data2d(i,j)+Fd(km,n)/cdt fluxout(i,j,bin_ind) = fluxout(i,j,bin_ind)+Fd(km,n)/cdt endif end do @@ -2097,8 +3250,8 @@ end subroutine UpdateAerosolState ! !INTERFACE: subroutine Aero_Compute_Diags (mie_table, km, klid, nbegin, nbins, rlow, rup, channels, & wavelengths_profile, wavelengths_vertint, aerosol, & - grav, tmpu, rhoa, rh, u, v, delp, & - sfcmass, colmass, mass, exttau, scatau, & + grav, tmpu, rhoa, rh, u, v, delp, ple,tropp, & + sfcmass, colmass, mass, exttau, stexttau, scatau, stscatau,& sfcmass25, colmass25, mass25, exttau25, scatau25, & fluxu, fluxv, conc, extcoef, scacoef, & exttaufm, scataufm, angstrom, aerindx, NO3nFlag, rc ) @@ -2124,6 +3277,8 @@ subroutine Aero_Compute_Diags (mie_table, km, klid, nbegin, nbins, rlow, rup, ch real, pointer, dimension(:,:,:), intent(in) :: rh ! relative humidity [1] real, pointer, dimension(:,:,:), intent(in) :: u ! east-west wind [m/s] real, pointer, dimension(:,:,:), intent(in) :: v ! north-south wind [m/s] + real, pointer, dimension(:,:,:), intent(in) :: ple ! level edge air pressure [Pa] + real, pointer, dimension(:,:), intent(in) :: tropp ! tropopause pressure [Pa] logical, optional, intent(in) :: NO3nFlag ! !OUTPUT PARAMETERS: @@ -2134,7 +3289,9 @@ subroutine Aero_Compute_Diags (mie_table, km, klid, nbegin, nbins, rlow, rup, ch real, pointer, dimension(:,:,:), intent(inout) :: conc ! 3d mass concentration, kg/m3 ! Total optical properties real, optional, pointer, dimension(:,:,:), intent(inout) :: exttau ! ext. AOT at 550 nm + real, optional, pointer, dimension(:,:,:), intent(inout) :: stexttau ! stratospheric ext. AOT at 550 nm real, optional, pointer, dimension(:,:,:), intent(inout) :: scatau ! sct. AOT at 550 nm + real, optional, pointer, dimension(:,:,:), intent(inout) :: stscatau ! stratospheric sct. AOT at 550 nm real, optional, pointer, dimension(:,:), intent(inout) :: sfcmass25 ! sfc mass concentration kg/m3 (pm2.5) real, optional, pointer, dimension(:,:), intent(inout) :: colmass25 ! col mass density kg/m2 (pm2.5) real, optional, pointer, dimension(:,:,:), intent(inout) :: mass25 ! 3d mass mixing ratio kg/kg (pm2.5) @@ -2392,14 +3549,18 @@ subroutine Aero_Compute_Diags (mie_table, km, klid, nbegin, nbins, rlow, rup, ch end if !present(extcoef)... if( (present(exttau) .and. associated(exttau)) .or. & + (present(stexttau) .and. associated(stexttau)) .or. & (present(scatau) .and. associated(scatau)) .or. & + (present(stscatau) .and. associated(stscatau)) .or. & (present(exttau25) .and. associated(exttau25)) .or. & (present(exttaufm) .and. associated(exttaufm)) .or. & (present(scatau25) .and. associated(scatau25)) .or. & (present(scataufm) .and. associated(scataufm)) ) then if( present(exttau) .and. associated(exttau)) exttau = 0. + if( present(stexttau) .and. associated(stexttau)) stexttau = 0. if( present(scatau) .and. associated(scatau)) scatau = 0. + if( present(stscatau) .and. associated(stscatau)) stscatau = 0. if( present(exttau25) .and. associated(exttau25)) exttau25 = 0. if( present(scatau25) .and. associated(scatau25)) scatau25 = 0. @@ -2407,8 +3568,9 @@ subroutine Aero_Compute_Diags (mie_table, km, klid, nbegin, nbins, rlow, rup, ch if( present(exttaufm) .and. associated(exttaufm)) exttaufm = 0. if( present(scataufm) .and. associated(scataufm)) scataufm = 0. - do n = nbegin, nbins do w = 1, size(wavelengths_vertint) + do n = nbegin, nbins +! do w = 1, size(wavelengths_vertint) do k = klid, km do j = j1, j2 do i = i1, i2 @@ -2420,6 +3582,14 @@ subroutine Aero_Compute_Diags (mie_table, km, klid, nbegin, nbins, rlow, rup, ch ! Integrate in the vertical if( present(exttau) .and. associated(exttau) ) exttau(i,j,w) = exttau(i,j,w) + tau + if( present(stexttau) .and. associated(stexttau) ) then + if (ple(i,j,k) .le. tropp(i,j)) then + stexttau(i,j,w) = stexttau(i,j,w) + tau + elseif(ple(i,j,k) .gt. tropp(i,j) .and. ple(i,j,k-1) .lt. tropp(i,j)) then + stexttau(i,j,w) = stexttau(i,j,w) + log(tropp(i,j)/ple(i,j,k-1))/log(ple(i,j,k)/ple(i,j,k-1))*tau + endif + endif + if( present(exttaufm) .and. associated(exttaufm)) then if( present(NO3nFlag) .and. (NO3nFlag .eqv. .true.)) then exttaufm(i,j,w) = exttaufm(i,j,w) + tau @@ -2437,6 +3607,13 @@ subroutine Aero_Compute_Diags (mie_table, km, klid, nbegin, nbins, rlow, rup, ch end if if( present(scatau) .and. associated(scatau) ) scatau(i,j,w) = scatau(i,j,w) + tau*ssa + if( present(stscatau) .and. associated(stscatau) ) then + if (ple(i,j,k) .le. tropp(i,j)) then + stscatau(i,j,w) = stscatau(i,j,w) + tau*ssa + elseif(ple(i,j,k) .gt. tropp(i,j) .and. ple(i,j,k-1) .lt. tropp(i,j)) then + stscatau(i,j,w) = stscatau(i,j,w) + log(tropp(i,j)/ple(i,j,k-1))/log(ple(i,j,k)/ple(i,j,k-1))*tau*ssa + endif + endif if( present(scataufm) .and. associated(scataufm) ) then if( present(NO3nFlag) .and. (NO3nFlag)) then scataufm(i,j,w) = scataufm(i,j,w) + tau * ssa @@ -3088,7 +4265,7 @@ end subroutine hoppelCorrection ! !INTERFACE: ! - subroutine CAEmission (mie_table, km, nbins, cdt, grav, prefix, ratPOM, fTerpene, aviation_lto_src, aviation_cds_src,& + subroutine CAEmission (mie_table, km, nbins, cdt, grav, prefix, ratPOM, aviation_lto_src, aviation_cds_src,& aviation_crs_src, fHydrophobic, pblh, tmpu, rhoa, rh, aerosolPhilic, aerosolPhobic, & delp, aviation_layers, & biomass_src, terpene_src, eocant1_src, eocant2_src, oc_ship_src, biofuel_src, & @@ -3106,7 +4283,6 @@ subroutine CAEmission (mie_table, km, nbins, cdt, grav, prefix, ratPOM, fTerpene real, intent(in) :: grav ! gravity [m/sec^2] character(len=2), intent(in) :: prefix ! varaible name prefix real, intent(in) :: ratPOM - real, intent(in) :: fTerpene real, dimension(:), intent(in) :: aviation_layers ! Heights [m] of LTO, CDS and CRS aviation emissions layers real, pointer, dimension(:,:), intent(in) :: pblh ! PBL height [m] real, pointer, dimension(:,:,:), intent(in) :: tmpu ! temperature [K] @@ -3187,8 +4363,6 @@ subroutine CAEmission (mie_table, km, nbins, cdt, grav, prefix, ratPOM, fTerpene ! -------------------------- i2 = size(rhoa,1) j2 = size(rhoa,2) -! n1 = w_c%reg%i_OC -! n2 = w_c%reg%j_OC ijl = ( i2 - i1 + 1 ) * ( j2 - j1 + 1 ) allocate(factor(i2,j2), srcHydrophobic(i2,j2), srcHydrophilic(i2,j2), srcBiofuel(i2,j2), & @@ -3197,7 +4371,7 @@ subroutine CAEmission (mie_table, km, nbins, cdt, grav, prefix, ratPOM, fTerpene ! Emission factors scaling from source files to desired mass quantity eBiomass = ratPOM eBiofuel = ratPOM - eTerpene = ratPOM * fTerpene + eTerpene = ratPOM eAnthro = ratPOM ! Zero diagnostic accumulators @@ -3617,24 +4791,26 @@ subroutine phobicTophilic (aerosol_phobic, aerosol_philic, aerosol_toHydrophilic __RETURN__(__SUCCESS__) end subroutine phobicTophilic + !============================================================================ !BOP ! -! !IROUTINE: NIheterogenousChem +! !IROUTINE: NIheterogenousChemOpt ! ! !INTERFACE: - subroutine NIheterogenousChem (NI_phet, xhno3, AVOGAD, AIRMW, PI, RUNIV, rhoa, tmpu, relhum, delp, & + subroutine NIheterogenousChem (NI_phet, xhno3, UNDEF, AVOGAD, AIRMW, PI, RUNIV, rhoa, tmpu, relhum, delp, & DU, SS, rmedDU, rmedSS, fnumDU, fnumSS, nbinsDU, nbinsSS, & - km, klid, cdt, grav, fMassHNO3, fMassNO3, nNO3an1, nNO3an2, & + km, klid, cdt, grav, fMassHNO3, fMassNO3, nNO3an1, nNO3an2, & nNO3an3, HNO3_conc, HNO3_sfcmass, HNO3_colmass, rc) -! !DESCRIPTION: Nitrogen heterogeneous chemistry +! !DESCRIPTION: Nitrogen heterogeneous chemistry - Optimized by A. Darmenov ! !USES: implicit NONE ! !INPUT PARAMETERS: + real, intent(in) :: UNDEF ! set an undefined value (MAPL_UNDEF) real, intent(in) :: AVOGAD ! Avogadro's number [1/kmol] real, intent(in) :: AIRMW ! molecular weight of air [kg/kmol] real, intent(in) :: PI ! pi constant @@ -3652,13 +4828,12 @@ subroutine NIheterogenousChem (NI_phet, xhno3, AVOGAD, AIRMW, PI, RUNIV, rhoa, t integer, intent(in) :: nbinsDU ! number of dust bins integer, intent(in) :: nbinsSS ! number of sea salt bins integer, intent(in) :: km ! number of model levels - integer, intent(in) :: klid ! index for pressure lid + integer, intent(in) :: klid ! index for pressure lid real, intent(in) :: cdt ! chemistry model timestep (sec) real, intent(in) :: grav ! gravity (m/sec) real, intent(in) :: fMassHNO3 ! gram molecular weight real, intent(in) :: fMassNO3 ! gram molecular weight - ! !INOUTPUT PARAMETERS: real, pointer, dimension(:,:,:), intent(inout) :: NI_phet ! Nitrate Production from Het Chem [kg/(m^2 sec)] real, dimension(:,:,:), intent(inout) :: xhno3 ! buffer for NITRATE_HNO3 [kg/(m^2 sec)] @@ -3673,9 +4848,17 @@ subroutine NIheterogenousChem (NI_phet, xhno3, AVOGAD, AIRMW, PI, RUNIV, rhoa, t integer, optional, intent(out) :: rc ! !Local Variables - real(kind=DP) :: kan1, kan2, kan3, sad, ad, rad, deltahno3, temp, rh -! real :: kan1, kan2, kan3, sad, ad, rad, deltahno3, temp, rh - integer :: i, j, k, n, j1, j2, i1, i2 + real, dimension(:,:,:), allocatable :: kan1, kan2, kan3, kan + real, dimension(:,:,:), allocatable :: deltahno3 + + integer :: i1, j1, i2, j2, n, i, j, k + + +! +! !REVISION HISTORY: +! +! ???? Optimized NI Het Chem - A. Darmenov +! 15Dec2020 - Ported to process library - E. Sherman !EOP !------------------------------------------------------------------------------------ @@ -3688,88 +4871,92 @@ subroutine NIheterogenousChem (NI_phet, xhno3, AVOGAD, AIRMW, PI, RUNIV, rhoa, t ! seems very wedded to the traditional GOCART arrangement (5 dust, ! 5 sea salt) and the particulars of the nitrate aerosol arrangement. - if(associated(NI_phet)) NI_phet = 0. - j1 = lbound(tmpu, 2) j2 = ubound(tmpu, 2) i1 = lbound(tmpu, 1) i2 = ubound(tmpu, 1) - do k = klid, km - do j = j1, j2 - do i = i1, i2 - kan1 = 0. - kan2 = 0. - kan3 = 0. - ad = 1.e-6*rhoa(i,j,k)*AVOGAD/AIRMW ! air number density # cm-3 - temp = tmpu(i,j,k) -! rh = w_c%rh(i,j,k) - rh = relhum(i,j,k) -! Dust - if (associated(DU)) then - do n = 1, nbinsDU - sad = 0.01*4.*PI*rmedDU(n)**2.*fnumDU(n) * & - rhoa(i,j,k) * DU(i,j,k,n) ! surface area density cm2 cm-3 - rad = 100.*rmedDU(n) ! radius cm - - if (sad > 0.) then - if(n == 1) & - kan1 = kan1 + sktrs_hno3(temp,rh,sad,ad,rad,PI,RUNIV,fMassHNO3) - if(n == 2) & - kan2 = kan2 + sktrs_hno3(temp,rh,sad,ad,rad,PI,RUNIV,fMassHNO3) - if(n == 3) & - kan2 = kan2 + sktrs_hno3(temp,rh,sad,ad,rad,PI,RUNIV,fMassHNO3) - if(n == 4) & - kan3 = kan3 + sktrs_hno3(temp,rh,sad,ad,rad,PI,RUNIV,fMassHNO3) - if(n == 5) & - kan3 = kan3 + sktrs_hno3(temp,rh,sad,ad,rad,PI,RUNIV,fMassHNO3) - end if - enddo - endif - -! Sea salt - if (associated(SS)) then - do n = 1, nbinsSS - sad = 0.01*4.*PI*rmedSS(n)**2.*fnumSS(n) * & - rhoa(i,j,k) * SS(i,j,k,n) ! surface area density cm2 cm-3 - rad = 100.*rmedSS(n) ! radius cm - - if (sad > 0.) then - if(n == 1) & - kan1 = kan1 + sktrs_sslt(temp,sad,ad,rad,PI,RUNIV,fMassHNO3) - if(n == 2) & - kan1 = kan1 + sktrs_sslt(temp,sad,ad,rad,PI,RUNIV,fMassHNO3) - if(n == 3) & - kan2 = kan2 + sktrs_sslt(temp,sad,ad,rad,PI,RUNIV,fMassHNO3) - if(n == 4) & - kan2 = kan2 + sktrs_sslt(temp,sad,ad,rad,PI,RUNIV,fMassHNO3) - if(n == 5) & - kan3 = kan3 + sktrs_sslt(temp,sad,ad,rad,PI,RUNIV,fMassHNO3) - end if - enddo - endif - -! Compute the nitric acid loss (but don't actually update) - if( (kan1+kan2+kan3) > 0.) then - deltahno3 = xhno3(i,j,k) * fMassHNO3 / AIRMW * (1.-exp(-(kan1+kan2+kan3)*cdt)) - xhno3(i,j,k) = xhno3(i,j,k) - deltahno3 * AIRMW / fMassHNO3 - nNO3an1(i,j,k) = & - nNO3an1(i,j,k) + kan1/(kan1+kan2+kan3)*deltahno3*fMassNO3/fMassHNO3 - nNO3an2(i,j,k) = & - nNO3an2(i,j,k) + kan2/(kan1+kan2+kan3)*deltahno3*fMassNO3/fMassHNO3 - nNO3an3(i,j,k) = & - nNO3an3(i,j,k) + kan3/(kan1+kan2+kan3)*deltahno3*fMassNO3/fMassHNO3 - - if(associated(NI_phet)) then - NI_phet(i,j,1) = NI_phet(i,j,1) + kan1/(kan1+kan2+kan3)*deltahno3*delp(i,j,k)/grav/cdt - NI_phet(i,j,2) = NI_phet(i,j,2) + kan2/(kan1+kan2+kan3)*deltahno3*delp(i,j,k)/grav/cdt - NI_phet(i,j,3) = NI_phet(i,j,3) + kan3/(kan1+kan2+kan3)*deltahno3*delp(i,j,k)/grav/cdt - end if - endif !(kan1+kan2+kan3) > 0. - - enddo !i - enddo !j - enddo !k + allocate(kan1, mold=tmpu) + allocate(kan2, mold=tmpu) + allocate(kan3, mold=tmpu) + allocate(kan, mold=tmpu) + + kan1 = 0.0 + kan2 = 0.0 + kan3 = 0.0 + kan = UNDEF + + DUST_HETEROGENOUS_CHEM: if (associated(DU)) then + DUST_REACTION_RATES: do n = 1, nbinsDU + kan = 0.0 + call HNO3_reaction_rate(i1, i2, j1, j2, km, klid, & + rmedDU(n), fnumDU(n), & + rhoa, tmpu, relhum, DU(:,:,:,n), kan, & + AVOGAD, AIRMW, PI, RUNIV, fMassHNO3) + + select case(n) + case (1) + kan1 = kan1 + kan + case (2) + kan2 = kan2 + kan + case (3) + kan2 = kan2 + kan + case (4) + kan3 = kan3 + kan + case (5) + kan3 = kan3 + kan + end select + + end do DUST_REACTION_RATES + end if DUST_HETEROGENOUS_CHEM + + + SALT_HETEROGENOUS_CHEM: if (associated(SS)) then + SALT_REACTION_RATES: do n = 1, nbinsSS + kan = 0.0 + call SSLT_reaction_rate(i1, i2, j1, j2, km, klid, & + rmedSS(n), fnumSS(n), & + rhoa, tmpu, relhum, SS(:,:,:,n), kan, & + AVOGAD, AIRMW, PI, RUNIV, fMassHNO3) + + select case(n) + case (1) + kan1 = kan1 + kan + case (2) + kan1 = kan1 + kan + case (3) + kan2 = kan2 + kan + case (4) + kan2 = kan2+ kan + case (5) + kan3 = kan3 + kan + end select + + end do SALT_REACTION_RATES + end if SALT_HETEROGENOUS_CHEM + +! Compute the nitric acid loss (but don't actually update) + kan = max(0.0, (kan1 + kan2 + kan3)) + + call apportion_reaction_rate(i1, i2, j1, j2, km, kan1, kan) + call apportion_reaction_rate(i1, i2, j1, j2, km, kan2, kan) + call apportion_reaction_rate(i1, i2, j1, j2, km, kan3, kan) + + allocate(deltahno3, mold=kan) + deltahno3 = xhno3 * fMassHNO3 / AIRMW * (1.0 - exp(-kan*cdt)) + deltahno3 = max(0.0, deltahno3) + + xhno3 = xhno3 - deltahno3 * AIRMW / fMassHNO3 + + nNO3an1 = nNO3an1 + kan1 * deltahno3 * fMassNO3 / fMassHNO3 + nNO3an2 = nNO3an2 + kan2 * deltahno3 * fMassNO3 / fMassHNO3 + nNO3an3 = nNO3an3 + kan3 * deltahno3 * fMassNO3 / fMassHNO3 + + if(associated(NI_phet)) then + NI_phet(:,:,1) = (1.0 / (grav*cdt)) * sum(kan1*deltahno3*delp, dim=3) + NI_phet(:,:,2) = (1.0 / (grav*cdt)) * sum(kan2*deltahno3*delp, dim=3) + NI_phet(:,:,3) = (1.0 / (grav*cdt)) * sum(kan3*deltahno3*delp, dim=3) + end if ! Output diagnostic HNO3 ! ---------------------- @@ -3793,13 +4980,178 @@ subroutine NIheterogenousChem (NI_phet, xhno3, AVOGAD, AIRMW, PI, RUNIV, rhoa, t __RETURN__(__SUCCESS__) end subroutine NIheterogenousChem +!============================================================================ +!BOP +! +! !IROUTINE: HNO3_reaction_rate +! +! !INTERFACE: + subroutine HNO3_reaction_rate(i1, i2, j1, j2, km, klid, rmed, fnum, rhoa, temp, rh, q, kan, & + AVOGAD, AIRMW, PI, RUNIV, fMassHNO3) + +! !DESCRIPTION: + +! !USES: + implicit NONE + +! !INPUT PARAMETERS: + integer, intent(in) :: i1, i2, j1, j2 ! grid dimension + integer, intent(in) :: km ! model levels + integer, intent(in) :: klid ! index for pressure lid + real, intent(in) :: rmed ! aerosol radius [um] + real, intent(in) :: fnum ! number of aerosol particles per kg mass + real, dimension(:,:,:), intent(in) :: rhoa ! Layer air density [kg/m^3] + real, dimension(:,:,:), intent(in) :: temp ! Layer temperature [K] + real, dimension(:,:,:), intent(in) :: rh ! relative humidity [1] + real, dimension(:,:,:), intent(in) :: q ! aerosol + real, intent(in) :: AVOGAD ! Avogadro's number [1/kmol] + real, intent(in) :: AIRMW ! molecular weight of air [kg/kmol] + real, intent(in) :: PI ! pi constant + real, intent(in) :: RUNIV ! ideal gas constant [J/(Kmole*K)] + real, intent(in) :: fMassHNO3 ! gram molecular weight + +! !OUTPUT PARAMETERS: + real, dimension(:,:,:), intent(out) :: kan + +! !Local Variables + integer :: i, j, k + + real :: f_sad + real :: f_ad + real :: radius + real :: ad + real :: sad + +!EOP +!------------------------------------------------------------------------------------ +! Begin.. + + f_ad = 1.e-6 * AVOGAD / AIRMW ! air number density # cm-3 per unit air density + + ! surface area per unit air density and unit aerosol mass mixing ratio + f_sad = 0.01 * 4 * PI * rmed**2 * fnum + + ! radius in 'cm' + radius = 100 * rmed + + do k = klid, km + do j = j1, j2 + do i = i1, i2 + ad = f_ad * rhoa(i,j,k) ! air number density # cm-3 + sad = f_sad * rhoa(i,j,k) * q(i,j,k) ! surface area density cm2 cm-3 + + kan(i,j,k) = sktrs_hno3(temp(i,j,k), rh(i,j,k), sad, ad, radius, PI, & + RUNIV, fMassHNO3) + end do + end do + end do + + end subroutine HNO3_reaction_rate + +!============================================================================ +!BOP +! +! !IROUTINE: SSLT_reaction_rate +! +! !INTERFACE: + subroutine SSLT_reaction_rate(i1, i2, j1, j2, km, klid, rmed, fnum, rhoa, temp, rh, q, kan, & + AVOGAD, AIRMW, PI, RUNIV, fMassHNO3) + +! !DESCRIPTION: + +! !USES: + implicit NONE + +! !INPUT PARAMETERS: + integer, intent(in) :: i1, i2, j1, j2 ! grid dimension + integer, intent(in) :: km ! model levels + integer, intent(in) :: klid ! index for pressure lid + real, intent(in) :: rmed ! aerosol radius [um] + real, intent(in) :: fnum ! number of aerosol particles per kg mass + real, dimension(:,:,:), intent(in) :: rhoa ! Layer air density [kg/m^3] + real, dimension(:,:,:), intent(in) :: temp ! Layer temperature [K] + real, dimension(:,:,:), intent(in) :: rh ! relative humidity [1] + real, dimension(:,:,:), intent(in) :: q ! aerosol + real, intent(in) :: AVOGAD ! Avogadro's number [1/kmol] + real, intent(in) :: AIRMW ! molecular weight of air [kg/kmol] + real, intent(in) :: PI ! pi constant + real, intent(in) :: RUNIV ! ideal gas constant [J/(Kmole*K)] + real, intent(in) :: fMassHNO3 ! gram molecular weight + +! !OUTPUT PARAMETERS: + real, dimension(:,:,:), intent(out) :: kan + +! !Local Variables + integer :: i, j, k + + real :: f_sad + real :: f_ad + real :: radius + real :: ad + real :: sad + +!EOP +!------------------------------------------------------------------------------------ +! Begin.. + + f_ad = 1.e-6 * AVOGAD / AIRMW ! air number density # cm-3 per unit air density + + ! surface area per unit air density and unit aerosol mass mixing ratio + f_sad = 0.01 * 4 * PI * rmed**2 * fnum + + ! radius in 'cm' + radius = 100 * rmed + + do k = klid, km + do j = j1, j2 + do i = i1, i2 + ad = f_ad * rhoa(i,j,k) ! air number density # cm-3 + sad = f_sad * rhoa(i,j,k) * q(i,j,k) ! surface area density cm2 cm-3 + + kan(i,j,k) = sktrs_sslt(temp(i,j,k), sad, ad, radius, PI, RUNIV, fMassHNO3) + end do + end do + end do + + end subroutine SSLT_reaction_rate + +!============================================================================ +!BOP +! +! !IROUTINE: apportion_reaction_rate +! +! !INTERFACE: + subroutine apportion_reaction_rate (i1, i2, j1, j2, km, kan, kan_total) + +! !DESCRIPTION: + +! !USES: + implicit NONE + + + integer, intent(in) :: i1, i2, j1, j2, km + + real, dimension(i1:i2,j1:j2,km), intent(inout) :: kan + real, dimension(i1:i2,j1:j2,km), intent(in) :: kan_total +!EOP +!------------------------------------------------------------------------------------ +! Begin.. + + where (kan_total > tiny(kan_total)) + kan = kan / kan_total + else where + kan = 0.0 + end where + + end subroutine apportion_reaction_rate + !============================================================================ !BOP ! ! !IROUTINE: sktrs_hno3 ! ! !INTERFACE: - function sktrs_hno3 ( tk, frh, sad, ad, radA, pi, rgas, fMassHNO3 ) + function sktrs_hno3 ( tk, rh, sad, ad, radA, pi, rgas, fMassHNO3 ) ! !DESCRIPTION: ! Below are the series of heterogeneous reactions @@ -3821,54 +5173,85 @@ function sktrs_hno3 ( tk, frh, sad, ad, radA, pi, rgas, fMassHNO3 ) ! radA/Dg = uptake by gas-phase diffusion to the particle surface ! 4/(vL) = uptake by free molecular collisions of gas molecules with the surface + implicit none + ! !INPUT PARAMETERS: - real(kind=DP) :: tk ! temperature [K] - real(kind=DP) :: frh ! fractional relative humidity [0 - 1] - real(kind=DP) :: sad ! aerosol surface area density [cm2 cm-3] - real(kind=DP) :: ad ! air number concentration [# cm-3] - real(kind=DP) :: radA ! aerosol radius [cm] - real(kind=DP) :: sktrs_hno3 + real, intent(in) :: tk ! temperature [K] + real, intent(in) :: rh ! fractional relative humidity [0 - 1] + real, intent(in) :: sad ! aerosol surface area density [cm2 cm-3] + real, intent(in) :: ad ! air number concentration [# cm-3] + real, intent(in) :: radA ! aerosol radius [cm] real :: pi ! pi constant real :: rgas ! ideal gas constant [J/(K*mol)] real :: fMassHNO3 ! gram molecular weight of HNO3 -! real(kind=DP), optional :: gammaInp ! optional uptake coefficient (e.g., 0.2 for SS, else calculated) + real :: sktrs_hno3 ! !Local Variables - real(kind=DP), parameter :: GAMMA_HNO3 = 1.0d-3 - real(kind=DP) :: dfkg - real(kind=DP) :: avgvel - real(kind=DP) :: gamma - - real(kind=DP) :: pi_dp, rgas_dp real, parameter :: fmassHNO3_hno3 = 63.013 +! REAL, PARAMETER :: GAMMA_HNO3 = 0.1 + REAL, PARAMETER :: GAMMA_HNO3 = 1.0e-3 +! REAL, PARAMETER :: GAMMA_HNO3 = 5.0e-4 + + real :: dfkg + real :: avgvel + real :: gamma + real :: f_rh + real :: sqrt_tk +! real(kind=DP) :: pi_dp = pi +! real(kind=DP) :: rgas_dp = rgas + +! real, parameter :: p_dfkg = sqrt(3.472e-2 + 1.0/fmassHNO3) +! real, parameter :: p_avgvel = sqrt(8.0 * rgas_dp * 1000.0 / (pi_dp * fmassHNO3)) + + real(kind=DP) :: pi_dp + real(kind=DP) :: rgas_dp + + real :: p_dfkg + real :: p_avgvel + !EOP !------------------------------------------------------------------------------------ ! Begin.. - sktrs_hno3 = 0.d0 - gamma = 3.d-5 - pi_dp = pi - rgas_dp = rgas - -! Following uptake coefficients of Liu et al.(2007) - if (frh >= 0.1d0 .and. frh < 0.3d0 ) gamma = gamma_hno3 * (0.03d0 + 0.08d0 * (frh - 0.1d0)) - if (frh >= 0.3d0 .and. frh < 0.5d0 ) gamma = gamma_hno3 * (0.19d0 + 0.255d0 * (frh - 0.3d0)) - if (frh >= 0.5d0 .and. frh < 0.6d0 ) gamma = gamma_hno3 * (0.7d0 + 0.3d0 * (frh - 0.5d0)) - if (frh >= 0.6d0 .and. frh < 0.7d0 ) gamma = gamma_hno3 * (1.0d0 + 0.3d0 * (frh - 0.6d0)) - if (frh >= 0.7d0 .and. frh < 0.8d0 ) gamma = gamma_hno3 * (1.3d0 + 0.7d0 * (frh - 0.7d0)) - if (frh >= 0.8d0 ) gamma = gamma_hno3 * 2.0d0 + + pi_dp = pi + rgas_dp = rgas + p_dfkg = sqrt(3.472e-2 + 1.0/fmassHNO3) + p_avgvel = sqrt(8.0 * rgas_dp * 1000.0 / (pi_dp * fmassHNO3)) + + ! RH factor - Figure 1 in Duncan et al. (2010) + f_rh = 0.03 + + if (rh >= 0.1 .and. rh < 0.3) then + f_rh = 0.03 + 0.8 * (rh - 0.1) + else if (rh >= 0.3 .and. rh < 0.5 ) then + f_rh = 0.19 + 2.55 * (rh - 0.3) + else if (rh >= 0.5 .and. rh < 0.6) then + f_rh = 0.7 + 3.0 * (rh - 0.5) + else if (rh >= 0.6 .and. rh < 0.7) then + f_rh = 1.0 + 3.0 * (rh - 0.6) + else if (rh >= 0.7 .and. rh < 0.8) then + f_rh = 1.3 + 7.0 * (rh - 0.7) + else if (rh >= 0.8 ) then + f_rh = 2.0 + end if + +! Following uptake coefficients of Liu et al.(2007) + gamma = gamma_hno3 * f_rh + + sqrt_tk = sqrt(tk) ! calculate gas phase diffusion coefficient (cm2/s) - dfkg = 9.45D17 / ad * ( tk * (3.472D-2 + 1.D0/fmassHNO3_hno3) )**0.5d0 + dfkg = 9.45e17 / ad * sqrt_tk * p_dfkg ! calculate mean molecular speed (cm/s) - avgvel = 100.0d0 * (8.0d0 * rgas_dp * tk * 1000.0d0 / (pi_dp * fmassHNO3_hno3))**0.5d0 + avgvel = 100.0 * sqrt_tk * p_avgvel ! calculate rate coefficient - sktrs_hno3 = sad * ( 4.0d0 / ( gamma * avgvel )+ radA / dfkg )**(-1.0d0) + sktrs_hno3 = sad / ( 4.0 / (gamma * avgvel) + radA / dfkg ) - end function sktrs_hno3 + END FUNCTION sktrs_hno3 !============================================================================ !BOP @@ -3898,40 +5281,52 @@ function sktrs_sslt ( tk, sad, ad, radA, pi, rgas, fMassHNO3 ) ! radA/Dg = uptake by gas-phase diffusion to the particle surface ! 4/(vL) = uptake by free molecular collisions of gas molecules with the surface + implicit none + ! !INPUT PARAMETERS: - real(kind=DP) :: tk ! temperature [K] - real(kind=DP) :: sad ! aerosol surface area density [cm2 cm-3] - real(kind=DP) :: ad ! air number concentration [# cm-3] - real(kind=DP) :: radA ! aerosol radius [cm] - real(kind=DP) :: sktrs_sslt - real :: pi ! pi constant - real :: rgas ! ideal gas constant [J/(K*mol)] - real :: fMassHNO3 ! gram molecular weight of HNO3 + real :: tk ! temperature [K] + real :: sad ! aerosol surface area density [cm2 cm-3] + real :: ad ! air number concentration [# cm-3] + real :: radA ! aerosol radius [cm] + real :: sktrs_sslt + real :: pi ! pi constant + real :: rgas ! ideal gas constant [J/(K*mol)] + real :: fMassHNO3 ! gram molecular weight of HNO3 ! real(kind=DP), optional :: gammaInp ! optional uptake coefficient (e.g., 0.2 for SS, else calculated) -! !Local Variables - real(kind=DP), parameter :: GAMMA_SSLT = 0.1d0 - real(kind=DP) :: dfkg - real(kind=DP) :: avgvel - real(kind=DP) :: pi_dp, rgas_dp - real, parameter :: fmassHNO3_sslt = 63.013 +! Locals + REAL, PARAMETER :: GAMMA_SSLT = 0.1e0 + + real :: dfkg + real :: avgvel + real :: sqrt_tk + + real(kind=DP) :: pi_dp + real(kind=DP) :: rgas_dp + + real :: p_dfkg + real :: p_avgvel !EOP !------------------------------------------------------------------------------------ ! Begin.. -! Initialize - sktrs_sslt = 0.d0 pi_dp = pi rgas_dp = rgas -! calculate gas phase diffusion coefficient (cm2/s) - dfkg = 9.45D17 / ad * ( tk * (3.472D-2 + 1.D0/fmassHNO3_sslt) )**0.5d0 + p_dfkg = sqrt(3.472e-2 + 1.0/fmassHNO3) + p_avgvel = sqrt(8.0 * rgas_dp * 1000.0 / (pi_dp * fmassHNO3)) -! calculate mean molecular speed (cm/s) - avgvel = 100.0d0 * (8.0d0 * rgas_dp * tk * 1000.0d0 / (pi_dp * fmassHNO3_sslt))**0.5d0 +! Initialize + sqrt_tk = sqrt(tk) + +! calculate gas phase diffusion coefficient (cm2/s) + dfkg = 9.45e17 / ad * sqrt_tk * p_dfkg + +! calculate mean molecular speed (cm/s) + avgvel = 100.0 * sqrt_tk * p_avgvel -! calculate rate coefficient - sktrs_sslt = sad * ( 4.0d0 / ( GAMMA_SSLT * avgvel )+ radA / dfkg )**(-1.0d0) +! calculate rate coefficient + sktrs_sslt = sad / ( 4.0 / (gamma_sslt * avgvel) + radA / dfkg ) end function sktrs_sslt @@ -4312,10 +5707,6 @@ end subroutine DMSemission !BOP ! !IROUTINE: SUvolcanicEmissions -! subroutine SUvolcanicEmissions (nVolc, vStart, vEnd, vSO2, vElev, vCloud, iPoint, & -! jPoint, nhms, SO2EMVN, SO2EMVE, SO2, km, cdt, grav, & -! airdens, delp, area, vLat, vLon, rc) - subroutine SUvolcanicEmissions (nVolc, vStart, vEnd, vSO2, vElev, vCloud, iPoint, & jPoint, nhms, SO2EMVN, SO2EMVE, SO2, nSO2, SU_emis, km, cdt, grav,& hghte, delp, area, vLat, vLon, rc) @@ -4532,18 +5923,6 @@ subroutine SulfateUpdateOxidants (nymd_current, nhms_current, lonRad, latRad, & integer :: n, ndystep integer :: i1=1, j1=1, i2, j2 - -! REPLACE WITH MAPL!!!!! -!************************** -!data pi / 3.1415926 / -!real, parameter :: radToDeg = 57.2957795 -!real, parameter :: nAvogadro = 6.022e23 ! molecules per mole of air -!real, parameter :: pi = 3.1415926 -!real, parameter :: airMolWght = 28.97 ! molecular weight of air -!************************* - - - !EOP !------------------------------------------------------------------------- ! Begin... @@ -4659,7 +6038,7 @@ end subroutine SulfateUpdateOxidants !================================================================================== !BOP -! !IROUTINE: SulfateUpdateOxidants +! !IROUTINE: szangle subroutine szangle (jday, xhour, lonRad, latRad, PI, radToDeg, sza, cossza, i2, j2) @@ -5365,13 +6744,13 @@ end subroutine SU_Wet_Removal subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie_table, channels, & wavelengths_profile, wavelengths_vertint, & - tmpu, rhoa, delp, rh, u, v, & + tmpu, rhoa, delp, ple, tropp,rh, u, v, & DMS, SO2, SO4, MSA, & dmssfcmass, dmscolmass, & msasfcmass, msacolmass, & so2sfcmass, so2colmass, & so4sfcmass, so4colmass, & - exttau, scatau, so4mass, so4conc, extcoef, & + exttau, stexttau,scatau, stscatau,so4mass, so4conc, extcoef, & scacoef, angstrom, fluxu, fluxv, sarea, snum, rc ) ! !USES: @@ -5393,6 +6772,8 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie_t real, pointer, dimension(:,:,:), intent(in) :: tmpu ! temperature [K] real, pointer, dimension(:,:,:), intent(in) :: rhoa ! air density [kg/m^3] real, pointer, dimension(:,:,:), intent(in) :: delp ! pressure thickness [Pa] + real, pointer, dimension(:,:,:), intent(in) :: ple ! level edge air pressure [Pa] + real, pointer, dimension(:,:), intent(in) :: tropp ! tropopause pressure [Pa] real, pointer, dimension(:,:,:), intent(in) :: rh ! relative humidity [1] real, pointer, dimension(:,:,:), intent(in) :: u ! east-west wind [m s-1] real, pointer, dimension(:,:,:), intent(in) :: v ! north-south wind [m s-1] @@ -5411,7 +6792,9 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie_t 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] @@ -5643,12 +7026,13 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie_t enddo endif - - - if( associated(exttau) .or. associated(scatau) ) then + if( associated(exttau) .or. associated(stexttau) .or. & + associated(scatau) .or. associated(stscatau)) then if (associated(exttau)) exttau = 0. + if (associated(stexttau)) stexttau = 0. if (associated(scatau)) scatau = 0. + if (associated(stscatau)) stscatau = 0. do w = 1, size(wavelengths_vertint) do k = klid, km @@ -5662,9 +7046,27 @@ subroutine SU_Compute_Diags ( km, klid, rmed, sigma, rhop, grav, pi, nSO4, mie_t if( associated(exttau) ) then exttau(i,j,w) = exttau(i,j,w) + tau endif - if( associated(scatau) ) then - scatau(i,j,w) = scatau(i,j,w) + tau*ssa - endif + + if(associated(stexttau) ) then + if (ple(i,j,k) .le. tropp(i,j)) then + stexttau(i,j,w) = stexttau(i,j,w) + tau + elseif(ple(i,j,k) .gt. tropp(i,j) .and. ple(i,j,k-1) .lt. tropp(i,j)) then + stexttau(i,j,w) = stexttau(i,j,w) + log(tropp(i,j)/ple(i,j,k-1))/log(ple(i,j,k)/ple(i,j,k-1))*tau + endif + endif + + if( associated(scatau) ) then + scatau(i,j,w) = scatau(i,j,w) + tau*ssa + endif + + if( associated(stscatau) ) then + if (ple(i,j,k) .le. tropp(i,j)) then + stscatau(i,j,w) = stscatau(i,j,w) + tau*ssa + elseif(ple(i,j,k) .gt. tropp(i,j) .and. ple(i,j,k-1) .lt. tropp(i,j)) then + stscatau(i,j,w) = stscatau(i,j,w) + log(tropp(i,j)/ple(i,j,k-1))/log(ple(i,j,k)/ple(i,j,k-1))*tau*ssa + endif + endif + enddo enddo @@ -6719,7 +8121,7 @@ subroutine get_HenrysLawCts(name,c1,c2,c3,c4,rc) 0.0E+00 , & ! OLN - 046 0.0E+00 , & ! XO2 - 047 5.6E-01 , & ! DMS - 048 - 5.9E+01 , & ! NH3 - 048 + 1.05E+06 , & ! NH3 - 048 -1. , & ! CFC - 048 2.4E-02 & ! N2O - 051 /) @@ -7000,8 +8402,8 @@ subroutine NIthermo (km, klid, cdt, grav, delp, rhoa, tmpu, rh, fMassHNO3, fMass ! !INPUT PARAMETERS: integer, intent(in) :: km ! total model levels integer, intent(in) :: klid ! index for pressure lid - real, intent(in) :: cdt ! model time step [sec] - real, intent(in) :: grav ! gravity [m/sec] + real, intent(in) :: cdt ! model time step [s] + real, intent(in) :: grav ! gravity [m s-2] real, dimension(:,:,:), intent(in) :: delp ! pressure thickness [Pa] real, dimension(:,:,:), intent(in) :: rhoa ! Layer air density [kg m-3] real, dimension(:,:,:), intent(in) :: tmpu ! Layer temperature [K] @@ -7059,7 +8461,7 @@ subroutine NIthermo (km, klid, cdt, grav, delp, rhoa, tmpu, rh, fMassHNO3, fMass SO4_ = max(1.d-32,SO4(i,j,k) * fmmr_to_conc) GNO3 = max(1.d-32,xhno3(i,j,k) * fMassHNO3 / fMassAir * fmmr_to_conc) GNH3 = max(1.d-32,NH3(i,j,k) * fmmr_to_conc) - RH_ = rh(i,j,k) + RH_ = rh(i,j,k) TEMP = tmpu(i,j,k) ASO4 = 1.d-32 AHSO4 = 1.d-32 @@ -7067,6 +8469,8 @@ subroutine NIthermo (km, klid, cdt, grav, delp, rhoa, tmpu, rh, fMassHNO3, fMass AH2O = 1.d-32 ANH4 = max(1.d-32,NH4a(i,j,k) * fmmr_to_conc) +!print*,'GOCART2G NIthermo TEST 2' + call RPMARES ( SO4_, GNO3, GNH3, RH_, TEMP, & ASO4, AHSO4, ANO3, AH2O, ANH4, __RC__ ) @@ -7094,6 +8498,7 @@ subroutine NIthermo (km, klid, cdt, grav, delp, rhoa, tmpu, rh, fMassHNO3, fMass enddo enddo + __RETURN__(__SUCCESS__) end subroutine NIthermo @@ -7453,10 +8858,12 @@ subroutine RPMARES( SO4, GNO3, GNH3, RH, TEMP, & PRINT*, 'TNO3 : ', TNO3 PRINT*, 'TNH4 : ', TNH4 + !.sds CALL GEOS_CHEM_STOP err_msg = 'negative concen problem in RPMARES - TSO4, TNO3, TNH4:' call PrintError & & (err_msg, .true., 0, 0, 0, 2, TSO4, TNO3, __RC_NO_OPT__) +! & (err_msg, .true., 0, 0, 0, 2, TSO4, TNO3, rc=status) ENDIF ! now set humidity index IRH as a percent @@ -7541,7 +8948,6 @@ subroutine RPMARES( SO4, GNO3, GNH3, RH, TEMP, & RETURN ENDIF - !================================================================= ! High Ammonia Case !================================================================= @@ -7564,7 +8970,6 @@ subroutine RPMARES( SO4, GNO3, GNH3, RH, TEMP, & WH2O = 1.0d-3 * AH2O ASO4 = TSO4 * MWSO4 - ! In sulfate poor case, Sulfate ion is preferred ! Set bisulfate equal to zero [rjp, 12/12/01] AHSO4 = 0.0d0 @@ -7837,6 +9242,7 @@ subroutine RPMARES( SO4, GNO3, GNH3, RH, TEMP, & & + RK2SA * RKNWET * ZSO4 + RK2SA * RKNA * TNO3 ) CALL CUBIC ( A2, A1, A0, NR, CRUTES, __RC_NO_OPT__ ) +! CALL CUBIC ( A2, A1, A0, NR, CRUTES ) ! Code assumes the smallest positive root is in CRUTES(1) HPLUS = CRUTES( 1 ) @@ -7861,7 +9267,6 @@ subroutine RPMARES( SO4, GNO3, GNH3, RH, TEMP, & ! Calculate ionic strength STION = 0.5d0 * ( HPLUS + MNA + MNH4 + MHSO4 + 4.0d0 * MSO4) - ! Update water CALL AWATER ( IRH, TSO4, YNH4, XNO3, AH2O ) @@ -7911,7 +9316,6 @@ subroutine RPMARES( SO4, GNO3, GNH3, RH, TEMP, & !### PHIOLD = PHIBAR EROR = ABS ( GAMOLD - GAMAHAT ) / GAMOLD GAMOLD = GAMAHAT - ! return with good solution IF ( EROR .LE. TOLER2 ) THEN RETURN @@ -8251,6 +9655,8 @@ END FUNCTION nh3_POLY6 !------------------------------------------------------------------------------ SUBROUTINE CUBIC( A2, A1, A0, NR, CRUTES, rc ) +! SUBROUTINE CUBIC( A2, A1, A0, NR, CRUTES ) + ! !****************************************************************************** ! Subroutine to find the roots of a cubic equation / 3rd order polynomial @@ -8287,11 +9693,11 @@ SUBROUTINE CUBIC( A2, A1, A0, NR, CRUTES, rc ) integer :: status - rc = __SUCCESS__ - !================================================================= ! CUBIC begins here! !================================================================= + rc = __SUCCESS__ + A2SQ = A2 * A2 QQ = ( A2SQ - 3.d0*A1 ) / 9.d0 RR = ( A2*( 2.d0*A2SQ - 9.d0*A1 ) + 27.d0*A0 ) / 54.d0