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

Reorganize ozone physics into CCPP phases #75

Merged
merged 119 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
7271136
Issue 886
dustinswales Aug 11, 2022
8329e07
Issue 764
dustinswales Aug 11, 2022
a282821
Issue 672
dustinswales Aug 11, 2022
7c37906
Cleanup to radiation_aerosols. Related to #923. Made changes to made …
dustinswales Aug 12, 2022
11f1ef0
Remove dependency on physcons and physparam in radiation_aerosols.f. …
dustinswales Aug 15, 2022
063e15d
bug fix in argument list.
dustinswales Aug 15, 2022
225f5b5
Remove dependency on physcons and physparam in radiation_astronomy.f.…
dustinswales Aug 15, 2022
da57e02
Replaced stop statements with ccpp error handling
dustinswales Aug 15, 2022
1dbed67
Replaced all remaing stop statements with ccpp error handling.
dustinswales Aug 16, 2022
1d907a2
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
dustinswales Aug 16, 2022
e02f1dd
Bug fix in html include location.
dustinswales Aug 16, 2022
f885b9c
Remove dependency on physcons and physparam in radiation_surface.f. …
dustinswales Aug 17, 2022
9f9ed2a
Remove dependency on physcons and physparam in radiation_gases.f. Pro…
dustinswales Aug 17, 2022
c0d2d20
Remove dependency on physparam in radlw_main/radsw_main.F90. Provided…
dustinswales Aug 18, 2022
98cf6d2
Adios physparam.f
dustinswales Aug 18, 2022
1d8998d
Revert change to CMakeLists.txt
dustinswales Aug 31, 2022
82bcd67
Omission from previous commit
dustinswales Sep 6, 2022
2f9e604
Adress reviewers comments
dustinswales Sep 7, 2022
0650bae
Fix bug in metadata.
Sep 12, 2022
2fe654e
Address reviewers comments. Bug found in seeding for cloud-sampling i…
Sep 21, 2022
3b3ecf2
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
Sep 21, 2022
51b9243
Update CODEOWNERS file
Sep 22, 2022
f5ca603
Update CODEOWNERS
Sep 22, 2022
d0e5b30
Merge pull request #19 from dustinswales/update_codeowners
Sep 22, 2022
62079c1
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
Oct 3, 2022
d0d7d50
Update CODEOWNERS
dustinswales Oct 17, 2022
297cf32
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
Oct 27, 2022
469ef08
Update CODEOWNERS
Oct 27, 2022
6d74eaf
Changes to metadata to accommodate standard_name rules.
Oct 27, 2022
e7fdd76
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
Nov 2, 2022
4900b30
Omission from previous commit.
Nov 2, 2022
c3f2d05
Merge branch 'bug/aod550' into ufs-dev-PR16
Nov 16, 2022
f21b760
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
Nov 22, 2022
786cd20
Omission from previous commit
Nov 22, 2022
fb6fdb9
Move declaration to init.
Nov 22, 2022
7a5b081
Merge pull request #9 from dustinswales/add_cnvcldcnd_mp2rad_cplng
grantfirl Nov 22, 2022
c078109
Merge branch 'main' into ufs-dev-PR16
Nov 30, 2022
ca2a3d9
Merge commit '18d3fd' into ufs-dev-PR23
Dec 2, 2022
827685f
Merge commit '9d45cd' into ufs-dev-PR25
Dec 2, 2022
86e0b79
Merge pull request #984 from grantfirl/ufs-dev-PR16
grantfirl Dec 13, 2022
cb2993e
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into ufs-…
Dec 13, 2022
fc1d621
Merge pull request #987 from dustinswales/ufs-dev-PR9
Dec 14, 2022
c0e416d
Merge branch 'main' into ufs-dev-PR23
Dec 14, 2022
05b1682
Merge pull request #988 from grantfirl/ufs-dev-PR23
grantfirl Dec 16, 2022
6a961ba
Merge branch 'main' into ufs-dev-PR25
Dec 16, 2022
b855d2b
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
Dec 19, 2022
d083f87
Bugfox in argument list
Dec 20, 2022
4fb7ef9
Merge branch 'progc_update' into ufs-dev-PR18
Dec 20, 2022
4f85dfb
Merge branch 'ufs/dev' into ufs-dev-PR27
Dec 20, 2022
abe7dd6
Merge pull request #989 from grantfirl/ufs-dev-PR25
grantfirl Dec 20, 2022
dc46ccb
Merge branch 'main' into ufs-dev-PR18
Dec 20, 2022
a0cd923
Merge pull request #991 from grantfirl/ufs-dev-PR18
grantfirl Dec 26, 2022
394cd7b
Merge branch 'main' into ufs-dev-PR27
Dec 26, 2022
0c79a08
Merge pull request #992 from grantfirl/ufs-dev-PR27
grantfirl Jan 3, 2023
b3c208f
Merge branch 'ufs/dev' into ufs-dev-PR22
Jan 3, 2023
4742757
Merge commit '431591' into ufs-dev-PR28
Jan 9, 2023
cbcf09d
Merge pull request #994 from grantfirl/ufs-dev-PR22
grantfirl Jan 17, 2023
cbcb11a
Merge branch 'main' into ufs-dev-PR28
grantfirl Jan 17, 2023
ae82e1a
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
dustinswales Jan 18, 2023
f50b0bd
Merge pull request #995 from grantfirl/ufs-dev-PR28
grantfirl Jan 23, 2023
0f687f8
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into HEAD
Jan 31, 2023
2ffa0f5
Merge pull request #34 from dustinswales/rrtmgp_refactor
ChunxiZhang-NOAA Feb 7, 2023
818298c
Merge pull request #956 from dustinswales/accumulated_cleanup
Feb 8, 2023
df852e6
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into ufs-…
Feb 8, 2023
6760693
Merge pull request #35 from ChunxiZhang-NOAA/bugfix/cloud_rad
grantfirl Jan 30, 2023
14b56d4
Merge pull request #998 from dustinswales/ufs-dev-PR35
Feb 23, 2023
06b22d9
Merge branch 'main' of https://github.com/NCAR/ccpp-physics into ufs-…
Feb 23, 2023
e167925
Merge pull request #40 from mdtoyNOAA/ufs/dev_drag_suite_intent_mods
grantfirl Feb 22, 2023
fb0a90f
Merge pull request #997 from dustinswales/ufs-dev-PR34
Mar 2, 2023
3f89866
Merge commit '336285206d19f06bde4b37a741ac9bc0e15f05e1' into main
Mar 16, 2023
2b504ec
Fix missed change in merge.
Mar 16, 2023
8bce327
Merge pull request #1004 from dustinswales/ufs-dev-PR30a
Mar 17, 2023
f02bac7
Merge remote-tracking branch 'origin/main' into ufs-dev-PR40
Mar 20, 2023
88ec3ca
Merge pull request #1002 from dustinswales/ufs-dev-PR40
Mar 27, 2023
b0ad8d8
Merge branch '20230313_combo' into ufs-dev-PR53
grantfirl Mar 31, 2023
40b582f
Merge branch 'lightning' into ufs-dev-PR42
grantfirl Mar 31, 2023
c2b0653
Merge branch 'ufs/dev-rrfs-sd' into ufs-dev-PR54
grantfirl Mar 31, 2023
1003d15
Merge pull request #1006 from grantfirl/ufs-dev-PR53
grantfirl Apr 6, 2023
fdb5b05
Merge branch 'main' into ufs-dev-PR42
grantfirl Apr 6, 2023
76df8de
Merge branch 'ufsdev_ruclsm' into ufs-dev-PR49
grantfirl Apr 7, 2023
55850de
Merge branch 'ufs/dev' into ufs-dev-PR57
grantfirl Apr 7, 2023
ce0a2cf
Merge pull request #1007 from grantfirl/ufs-dev-PR42
grantfirl Apr 12, 2023
24c1548
Merge branch 'main' into ufs-dev-PR54
grantfirl Apr 12, 2023
ec115b8
Merge pull request #1008 from grantfirl/ufs-dev-PR54
grantfirl Apr 14, 2023
aaf97e8
Merge branch 'main' into ufs-dev-PR49
grantfirl Apr 17, 2023
b7dc3ec
Merge pull request #1009 from grantfirl/ufs-dev-PR49
grantfirl Apr 18, 2023
42509d0
Merge branch 'main' into ufs-dev-PR57
grantfirl Apr 19, 2023
ae12bd5
Merge pull request #1010 from grantfirl/ufs-dev-PR57
grantfirl Apr 20, 2023
4ef1f1a
Merge branch 'unified_conv' into ufs-dev-PR56
grantfirl Apr 25, 2023
3dc962c
Merge pull request #1013 from grantfirl/ufs-dev-PR56
grantfirl May 8, 2023
4c60a2f
Reorganize NRL ozone physics scheme into CCPP phases. Make scheme (me…
May 23, 2023
07f279d
Merge remote-tracking branch 'dswales/feature_reorg_ozphys' into HEAD
May 23, 2023
70b9d7e
RRTMGP changes for refactored NRL ozone physics.
May 25, 2023
6ff8689
Revert change to CI test from NCAR->UWM merge
May 25, 2023
32dfabe
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
Jun 8, 2023
856baa6
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
Jun 12, 2023
9859339
Some changes
Jun 15, 2023
8188e26
Split ozone physics into time_vary and run components
Aug 1, 2023
a583b26
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Aug 2, 2023
0bfac2a
Some cleanup. Now working
dustinswales Aug 2, 2023
bea77c8
More reorganization.
dustinswales Aug 10, 2023
fbb4b01
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
Sep 6, 2023
2c10492
Merge branch 'feature_reorg_ozphys' of https://github.com/dustinswale…
Sep 6, 2023
26ca9f9
Renamed file
Sep 6, 2023
a110a5b
Getting real close...
Sep 27, 2023
2886df9
Small cosmetic changes
Sep 27, 2023
17b057c
Housekeeping
Sep 27, 2023
17203fe
Housekeeping
Sep 27, 2023
3f6168b
More reorg.
Sep 27, 2023
d0a4bfd
Remove ozphysics modules. Now part of ty_ozphys
Sep 27, 2023
385ef4e
Some polishing. Merge 2006 ozone into module_ozphys
Sep 28, 2023
2e65765
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Sep 28, 2023
00d9060
Added documentation
dustinswales Sep 28, 2023
1b22397
Some more cleanup
dustinswales Oct 12, 2023
c65ee9e
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Oct 12, 2023
06bb2bc
Final cleanup
dustinswales Oct 12, 2023
89af3d8
Omission from previous commit
dustinswales Oct 12, 2023
72bd9bc
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Oct 27, 2023
32cf7ba
Reverted standard_name change
dustinswales Oct 27, 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
108 changes: 57 additions & 51 deletions physics/GFS_phys_time_vary.fv3.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
!! Contains code related to GFS physics suite setup (physics part of time_vary_step)

!>\defgroup mod_GFS_phys_time_vary GFS Physics Time Update
!! This module contains GFS physics time vary subroutines including ozone, stratospheric water vapor,
!! This module contains GFS physics time vary subroutines including stratospheric water vapor,
!! aerosol, IN&CCN and surface properties updates.
module GFS_phys_time_vary

#ifdef _OPENMP
use omp_lib
#endif

use machine, only : kind_phys
use machine, only : kind_phys, kind_dbl_prec, kind_sngl_prec

use mersenne_twister, only: random_setseed, random_number

use ozne_def, only : levozp, oz_coeff, oz_lat, oz_pres, oz_time, ozplin
use ozinterp, only : read_o3data, setindxoz, ozinterpol
use module_ozphys, only: ty_ozphys

use h2o_def, only : levh2o, h2o_coeff, h2o_lat, h2o_pres, h2o_time, h2oplin
use h2ointerp, only : read_h2odata, setindxh2o, h2ointerpol
Expand Down Expand Up @@ -85,7 +84,7 @@ end subroutine copy_error
subroutine GFS_phys_time_vary_init ( &
me, master, ntoz, h2o_phys, iaerclm, iccn, iaermdl, iflip, im, levs, &
nx, ny, idate, xlat_d, xlon_d, &
jindx1_o3, jindx2_o3, ddy_o3, ozpl, jindx1_h, jindx2_h, ddy_h, h2opl,fhour, &
jindx1_o3, jindx2_o3, ddy_o3, jindx1_h, jindx2_h, ddy_h, h2opl,fhour, &
jindx1_aer, jindx2_aer, ddy_aer, iindx1_aer, iindx2_aer, ddx_aer, aer_nm, &
jindx1_ci, jindx2_ci, ddy_ci, iindx1_ci, iindx2_ci, ddx_ci, imap, jmap, &
do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, &
Expand All @@ -98,7 +97,7 @@ subroutine GFS_phys_time_vary_init (
smcwtdxy, deeprechxy, rechxy, snowxy, snicexy, snliqxy, tsnoxy , smoiseq, zsnsoxy, &
slc, smc, stc, tsfcl, snowd, canopy, tg3, stype, con_t0c, lsm_cold_start, nthrds, &
lkm, use_lake_model, lakefrac, lakedepth, iopt_lake, iopt_lake_clm, iopt_lake_flake, &
lakefrac_threshold, lakedepth_threshold, errmsg, errflg)
lakefrac_threshold, lakedepth_threshold, ozphys, errmsg, errflg)

implicit none

Expand All @@ -115,7 +114,8 @@ subroutine GFS_phys_time_vary_init (

integer, intent(inout) :: jindx1_o3(:), jindx2_o3(:), jindx1_h(:), jindx2_h(:)
real(kind_phys), intent(inout) :: ddy_o3(:), ddy_h(:)
real(kind_phys), intent(in) :: ozpl(:,:,:), h2opl(:,:,:)
real(kind_phys), intent(in) :: h2opl(:,:,:)

integer, intent(inout) :: jindx1_aer(:), jindx2_aer(:), iindx1_aer(:), iindx2_aer(:)
real(kind_phys), intent(inout) :: ddy_aer(:), ddx_aer(:)
real(kind_phys), intent(out) :: aer_nm(:,:,:)
Expand All @@ -132,6 +132,7 @@ subroutine GFS_phys_time_vary_init (
real(kind_phys), intent(in) :: min_seaice, fice(:)
real(kind_phys), intent(in) :: landfrac(:)
real(kind_phys), intent(inout) :: weasd(:)
type(ty_ozphys), intent(in) :: ozphys

! NoahMP - only allocated when NoahMP is used
integer, intent(in) :: lsoil, lsnow_lsm_lbound, lsnow_lsm_ubound
Expand Down Expand Up @@ -224,7 +225,6 @@ subroutine GFS_phys_time_vary_init (
!$OMP parallel num_threads(nthrds) default(none) &
!$OMP shared (me,master,ntoz,h2o_phys,im,nx,ny,levs,idate) &
!$OMP shared (xlat_d,xlon_d,imap,jmap,errmsg,errflg) &
!$OMP shared (levozp,oz_coeff,oz_pres,ozpl) &
!$OMP shared (levh2o,h2o_coeff,h2o_pres,h2opl) &
!$OMP shared (iamin, iamax, jamin, jamax, lsm_noahmp) &
!$OMP shared (iaerclm,iaermdl,ntrcaer,aer_nm,iflip,iccn) &
Expand All @@ -234,41 +234,18 @@ subroutine GFS_phys_time_vary_init (
!$OMP shared (do_ugwp_v1,jindx1_tau,jindx2_tau,ddy_j1tau,ddy_j2tau) &
!$OMP shared (isot,ivegsrc,nlunit,sncovr,sncovr_ice,lsm,lsm_ruc) &
!$OMP shared (min_seaice,fice,landfrac,vtype,weasd,snupx,salp_data) &
!$OMP shared (ozphys) &
!$OMP private (ix,i,j,rsnow,vegtyp,myerrmsg,myerrflg)

!$OMP sections

!$OMP section
!> - Call read_o3data() to read ozone data
need_o3data: if(ntoz > 0) then
call read_o3data (ntoz, me, master)

! Consistency check that the hardcoded values for levozp and
! oz_coeff in GFS_typedefs.F90 match what is set by read_o3data
! in GFS_typedefs.F90: allocate (Tbd%ozpl (IM,levozp,oz_coeff))
if (size(ozpl, dim=2).ne.levozp) then
myerrflg = 1
write(myerrmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
"levozp from read_o3data does not match value in GFS_typedefs.F90: ", &
levozp, " /= ", size(ozpl, dim=2)
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
end if
if (size(ozpl, dim=3).ne.oz_coeff) then
myerrflg = 1
write(myerrmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
"oz_coeff from read_o3data does not match value in GFS_typedefs.F90: ", &
oz_coeff, " /= ", size(ozpl, dim=3)
call copy_error(myerrmsg, myerrflg, errmsg, errflg)
end if
endif need_o3data

!$OMP section
!> - Call read_h2odata() to read stratospheric water vapor data
need_h2odata: if(h2o_phys) then
call read_h2odata (h2o_phys, me, master)

! Consistency check that the hardcoded values for levh2o and
! h2o_coeff in GFS_typedefs.F90 match what is set by read_o3data
! h2o_coeff in GFS_typedefs.F90 match what is set by read_h2odata
! in GFS_typedefs.F90: allocate (Tbd%h2opl (IM,levh2o,h2o_coeff))
if (size(h2opl, dim=2).ne.levh2o) then
write(myerrmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
Expand Down Expand Up @@ -348,9 +325,9 @@ subroutine GFS_phys_time_vary_init (
!$OMP sections

!$OMP section
!> - Call setindxoz() to initialize ozone data
!> - Setup spatial interpolation indices for ozone physics.
if (ntoz > 0) then
call setindxoz (im, xlat_d, jindx1_o3, jindx2_o3, ddy_o3)
call ozphys%setup_o3prog(xlat_d, jindx1_o3, jindx2_o3, ddy_o3)
endif

!$OMP section
Expand Down Expand Up @@ -794,7 +771,7 @@ subroutine GFS_phys_time_vary_timestep_init (
lakefrac, min_seaice, min_lakeice, smc, slc, stc, smois, sh2o, tslb, tiice, tg3, tref, &
tsfc, tsfco, tisfc, hice, fice, facsf, facwf, alvsf, alvwf, alnsf, alnwf, zorli, zorll, &
zorlo, weasd, slope, snoalb, canopy, vfrac, vtype, stype,scolor, shdmin, shdmax, snowd, &
cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, landfrac, &
cv, cvb, cvt, oro, oro_uf, xlat_d, xlon_d, slmsk, landfrac, ozphys, &
do_ugwp_v1, jindx1_tau, jindx2_tau, ddy_j1tau, ddy_j2tau, tau_amf, errmsg, errflg)

implicit none
Expand Down Expand Up @@ -824,6 +801,7 @@ subroutine GFS_phys_time_vary_timestep_init (
integer, intent(in) :: jindx1_tau(:), jindx2_tau(:)
real(kind_phys), intent(in) :: ddy_j1tau(:), ddy_j2tau(:)
real(kind_phys), intent(inout) :: tau_amf(:)
type(ty_ozphys), intent(in) :: ozphys

! For gcycle only
integer, intent(in) :: nthrds, nx, ny, nsst, tile_num, nlunit, lsoil
Expand All @@ -846,10 +824,13 @@ subroutine GFS_phys_time_vary_timestep_init (
integer, intent(out) :: errflg

! Local variables
integer :: i, j, k, iseed, iskip, ix
real(kind=kind_phys) :: wrk(1)
real(kind=kind_phys) :: rannie(cny)
real(kind=kind_phys) :: rndval(cnx*cny*nrcm)
integer :: i, j, k, iseed, iskip, ix, idat(8), jdat(8), iday, j1, j2, nc, n1, n2, jdow, &
jdoy, jday, w3kindreal, w3kindint
real(kind_phys) :: wrk(1), tem, tx1, tx2, rjday
real(kind_phys) :: rannie(cny)
real(kind_phys) :: rndval(cnx*cny*nrcm)
real(kind_dbl_prec) :: rinc(5)
real(kind_sngl_prec) :: rinc4(5)

! Initialize CCPP error handling variables
errmsg = ''
Expand All @@ -869,7 +850,8 @@ subroutine GFS_phys_time_vary_timestep_init (
!$OMP shared(ozpl,ddy_o3,h2o_phys,jindx1_h,jindx2_h,h2opl,ddy_h,iaerclm,master) &
!$OMP shared(levs,prsl,iccn,jindx1_ci,jindx2_ci,ddy_ci,iindx1_ci,iindx2_ci) &
!$OMP shared(ddx_ci,in_nm,ccn_nm,do_ugwp_v1,jindx1_tau,jindx2_tau,ddy_j1tau) &
!$OMP shared(ddy_j2tau,tau_amf,iflip) &
!$OMP shared(ddy_j2tau,tau_amf,iflip,ozphys,rjday,n1,n2,idat,jdat,rinc,rinc4) &
!$OMP shared(w3kindreal,w3kindint,jdow,jdoy,jday) &
!$OMP private(iseed,iskip,i,j,k)

!$OMP sections
Expand Down Expand Up @@ -920,11 +902,41 @@ subroutine GFS_phys_time_vary_timestep_init (
endif ! imfdeepcnv, cal_re, random_clds

!$OMP section
!> - Call ozinterpol() to make ozone interpolation
!> - Compute temporal interpolation indices for updating gas concentrations.
idat=0
idat(1)=idate(4)
idat(2)=idate(2)
idat(3)=idate(3)
idat(5)=idate(1)
rinc=0.
rinc(2)=fhour
call w3kind(w3kindreal,w3kindint)
if(w3kindreal==4) then
rinc4=rinc
CALL w3movdat(rinc4,idat,jdat)
else
CALL w3movdat(rinc,idat,jdat)
endif
jdow = 0
jdoy = 0
jday = 0
call w3doxdat(jdat,jdow,jdoy,jday)
rjday = jdoy + jdat(5) / 24.
if (rjday < ozphys%time(1)) rjday = rjday + 365.

n2 = ozphys%ntime + 1
do j=2,ozphys%ntime
if (rjday < ozphys%time(j)) then
n2 = j
exit
endif
enddo
n1 = n2 - 1
if (n2 > ozphys%ntime) n2 = n2 - ozphys%ntime

!> - Update ozone concentration.
if (ntoz > 0) then
call ozinterpol (me, im, idate, fhour, &
jindx1_o3, jindx2_o3, &
ozpl, ddy_o3)
call ozphys%update_o3prog(jindx1_o3, jindx2_o3, ddy_o3, rjday, n1, n2, ozpl)
endif

!$OMP section
Expand Down Expand Up @@ -1024,12 +1036,6 @@ subroutine GFS_phys_time_vary_finalize(errmsg, errflg)

if (.not.is_initialized) return

! Deallocate ozone arrays
if (allocated(oz_lat) ) deallocate(oz_lat)
if (allocated(oz_pres) ) deallocate(oz_pres)
if (allocated(oz_time) ) deallocate(oz_time)
if (allocated(ozplin) ) deallocate(ozplin)

! Deallocate h2o arrays
if (allocated(h2o_lat) ) deallocate(h2o_lat)
if (allocated(h2o_pres)) deallocate(h2o_pres)
Expand Down
26 changes: 16 additions & 10 deletions physics/GFS_phys_time_vary.fv3.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = GFS_phys_time_vary
type = scheme
dependencies = aerclm_def.F,aerinterp.F90,gcycle.F90,h2o_def.f,h2ointerp.f90,iccn_def.F,iccninterp.F90,machine.F,mersenne_twister.f
dependencies = namelist_soilveg.f,set_soilveg.f,ozinterp.f90,ozne_def.f,sfcsub.F,cires_tauamf_data.F90,noahmp_tables.f90
dependencies = namelist_soilveg.f,set_soilveg.f,sfcsub.F,cires_tauamf_data.F90,noahmp_tables.f90,module_ozphys.F90

########################################################################
[ccpp-arg-table]
Expand Down Expand Up @@ -138,14 +138,6 @@
type = real
kind = kind_phys
intent = inout
[ozpl]
standard_name = ozone_forcing
long_name = ozone forcing data
units = mixed
dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data)
type = real
kind = kind_phys
intent = in
[jindx1_h]
standard_name = lower_latitude_index_of_stratospheric_water_vapor_forcing_for_interpolation
long_name = interpolation low index for stratospheric water vapor
Expand Down Expand Up @@ -969,6 +961,13 @@
type = real
kind = kind_phys
intent = in
[ozphys]
standard_name = dataset_for_ozone_physics
long_name = dataset for NRL ozone physics
units = mixed
dimensions = ()
type = ty_ozphys
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down Expand Up @@ -1206,7 +1205,7 @@
standard_name = ozone_forcing
long_name = ozone forcing data
units = mixed
dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_forcing_data)
dimensions = (horizontal_dimension,vertical_dimension_of_ozone_forcing_data,number_of_coefficients_in_ozone_data)
type = real
kind = kind_phys
intent = inout
Expand Down Expand Up @@ -1942,6 +1941,13 @@
type = real
kind = kind_phys
intent = inout
[ozphys]
standard_name = dataset_for_ozone_physics
long_name = dataset for NRL ozone physics
units = mixed
dimensions = ()
type = ty_ozphys
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
Loading
Loading