Skip to content

Commit

Permalink
FV3: this commits #refs 44997
Browse files Browse the repository at this point in the history
  • Loading branch information
junwang-noaa committed Mar 5, 2018
1 parent 6b8f273 commit 59e91f9
Show file tree
Hide file tree
Showing 41 changed files with 11,151 additions and 5,181 deletions.
2 changes: 1 addition & 1 deletion atmos_cubed_sphere/model/fv_cmp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ subroutine fv_sat_adj (mdt, zvir, is, ie, js, je, ng, hydrostatic, consv_te, &
rh = qpz (i) / qstar (i)

! -----------------------------------------------------------------------
! icloud_f = 0: bug - fxied
! icloud_f = 0: bug - fixed
! icloud_f = 1: old fvgfs gfdl) mp implementation
! icloud_f = 2: binary cloud scheme (0 / 1)
! -----------------------------------------------------------------------
Expand Down
6 changes: 4 additions & 2 deletions atmos_cubed_sphere/model/fv_control.F90
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ module fv_control_mod
! 2 for block
! 3 for four-interfaces non-block


! version number of this module
! Include variable "version" to be written to log file.
#include<file_version.h>
Expand Down Expand Up @@ -530,7 +531,7 @@ subroutine run_setup(Atm, dt_atmos, grids_on_this_pe, p_split)
real :: dim0 = 180. ! base dimension
real :: dt0 = 1800. ! base time step
real :: ns0 = 5. ! base nsplit for base dimension
! For cubed sphere 5 is better
! For cubed sphere 5 is better
!real :: umax = 350. ! max wave speed for grid_type>3 ! Now defined above
real :: dimx, dl, dp, dxmin, dymin, d_fac

Expand Down Expand Up @@ -570,6 +571,7 @@ subroutine run_setup(Atm, dt_atmos, grids_on_this_pe, p_split)

namelist /test_case_nml/test_case, bubble_do, alpha, nsolitons, soliton_Umax, soliton_size


pe_counter = mpp_root_pe()

! Make alpha = 0 the default:
Expand Down Expand Up @@ -613,7 +615,7 @@ subroutine run_setup(Atm, dt_atmos, grids_on_this_pe, p_split)

#ifdef INTERNAL_FILE_NML
! Set input_file_nml for correct parent/nest initialization
if (n .gt. 1) then
if (n > 1) then
write(nested_grid_filename,'(A4, I2.2)') 'nest', n
call read_input_nml(nested_grid_filename)
endif
Expand Down
45 changes: 45 additions & 0 deletions atmos_cubed_sphere/model/fv_sg.F90
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,13 @@ subroutine fv_subgrid_z( isd, ied, jsd, jed, is, ie, js, je, km, nq, dt, &
cpm(i) = (1.-(q0(i,k,sphum)+q_liq))*cp_air + q0(i,k,sphum)*cp_vapor + q_liq*c_liq
cvm(i) = (1.-(q0(i,k,sphum)+q_liq))*cv_air + q0(i,k,sphum)*cv_vap + q_liq*c_liq
enddo
elseif ( nwat==5 ) then
do i=is,ie
q_liq = q0(i,k,liq_wat) + q0(i,k,rainwat)
q_sol = q0(i,k,ice_wat) + q0(i,k,snowwat)
cpm(i) = (1.-(q0(i,k,sphum)+q_liq+q_sol))*cp_air + q0(i,k,sphum)*cp_vapor + q_liq*c_liq + q_sol*c_ice
cvm(i) = (1.-(q0(i,k,sphum)+q_liq+q_sol))*cv_air + q0(i,k,sphum)*cv_vap + q_liq*c_liq + q_sol*c_ice
enddo
else
do i=is,ie
q_liq = q0(i,k,liq_wat) + q0(i,k,rainwat)
Expand Down Expand Up @@ -285,6 +292,12 @@ subroutine fv_subgrid_z( isd, ied, jsd, jed, is, ie, js, je, km, nq, dt, &
qcon(i,k) = q0(i,k,liq_wat) + q0(i,k,rainwat)
enddo
enddo
elseif ( nwat==5 ) then
do k=1,kbot
do i=is,ie
qcon(i,k) = q0(i,k,liq_wat)+q0(i,k,ice_wat)+q0(i,k,snowwat)+q0(i,k,rainwat)
enddo
enddo
else
do k=1,kbot
do i=is,ie
Expand Down Expand Up @@ -341,6 +354,9 @@ subroutine fv_subgrid_z( isd, ied, jsd, jed, is, ie, js, je, km, nq, dt, &
qcon(i,km1) = q0(i,km1,liq_wat) + q0(i,km1,ice_wat)
elseif ( nwat==4 ) then ! K_warm_rain scheme with fake ice
qcon(i,km1) = q0(i,km1,liq_wat) + q0(i,km1,rainwat)
elseif ( nwat==5 ) then ! K_warm_rain scheme with fake ice
qcon(i,km1) = q0(i,km1,liq_wat) + q0(i,km1,ice_wat) + &
q0(i,km1,snowwat) + q0(i,km1,rainwat)
else
qcon(i,km1) = q0(i,km1,liq_wat) + q0(i,km1,ice_wat) + &
q0(i,km1,snowwat) + q0(i,km1,rainwat) + q0(i,km1,graupel)
Expand Down Expand Up @@ -419,6 +435,13 @@ subroutine fv_subgrid_z( isd, ied, jsd, jed, is, ie, js, je, km, nq, dt, &
cpm(i) = (1.-(q0(i,kk,sphum)+q_liq))*cp_air + q0(i,kk,sphum)*cp_vapor + q_liq*c_liq
cvm(i) = (1.-(q0(i,kk,sphum)+q_liq))*cv_air + q0(i,kk,sphum)*cv_vap + q_liq*c_liq
enddo
elseif ( nwat == 5 ) then
do i=is,ie
q_liq = q0(i,kk,liq_wat) + q0(i,kk,rainwat)
q_sol = q0(i,kk,ice_wat) + q0(i,kk,snowwat)
cpm(i) = (1.-(q0(i,kk,sphum)+q_liq+q_sol))*cp_air + q0(i,kk,sphum)*cp_vapor + q_liq*c_liq + q_sol*c_ice
cvm(i) = (1.-(q0(i,kk,sphum)+q_liq+q_sol))*cv_air + q0(i,kk,sphum)*cv_vap + q_liq*c_liq + q_sol*c_ice
enddo
else
do i=is,ie
q_liq = q0(i,kk,liq_wat) + q0(i,kk,rainwat)
Expand Down Expand Up @@ -643,6 +666,13 @@ subroutine fv_subgrid_z( isd, ied, jsd, jed, is, ie, js, je, km, nq, dt, &
cpm(i) = (1.-(q0(i,k,sphum)+q_liq))*cp_air + q0(i,k,sphum)*cp_vapor + q_liq*c_liq
cvm(i) = (1.-(q0(i,k,sphum)+q_liq))*cv_air + q0(i,k,sphum)*cv_vap + q_liq*c_liq
enddo
elseif ( nwat==5 ) then
do i=is,ie
q_liq = q0(i,k,liq_wat) + q0(i,k,rainwat)
q_sol = q0(i,k,ice_wat) + q0(i,k,snowwat)
cpm(i) = (1.-(q0(i,k,sphum)+q_liq+q_sol))*cp_air + q0(i,k,sphum)*cp_vapor + q_liq*c_liq + q_sol*c_ice
cvm(i) = (1.-(q0(i,k,sphum)+q_liq+q_sol))*cv_air + q0(i,k,sphum)*cv_vap + q_liq*c_liq + q_sol*c_ice
enddo
else
do i=is,ie
q_liq = q0(i,k,liq_wat) + q0(i,k,rainwat)
Expand Down Expand Up @@ -703,6 +733,11 @@ subroutine fv_subgrid_z( isd, ied, jsd, jed, is, ie, js, je, km, nq, dt, &
qcon(i,k) = q0(i,k,liq_wat) + q0(i,k,rainwat)
enddo
enddo
elseif ( nwat==5 ) then
do k=1,kbot
do i=is,ie
qcon(i,k) = q0(i,k,liq_wat)+q0(i,k,ice_wat)+q0(i,k,snowwat)+q0(i,k,rainwat)
enddo
else
do k=1,kbot
do i=is,ie
Expand Down Expand Up @@ -752,6 +787,9 @@ subroutine fv_subgrid_z( isd, ied, jsd, jed, is, ie, js, je, km, nq, dt, &
qcon(i,km1) = q0(i,km1,liq_wat) + q0(i,km1,ice_wat)
elseif ( nwat==4 ) then ! K_warm_rain scheme with fake ice
qcon(i,km1) = q0(i,km1,liq_wat) + q0(i,km1,rainwat)
elseif ( nwat==5 ) then
qcon(i,km1) = q0(i,km1,liq_wat) + q0(i,km1,ice_wat) + &
q0(i,km1,snowwat) + q0(i,km1,rainwat)
else
qcon(i,km1) = q0(i,km1,liq_wat) + q0(i,km1,ice_wat) + &
q0(i,km1,snowwat) + q0(i,km1,rainwat) + q0(i,km1,graupel)
Expand Down Expand Up @@ -830,6 +868,13 @@ subroutine fv_subgrid_z( isd, ied, jsd, jed, is, ie, js, je, km, nq, dt, &
cpm(i) = (1.-(q0(i,kk,sphum)+q_liq))*cp_air + q0(i,kk,sphum)*cp_vapor + q_liq*c_liq
cvm(i) = (1.-(q0(i,kk,sphum)+q_liq))*cv_air + q0(i,kk,sphum)*cv_vap + q_liq*c_liq
enddo
elseif ( nwat == 5 ) then
do i=is,ie
q_liq = q0(i,kk,liq_wat) + q0(i,kk,rainwat)
q_sol = q0(i,kk,ice_wat) + q0(i,kk,snowwat)
cpm(i) = (1.-(q0(i,kk,sphum)+q_liq+q_sol))*cp_air + q0(i,kk,sphum)*cp_vapor + q_liq*c_liq + q_sol*c_ice
cvm(i) = (1.-(q0(i,kk,sphum)+q_liq+q_sol))*cv_air + q0(i,kk,sphum)*cv_vap + q_liq*c_liq + q_sol*c_ice
enddo
else
do i=is,ie
q_liq = q0(i,kk,liq_wat) + q0(i,kk,rainwat)
Expand Down
Loading

0 comments on commit 59e91f9

Please sign in to comment.