Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
Browse files Browse the repository at this point in the history
…ture/gfdlmpv3
  • Loading branch information
dustinswales committed Dec 16, 2024
2 parents dd0c88a + 1648e17 commit 21d1609
Show file tree
Hide file tree
Showing 12 changed files with 223 additions and 93 deletions.
2 changes: 1 addition & 1 deletion atmos_cubed_sphere
4 changes: 2 additions & 2 deletions ccpp/data/CCPP_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1620,8 +1620,8 @@ subroutine gfdl_interstitial_create (Interstitial, is, ie, isd, ied, js, je, jsd
else
Interstitial%ngas = 0
end if
allocate(Interstitial%rilist(0:Interstitial%ngas))
allocate(Interstitial%cpilist(0:Interstitial%ngas))
allocate (Interstitial%rilist(0:Interstitial%ngas))
allocate (Interstitial%cpilist(0:Interstitial%ngas))
if (present(rilist)) then
Interstitial%rilist = rilist(0:Interstitial%ngas)
Interstitial%cpilist = cpilist(0:Interstitial%ngas)
Expand Down
179 changes: 99 additions & 80 deletions ccpp/data/GFS_typedefs.F90

Large diffs are not rendered by default.

63 changes: 59 additions & 4 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@
standard_name = emission_smoke_prvd_RRFS
long_name = emission fire RRFS daily
units = various
dimensions = (horizontal_dimension,4)
dimensions = (horizontal_dimension,5)
type = real
kind = kind_phys
active = (do_smoke_coupling)
Expand Down Expand Up @@ -2369,23 +2369,23 @@
standard_name = kinematic_surface_upward_sensible_heat_flux_of_fire
long_name = kinematic surface upward sensible heat flux of fire
units = K m s-1
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (do_fire_coupling)
[evap_fire]
standard_name = surface_upward_specific_humidity_flux_of_fire
long_name = kinematic surface upward latent heat flux of fire
units = kg kg-1 m s-1
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (do_fire_coupling)
[smoke_fire]
standard_name = smoke_emission_of_fire
long_name = smoke emission of fire
units = kg m-2
dimensions = (horizontal_loop_extent)
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
active = (do_fire_coupling)
Expand Down Expand Up @@ -3244,6 +3244,14 @@
type = real
kind = kind_phys
active = (do_smoke_coupling)
[rho_dry]
standard_name = dry_air_density
long_name = dry air density
units = kg m-3
dimensions = (horizontal_dimension,vertical_layer_dimension)
type = real
kind = kind_phys
active = (do_smoke_coupling)
[uspdavg]
standard_name = mean_wind_speed_in_boundary_layer
long_name = average wind speed within the boundary layer
Expand Down Expand Up @@ -4957,6 +4965,12 @@
units = flag
dimensions = ()
type = logical
[add_fire_moist_flux]
standard_name = flag_for_fire_moisture_flux
long_name = flag to add fire moisture flux
units = flag
dimensions = ()
type = logical
[isncond_opt]
standard_name = control_for_soil_thermal_conductivity_option_in_ruc_lsm
long_name = control for soil thermal conductivity option in RUC land surface model
Expand Down Expand Up @@ -5659,6 +5673,12 @@
units = none
dimensions = ()
type = integer
[conv_cf_opt]
standard_name = option_for_convection_scheme_cloud_fraction_computation
long_name = option for convection scheme cloud fraction computation
units = flag
dimensions = ()
type = integer
[nmtvr]
standard_name = number_of_statistical_measures_of_subgrid_orography
long_name = number of topographic variables in GWD
Expand Down Expand Up @@ -6884,6 +6904,13 @@
dimensions = ()
type = real
kind = kind_phys
[plume_alpha]
standard_name = alpha_for_plumerise_scheme
long_name = alpha paramter for plumerise scheme
units = none
dimensions = ()
type = real
kind = kind_phys
[ebb_dcycle]
standard_name = control_for_diurnal_cycle_of_biomass_burning_emissions
long_name = rrfs smoke diurnal cycle option
Expand Down Expand Up @@ -10439,3 +10466,31 @@
dimensions = ()
type = real
kind = kind_phys
[con_rgas]
standard_name = molar_gas_constant
long_name = universal ideal molar gas constant
units = J K-1 mol-1
dimensions = ()
type = real
kind = kind_phys
[con_avgd]
standard_name = avogadro_consant
long_name = Avogadro constant
units = mol-1
dimensions = ()
type = real
kind = kind_phys
[con_amd]
standard_name = molecular_weight_of_dry_air
long_name = molecular weight of dry air
units = g mol-1
dimensions = ()
type = real
kind = kind_phys
[con_amw]
standard_name = molecular_weight_of_water_vapor
long_name = molecular weight of water vapor
units = g mol-1
dimensions = ()
type = real
kind = kind_phys
12 changes: 12 additions & 0 deletions ccpp/driver/GFS_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,18 @@ subroutine GFS_externaldiag_populate (ExtDiag, Model, Statein, Stateout, Sfcprop
ExtDiag(idx)%data(nb)%var2 => IntDiag%fluxr(Model%chunk_begin(nb):Model%chunk_end(nb),32)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'csdsf'
ExtDiag(idx)%desc = 'Clear Sky Instantateous Downward Short Wave Flux'
ExtDiag(idx)%unit = 'W/m**2'
ExtDiag(idx)%mod_name = 'gfs_phys'
ExtDiag(idx)%intpl_method = 'bilinear'
allocate (ExtDiag(idx)%data(nblks))
do nb = 1,nblks
ExtDiag(idx)%data(nb)%var2 => IntDiag%fluxr(Model%chunk_begin(nb):Model%chunk_end(nb),32)
enddo

idx = idx + 1
ExtDiag(idx)%axes = 2
ExtDiag(idx)%name = 'csulf_ave'
Expand Down
2 changes: 1 addition & 1 deletion ccpp/framework
Submodule framework updated 1 files
+1 −1 CMakeLists.txt
2 changes: 2 additions & 0 deletions ccpp/suites/suite_RRFSens_phy1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>sgscloud_radpre</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>sgscloud_radpost</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
Expand Down
2 changes: 2 additions & 0 deletions ccpp/suites/suite_RRFSens_phy4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>sgscloud_radpre</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
<scheme>rrtmg_sw</scheme>
<scheme>rrtmg_sw_post</scheme>
<scheme>rrtmg_lw</scheme>
<scheme>sgscloud_radpost</scheme>
<scheme>rrtmg_lw_post</scheme>
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
Expand Down
4 changes: 3 additions & 1 deletion io/fv3atm_rrfs_sd_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module fv3atm_rrfs_sd_io
integer, private :: nvar_dust12m = 5
integer, private :: nvar_emi = 1
integer, private :: nvar_fire = 2
integer, private :: nvar_fire2d = 4
integer, private :: nvar_fire2d = 5

character(len=32), pointer, dimension(:), private :: dust12m_name => null()
character(len=32), pointer, dimension(:), private :: emi_name => null()
Expand Down Expand Up @@ -578,6 +578,7 @@ subroutine rrfs_sd_emissions_register_fire(data, Model, restart, Atm_block)
data%fire_name2d(2) = 'frp_davg'
data%fire_name2d(3) = 'fire_end_hr'
data%fire_name2d(4) = 'hwp_davg'
data%fire_name2d(5) = 'totprcp_24hrs'

!--- register axis
call register_axis(restart, 'lon', 'X')
Expand Down Expand Up @@ -637,6 +638,7 @@ subroutine rrfs_sd_emissions_copy_fire(data, Model, Sfcprop, Atm_block)
Sfcprop%smoke2d_RRFS(im,2) = data%fire_var2d(i,j,2)
Sfcprop%smoke2d_RRFS(im,3) = data%fire_var2d(i,j,3)
Sfcprop%smoke2d_RRFS(im,4) = data%fire_var2d(i,j,4)
Sfcprop%smoke2d_RRFS(im,5) = data%fire_var2d(i,j,5)
else
! -- user define their own fire emission
endif
Expand Down
1 change: 1 addition & 0 deletions io/module_write_internal_state.F90
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ module write_internal_state
integer :: ncld !< Number of hydrometeors.
integer :: nsoil !< Number of soil layers.
integer :: imp_physics !< Choice of microphysics scheme.
integer :: landsfcmdl !< Choice of land surface model.
integer :: dtp !< Physics timestep.
real,dimension(:),allocatable :: ak !< a parameter for sigma pressure level calculations.
real,dimension(:),allocatable :: bk !< b parameter for sigma pressure level calculations.
Expand Down
43 changes: 40 additions & 3 deletions io/post_fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,9 @@ subroutine post_getattr_fv3(wrt_int_state,grid_id)
if (trim(attName) == 'ncnsto') wrt_int_state%ntrac=varival
if (trim(attName) == 'ncld') wrt_int_state%ncld=varival
if (trim(attName) == 'nsoil') wrt_int_state%nsoil=varival
if (trim(attName) == 'fhzero') wrt_int_state%fhzero=varival
if (trim(attName) == 'imp_physics') wrt_int_state%imp_physics=varival
if (trim(attName) == 'landsfcmdl') wrt_int_state%landsfcmdl=varival
endif
else if (typekind==ESMF_TYPEKIND_R4) then
if(n==1) then
Expand Down Expand Up @@ -554,7 +556,7 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp)
no3cb, nh4cb, dusmass, ducmass, dusmass25,ducmass25, &
snownc, graupelnc, qrmax, hail_maxhailcast, &
smoke_ave,dust_ave,coarsepm_ave,swddif,swddni, &
xlaixy
xlaixy,wspd10umax,wspd10vmax
use soil, only: sldpth, sh2o, smc, stc, sllevel
use masks, only: lmv, lmh, htm, vtm, gdlat, gdlon, dx, dy, hbm2, sm, sice
use ctlblk_mod, only: im, jm, lm, lp1, jsta, jend, jsta_2l, jend_2u, jsta_m,jend_m, &
Expand Down Expand Up @@ -628,7 +630,7 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp)
!
imp_physics = wrt_int_state%imp_physics !set GFS mp physics to 99 for Zhao scheme
dtp = wrt_int_state%dtp
iSF_SURFACE_PHYSICS = 2
iSF_SURFACE_PHYSICS = wrt_int_state%landsfcmdl
spval = 9.99e20
!
! nems gfs has zhour defined
Expand Down Expand Up @@ -1367,13 +1369,48 @@ subroutine set_postvars_fv3(wrt_int_state,grid_id,mype,mpicomp)
enddo
endif

! max temporal 10m agl wind speed
if (modelname =='GFS')then
if(trim(fieldname)=='wind10m_max') then
!$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,wspd10max,arrayr42d,sm,fillValue)
do j=jsta,jend
do i=ista, iend
wspd10max(i,j) = arrayr42d(i,j)
if (abs(arrayr42d(i,j)-fillValue) < small) wspd10max(i,j) = spval
enddo
enddo
endif
else
! max hourly 10m agl wind speed
if(trim(fieldname)=='spd10max') then
!$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,wspd10max,arrayr42d,sm,fillValue)
do j=jsta,jend
do j=jsta,jend
do i=ista, iend
wspd10max(i,j) = arrayr42d(i,j)
if (abs(arrayr42d(i,j)-fillValue) < small) wspd10max(i,j) = spval
enddo
enddo
endif
endif !end modelname

! u comp of temporal max 10m agl wind speed
if(trim(fieldname)=='u10m_max') then
!$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,wspd10umax,arrayr42d,sm,fillValue)
do j=jsta,jend
do i=ista, iend
wspd10umax(i,j) = arrayr42d(i,j)
if (abs(arrayr42d(i,j)-fillValue) < small) wspd10umax(i,j) = spval
enddo
enddo
endif

! v comp of temporal max 10m agl wind speed
if(trim(fieldname)=='v10m_max') then
!$omp parallel do default(none) private(i,j) shared(jsta,jend,ista,iend,spval,wspd10vmax,arrayr42d,sm,fillValue)
do j=jsta,jend
do i=ista, iend
wspd10vmax(i,j) = arrayr42d(i,j)
if (abs(arrayr42d(i,j)-fillValue) < small) wspd10vmax(i,j) = spval
enddo
enddo
endif
Expand Down

0 comments on commit 21d1609

Please sign in to comment.