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

UFS-dev PR#223 #1095

Merged
merged 28 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ce7fde9
Update physics/Interstitials/UFS_SCM_NEPTUNE/GFS_debug.* to use chunk…
climbfuji Feb 27, 2024
547b739
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
climbfuji Mar 6, 2024
084b702
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
climbfuji Apr 10, 2024
53a98be
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
climbfuji May 13, 2024
6f6175a
Update MPI communicator in GFS_debug.F90
climbfuji May 13, 2024
e176e67
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
climbfuji May 22, 2024
4ed1b4f
Bug fixes in Thompson MP and CLM Lake found by Dusan
climbfuji Jun 3, 2024
ddbd127
Refactor h2o photochemistry scheme following the ozone photochemistry…
dustinswales Jun 12, 2024
cf89e99
Bug fix
dustinswales Jun 12, 2024
afa2bc0
Use assumed-size arrays in lakeini routine in physics/SFC_Models/Lake…
climbfuji Jun 13, 2024
a446fec
Some bugfixes
dustinswales Jun 13, 2024
99c02ef
Now B4B Identical
dustinswales Jun 14, 2024
de95e37
Output tendency_of_vertically_diffused_tracer_concentration from MYNN…
lisa-bengtsson Jun 26, 2024
c866747
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
climbfuji Jul 12, 2024
80bade7
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
lisa-bengtsson Jul 15, 2024
3395bba
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
dustinswales Jul 15, 2024
420317e
Address reviewers comments
dustinswales Jul 15, 2024
2a50ccc
Merge pull request #219 from HelinWei-NOAA/land_upgrade_hr4
grantfirl Jul 23, 2024
9e736da
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
climbfuji Jul 24, 2024
97f1b64
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
lisa-bengtsson Aug 7, 2024
1d9b076
Merge pull request #183 from climbfuji/feature/gfs_debug_update
grantfirl Aug 8, 2024
d45ce2f
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physi…
lisa-bengtsson Aug 22, 2024
8a3d61f
Merge branch 'ufs/dev' into combo_213_218
grantfirl Aug 22, 2024
8485c1d
Merge branch 'myc3' into combo_213_218
grantfirl Aug 22, 2024
cde7c10
add missing dimensions attribute for initialized flag
grantfirl Aug 23, 2024
fbb1515
Merge branch 'combo_213_218' into ufs-dev-PR223
grantfirl Oct 17, 2024
69aacf5
fix typo in GFS_phys_time_vary.scm.F90
grantfirl Oct 17, 2024
cbe4ce7
Merge branch 'main' into ufs-dev-PR223
grantfirl Oct 22, 2024
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: 1 addition & 3 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ physics/SFC_Models/SeaIce/CICE/sfc_cice.* @wd
physics/SFC_Models/SeaIce/CICE/sfc_sice.* @wd20xw @grantfirl @Qingfu-Liu @dustinswales
physics/hooks/machine.* @grantfirl @Qingfu-Liu @dustinswales
physics/hooks/physcons.F90 @grantfirl @Qingfu-Liu @dustinswales
physics/photochem/h2o_def.* @grantfirl @Qingfu-Liu @dustinswales
physics/photochem/h2ointerp.f90 @grantfirl @Qingfu-Liu @dustinswales
physics/photochem/h2ophys.* @Qingfu-Liu @grantfirl @Qingfu-Liu @dustinswales
physics/photochem/module_h2ophys.* @Qingfu-Liu @grantfirl @Qingfu-Liu @dustinswales
physics/photochem/module_ozphys.* @dustinswales @grantfirl @Qingfu-Liu @dustinswales
physics/smoke_dust/* @haiqinli @grantfirl @Qingfu-Liu @dustinswales
physics/tools/funcphys.f90 @grantfirl @Qingfu-Liu @dustinswales
Expand Down
110 changes: 110 additions & 0 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_photochemistry.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
! #########################################################################################
!> \file GFS_photochemistry.f90
!!
! #########################################################################################
module GFS_photochemistry
use machine, only: kind_phys
use module_ozphys, only: ty_ozphys
use module_h2ophys, only: ty_h2ophys
implicit none
contains

! #########################################################################################
!> \section arg_table_GFS_photochemistry_init Argument Table
!! \htmlinclude GFS_photochemistry_init.html
!!
! #########################################################################################
subroutine GFS_photochemistry_init(oz_phys_2006, oz_phys_2015, h2o_phys, errmsg, errflg)
logical, intent(in) :: &
oz_phys_2015, & ! Do ozone photochemistry? (2015)
oz_phys_2006, & ! Do ozone photochemistry? (2006)
h2o_phys ! Do stratospheric h2o photochemistry?
character(len=*), intent(out) :: &
errmsg ! CCPP Error message.
integer, intent(out) :: &
errflg ! CCPP Error flag.

! Initialize CCPP error handling variables
errmsg = ''
errflg = 0

! If no photchemical scheme is on, but SDF has this module, report an error?
if ((.not. oz_phys_2006) .and. (.not. oz_phys_2015) .and. (.not. h2o_phys)) then
write (errmsg,'(*(a))') 'Logic error: One of [oz_phys_2006, oz_phys_2015, or h2o_phys] must == .true. '
errflg = 1
return
endif

! Only one ozone scheme can be on. Otherwise, return and report error.
if (oz_phys_2006 .and. oz_phys_2015) then
write (errmsg,'(*(a))') 'Logic error: Only one ozone scheme can be enabled at a time'
errflg = 1
return
endif

end subroutine GFS_photochemistry_init

! #########################################################################################
!> \section arg_table_GFS_photochemistry_run Argument Table
!! \htmlinclude GFS_photochemistry_run.html
!!
! #########################################################################################
subroutine GFS_photochemistry_run (dtp, ozphys, oz_phys_2015, oz_phys_2006, con_1ovg, &
prsl, dp, ozpl, h2o_phys, h2ophys, h2opl, h2o0, oz0, gt0, do3_dt_prd, do3_dt_ozmx, &
do3_dt_temp, do3_dt_ohoz, errmsg, errflg)

! Inputs
real(kind=kind_phys), intent(in) :: &
dtp, & ! Model timestep
con_1ovg ! Physical constant (1./gravity)
real(kind=kind_phys), intent(in), dimension(:,:) :: &
prsl, & ! Air pressure (Pa)
dp, & ! Pressure thickness (Pa)
gt0 ! Air temperature (K)
real(kind=kind_phys), intent(in), dimension(:,:,:) :: &
ozpl, & ! Ozone data for current model timestep.
h2opl ! h2o data for curent model timestep.
logical, intent(in) :: &
oz_phys_2015, & ! Do ozone photochemistry? (2015)
oz_phys_2006, & ! Do ozone photochemistry? (2006)
h2o_phys ! Do stratospheric h2o photochemistry?
type(ty_ozphys), intent(in) :: &
ozphys ! DDT with ozone photochemistry scheme/data.
type(ty_h2ophys), intent(in) :: &
h2ophys ! DDT with h2o photochemistry scheme/data.

! Outputs (optional)
real(kind=kind_phys), intent(inout), dimension(:,:), optional :: &
do3_dt_prd, & ! Physics tendency: production and loss effect
do3_dt_ozmx, & ! Physics tendency: ozone mixing ratio effect
do3_dt_temp, & ! Physics tendency: temperature effect
do3_dt_ohoz ! Physics tendency: overhead ozone effect

! Outputs
real(kind=kind_phys), intent(inout), dimension(:,:) :: &
oz0, & ! Update ozone concentration.
h2o0 ! Updated h2o concentration.
character(len=*), intent(out) :: &
errmsg ! CCPP Error message.
integer, intent(out) :: &
errflg ! CCPP Error flag.

! Initialize CCPP error handling variables
errmsg = ''
errflg = 0

if (oz_phys_2015) then
call ozphys%run_o3prog_2015(con_1ovg, dtp, prsl, gt0, dp, ozpl, oz0, do3_dt_prd, &
do3_dt_ozmx, do3_dt_temp, do3_dt_ohoz)
endif
if (oz_phys_2006) then
call ozphys%run_o3prog_2006(con_1ovg, dtp, prsl, gt0, dp, ozpl, oz0, do3_dt_prd, &
do3_dt_ozmx, do3_dt_temp, do3_dt_ohoz)
endif
if (h2o_phys) then
call h2ophys%run(dtp, prsl, h2opl, h2o0)
endif

end subroutine GFS_photochemistry_run

end module GFS_photochemistry
211 changes: 211 additions & 0 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_photochemistry.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
########################################################################
[ccpp-table-properties]
name = GFS_photochemistry
type = scheme
dependencies = ../../hooks/machine.F,../../photochem/module_ozphys.F90
dependencies = ../../photochem/module_h2ophys.F90

########################################################################
[ccpp-arg-table]
name = GFS_photochemistry_init
type = scheme
[oz_phys_2006]
standard_name = flag_for_nrl_2006_ozone_scheme
long_name = flag for new (2006) ozone physics
units = flag
dimensions = ()
type = logical
intent = in
[oz_phys_2015]
standard_name = flag_for_nrl_2015_ozone_scheme
long_name = flag for new (2015) ozone physics
units = flag
dimensions = ()
type = logical
intent = in
[h2o_phys]
standard_name = flag_for_stratospheric_water_vapor_physics
long_name = flag for stratospheric water vapor physics
units = flag
dimensions = ()
type = logical
intent = in
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
units = none
dimensions = ()
type = character
kind = len=*
intent = out
[errflg]
standard_name = ccpp_error_code
long_name = error code for error handling in CCPP
units = 1
dimensions = ()
type = integer
intent = out

########################################################################
[ccpp-arg-table]
name = GFS_photochemistry_run
type = scheme
[dtp]
standard_name = timestep_for_physics
long_name = physics timestep
units = s
dimensions = ()
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
[oz_phys_2015]
standard_name = flag_for_nrl_2015_ozone_scheme
long_name = flag for new (2015) ozone physics
units = flag
dimensions = ()
type = logical
intent = in
[oz_phys_2006]
standard_name = flag_for_nrl_2006_ozone_scheme
long_name = flag for new (2006) ozone physics
units = flag
dimensions = ()
type = logical
intent = in
[con_1ovg]
standard_name = one_divided_by_the_gravitational_acceleration
long_name = inverse of gravitational acceleration
units = s2 m-1
dimensions = ()
type = real
kind = kind_phys
intent = in
[prsl]
standard_name = air_pressure
long_name = mid-layer pressure
units = Pa
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
[dp]
standard_name = air_pressure_difference_between_midlayers
long_name = difference between mid-layer pressures
units = Pa
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
[ozpl]
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_data)
type = real
kind = kind_phys
intent = in
[h2o_phys]
standard_name = flag_for_stratospheric_water_vapor_physics
long_name = flag for stratospheric water vapor physics
units = flag
dimensions = ()
type = logical
intent = in
[h2ophys]
standard_name = dataset_for_h2o_photochemistry_physics
long_name = dataset for NRL h2o photochemistry physics
units = mixed
dimensions = ()
type = ty_h2ophys
intent = in
[h2opl]
standard_name = stratospheric_water_vapor_forcing
long_name = water forcing data
units = mixed
dimensions = (horizontal_loop_extent,vertical_dimension_of_h2o_forcing_data,number_of_coefficients_in_h2o_forcing_data)
type = real
kind = kind_phys
intent = in
[h2o0]
standard_name = specific_humidity_of_new_state
long_name = water vapor specific humidity updated by physics
units = kg kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = inout
[oz0]
standard_name = ozone_concentration_of_new_state
long_name = ozone concentration updated by physics
units = kg kg-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = inout
[gt0]
standard_name = air_temperature_of_new_state
long_name = temperature updated by physics
units = K
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = in
[do3_dt_prd]
standard_name = ozone_tendency_due_to_production_and_loss_rate
long_name = ozone tendency due to production and loss rate
units = kg kg-1 s-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = inout
optional = True
[do3_dt_ozmx]
standard_name = ozone_tendency_due_to_ozone_mixing_ratio
long_name = ozone tendency due to ozone mixing ratio
units = kg kg-1 s-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = inout
optional = True
[do3_dt_temp]
standard_name = ozone_tendency_due_to_temperature
long_name = ozone tendency due to temperature
units = kg kg-1 s-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = inout
optional = True
[do3_dt_ohoz]
standard_name = ozone_tendency_due_to_overhead_ozone_column
long_name = ozone tendency due to overhead ozone column
units = kg kg-1 s-1
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
type = real
kind = kind_phys
intent = inout
optional = True
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
units = none
dimensions = ()
type = character
kind = len=*
intent = out
[errflg]
standard_name = ccpp_error_code
long_name = error code for error handling in CCPP
units = 1
dimensions = ()
type = integer
intent = out

Loading
Loading