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

Add soil temperature and moisture IAU #866

Merged
merged 46 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
81ae030
update driver for land IAU
tsga Sep 4, 2024
3dbcd60
merge land IAU
tsga Sep 4, 2024
2c99f59
use defaults when lnd_iau_nml doesn't exist
tsga Sep 13, 2024
88ad1b2
Merge branch 'develop' into feature/lnd_iau_gjf
grantfirl Oct 8, 2024
fed6eb8
move declaration of lnd_iau_mod DDT instances from the CCPP to the host
grantfirl Oct 9, 2024
ac4ae6c
add lnd_iau_mod.F90 as dependency for the GFS_typedefs module
grantfirl Oct 9, 2024
3523657
update ccpp/physics
grantfirl Oct 9, 2024
dc39667
Merge pull request #1 from grantfirl/feature/lnd_iau_gjf
tsga Oct 10, 2024
78716ca
update physics
tsga Oct 10, 2024
1f1a5d0
set land_iau_control from host
Oct 15, 2024
ee53b0b
Merge branch 'feature/lnd_iau' of https://github.com/tsga/fv3atm into…
Oct 15, 2024
b25b4c7
calculate snowsoil mask at runtime
Oct 16, 2024
277874b
combine DDTs holding increments; get rid of scheme level global array
Oct 16, 2024
7107960
modify subroutines set/update increments
Oct 16, 2024
83e49ec
default weight factors
Oct 17, 2024
7cac11e
update physics
tsga Oct 17, 2024
ca4d2aa
Merge branch 'feature/lnd_iau' of https://github.com/tsga/fv3atm into…
tsga Oct 17, 2024
65cc5ea
edit
Oct 17, 2024
7885255
move weight factors to _IAU_Data
Oct 17, 2024
07ce687
update physics
tsga Oct 17, 2024
763f300
Merge branch 'feature/lnd_iau' of https://github.com/tsga/fv3atm into…
tsga Oct 17, 2024
4e1170a
update noahmpdrv meta
Oct 17, 2024
de92fda
Merge branch 'feature/lnd_iau' of https://github.com/tsga/fv3atm into…
Oct 17, 2024
92e67ec
update physics
tsga Oct 17, 2024
a0d3248
Merge branch 'feature/lnd_iau' of https://github.com/tsga/fv3atm into…
tsga Oct 17, 2024
306e46c
fix time interval bounds
Oct 20, 2024
8795641
Merge branch 'feature/lnd_iau' of https://github.com/tsga/fv3atm into…
Oct 20, 2024
2b4f5a4
handle valid time range better
Oct 20, 2024
44277d9
udpate land iau
Oct 20, 2024
ae537e4
do netcdf error handling inside get_var3d_values
Oct 21, 2024
63e5917
error handling for read_iau_forcing_fv3
Oct 21, 2024
0c9180a
remove redeclared constants in _timestep_int
Oct 21, 2024
38d0110
fix compilation errors
Oct 21, 2024
41ee119
update for NoahMP component model
tsga Oct 30, 2024
a16d991
fix compile error
Oct 30, 2024
e7aaa7b
Merge branch 'feature/lnd_iau' of https://github.com/tsga/fv3atm into…
Oct 30, 2024
300cdfc
merge ccpp/physics with ufs/dev
tsga Oct 30, 2024
0527fa6
Merge branch 'develop' into feature/lnd_iau
tsga Oct 30, 2024
2573b5f
fix real type for mask in ccpp/physics lnd_iau
tsga Oct 31, 2024
e1510d2
merge ufs/dev for ccpp/physics
tsga Nov 13, 2024
f8add54
Merge branch 'develop' into feature/lnd_iau
tsga Nov 13, 2024
3c8961b
clean up comments and warning
tsga Nov 15, 2024
d2a98da
minor edit to combine use lnd_iau_mod lines
tsga Nov 15, 2024
2429d66
fix gitmodules to point to physics feature branch
jkbk2004 Nov 15, 2024
b9274c9
Update .gitmodules to point to ufs/dev
tsga Nov 18, 2024
357bd5e
update physics hash
jkbk2004 Nov 18, 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
7 changes: 7 additions & 0 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'physics/physics/Radiation/RRTMG/radlw_param.f',
'physics/physics/photochem/module_ozphys.F90',
'physics/physics/photochem/module_h2ophys.F90',
'physics/physics/SFC_Models/Land/Noahmp/lnd_iau_mod.F90',
'data/CCPP_typedefs.F90',
'data/GFS_typedefs.F90',
'data/CCPP_data.F90',
Expand Down Expand Up @@ -49,6 +50,12 @@
'module_h2ophys' : '',
'ty_h2ophys' : '',
},
'land_iau_mod' : {
'land_iau_mod' : '',
'land_iau_external_data_type' : '',
'land_iau_state_type' : '',
'land_iau_control_type' : '',
},
'CCPP_typedefs' : {
'GFS_interstitial_type' : 'GFS_Interstitial(cdata%thrd_no)',
'GFDL_interstitial_type' : 'GFDL_interstitial',
Expand Down
71 changes: 69 additions & 2 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ module GFS_typedefs
use module_radlw_parameters, only: topflw_type, sfcflw_type
use module_ozphys, only: ty_ozphys
use module_h2ophys, only: ty_h2ophys
use land_iau_mod, only: land_iau_external_data_type, land_iau_control_type, &
land_iau_state_type, land_iau_mod_set_control

implicit none

Expand Down Expand Up @@ -480,7 +482,12 @@ module GFS_typedefs

!--- For smoke and dust auxiliary inputs
real (kind=kind_phys), pointer :: fire_in (:,:) => null() !< fire auxiliary inputs


!--- Land IAU DDTs
type(land_iau_external_data_type) :: land_iau_data
type(land_iau_control_type) :: land_iau_control
type(land_iau_state_type) :: land_iau_state

contains
procedure :: create => sfcprop_create !< allocate array data
end type GFS_sfcprop_type
Expand Down Expand Up @@ -1644,6 +1651,19 @@ module GFS_typedefs
type(ty_h2ophys) :: h2ophys !< DDT with data needed by h2o photchemistry physics.
integer :: levh2o !< Number of vertical layers in stratospheric h2o data.
integer :: h2o_coeff !< Number of coefficients in stratospheric h2o data.

! !--- Land IAU
! !> land iau setting read from namelist
! logical :: do_land_iau
! real(kind=kind_phys) :: land_iau_delthrs
! character(len=240) :: land_iau_inc_files(7)
! real(kind=kind_phys) :: land_iau_fhrs(7)
! logical :: land_iau_filter_increments
! integer :: lsoil_incr
! logical :: land_iau_upd_stc
! logical :: land_iau_upd_slc
! logical :: land_iau_do_stcsmc_adjustment
! real(kind=kind_phys) :: land_iau_min_T_increment

contains
procedure :: init => control_initialize
Expand Down Expand Up @@ -2296,6 +2316,9 @@ subroutine sfcprop_create (Sfcprop, Model)
type(GFS_control_type), intent(in) :: Model
integer :: IM

character(len=512) :: errmsg
integer :: errflg

IM = Model%ncols

!--- physics and radiation
Expand Down Expand Up @@ -2864,6 +2887,20 @@ subroutine sfcprop_create (Sfcprop, Model)
Sfcprop%smoke_fire = zero
endif

! land iau control setting
call land_iau_mod_set_control(Sfcprop%land_iau_control, &
Model%fn_nml, Model%input_nml_file, Model%me, Model%master, &
Model%isc, Model%jsc, Model%nx, Model%ny, Model%tile_num, Model%nblks, Model%blksz, &
Model%lsoil, Model%lsnow_lsm, Model%dtp, Model%fhour, errmsg, errflg)

if (errflg/=0) then
if (Model%me==Model%master) then
write(0,'(a)') "Error inside sfcprop_create"
write(0,'(a)') trim(errmsg)
stop
endif
endif

end subroutine sfcprop_create


Expand Down Expand Up @@ -3987,6 +4024,18 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
real(kind=kind_phys) :: radar_tten_limits(2) = (/ limit_unspecified, limit_unspecified /)
integer :: itime

! !> land iau setting read from namelist
! logical :: do_land_iau = .false.
! real(kind=kind_phys) :: land_iau_delthrs = 0
! character(len=240) :: land_iau_inc_files(7) = ''
! real(kind=kind_phys) :: land_iau_fhrs(7) = -1
! logical :: land_iau_filter_increments = .false.
! integer :: lsoil_incr = 4
! logical :: land_iau_upd_stc = .false.
! logical :: land_iau_upd_slc = .false.
! logical :: land_iau_do_stcsmc_adjustment = .false.
! real(kind=kind_phys) :: land_iau_min_T_increment = 0.0001

!--- END NAMELIST VARIABLES

NAMELIST /gfs_physics_nml/ &
Expand Down Expand Up @@ -4143,7 +4192,13 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
! and (maybe) convection suppression
fh_dfi_radar, radar_tten_limits, do_cap_suppress, &
!--- GSL lightning threat indices
lightning_threat
lightning_threat !, &
! !--- land_iau_nml
! do_land_iau, land_iau_delthrs, land_iau_inc_files, &
! land_iau_fhrs, land_iau_filter_increments, lsoil_incr, &
! land_iau_upd_stc, land_iau_upd_slc, &
! land_iau_do_stcsmc_adjustment, land_iau_min_T_increment


!--- other parameters
integer :: nctp = 0 !< number of cloud types in CS scheme
Expand Down Expand Up @@ -6257,6 +6312,18 @@ subroutine control_initialize (Model, nlunit, fn_nml, me, master, &
endif
!--- END CODE FROM GLOOPB

! !---Land IAU Settings
! Model%do_land_iau = do_land_iau
! Model%iau_delthrs = land_iau_delthrs
! Model%iau_inc_files = land_iau_inc_files
! Model%iaufhrs = land_iau_fhrs
! Model%iau_filter_increments = land_iau_filter_increments
! Model%lsoil_incr = lsoil_incr
! Model%upd_stc = land_iau_upd_stc
! Model%upd_slc = land_iau_upd_slc
! Model%do_stcsmc_adjustment = land_iau_do_stcsmc_adjustment
! Model%min_T_increment = land_iau_min_T_increment

call Model%print ()

end subroutine control_initialize
Expand Down
20 changes: 19 additions & 1 deletion ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -2389,6 +2389,24 @@
type = real
kind = kind_phys
active = (do_fire_coupling)
[land_iau_data]
standard_name = land_data_assimilation_data
long_name = land data assimilation data
units = mixed
dimensions = ()
type = land_iau_external_data_type
[land_iau_control]
standard_name = land_data_assimilation_control
long_name = land data assimilation control
units = mixed
dimensions = ()
type = land_iau_control_type
[land_iau_state]
standard_name = land_data_assimilation_interpolated_data
long_name = land data assimilation space- and time-interpolated
units = mixed
dimensions = ()
type = land_iau_state_type

########################################################################
[ccpp-table-properties]
Expand Down Expand Up @@ -10070,7 +10088,7 @@
dependencies = hooks/machine.F,hooks/physcons.F90
dependencies = Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f
dependencies = photochem/module_ozphys.F90,photochem/module_h2ophys.F90
dependencies = MP/GFDL/GFDL_parse_tracers.F90
dependencies = SFC_Models/Land/Noahmp/lnd_iau_mod.F90,MP/GFDL/GFDL_parse_tracers.F90

[ccpp-arg-table]
name = GFS_typedefs
Expand Down
16 changes: 16 additions & 0 deletions ccpp/driver/CCPP_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ subroutine CCPP_step (step, nblks, ierr)
return
end if

! call timestep_init for "physics"---required for Land IAU
call ccpp_physics_timestep_init(cdata_domain, suite_name=trim(ccpp_suite),group_name="physics", ierr=ierr)
if (ierr/=0) then
write(0,'(a)') "An error occurred in ccpp_physics_timestep_init for group physics"
write(0,'(a)') trim(cdata_domain%errmsg)
return
end if

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! DH* 20210104 - this block of code will be removed once the CCPP framework !
! fully supports handling diagnostics through its metadata, work in progress !
Expand Down Expand Up @@ -214,6 +222,14 @@ subroutine CCPP_step (step, nblks, ierr)
return
end if

! call timestep_finalize for "physics"---required for Land IAU
call ccpp_physics_timestep_finalize(cdata_domain, suite_name=trim(ccpp_suite), group_name="physics", ierr=ierr)
if (ierr/=0) then
write(0,'(a)') "An error occurred in ccpp_physics_timestep_finalize for group physics"
write(0,'(a)') trim(cdata_domain%errmsg)
return
end if

! Physics finalize
else if (trim(step)=="physics_finalize") then

Expand Down
Loading