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

rain variable refactoring #40

Merged
merged 1 commit into from
Jan 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
106 changes: 56 additions & 50 deletions GFS_layer/GFS_physics_driver.F90

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion physics/GFS_DCNV_generic.f90
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ end subroutine GFS_DCNV_generic_post_finalize
!! | Model | FV3-GFS_Control_type | Fortran DDT containing FV3-GFS model control parameters | DDT | 0 | GFS_control_type | | in | F |
!! | Stateout | FV3-GFS_Stateout_type | Fortran DDT containing FV3-GFS prognostic state to return to dycore | DDT | 0 | 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 | rainfall_amount_on_physics_timestep | convective rainfall amount on physics timestep | m | 1 | real | kind_phys | in | F |
!! | rain1 | lwe_thickness_of_deep_convective_precipitation_amount | deep convective rainfall amount on physics timestep | m | 1 | real | kind_phys | in | F |
!! | cld1d | cloud_work_function | cloud work function | m2 s-2 | 1 | real | kind_phys | in | F |
!! | save_u | x_wind_save | x-wind before entering a physics scheme | m s-1 | 2 | real | kind_phys | in | F |
!! | save_v | y_wind_save | y-wind before entering a physics scheme | m s-1 | 2 | real | kind_phys | in | F |
Expand Down
25 changes: 12 additions & 13 deletions physics/GFS_MP_generic_post.f90
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
!> \file GFS_MP_generic_post.f90
!! This file contains the subroutines that calculates physics/diagnotics variables
!! This file contains the subroutines that calculates physics/diagnotics variables
!! after calling microphysics scheme:
!! - totprcp: precipitation rate at surface
!! - dt3dt(:,:,6): large scale condensate heating rate at model layers
!! - dq3dt(:,:,4): large scale condensate moistening rate at model layers
!! - pwat: column integrated precipitable water

module GFS_MP_generic_post
contains
contains

!> \defgroup GFS_MP_generic_post GFS MP generic post
!> \defgroup GFS_MP_generic_post GFS MP generic post
!! @{
!! \section arg_table_GFS_MP_generic_post_init Argument Table
!!
subroutine GFS_MP_generic_post_init
subroutine GFS_MP_generic_post_init
end subroutine GFS_MP_generic_post_init


Expand All @@ -27,7 +27,7 @@ end subroutine GFS_MP_generic_post_init
!! | del | air_pressure_difference_between_midlayers | air pressure difference between midlayers | Pa | 2 | real | kind_phys | in | F |
!! | lssav | flag_diagnostics | logical flag for model physics diagnostics | flag | 0 | logical | | in | F |
!! | ldiag3d | flag_diagnostics_3D | logical flag for 3D diagnostics | flag | 0 | logical | | in | F |
!! | rain | timestep_total_rainfall_amount | total precipitation at surface (APCP) | m | 1 | real | kind_phys | in | F |
!! | rain | lwe_thickness_of_precipitation_amount_on_dynamics_timestep | total rainfall amount on dynamics timestep | m | 1 | real | kind_phys | in | F |
!! | frain | dynamics_to_physics_timestep_ratio | dtf/dtp, dynamics to physics timestep ratio | none | 0 | real | kind_phys | in | F |
!! | ntcw | index_for_liquid_cloud_condensate | cloud condensate index in tracer array(3) | index | 0 | integer | | in | F |
!! | ncld | number_of_hydrometeors | number_of_hydrometeors(1 for Z-C) | count | 0 | integer | | in | F |
Expand All @@ -36,7 +36,7 @@ end subroutine GFS_MP_generic_post_init
!! | q | water_vapor_specific_humidity_updated_by_physics | water vapor specific humidity | kg kg-1 | 2 | real | kind_phys | in | F |
!! | save_t | air_temperature_save | air temperature before entering a physics scheme | K | 2 | real | kind_phys | in | F |
!! | save_qv | water_vapor_specific_humidity_save | water vapor specific humidity before entering a physics scheme | kg kg-1 | 2 | real | kind_phys | in | F |
!! | totprcp | accumulated_total_rainfall_amount | accumulated total_rainfall_amount | m | 1 | real | kind_phys | inout | F |
!! | totprcp | accumulated_lwe_thickness_of_precipitation_amount | accumulated total precipitation amount | m | 1 | real | kind_phys | inout | F |
!! | dt3dt6 | large_scale_condensate_heating_rate_at_model_layers | large scale condensate heating rate at model layers | K s-1 | 2 | real | kind_phys | inout | F |
!! | dq3dt4 | large_scale_condensate_moistening_rate_at_model_layers | large scale condensate moistening rate at model layers | kg kg-1 s-1 | 2 | real | kind_phys | inout | F |
!! | pwat | column_precipitable_water | column integrated precipitable water | kg m-2 | 1 | real | kind_phys | out | F |
Expand All @@ -45,13 +45,13 @@ subroutine GFS_MP_generic_post_run(im,ix,levs,dtf,del, &
lssav,ldiag3d,rain,frain,ntcw,ncld,cwm, & !input
t,q,save_t,save_qv, &
totprcp,dt3dt6,dq3dt4,pwat) ! output

!
use machine, only: kind_phys
use physcons, only: con_g

implicit none
!
!
! declare variables.
!
integer,intent(in) :: im, ix, levs, ntcw, ncld
Expand All @@ -62,7 +62,7 @@ subroutine GFS_MP_generic_post_run(im,ix,levs,dtf,del, &
real(kind=kind_phys),dimension(im), intent(in) :: rain
real(kind=kind_phys),dimension(ix,levs), intent(in) :: t,q, &
cwm, del, save_t, &
save_qv
save_qv
real(kind=kind_phys),dimension(im), intent(inout) :: totprcp
real(kind=kind_phys),dimension(im), intent(out) :: pwat
real(kind=kind_phys),dimension(ix,levs), intent(inout) :: &
Expand All @@ -74,7 +74,7 @@ subroutine GFS_MP_generic_post_run(im,ix,levs,dtf,del, &
do i = 1, im
totprcp(i) = totprcp(i) + rain(i)
enddo

if (ldiag3d) then
do i = 1, im
do k = 1,levs
Expand All @@ -99,13 +99,13 @@ subroutine GFS_MP_generic_post_run(im,ix,levs,dtf,del, &
!if (ncld > 0) then
!do ic = ntcw, ntcw+ncld-1
! work1(i) = work1(i) + Stateout%gq0(i,k,ic)
work1(i) = work1(i) + cwm(i,k)
work1(i) = work1(i) + cwm(i,k)
!enddo
!endif
pwat(i) = pwat(i) + del(i,k)*(q(i,k)+work1(i))
enddo
pwat(i) = pwat(i) * onebg

enddo

!deallocate (clw)
Expand All @@ -118,4 +118,3 @@ subroutine GFS_MP_generic_post_finalize
end subroutine GFS_MP_generic_post_finalize
!! @}
end module GFS_MP_generic_post

Loading