Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partially-tested CO changes #1

Draft
wants to merge 11 commits into
base: ca-sgs-emis
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/SamuelTrahanNOAA/ccpp-physics
branch = ca-sgs-emis
branch = gocart_co
1 change: 1 addition & 0 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
'FV3/ccpp/physics/physics/sfc_ocean.F',
'FV3/ccpp/physics/physics/sfc_sice.f',
'FV3/ccpp/physics/physics/tracer_sanitizer.F90',
'FV3/ccpp/physics/gsdchem/gsd_chem_config_wrapper.F90',
'FV3/ccpp/physics/gsdchem/gsd_chem_seas_wrapper.F90',
'FV3/ccpp/physics/gsdchem/gsd_chem_dust_wrapper.F90',
'FV3/ccpp/physics/gsdchem/gsd_chem_anthropogenic_wrapper.F90',
Expand Down
2 changes: 1 addition & 1 deletion ccpp/physics
Submodule physics updated 44 files
+12 −12 gsdchem/dep_dry_gocart_mod.F90
+22 −12 gsdchem/dep_dry_mod.F90
+29 −15 gsdchem/dep_simple_mod.F90
+12 −12 gsdchem/dep_vertmx_mod.F90
+34 −9 gsdchem/dep_wet_ls_mod.F90
+39 −37 gsdchem/dust_afwa_mod.F90
+48 −46 gsdchem/dust_fengsha_mod.F90
+58 −56 gsdchem/dust_gocart_mod.F90
+30 −27 gsdchem/gocart_aerosols_mod.F90
+87 −55 gsdchem/gocart_chem_mod.F90
+7 −2 gsdchem/gocart_diag_mod.F90
+12 −12 gsdchem/gocart_dmsemis_mod.F90
+18 −18 gsdchem/gocart_settling_mod.F90
+51 −20 gsdchem/gsd_chem_anthropogenic_wrapper.F90
+8 −0 gsdchem/gsd_chem_anthropogenic_wrapper.meta
+45 −32 gsdchem/gsd_chem_config.F90
+166 −0 gsdchem/gsd_chem_config_wrapper.F90
+503 −0 gsdchem/gsd_chem_config_wrapper.meta
+9 −9 gsdchem/gsd_chem_diag_wrapper.F90
+9 −1 gsdchem/gsd_chem_diag_wrapper.meta
+17 −17 gsdchem/gsd_chem_dmsemis_wrapper.F90
+36 −26 gsdchem/gsd_chem_drydep_wrapper.F90
+8 −0 gsdchem/gsd_chem_drydep_wrapper.meta
+29 −26 gsdchem/gsd_chem_dust_wrapper.F90
+43 −25 gsdchem/gsd_chem_gocart_wrapper.F90
+8 −0 gsdchem/gsd_chem_gocart_wrapper.meta
+30 −18 gsdchem/gsd_chem_lsdep_wrapper.F90
+8 −0 gsdchem/gsd_chem_lsdep_wrapper.meta
+69 −30 gsdchem/gsd_chem_plume_wrapper.F90
+8 −0 gsdchem/gsd_chem_plume_wrapper.meta
+19 −17 gsdchem/gsd_chem_rad_wrapper.F90
+8 −0 gsdchem/gsd_chem_rad_wrapper.meta
+19 −17 gsdchem/gsd_chem_seas_wrapper.F90
+19 −16 gsdchem/gsd_chem_settling_wrapper.F90
+8 −0 gsdchem/gsd_chem_settling_wrapper.meta
+7 −7 gsdchem/opt_aer_out_mod.F90
+6 −6 gsdchem/opt_aer_ra_mod.F90
+50 −50 gsdchem/opt_averaging_mod.F90
+5 −5 gsdchem/opt_driver_mod.F90
+6 −6 gsdchem/opt_gocart_mod.F90
+10 −5 gsdchem/plume_rise_mod.F90
+41 −41 gsdchem/plume_scalar_mod.F90
+15 −35 gsdchem/seas_mod.F90
+21 −21 gsdchem/vash_settling_mod.F90
1 change: 1 addition & 0 deletions ccpp/suites/suite_FV3_GFS_2017_gfdlmp_gsd_chem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<scheme>sfc_diag</scheme>
<scheme>sfc_diag_post</scheme>
<scheme>GFS_surface_generic_post</scheme>
<scheme>gsd_chem_config_wrapper</scheme>
<scheme>gsd_chem_seas_wrapper</scheme>
<scheme>gsd_chem_dmsemis_wrapper</scheme>
<scheme>gsd_chem_dust_wrapper</scheme>
Expand Down
1 change: 1 addition & 0 deletions ccpp/suites/suite_FV3_GFS_v15_gsd_chem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<scheme>sfc_diag</scheme>
<scheme>sfc_diag_post</scheme>
<scheme>GFS_surface_generic_post</scheme>
<scheme>gsd_chem_config_wrapper</scheme>
<scheme>gsd_chem_seas_wrapper</scheme>
<scheme>gsd_chem_dmsemis_wrapper</scheme>
<scheme>gsd_chem_dust_wrapper</scheme>
Expand Down
1 change: 1 addition & 0 deletions ccpp/suites/suite_FV3_GFS_v16beta_gsd_chem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
<scheme>sfc_diag</scheme>
<scheme>sfc_diag_post</scheme>
<scheme>GFS_surface_generic_post</scheme>
<scheme>gsd_chem_config_wrapper</scheme>
<scheme>gsd_chem_seas_wrapper</scheme>
<scheme>gsd_chem_dmsemis_wrapper</scheme>
<scheme>gsd_chem_dust_wrapper</scheme>
Expand Down
3 changes: 3 additions & 0 deletions gfsphysics/GFS_layer/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4202,6 +4202,9 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
case(6)
ExtDiag(idx)%name = 'sscmass'
ExtDiag(idx)%desc = 'Seasalt Column Mass Density'
case(7)
ExtDiag(idx)%name = 'comass'
ExtDiag(idx)%desc = 'Carbon Monoxide Column Mass Density'
end select

ExtDiag(idx)%axes = 2
Expand Down
41 changes: 34 additions & 7 deletions gfsphysics/GFS_layer/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,9 @@ module GFS_typedefs
logical :: cplchm !< default no cplchm collection
#ifdef CCPP
logical :: cplchm_rad_opt !< default no cplchm radiation feedback

integer :: num_ebu !< length of internal gsdchem ebu buffer
integer :: num_aecm !< length of aecm buffer
#endif

!--- integrated dynamics through earth's atmosphere
Expand Down Expand Up @@ -1114,6 +1117,7 @@ module GFS_typedefs
integer :: ntsulf !< tracer index for sulf
integer :: ntdms !< tracer index for DMS
integer :: ntmsa !< tracer index for msa
integer :: ntco !< tracer index for co
integer :: ntpp25 !< tracer index for pp25
integer :: ntbc1 !< tracer index for bc1
integer :: ntbc2 !< tracer index for bc2
Expand Down Expand Up @@ -1168,6 +1172,9 @@ module GFS_typedefs
integer :: chem_conv_tr
integer :: chem_in_opt
integer :: chem_opt
! These must match gsd_chem_config.F90:
integer :: chem_opt_gocart !< chem_opt for simple scheme
integer :: chem_opt_gocart_co !< chem_opt for simple scheme with co
integer :: chemdt
integer :: cldchem_onoff
integer :: dmsemis_opt
Expand Down Expand Up @@ -1736,7 +1743,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: abem (:,:) => null() !< instantaneous anthopogenic and biomass burning emissions
!< for black carbon, organic carbon, and sulfur dioxide ( ug/m**2/s )
real (kind=kind_phys), pointer :: aecm (:,:) => null() !< instantaneous aerosol column mass densities for
!< pm2.5, black carbon, organic carbon, sulfate, dust, sea salt ( g/m**2 )
!< pm2.5, black carbon, organic carbon, sulfate, dust, sea salt, CO ( g/m**2 )
real (kind=kind_phys), pointer :: wetdpc_deep(:,:) => null() !< instantaneous deep convective wet deposition ( kg/m**2/s )
real (kind=kind_phys), pointer :: wetdpc_mid (:,:) => null() !< instantaneous mid convective wet deposition ( kg/m**2/s )
real (kind=kind_phys), pointer :: wetdpc_shal(:,:) => null() !< instantaneous shallow convective wet deposition ( kg/m**2/s )
Expand Down Expand Up @@ -2334,10 +2341,18 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
! allocate (Sfcprop%hprim (IM))
allocate (Sfcprop%hprime (IM,Model%nmtvr))
allocate (Sfcprop%dust_in (IM,5))
allocate (Sfcprop%emi_in (IM,10))
if(Model%chem_opt == Model%CHEM_OPT_GOCART_CO) then
allocate (Sfcprop%emi_in (IM,11))
else
allocate (Sfcprop%emi_in (IM,10))
endif
allocate (Sfcprop%emi2_in (IM,64,3))
allocate (Sfcprop%fire_MODIS (IM,13))
allocate (Sfcprop%fire_GBBEPx(IM,5))
if(Model%chem_opt == Model%CHEM_OPT_GOCART_CO) then
allocate (Sfcprop%fire_GBBEPx(IM,6))
else
allocate (Sfcprop%fire_GBBEPx(IM,5))
endif

Sfcprop%slmsk = clear_val
Sfcprop%oceanfrac = clear_val
Expand Down Expand Up @@ -2892,7 +2907,7 @@ subroutine coupling_create (Coupling, IM, Model)
!--- accumulated convective rainfall
allocate (Coupling%rainc_cpl (IM))
!-- chemistry coupling buffer
allocate (Coupling%buffer_ebu (IM,Model%levs+1,1,7))
allocate (Coupling%buffer_ebu (IM,Model%levs+1,1,Model%num_ebu))
!-- chemistry coupling feedback to radiation
allocate (Coupling%faersw_cpl (IM,Model%levr+LTP,14,3))

Expand Down Expand Up @@ -3458,6 +3473,8 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

#ifdef CCPP
!-- chem nml variables for FV3/CCPP-Chem
integer, parameter :: chem_opt_gocart = 300
integer, parameter :: chem_opt_gocart_co = 499
integer :: aer_bc_opt = 1
integer :: aer_ic_opt = 1
integer :: aer_ra_feedback = 0
Expand All @@ -3466,7 +3483,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
integer :: biomass_burn_opt = 1
integer :: chem_conv_tr = 0
integer :: chem_in_opt = 0
integer :: chem_opt =300
integer :: chem_opt = chem_opt_gocart
integer :: chemdt = 3
integer :: cldchem_onoff = 0
integer :: dmsemis_opt = 1
Expand Down Expand Up @@ -3640,7 +3657,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!--- convective clouds
integer :: ncnvcld3d = 0 !< number of convective 3d clouds fields


!--- read in the namelist
#ifdef INTERNAL_FILE_NML
Model%input_nml_file => input_nml_file
Expand Down Expand Up @@ -4300,6 +4316,7 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%ntsulf = get_tracer_index(Model%tracer_names, 'sulf', Model%me, Model%master, Model%debug)
Model%ntdms = get_tracer_index(Model%tracer_names, 'dms', Model%me, Model%master, Model%debug)
Model%ntmsa = get_tracer_index(Model%tracer_names, 'msa', Model%me, Model%master, Model%debug)
Model%ntco = get_tracer_index(Model%tracer_names, 'co', Model%me, Model%master, Model%debug)
Model%ntpp25 = get_tracer_index(Model%tracer_names, 'pp25', Model%me, Model%master, Model%debug)
Model%ntbc1 = get_tracer_index(Model%tracer_names, 'bc1', Model%me, Model%master, Model%debug)
Model%ntbc2 = get_tracer_index(Model%tracer_names, 'bc2', Model%me, Model%master, Model%debug)
Expand Down Expand Up @@ -4376,7 +4393,16 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
Model%biomass_burn_opt = biomass_burn_opt
Model%chem_conv_tr = chem_conv_tr
Model%chem_in_opt = chem_in_opt
Model%chem_opt_gocart = chem_opt_gocart
Model%chem_opt_gocart_co= chem_opt_gocart_co
Model%chem_opt = chem_opt
if(chem_opt==chem_opt_gocart_co) then
Model%num_ebu=8
Model%num_aecm=7
else
Model%num_ebu=7
Model%num_aecm=6
endif
Model%chemdt = chemdt
Model%cldchem_onoff = cldchem_onoff
Model%dmsemis_opt = dmsemis_opt
Expand Down Expand Up @@ -5401,6 +5427,7 @@ subroutine control_print(Model)
print *, ' ntsulf : ', Model%ntsulf
print *, ' ntdms : ', Model%ntdms
print *, ' ntmsa : ', Model%ntmsa
print *, ' ntco : ', Model%ntco
print *, ' ntpp25 : ', Model%ntpp25
print *, ' ntbc1 : ', Model%ntbc1
print *, ' ntbc2 : ', Model%ntbc2
Expand Down Expand Up @@ -6499,7 +6526,7 @@ subroutine diag_chem_init(Diag, IM, Model)
! -- for aerosol species (in order): pm2.5
! -- black carbon, organic carbon, sulfate,
! -- dust, sea salt
allocate (Diag%aecm(IM,6))
allocate (Diag%aecm(IM,Model%num_aecm))
Diag%aecm = zero

contains
Expand Down
28 changes: 26 additions & 2 deletions gfsphysics/GFS_layer/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2142,7 +2142,7 @@
standard_name = chem_buffer_ebu
long_name = chemistry buffer of ebu
units = various
dimensions = (horizontal_dimension,vertical_dimension_plus_one,1,7)
dimensions = (horizontal_dimension,vertical_dimension_plus_one,1,buffer_ebu_length)
type = real
kind = kind_phys
[faersw_cpl]
Expand Down Expand Up @@ -2419,6 +2419,24 @@
units = flag
dimensions = ()
type = logical
[num_chem]
standard_name = number_of_gsd_chem_chemistry_components
long_name = number of gsd chem chemistry components
units = count
dimensions = ()
type = integer
[num_ebu]
standard_name = buffer_ebu_length
long_name = buffer ebu length
units = count
dimensions = ()
type = integer
[num_aecm]
standard_name = number_of_aerosol_column_mass_densities
long_name = number of aerosol column mass densities
units = count
dimensions = ()
type = integer
[lsidea]
standard_name = flag_idealized_physics
long_name = flag for idealized physics
Expand Down Expand Up @@ -4222,6 +4240,12 @@
units = index
dimensions = ()
type = integer
[ntco]
standard_name = index_for_co
long_name = tracer index for co
units = index
dimensions = ()
type = integer
[ntpp25]
standard_name = index_for_pp25
long_name = tracer index for pp25
Expand Down Expand Up @@ -6873,7 +6897,7 @@
standard_name = instantaneous_aerosol_column_mass_densities
long_name = instantaneous aerosol column mass densities for pm2.5, black carbon, organic carbon, sulfate, dust, sea salt
units = kg m-2
dimensions = (horizontal_dimension,6)
dimensions = (horizontal_dimension,number_of_aerosol_column_mass_densities)
type = real
kind = kind_phys
[edmf_a]
Expand Down
16 changes: 16 additions & 0 deletions io/FV3GFS_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,10 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
nvar_emi2 = 3
nvar_gbbepx = 5
nvar_modis = 13
if(Model%chem_opt == Model%CHEM_OPT_GOCART_CO) then
nvar_emi = nvar_emi+1
nvar_gbbepx = nvar_gbbepx+1
endif
else
nvar_dust = 0
nvar_emi = 0
Expand Down Expand Up @@ -762,6 +766,9 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
emi_name(8) = 'ero1'
emi_name(9) = 'ero2'
emi_name(10) = 'ero3'
if(Model%chem_opt==Model%CHEM_OPT_GOCART_CO) then
emi_name(11) = 'e_co'
endif
!--- register the 2D fields
do num = 1,nvar_emi
var2_p => emi_var(:,:,num)
Expand Down Expand Up @@ -791,6 +798,9 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
Sfcprop(nb)%emi_in(ix,8) = emi_var(i,j,8)
Sfcprop(nb)%emi_in(ix,9) = emi_var(i,j,9)
Sfcprop(nb)%emi_in(ix,10) = emi_var(i,j,10)
if(Model%chem_opt==Model%CHEM_OPT_GOCART_CO) then
Sfcprop(nb)%emi_in(ix,11) = emi_var(i,j,11)
endif
enddo
enddo

Expand Down Expand Up @@ -847,6 +857,9 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
gbbepx_name(3) = 'ebu_pm_25'
gbbepx_name(4) = 'ebu_so2'
gbbepx_name(5) = 'ebu_frp'
if(Model%chem_opt == Model%CHEM_OPT_GOCART_CO) then
gbbepx_name(6) = 'ebu_co'
endif
!--- register the 2D fields
do num = 1,nvar_gbbepx
var2_p => gbbepx_var(:,:,num)
Expand All @@ -871,6 +884,9 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
Sfcprop(nb)%fire_GBBEPx(ix,3) = gbbepx_var(i,j,3)
Sfcprop(nb)%fire_GBBEPx(ix,4) = gbbepx_var(i,j,4)
Sfcprop(nb)%fire_GBBEPx(ix,5) = gbbepx_var(i,j,5)
if(Model%chem_opt == Model%CHEM_OPT_GOCART_CO) then
Sfcprop(nb)%fire_GBBEPx(ix,6) = gbbepx_var(i,j,6)
endif
enddo
enddo

Expand Down