Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f5b37af
FV3 changes for refactored ozone physics scheme
May 25, 2023
e25b1c7
Remove change to metadata (Not relevant for PR)
May 26, 2023
96542b2
Update physics
Jun 8, 2023
2ca6f33
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into fea…
Jun 8, 2023
8a6eefe
Update physics
Jun 12, 2023
a5ecd38
Merge branch 'feature_reorg_ozphys' of https://github.com/dustinswale…
Jun 12, 2023
f066fd7
Split ozone physics into time_vary and run components
Aug 1, 2023
2f78f32
Change submodule
Aug 1, 2023
3c6308c
Sync physics
dustinswales Aug 2, 2023
db0aa55
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Aug 2, 2023
2d352b1
Some cleanup. Now working
dustinswales Aug 2, 2023
b0bd401
Address reviewers comments
dustinswales Aug 2, 2023
f3a5882
More reorganization.
dustinswales Aug 10, 2023
9938c37
Synced physics
Sep 6, 2023
6966159
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
Sep 6, 2023
c5b16fc
Merge branch 'feature_reorg_ozphys' of https://github.com/dustinswale…
Sep 6, 2023
05852bd
Renamed file. Update SDFs
Sep 6, 2023
8e8f698
Getting real close...
Sep 27, 2023
4ab16ee
SDF cleanup. physics updates
Sep 27, 2023
ff67b40
Omission from previous commit
Sep 27, 2023
8fd6b28
Some polishing. Merge 2006 ozone into module_ozphys
Sep 28, 2023
5f84695
Update physics wiht ufs-community
dustinswales Sep 28, 2023
7dfee39
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Sep 28, 2023
53ee700
Added documentation
dustinswales Sep 28, 2023
fb821e6
Some more cleanup
dustinswales Oct 12, 2023
05f6788
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Oct 12, 2023
18206e7
Final cleanup
dustinswales Oct 12, 2023
5f14225
Omission from previous commit
dustinswales Oct 12, 2023
10ce057
Update ccpp-framework hash
dustinswales Oct 27, 2023
dc30cf1
Update ccpp-physics
dustinswales Oct 27, 2023
039eaec
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Oct 27, 2023
e045e7e
Reverted standard_name change
dustinswales Oct 27, 2023
1cf4cc5
Merge branch 'develop' of https://github.com/NOAA-EMC/fv3atm into HEAD
dustinswales Nov 1, 2023
1f2eafd
Missed changes needed to SDF.
dustinswales Nov 1, 2023
af844cb
revert submodules
dustinswales Nov 2, 2023
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
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
branch = main
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/ufs-community/ccpp-physics
branch = ufs/dev
url = https://github.com/dustinswales/ccpp-physics
branch = feature_reorg_ozphys
[submodule "upp"]
path = upp
url = https://github.com/NOAA-EMC/UPP
Expand Down
4 changes: 2 additions & 2 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
'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',
'data/CCPP_typedefs.F90',
'data/GFS_typedefs.F90',
Expand Down Expand Up @@ -164,7 +163,8 @@
'physics/physics/mp_thompson_post.F90',
'physics/physics/mp_nssl.F90' ,
'physics/physics/ozphys.f',
'physics/physics/ozphys_2015.f',
'physics/physics/ozphys_2015.F90',
'physics/physics/ozphys_time_vary.F90',
'physics/physics/zhaocarr_precpd.f',
'physics/physics/phys_tend.F90',
'physics/physics/radlw_main.F90',
Expand Down
3 changes: 1 addition & 2 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
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
115 changes: 88 additions & 27 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module GFS_typedefs

use module_radsw_parameters, only: topfsw_type, sfcfsw_type
use module_radlw_parameters, only: topflw_type, sfcflw_type
use ozne_def, only: levozp, oz_coeff
use h2o_def, only: levh2o, h2o_coeff

implicit none
Expand Down Expand Up @@ -1119,8 +1118,6 @@ module GFS_typedefs
logical :: shocaftcnv !< flag for SHOC
logical :: shoc_cld !< flag for clouds
logical :: uni_cld !< flag for clouds in grrad
logical :: oz_phys !< flag for old (2006) ozone physics
logical :: oz_phys_2015 !< flag for new (2015) ozone physics
logical :: h2o_phys !< flag for stratosphere h2o
logical :: pdfcld !< flag for pdfcld
logical :: shcnvcw !< flag for shallow convective cloud
Expand Down Expand Up @@ -1568,6 +1565,26 @@ module GFS_typedefs
!--- lightning threat and diagsnostics
logical :: lightning_threat !< report lightning threat indices

!--- NRL Ozone physics
logical :: oz_phys !< Flag for old (2006) ozone physics
logical :: oz_phys_2015 !< Flag for new (2015) ozone physics
integer :: kozpl !< File identifier for ozone forcing data
integer :: latsozp !< Number of latitudes in ozone forcing data
integer :: levozp !< Number of vertical layers in ozone forcing data
integer :: timeoz !< Number of times in ozone forcing data
integer :: oz_coeff !< Number of coefficients in ozone forcing data
real (kind=kind_phys), allocatable :: oz_lat(:) !< Latitude for ozone forcing data
real (kind=kind_phys), allocatable :: oz_pres(:) !< Pressure levels for ozone forcing data
real (kind=kind_phys), allocatable :: po3(:) !< Natural log pressure levels for ozone forcing data
real (kind=kind_phys), allocatable :: oz_time(:) !< Time for ozone forcing data
real (kind=kind_phys), allocatable :: ozplin(:,:,:,:) !< Ozone forcing data
integer :: kozc !< File identifier for ozone climotology data
integer :: latsozc !< Number of latitudes in ozone climotology data
integer :: levozc !< Number of vertical layers in ozone climotology data
integer :: timeozc !< Number of times in ozone climotology data
real (kind=kind_phys) :: blatc !< Parameter for ozone climotology
real (kind=kind_phys) :: dphiozc !< Parameter for ozone climotology

contains
procedure :: init => control_initialize
procedure :: init_chemistry => control_chemistry_initialize
Expand Down Expand Up @@ -3563,8 +3580,6 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
logical :: do_shoc = .false. !< flag for SHOC
logical :: shocaftcnv = .false. !< flag for SHOC
logical :: shoc_cld = .false. !< flag for SHOC in grrad
logical :: oz_phys = .true. !< flag for old (2006) ozone physics
logical :: oz_phys_2015 = .false. !< flag for new (2015) ozone physics
logical :: h2o_phys = .false. !< flag for stratosphere h2o
logical :: pdfcld = .false. !< flag for pdfcld
logical :: shcnvcw = .false. !< flag for shallow convective cloud
Expand Down Expand Up @@ -3842,6 +3857,12 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
!-- Lightning threat index
logical :: lightning_threat = .false.

!--- NRL Ozone physics
logical :: oz_phys = .true. !< Flag for old (2006) ozone physics
logical :: oz_phys_2015 = .false. !< Flag for new (2015) ozone physics
integer :: kozpl = 28 !< File identifier for ozone forcing data
integer :: kozc = 48 !< File identifier for ozone climotology data

!--- aerosol scavenging factors
integer, parameter :: max_scav_factors = 183
character(len=40) :: fscav_aero(max_scav_factors)
Expand Down Expand Up @@ -4015,6 +4036,11 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
character(len=20) :: namestr
character(len=44) :: descstr

!--- ozone physics
integer :: i1, i2, i3
real(kind=4), dimension(:), allocatable :: oz_lat4, oz_pres4, oz_time4, tempin
real(kind=4) :: blatc4

! dtend selection: default is to match all variables:
dtend_select(1)='*'
do ipat=2,pat_count
Expand Down Expand Up @@ -5394,29 +5420,64 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &

ENDIF !}

! To ensure that these values match what's in the physics,
! array sizes are compared during model init in GFS_phys_time_vary_init()
!
! from module ozinterp
if (Model%ntoz>0) then
if (Model%oz_phys) then
levozp = 80
oz_coeff = 4
else if (Model%oz_phys_2015) then
levozp = 53
oz_coeff = 6
else
write(*,*) 'Logic error, ntoz>0 but no ozone physics selected'
stop
end if
!--- NRL ozone physics
if (Model%ntoz > 0) then
Comment thread
dustinswales marked this conversation as resolved.
! Get dimensions from data file
open(unit=Model%kozpl,file='global_o3prdlos.f77', form='unformatted', convert='big_endian')
Comment thread
dustinswales marked this conversation as resolved.
Outdated
read (Model%kozpl) Model%oz_coeff, Model%latsozp, Model%levozp, Model%timeoz
rewind(Model%kozpl)
if (Model%me == Model%master) then
write(*,*) 'Reading in o3data from global_o3prdlos.f77 '
write(*,*) ' oz_coeff = ', Model%oz_coeff
write(*,*) ' latsozp = ', Model%latsozp
write(*,*) ' levozp = ', Model%levozp
write(*,*) ' timeoz = ', Model%timeoz
endif
! Allocate space
allocate (Model%oz_lat(Model%latsozp))
allocate (Model%oz_pres(Model%levozp))
allocate (Model%po3(Model%levozp))
allocate (Model%oz_time(Model%timeoz+1))
allocate (Model%ozplin(Model%latsozp,Model%levozp,Model%oz_coeff,Model%timeoz))
!
allocate(oz_lat4(Model%latsozp), oz_pres4(Model%levozp), oz_time4(Model%timeoz+1))
read (Model%kozpl) Model%oz_coeff, Model%latsozp, Model%levozp, Model%timeoz, oz_lat4, oz_pres4, oz_time4

! Store
Model%oz_pres(:) = oz_pres4(:)
Model%po3(:) = log(100.0*Model%oz_pres(:)) ! from mb to ln(Pa)
Model%oz_lat(:) = oz_lat4(:)
Model%oz_time(:) = oz_time4(:)
deallocate(oz_lat4, oz_pres4, oz_time4)
!
allocate(tempin(Model%latsozp))
do i1=1,Model%timeoz
do i2=1,Model%oz_coeff
do i3=1,Model%levozp
READ(Model%kozpl) tempin
Model%ozplin(:,i3,i2,i1) = tempin(:)
enddo
enddo
enddo
deallocate(tempin)
close(Model%kozpl)
else
if (Model%oz_phys .or. Model%oz_phys_2015) then
write(*,*) 'Logic error, ozone physics are selected, but ntoz<=0'
stop
!--- Diagnostic ozone
rewind (Model%kozc)
read (Model%kozc,end=101) Model%latsozc, Model%levozc, Model%timeozc, blatc4
101 if (Model%levozc < 10 .or. Model%levozc > 100) then
rewind (Model%kozc)
Model%levozc = 17
Model%latsozc = 18
Model%blatc = -85.0
else
levozp = 1
oz_coeff = 1
end if
Model%blatc = blatc4
endif
Model%latsozp = 2
Model%levozp = 1
Model%timeoz = 1
Model%oz_coeff = 0
Model%dphiozc = -(Model%blatc+Model%blatc)/(Model%latsozc-1)
end if
Comment thread
dustinswales marked this conversation as resolved.

!--- quantities to be used to derive phy_f*d totals
Expand Down Expand Up @@ -6939,7 +7000,7 @@ subroutine tbd_create (Tbd, IM, Model)
endif

!--- ozone and stratosphere h2o needs
allocate (Tbd%ozpl (IM,levozp,oz_coeff))
allocate (Tbd%ozpl (IM,Model%levozp,Model%oz_coeff))
allocate (Tbd%h2opl (IM,levh2o,h2o_coeff))
Tbd%ozpl = clear_val
Tbd%h2opl = clear_val
Expand Down
108 changes: 106 additions & 2 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -6670,6 +6670,110 @@
units = flag
dimensions = ()
type = logical
[levozp]
standard_name = number_of_levels_in_ozone_data
Comment thread
dustinswales marked this conversation as resolved.
Outdated
long_name = number of vertical layers in ozone forcing data
units = count
dimensions = ()
type = integer
[oz_coeff]
standard_name = number_of_coefficients_in_ozone_data
long_name = number of coefficients in ozone forcing data
units = count
dimensions = ()
type = integer
[dphiozc]
standard_name = ozone_data_parameter_1
long_name = ozone data parameter 1
units = none
dimensions = ()
type = real
kind = kind_phys
[blatc]
standard_name = ozone_data_parameter_2
long_name = ozone data parameter 2
units = none
dimensions = ()
type = real
kind = kind_phys
[kozc]
standard_name = file_indicator_for_ozone_climotology_data
long_name = file indicator for ozone climotology data
units = none
dimensions = ()
type = integer
[latsozc]
standard_name = number_of_latitudes_in_ozone_climotology_data
long_name = number of latitude in ozone climotology data
units = count
dimensions = ()
type = integer
[timeozc]
standard_name = number_of_times_in_ozone_climotology_data
long_name = number of times in ozone climotology data
units = count
dimensions = ()
type = integer
[levozc]
standard_name = number_of_levels_in_ozone_climotology_data
long_name = number of vertical layers in ozone climotology data
units = count
dimensions = ()
type = integer
[kozpl]
standard_name = file_indicator_for_ozone_data
long_name = file indicator for ozone data
units = none
dimensions = ()
type = integer
[latsozp]
standard_name = number_of_latitudes_in_ozone_data
long_name = number of latitude in ozone data
units = count
dimensions = ()
type = integer
[timeoz]
standard_name = number_of_times_in_ozone_data
long_name = number of times in ozone data
units = count
dimensions = ()
type = integer
[oz_lat]
standard_name = ozone_data_latitude
long_name = ozone data latitude
units = deg
dimensions = (number_of_latitudes_in_ozone_data)
type = real
kind = kind_phys
[oz_pres]
standard_name = ozone_data_level_pressure
long_name = ozone data level pressure
units = Pa
dimensions = (number_of_levels_in_ozone_data)
type = real
kind = kind_phys
[po3]
standard_name = natural_log_of_ozone_data_pressure_levels
long_name = natural log of ozone forcing data pressure levels in Pa
units = 1
dimensions = (number_of_levels_in_ozone_data)
type = real
kind = kind_phys
active = (index_of_ozone_mixing_ratio_in_tracer_concentration_array>0)
[oz_time]
standard_name = ozone_data_time
long_name = ozone data time
units = none
dimensions = (13)
type = real
kind = kind_phys
[ozplin]
standard_name = ozone_data
long_name = ozone data
units = 1
dimensions = (number_of_latitudes_in_ozone_data,number_of_levels_in_ozone_data,number_of_coefficients_in_ozone_data,number_of_times_in_ozone_data)
type = real
kind = kind_phys
[ipt]
standard_name = index_of_horizontal_gridpoint_for_debug_output
long_name = horizontal index for point used for diagnostic printout
Expand Down Expand Up @@ -7423,7 +7527,7 @@
standard_name = ozone_forcing
long_name = ozone forcing data
units = mixed
dimensions = (horizontal_loop_extent,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data)
dimensions = (horizontal_loop_extent,number_of_levels_in_ozone_data,number_of_coefficients_in_ozone_data)
type = real
kind = kind_phys
[h2opl]
Expand Down Expand Up @@ -9629,7 +9733,7 @@
type = module
relative_path = ../physics/physics
dependencies = machine.F,physcons.F90,radlw_param.f,radsw_param.f
dependencies = GFDL_parse_tracers.F90,h2o_def.f,ozne_def.f
dependencies = GFDL_parse_tracers.F90,h2o_def.f

[ccpp-arg-table]
name = GFS_typedefs
Expand Down
1 change: 1 addition & 0 deletions ccpp/suites/suite_FV3_GFS_v16.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<scheme>GFS_rrtmg_setup</scheme>
<scheme>GFS_rad_time_vary</scheme>
<scheme>GFS_phys_time_vary</scheme>
<scheme>ozphys_time_vary</scheme>
</subcycle>
</group>
<group name="radiation">
Expand Down