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

Physics separator merge: Step5 #27

Merged
merged 52 commits into from
Dec 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
806dce8
added table for moninedmf_run; added init and finalize routines
grantfirl Sep 21, 2017
510c88d
added module and changed names from moninedmf to edmf for simplicity
grantfirl Sep 21, 2017
aeabd10
fixed subroutine name for arg_table declaration
grantfirl Sep 21, 2017
10b460a
changed GFS_physics_driver.F90 to use the edmf module and changed the…
grantfirl Sep 25, 2017
1c3829e
added edmf_ prefix to other subs in moninedmf.f; changed actual argum…
grantfirl Sep 26, 2017
43c5943
fixed line continuation character in moninedmf.f
grantfirl Sep 26, 2017
ec3938d
argument table fixes
grantfirl Oct 4, 2017
d8eb319
more changes to argument table
grantfirl Oct 4, 2017
b5be301
changes to edmf_run argument table
grantfirl Oct 5, 2017
fbc1e24
merged in doxygen comments
grantfirl Oct 9, 2017
8ecb30f
Merge branch 'master' into EDMF_table
grantfirl Oct 10, 2017
079668a
added GFS generic PBL interstitial code
grantfirl Oct 31, 2017
b2e3075
saving changes due to GFS_PBL_generic interstitial
grantfirl Nov 3, 2017
41fd8e8
longname changes
grantfirl Nov 13, 2017
693b446
changed GFS_physics_driver.F90 for module changes in GFS_PBL_generic.f90
grantfirl Nov 13, 2017
96e2adb
fixing compilation errors in GFS_PBL_generic.f90
grantfirl Nov 13, 2017
6ac3349
fixing compilation errors in GFS_PBL_generic.f90
grantfirl Nov 14, 2017
0ee96b8
put tridiagonal solver subroutines in their own file, tridi.f; modifi…
grantfirl Nov 14, 2017
c893141
fixing columns in tridi.f for compilation
grantfirl Nov 14, 2017
4c72006
fixed column in tridi.f
grantfirl Nov 14, 2017
e729c23
longname fix in moninedmf.f
grantfirl Nov 15, 2017
2ef4c22
Added code necessary for the generic deep convection interstitial sch…
grantfirl Nov 15, 2017
215e397
typo fixes to GFS_DCNV_generic.f90 found when compiling
grantfirl Nov 15, 2017
e029001
fixed typo in GFS_physics_driver.F90 found when compiling
grantfirl Nov 15, 2017
d7e16ba
found some more lines in GFS_physics_driver.F90 that belong in DCNV_g…
grantfirl Nov 15, 2017
67f98a3
propogated change from dudt, dvdt, dtdt, dqdt to initial_u, ... after…
grantfirl Nov 15, 2017
c743938
added GFS_tbd_type in use statement
grantfirl Nov 15, 2017
97ec943
added Tbd to call to GFS_DCNV_generic_post_run in GFS_physics_driver.F90
grantfirl Nov 15, 2017
fd942ac
fixed call to GFS_DCNV_generic_post_run again
grantfirl Nov 15, 2017
beba967
added first GFS_suite_interstitial subroutine (not compiled yet)
grantfirl Nov 16, 2017
5d2eec2
added use statement for kind_phys
grantfirl Nov 16, 2017
6d3d47d
table updates
grantfirl Nov 16, 2017
c618a99
changes to longname table in DCNV_generic and start on GFS_suite_inte…
grantfirl Nov 17, 2017
e1b121f
GFS_suite_interstitial_2 ready to compile/test
grantfirl Nov 17, 2017
f30d707
fixed typo in GFS_suite_interstitial.f90
grantfirl Nov 17, 2017
6b377a7
commit of uncompiled/untested GFS_suite_interstitial_3
grantfirl Nov 17, 2017
da92239
added use GFS_suite_interstitial_3 to driver
grantfirl Nov 17, 2017
f43067f
added GFS_suite_update_stateout
grantfirl Nov 17, 2017
8f02530
table for GFS_suite_update_stateout
grantfirl Nov 17, 2017
8d64353
added GFS_suite_interstitial_4
grantfirl Nov 17, 2017
d3cd2b1
table for GFS_suite_interstitial_4
grantfirl Nov 17, 2017
228216e
added GFS_suite_interstitial_5
grantfirl Nov 18, 2017
26d5f26
fixed end module statement
grantfirl Nov 18, 2017
51560a1
added allocatable to arrays in deallocation subroutine
grantfirl Nov 18, 2017
e02e98a
longname updates
grantfirl Nov 18, 2017
36ef5b4
longname table updates
grantfirl Nov 18, 2017
5bfc305
Merge branch 'master' into EDMF_table
grantfirl Nov 29, 2017
2cd977d
added GFS_SCNV_generic_pre,post
grantfirl Nov 29, 2017
4172e15
fixed some standard name conflicts in GFS_SCNV_generic
grantfirl Dec 4, 2017
7d74d98
fixed rank error for xmu in moninedmf.f
grantfirl Dec 7, 2017
27c664a
Merge branch 'EDMF_table' of https://github.com/grantfirl/gmtb-gfsphy…
llpcarson Dec 18, 2017
fe088b1
Add the end-subroutine stmt
llpcarson Dec 18, 2017
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
500 changes: 258 additions & 242 deletions GFS_layer/GFS_physics_driver.F90

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ SRCS_f = \
./physics/shalcv_fixdp.f \
./physics/shalcv_opr.f \
./physics/tracer_const_h.f \
./physics/tridi.f \
./physics/tridi2t3.f

SRCS_f90 = \
Expand All @@ -123,6 +124,10 @@ SRCS_f90 = \
./physics/gcm_shoc.f90 \
./physics/gcycle.f90 \
./physics/get_prs_fv3.f90 \
./physics/GFS_DCNV_generic.f90 \
./physics/GFS_SCNV_generic.f90 \
./physics/GFS_PBL_generic.f90 \
./physics/GFS_suite_interstitial.f90 \
./physics/h2ointerp.f90 \
./physics/m_micro_driver.f90 \
./physics/module_nst_model.f90 \
Expand Down Expand Up @@ -192,4 +197,3 @@ include ./depend
ifneq (clean,$(findstring clean,$(MAKECMDGOALS)))
-include depend
endif

135 changes: 135 additions & 0 deletions physics/GFS_DCNV_generic.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
!> \file GFS_DCNV_generic.f90
!! Contains code related to deep convective schemes to be used within the GFS physics suite.

module GFS_DCNV_generic_pre

contains

subroutine GFS_DCNV_generic_pre_init ()
end subroutine GFS_DCNV_generic_pre_init

subroutine GFS_DCNV_generic_pre_finalize()
end subroutine GFS_DCNV_generic_pre_finalize

!> \section arg_table_GFS_DCNV_generic_pre_run Argument Table
!! | local var name | longname | description | units | rank | type | kind | intent | optional |
!! |----------------|--------------------------------------------------------|-----------------------------------------------------------------------|---------------|------|-------------------------------|-----------|--------|----------|
!! | Model | FV3-GFS_Control_type | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_typedefs%GFS_control_type | | in | F |
!! | Stateout | FV3-GFS_Stateout_type | Fortran DDT containing FV3-GFS prognostic state to return to dycore | DDT | 0 | GFS_typedefs%GFS_stateout_type| | in | F |
!! | Grid | FV3-GFS_Grid_type | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_typedefs%GFS_grid_type | | in | F |
!! | initial_u | x_wind_initial | x-wind before entering a physics scheme | m s-1 | 2 | real | kind_phys | inout | F |
!! | initial_v | y_wind_initial | y-wind before entering a physics scheme | m s-1 | 2 | real | kind_phys | inout | F |
!! | initial_t | air_temperature_initial | air temperature before entering a physics scheme | K | 2 | real | kind_phys | inout | F |
!! | initial_qv | water_vapor_specific_humidity_initial | water vapor specific humidity before entering a physics scheme | kg kg-1 | 2 | real | kind_phys | inout | F |
!!
subroutine GFS_DCNV_generic_pre_run (Model, Stateout, Grid, initial_u, initial_v, initial_t, initial_qv)
use machine, only: kind_phys
use GFS_typedefs, only: GFS_control_type, GFS_stateout_type, GFS_grid_type

type(GFS_control_type), intent(in) :: Model
type(GFS_stateout_type), intent(in) :: Stateout
type(GFS_grid_type), intent(in) :: Grid
real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(inout) :: initial_u, initial_v, initial_t, initial_qv

if (Model%ldiag3d) then
initial_t(:,:) = Stateout%gt0(:,:)
initial_u(:,:) = Stateout%gu0(:,:)
initial_v(:,:) = Stateout%gv0(:,:)
elseif (Model%cnvgwd) then
initial_t(:,:) = Stateout%gt0(:,:)
endif ! end if_ldiag3d/cnvgwd

if (Model%ldiag3d .or. Model%lgocart) then
initial_qv(:,:) = Stateout%gq0(:,:,1)
endif ! end if_ldiag3d/lgocart

end subroutine GFS_DCNV_generic_pre_run

end module

module GFS_DCNV_generic_post

contains

subroutine GFS_DCNV_generic_post_init ()
end subroutine GFS_DCNV_generic_post_init

subroutine GFS_DCNV_generic_post_finalize ()
end subroutine GFS_DCNV_generic_post_finalize

!> \section arg_table_GFS_DCNV_generic_post_run Argument Table
!! | local var name | longname | description | units | rank | type | kind | intent | optional |
!! |----------------|-----------------------------------------------------------|-----------------------------------------------------------------------|---------------|------|-------------------------------|-----------|--------|----------|
!! | Grid | FV3-GFS_Grid_type | Fortran DDT containing FV3-GFS grid and interpolation related data | DDT | 0 | GFS_typedefs%GFS_grid_type | | in | F |
!! | Model | FV3-GFS_Control_type | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_typedefs%GFS_control_type | | in | F |
!! | Stateout | FV3-GFS_Stateout_type | Fortran DDT containing FV3-GFS prognostic state to return to dycore | DDT | 0 | GFS_typedefs%GFS_stateout_type| | in | F |
!! | frain | dynamics_to_physics_timestep_ratio | ratio of dynamics timestep to physics timestep | none | 0 | real | kind_phys | in | F |
!! | rain1 | instantaneous_rainfall_amount | instantaneous rainfall amount | m | 1 | real | kind_phys | in | F |
!! | cld1d | cloud_work_function | cloud work function | m2 s-2 | 1 | real | kind_phys | in | F |
!! | initial_u | x_wind_initial | x-wind before entering a physics scheme | m s-1 | 2 | real | kind_phys | in | F |
!! | initial_v | y_wind_initial | y-wind before entering a physics scheme | m s-1 | 2 | real | kind_phys | in | F |
!! | initial_t | air_temperature_initial | air temperature before entering a physics scheme | K | 2 | real | kind_phys | in | F |
!! | initial_qv | water_vapor_specific_humidity_initial | water vapor specific humidity before entering a physics scheme | kg kg-1 | 2 | real | kind_phys | in | F |
!! | ud_mf | instantaneous_atmosphere_updraft_convective_mass_flux | (updraft mass flux) * delt | kg m-2 | 2 | real | kind_phys | in | F |
!! | dd_mf | instantaneous_atmosphere_downdraft_convective_mass_flux | (downdraft mass flux) * delt | kg m-2 | 2 | real | kind_phys | in | F |
!! | dt_mf | instantaneous_atmosphere_detrainment_convective_mass_flux | (detrainment mass flux) * delt | kg m-2 | 2 | real | kind_phys | in | F |
!! | cnvw | convective_cloud_water_specific_humidity | convective cloud water specific humidity | kg kg-1 | 2 | real | kind_phys | out | F |
!! | cnvc | convective_cloud_cover | convective cloud cover | frac | 2 | real | kind_phys | out | F |
!! | Diag | FV3-GFS_Diag_type | Fortran DDT containing FV3-GFS fields targeted for diagnostic output | DDT | 0 | GFS_typedefs%GFS_diag_type | | inout | F |
!! | Tbd | FV3-GFS_Tbd_type | Fortran DDT containing FV3-GFS miscellaneous data | DDT | 0 | GFS_typedefs%GFS_tbd_type | | inout | F |
!!
subroutine GFS_DCNV_generic_post_run (Grid, Model, Stateout, frain, rain1, cld1d, initial_u, initial_v, initial_t, initial_qv, &
ud_mf, dd_mf, dt_mf, cnvw, cnvc, Diag, Tbd)

use machine, only: kind_phys
use GFS_typedefs, only: GFS_grid_type, GFS_control_type, GFS_stateout_type, GFS_diag_type, GFS_tbd_type
use physcons, only: con_g

type(GFS_grid_type), intent(in) :: Grid
type(GFS_control_type), intent(in) :: Model
type(GFS_stateout_type), intent(in) :: Stateout
type(GFS_diag_type), intent(inout) :: Diag
type(GFS_tbd_type), intent(inout) :: Tbd

real(kind=kind_phys), intent(in) :: frain
real(kind=kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: rain1, cld1d
real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(in) :: initial_u, initial_v, initial_t, initial_qv
real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(in) :: ud_mf, dd_mf, dt_mf
real(kind=kind_phys), dimension(size(Grid%xlon,1),Model%levs), intent(in) :: cnvw, cnvc

integer :: i, num2, num3

do i = 1, size(Grid%xlon,1)
Diag%rainc(:) = frain * rain1(:)
enddo
!
if (Model%lssav) then
Diag%cldwrk (:) = Diag%cldwrk (:) + cld1d(:) * Model%dtf
Diag%cnvprcp(:) = Diag%cnvprcp(:) + Diag%rainc(:)

if (Model%ldiag3d) then
Diag%dt3dt(:,:,4) = Diag%dt3dt(:,:,4) + (Stateout%gt0(:,:)-initial_t(:,:)) * frain
Diag%dq3dt(:,:,2) = Diag%dq3dt(:,:,2) + (Stateout%gq0(:,:,1)-initial_qv(:,:)) * frain
Diag%du3dt(:,:,3) = Diag%du3dt(:,:,3) + (Stateout%gu0(:,:)-initial_u(:,:)) * frain
Diag%dv3dt(:,:,3) = Diag%dv3dt(:,:,3) + (Stateout%gv0(:,:)-initial_v(:,:)) * frain

Diag%upd_mf(:,:) = Diag%upd_mf(:,:) + ud_mf(:,:) * (con_g*frain)
Diag%dwn_mf(:,:) = Diag%dwn_mf(:,:) + dd_mf(:,:) * (con_g*frain)
Diag%det_mf(:,:) = Diag%det_mf(:,:) + dt_mf(:,:) * (con_g*frain)
endif ! if (ldiag3d)

endif ! end if_lssav

if ((Model%npdf3d == 3) .and. (Model%num_p3d == 4)) then
num2 = Model%num_p3d + 2
num3 = num2 + 1
Tbd%phy_f3d(:,:,num2) = cnvw(:,:)
Tbd%phy_f3d(:,:,num3) = cnvc(:,:)
elseif ((Model%npdf3d == 0) .and. (Model%ncnvcld3d == 1)) then
num2 = Model%num_p3d + 1
Tbd%phy_f3d(:,:,num2) = cnvw(:,:)
endif

end subroutine GFS_DCNV_generic_post_run

end module
Loading