Skip to content

Commit

Permalink
Merge pull request #33 from NOAA-EMC/develop
Browse files Browse the repository at this point in the history
sync with the develop
  • Loading branch information
HelinWei-NOAA authored Nov 6, 2023
2 parents 89e879f + 0dbc9ed commit f65dfea
Show file tree
Hide file tree
Showing 58 changed files with 2,011 additions and 1,576 deletions.
2 changes: 1 addition & 1 deletion atmos_cubed_sphere
56 changes: 28 additions & 28 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
call fv3atm_restart_read (GFS_data, GFS_restart_var, Atm_block, GFS_control, Atmos%domain_for_read, &
Atm(mygrid)%flagstruct%warm_start, ignore_rst_cksum)
if(GFS_control%do_ca .and. Atm(mygrid)%flagstruct%warm_start)then
call read_ca_restart (Atmos%domain,GFS_control%ncells,GFS_control%nca,GFS_control%ncells_g,GFS_control%nca_g)
call read_ca_restart (Atmos%domain,3,GFS_control%ncells,GFS_control%nca,GFS_control%ncells_g,GFS_control%nca_g)
endif
! Populate the GFS_data%Statein container with the prognostic state
! in Atm_block, which contains the initial conditions/restart data.
Expand Down Expand Up @@ -2015,7 +2015,7 @@ subroutine assign_importdata(jdat, rc)

! get upward LW flux: for sea ice covered area
!----------------------------------------------
fldname = 'mean_up_lw_flx_ice'
fldname = 'lwup_flx_ice'
if (trim(impfield_name) == trim(fldname)) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
Expand All @@ -2042,7 +2042,7 @@ subroutine assign_importdata(jdat, rc)

! get latent heat flux: for sea ice covered area
!------------------------------------------------
fldname = 'mean_laten_heat_flx_atm_into_ice'
fldname = 'laten_heat_flx_atm_into_ice'
if (trim(impfield_name) == trim(fldname)) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
Expand All @@ -2062,7 +2062,7 @@ subroutine assign_importdata(jdat, rc)

! get sensible heat flux: for sea ice covered area
!--------------------------------------------------
fldname = 'mean_sensi_heat_flx_atm_into_ice'
fldname = 'sensi_heat_flx_atm_into_ice'
if (trim(impfield_name) == trim(fldname)) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
Expand Down Expand Up @@ -2122,7 +2122,7 @@ subroutine assign_importdata(jdat, rc)

! get sea ice volume: for sea ice covered area
!----------------------------------------------
fldname = 'mean_ice_volume'
fldname = 'sea_ice_volume'
if (trim(impfield_name) == trim(fldname)) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
Expand All @@ -2143,7 +2143,7 @@ subroutine assign_importdata(jdat, rc)

! get snow volume: for sea ice covered area
!-------------------------------------------
fldname = 'mean_snow_volume'
fldname = 'snow_volume_on_sea_ice'
if (trim(impfield_name) == trim(fldname)) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
Expand Down Expand Up @@ -2251,7 +2251,7 @@ subroutine assign_importdata(jdat, rc)

! get upward LW flux: for open ocean
!----------------------------------------------
fldname = 'mean_up_lw_flx_ocn'
fldname = 'lwup_flx_ocn'
if (trim(impfield_name) == trim(fldname) .and. GFS_control%use_med_flux) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
Expand All @@ -2271,7 +2271,7 @@ subroutine assign_importdata(jdat, rc)

! get latent heat flux: for open ocean
!------------------------------------------------
fldname = 'mean_laten_heat_flx_atm_into_ocn'
fldname = 'laten_heat_flx_atm_into_ocn'
if (trim(impfield_name) == trim(fldname) .and. GFS_control%use_med_flux) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
Expand All @@ -2291,7 +2291,7 @@ subroutine assign_importdata(jdat, rc)

! get sensible heat flux: for open ocean
!--------------------------------------------------
fldname = 'mean_sensi_heat_flx_atm_into_ocn'
fldname = 'sensi_heat_flx_atm_into_ocn'
if (trim(impfield_name) == trim(fldname) .and. GFS_control%use_med_flux) then
findex = queryImportFields(fldname)
if (importFieldsValid(findex)) then
Expand Down Expand Up @@ -2923,19 +2923,28 @@ subroutine setup_exportdata(rc)
call block_data_copy(datar82d, GFS_data(nb)%coupling%v10mi_cpl, Atm_block, nb, rc=localrc)
! Instantaneous Zonal compt of momentum flux (N/m**2)
case ('inst_zonal_moment_flx')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dusfci_cpl, Atm_block, nb, rc=localrc)
call block_data_copy(datar82d, GFS_data(nb)%coupling%dusfci_cpl, Atm_block, nb, -one, spval, rc=localrc)
! Instantaneous Merid compt of momentum flux (N/m**2)
case ('inst_merid_moment_flx')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dvsfci_cpl, Atm_block, nb, rc=localrc)
call block_data_copy(datar82d, GFS_data(nb)%coupling%dvsfci_cpl, Atm_block, nb, -one, spval, rc=localrc)
! Instantaneous Sensible heat flux (W/m**2)
case ('inst_sensi_heat_flx')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dtsfci_cpl, Atm_block, nb, rc=localrc)
call block_data_copy(datar82d, GFS_data(nb)%coupling%dtsfci_cpl, Atm_block, nb, -one, spval, rc=localrc)
! Instantaneous Latent heat flux (W/m**2)
case ('inst_laten_heat_flx')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dqsfci_cpl, Atm_block, nb, rc=localrc)
call block_data_copy(datar82d, GFS_data(nb)%coupling%dqsfci_cpl, Atm_block, nb, -one, spval, rc=localrc)
! Instantaneous Evap flux (kg/m**2/s)
case ('inst_evap_rate')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dqsfci_cpl, Atm_block, nb, revap, spval, rc=localrc)
call block_data_copy(datar82d, GFS_data(nb)%coupling%dqsfci_cpl, Atm_block, nb, -revap, spval, rc=localrc)
! Instantaneous precipitation rate (kg/m2/s)
case ('inst_prec_rate')
call block_data_copy(datar82d, GFS_data(nb)%coupling%rain_cpl, Atm_block, nb, rtimek, spval, rc=localrc)
! Instantaneous convective precipitation rate (kg/m2/s)
case ('inst_prec_rate_conv')
call block_data_copy(datar82d, GFS_Data(nb)%Coupling%rainc_cpl, Atm_block, nb, rtimek, spval, rc=localrc)
! Instaneous snow precipitation rate (kg/m2/s)
case ('inst_fprec_rate')
call block_data_copy(datar82d, GFS_data(nb)%coupling%snow_cpl, Atm_block, nb, rtimek, spval, rc=localrc)
! Instantaneous Downward long wave radiation flux (W/m**2)
case ('inst_down_lw_flx')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dlwsfci_cpl, Atm_block, nb, rc=localrc)
Expand Down Expand Up @@ -2993,19 +3002,19 @@ subroutine setup_exportdata(rc)
!--- Mean quantities
! MEAN Zonal compt of momentum flux (N/m**2)
case ('mean_zonal_moment_flx_atm')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dusfc_cpl, Atm_block, nb, rtime, spval, rc=localrc)
call block_data_copy(datar82d, GFS_data(nb)%coupling%dusfc_cpl, Atm_block, nb, -rtime, spval, rc=localrc)
! MEAN Merid compt of momentum flux (N/m**2)
case ('mean_merid_moment_flx_atm')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dvsfc_cpl, Atm_block, nb, rtime, spval, rc=localrc)
call block_data_copy(datar82d, GFS_data(nb)%coupling%dvsfc_cpl, Atm_block, nb, -rtime, spval, rc=localrc)
! MEAN Sensible heat flux (W/m**2)
case ('mean_sensi_heat_flx')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dtsfc_cpl, Atm_block, nb, rtime, spval, rc=localrc)
call block_data_copy(datar82d, GFS_data(nb)%coupling%dtsfc_cpl, Atm_block, nb, -rtime, spval, rc=localrc)
! MEAN Latent heat flux (W/m**2)
case ('mean_laten_heat_flx')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dqsfc_cpl, Atm_block, nb, rtime, spval, rc=localrc)
call block_data_copy(datar82d, GFS_data(nb)%coupling%dqsfc_cpl, Atm_block, nb, -rtime, spval, rc=localrc)
! MEAN Evap rate (kg/m**2/s)
case ('mean_evap_rate')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dqsfc_cpl, Atm_block, nb, rtime*revap, rc=localrc)
call block_data_copy(datar82d, GFS_data(nb)%coupling%dqsfc_cpl, Atm_block, nb, -rtime*revap, spval, rc=localrc)
! MEAN Downward LW heat flux (W/m**2)
case ('mean_down_lw_flx')
call block_data_copy(datar82d, GFS_data(nb)%coupling%dlwsfc_cpl, Atm_block, nb, rtime, spval, rc=localrc)
Expand Down Expand Up @@ -3042,15 +3051,6 @@ subroutine setup_exportdata(rc)
! MEAN NET sfc uv+vis diffused flux (W/m**2)
case ('mean_net_sw_vis_dif_flx')
call block_data_copy(datar82d, GFS_data(nb)%coupling%nvisdf_cpl, Atm_block, nb, rtime, spval, rc=localrc)
! MEAN precipitation rate (kg/m2/s)
case ('mean_prec_rate')
call block_data_copy(datar82d, GFS_data(nb)%coupling%rain_cpl, Atm_block, nb, rtimek, spval, rc=localrc)
! MEAN convective precipitation rate (kg/m2/s)
case ('mean_prec_rate_conv')
call block_data_copy(datar82d, GFS_Data(nb)%Coupling%rainc_cpl, Atm_block, nb, rtimek, spval, rc=localrc)
! MEAN snow precipitation rate (kg/m2/s)
case ('mean_fprec_rate')
call block_data_copy(datar82d, GFS_data(nb)%coupling%snow_cpl, Atm_block, nb, rtimek, spval, rc=localrc)
! oceanfrac used by atm to calculate fluxes
case ('openwater_frac_in_atm')
call block_data_combine_fractions(datar82d, GFS_data(nb)%sfcprop%oceanfrac, GFS_Data(nb)%sfcprop%fice, Atm_block, nb, rc=localrc)
Expand Down
12 changes: 7 additions & 5 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
'physics/physics/radsw_param.f',
'physics/physics/radlw_param.f',
'physics/physics/h2o_def.f',
'physics/physics/ozne_def.f',
'physics/physics/radiation_surface.f',
'physics/physics/module_ozphys.F90',
'data/CCPP_typedefs.F90',
'data/GFS_typedefs.F90',
'data/CCPP_data.F90',
Expand All @@ -41,6 +41,10 @@
'module_radlw_parameters' : {
'module_radlw_parameters' : '',
},
'module_ozphys' : {
'module_ozphys' : '',
'ty_ozphys' : '',
},
'CCPP_typedefs' : {
'GFS_interstitial_type' : 'GFS_Interstitial(cdata%thrd_no)',
'GFDL_interstitial_type' : 'GFDL_interstitial',
Expand Down Expand Up @@ -105,6 +109,7 @@
'physics/physics/GFS_surface_loop_control_part1.F90',
'physics/physics/GFS_surface_loop_control_part2.F90',
'physics/physics/GFS_time_vary_pre.fv3.F90',
'physics/physics/GFS_physics_post.F90',
'physics/physics/cires_ugwp.F90',
'physics/physics/cires_ugwp_post.F90',
'physics/physics/unified_ugwp.F90',
Expand Down Expand Up @@ -162,11 +167,8 @@
'physics/physics/mp_thompson_pre.F90',
'physics/physics/mp_thompson.F90',
'physics/physics/mp_thompson_post.F90',
'physics/physics/mp_nssl.F90' ,
'physics/physics/ozphys.f',
'physics/physics/ozphys_2015.f',
'physics/physics/mp_nssl.F90',
'physics/physics/zhaocarr_precpd.f',
'physics/physics/phys_tend.F90',
'physics/physics/radlw_main.F90',
'physics/physics/radsw_main.F90',
'physics/physics/rascnv.F90',
Expand Down
18 changes: 11 additions & 7 deletions ccpp/data/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ module CCPP_typedefs
use machine, only: kind_grid, kind_dyn, kind_phys

! Constants/dimensions needed for interstitial DDTs
use ozne_def, only: oz_coeff
use GFS_typedefs, only: clear_val, LTP

! Physics type defininitions needed for interstitial DDTs
Expand Down Expand Up @@ -881,7 +880,7 @@ subroutine gfs_interstitial_create (Interstitial, IM, Model)
Interstitial%nf_albd = NF_ALBD
Interstitial%nspc1 = NSPC1
if (Model%oz_phys .or. Model%oz_phys_2015) then
Interstitial%oz_coeffp5 = oz_coeff+5
Interstitial%oz_coeffp5 = Model%oz_coeff+5
else
Interstitial%oz_coeffp5 = 5
endif
Expand Down Expand Up @@ -929,6 +928,8 @@ subroutine gfs_interstitial_setup_tracers(Interstitial, Model)
if (Model%imp_physics == Model%imp_physics_thompson) then
if (Model%ltaerosol) then
Interstitial%nvdiff = 12
else if (Model%mraerosol) then
Interstitial%nvdiff = 10
else
Interstitial%nvdiff = 9
endif
Expand Down Expand Up @@ -1018,6 +1019,8 @@ subroutine gfs_interstitial_setup_tracers(Interstitial, Model)
elseif (Model%imp_physics == Model%imp_physics_thompson) then
if (Model%ltaerosol) then
Interstitial%nvdiff = 12
else if (Model%mraerosol) then
Interstitial%nvdiff = 10
else
Interstitial%nvdiff = 9
endif
Expand Down Expand Up @@ -1054,11 +1057,12 @@ subroutine gfs_interstitial_setup_tracers(Interstitial, Model)
tracers = 2
do n=2,Model%ntrac
ltest = ( n /= Model%ntcw .and. n /= Model%ntiw .and. n /= Model%ntclamt .and. &
n /= Model%ntrw .and. n /= Model%ntsw .and. n /= Model%ntrnc .and. &
n /= Model%ntsnc .and. n /= Model%ntgl .and. n /= Model%ntgnc .and. &
n /= Model%nthl .and. n /= Model%nthnc .and. n /= Model%ntgv .and. &
n /= Model%nthv .and. n /= Model%ntccn .and. n /= Model%ntccna .and. &
n /= Model%ntsigma)
n /= Model%ntrw .and. n /= Model%ntsw .and. n /= Model%ntrnc .and. &
n /= Model%ntsnc .and. n /= Model%ntgl .and. n /= Model%ntgnc .and. &
n /= Model%nthl .and. n /= Model%nthnc .and. n /= Model%ntgv .and. &
n /= Model%nthv .and. n /= Model%ntccn .and. n /= Model%ntccna .and. &
n /= Model%ntrz .and. n /= Model%ntgz .and. n /= Model%nthz .and. &
n /= Model%ntsigma)
Interstitial%otsptflag(n) = ltest
if ( ltest ) then
tracers = tracers + 1
Expand Down
2 changes: 1 addition & 1 deletion ccpp/data/CCPP_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -3187,7 +3187,7 @@
name = CCPP_typedefs
type = module
relative_path = ../physics/physics
dependencies = machine.F,ozne_def.f,radlw_param.f,radsw_param.f
dependencies = machine.F,radlw_param.f,radsw_param.f
dependencies = rte-rrtmgp/rrtmgp/mo_gas_optics_rrtmgp.F90,rte-rrtmgp/rte/mo_optical_props.F90
dependencies = rte-rrtmgp/extensions/cloud_optics/mo_cloud_optics.F90
dependencies = rte-rrtmgp/rrtmgp/mo_gas_concentrations.F90,rte-rrtmgp/rte/mo_rte_config.F90
Expand Down
Loading

0 comments on commit f65dfea

Please sign in to comment.