Skip to content

Commit

Permalink
save work progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Man Zhang committed Jun 20, 2024
1 parent 7a0c400 commit 283be49
Show file tree
Hide file tree
Showing 21 changed files with 2,847 additions and 405 deletions.
6 changes: 3 additions & 3 deletions physics/CONV/SAS/shalcnv.F
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
!!
!! This scheme was designed to replace the previous eddy-diffusivity approach to shallow convection with a mass-flux based approach as it is used for deep convection. Differences between the shallow and deep SAS schemes are presented in Han and Pan (2011) \cite han_and_pan_2011 . Like the deep scheme, it uses the working concepts put forth in Arakawa and Schubert (1974) \cite arakawa_and_schubert_1974 but includes modifications and simplifications from Grell (1993) \cite grell_1993 such as only one cloud type (the deepest possible, up to \f$p=0.7p_{sfc}\f$), rather than a spectrum based on cloud top heights or assumed entrainment rates, although it assumes no convective downdrafts. It contains many modifications associated with deep scheme as discussed in Han and Pan (2011) \cite han_and_pan_2011 , including the calculation of cloud top, a greater CFL-criterion-based maximum cloud base mass flux, and the inclusion of convective overshooting.
!!
!! \section diagram Calling Hierarchy Diagram
!! \section diagram_sashal Calling Hierarchy Diagram
!! \image html Shallow_SAS_Flowchart.png "Diagram depicting how the SAS shallow convection scheme is called from the GSM physics time loop" height=2cm
!! \section intraphysics Intraphysics Communication
!! This space is reserved for a description of how this scheme uses information from other scheme types and/or how information calculated in this scheme is used in other scheme types.
Expand Down Expand Up @@ -80,12 +80,12 @@ end subroutine shalcnv_init
!! \param[out] cnvw convective cloud water (kg/kg)
!! \param[out] cnvc convective cloud cover (unitless)
!!
!! \section general General Algorithm
!! \section general_shalcnv General Algorithm
!! -# Compute preliminary quantities needed for the static and feedback control portions of the algorithm.
!! -# Perform calculations related to the updraft of the entraining/detraining cloud model ("static control").
!! -# Calculate the tendencies of the state variables (per unit cloud base mass flux) and the cloud base mass flux.
!! -# For the "feedback control", calculate updated values of the state variables by multiplying the cloud base mass flux and the tendencies calculated per unit cloud base mass flux from the static control.
!! \section detailed Detailed Algorithm
!! \section detailed_shalcnv Detailed Algorithm
!!
!! \section arg_table_shalcnv_run Argument Table
!! \htmlinclude shalcnv_run.html
Expand Down
2 changes: 1 addition & 1 deletion physics/MP/NSSL/module_mp_nssl_2mom.F90
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@


!>\defgroup mod_nsslmp NSSL 2-moment microphysics modules
!!\ingroup nsslmp testphrase one
!!\ingroup nsslmp
!! Module for NSSL cloud physics
MODULE module_mp_nssl_2mom
IMPLICIT NONE
Expand Down
23 changes: 8 additions & 15 deletions physics/MP/module_mp_radar.F90
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ MODULE module_mp_radar
!+---+-----------------------------------------------------------------+
!+---+-----------------------------------------------------------------+

!>\ingroup thompson_radar
!!
!>
subroutine radar_init

IMPLICIT NONE
Expand Down Expand Up @@ -189,13 +188,11 @@ end subroutine radar_init
!+---+-----------------------------------------------------------------+
!+---+-----------------------------------------------------------------+

!>\ingroup thompson_radar
COMPLEX*16 FUNCTION m_complex_water_ray(lambda,T)

!> Complex refractive Index of Water as function of Temperature T
!! [deg C] and radar wavelength lambda [m]; valid for
!! lambda in [0.001,1.0] m; T in [-10.0,30.0] deg C
!! after Ray (1972)
COMPLEX*16 FUNCTION m_complex_water_ray(lambda,T)

IMPLICIT NONE
DOUBLE PRECISION, INTENT(IN):: T,lambda
Expand Down Expand Up @@ -264,8 +261,7 @@ END FUNCTION m_complex_ice_maetzler

!+---+-----------------------------------------------------------------+

!>ingroup thompson_radar
!!
!>
subroutine rayleigh_soak_wetgraupel (x_g, a_geo, b_geo, fmelt, &
meltratio_outside, m_w, m_i, lambda, C_back, &
mixingrule,matrix,inclusion, &
Expand Down Expand Up @@ -362,8 +358,7 @@ subroutine rayleigh_soak_wetgraupel (x_g, a_geo, b_geo, fmelt, &
end subroutine rayleigh_soak_wetgraupel

!+---+-----------------------------------------------------------------+
!>\ingroup thompson_radar
!!
!>
complex*16 function get_m_mix_nested (m_a, m_i, m_w, volair, &
volice, volwater, mixingrule, host, matrix, &
inclusion, hostmatrix, hostinclusion, cumulerror)
Expand Down Expand Up @@ -493,8 +488,7 @@ complex*16 function get_m_mix_nested (m_a, m_i, m_w, volair, &
end function get_m_mix_nested

!+---+-----------------------------------------------------------------+
!>\ingroup thompson_radar
!!
!>
COMPLEX*16 FUNCTION get_m_mix (m_a, m_i, m_w, volair, volice, &
volwater, mixingrule, matrix, inclusion, error)

Expand Down Expand Up @@ -535,8 +529,7 @@ COMPLEX*16 FUNCTION get_m_mix (m_a, m_i, m_w, volair, volice, &
END FUNCTION get_m_mix

!+---+-----------------------------------------------------------------+
!>\ingroup thompson_radar
!!
!>
COMPLEX*16 FUNCTION m_complex_maxwellgarnett(vol1, vol2, vol3, &
m1, m2, m3, inclusion, error)

Expand Down Expand Up @@ -584,7 +577,7 @@ COMPLEX*16 FUNCTION m_complex_maxwellgarnett(vol1, vol2, vol3, &
END FUNCTION m_complex_maxwellgarnett

!+---+-----------------------------------------------------------------+
!>\ingroup thompson_radar
!>
REAL FUNCTION GAMMLN(XX)
! --- RETURNS THE VALUE LN(GAMMA(XX)) FOR XX > 0.
IMPLICIT NONE
Expand All @@ -610,7 +603,7 @@ REAL FUNCTION GAMMLN(XX)
END FUNCTION GAMMLN
! (C) Copr. 1986-92 Numerical Recipes Software 2.02
!+---+-----------------------------------------------------------------+
!>\ingroup thompson_radar
!>
REAL FUNCTION WGAMMA(y)

IMPLICIT NONE
Expand Down
40 changes: 20 additions & 20 deletions physics/PBL/MYNN_EDMF/module_bl_mynn.F90
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ MODULE module_bl_mynn
CONTAINS

! ==================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine is the GSD MYNN-EDNF PBL driver routine,which
!! encompassed the majority of the subroutines that comprise the
!! procedures that ultimately solve for tendencies of
Expand Down Expand Up @@ -1505,7 +1505,7 @@ END SUBROUTINE mynn_bl_driver
!
!-------------------------------------------------------------------

!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine initializes the mixing length, TKE, \f$\theta^{'2}\f$,
!! \f$q^{'2}\f$, and \f$\theta^{'}q^{'}\f$.
!!\section gen_mym_ini GSD MYNN-EDMF mym_initialize General Algorithm
Expand Down Expand Up @@ -1691,7 +1691,7 @@ END SUBROUTINE mym_initialize
! These are defined on the walls of the grid boxes.
!

!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine calculates the level 2, non-dimensional wind shear
!! \f$G_M\f$ and vertical temperature gradient \f$G_H\f$ as well as
!! the level 2 stability funcitons \f$S_h\f$ and \f$S_m\f$.
Expand Down Expand Up @@ -1843,7 +1843,7 @@ END SUBROUTINE mym_level2
! NOTE: the mixing lengths are meant to be calculated at the full-
! sigmal levels (or interfaces beween the model layers).
!
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine calculates the mixing lengths.
SUBROUTINE mym_length ( &
& kts,kte,xland, &
Expand Down Expand Up @@ -2242,7 +2242,7 @@ SUBROUTINE mym_length ( &
END SUBROUTINE mym_length

! ==================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine was taken from the BouLac scheme in WRF-ARW and modified for
!! integration into the MYNN PBL scheme. WHILE loops were added to reduce the
!! computational expense. This subroutine computes the length scales up and down
Expand Down Expand Up @@ -2405,7 +2405,7 @@ SUBROUTINE boulac_length0(k,kts,kte,zw,dz,qtke,theta,lb1,lb2)
END SUBROUTINE boulac_length0

! ==================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine was taken from the BouLac scheme in WRF-ARW
!! and modified for integration into the MYNN PBL scheme.
!! WHILE loops were added to reduce the computational expense.
Expand Down Expand Up @@ -2596,7 +2596,7 @@ END SUBROUTINE boulac_length
! # dtl, dqw, dtv, gm and gh are allowed to share storage units with
! dfm, dfh, dfq, tcd and qcd, respectively, for saving memory.
!
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine calculates the vertical diffusivity coefficients and the
!! production terms for the turbulent quantities.
!>\section gen_mym_turbulence GSD mym_turbulence General Algorithm
Expand Down Expand Up @@ -3190,7 +3190,7 @@ END SUBROUTINE mym_turbulence
! scheme (program).
!
!-------------------------------------------------------------------
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine predicts the turbulent quantities at the next step.
SUBROUTINE mym_predict (kts,kte, &
& closure, &
Expand Down Expand Up @@ -3593,7 +3593,7 @@ END SUBROUTINE mym_predict
! Set these values to those adopted by you.
!
!-------------------------------------------------------------------
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine calculates the nonconvective component of the
!! subgrid cloud fraction and mixing ratio as well as the functions used to
!! calculate the buoyancy flux. Different cloud PDFs can be selected by
Expand Down Expand Up @@ -4020,7 +4020,7 @@ SUBROUTINE mym_condensation (kts,kte, &
END SUBROUTINE mym_condensation

! ==================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine solves for tendencies of U, V, \f$\theta\f$, qv,
!! qc, and qi
SUBROUTINE mynn_tendencies(kts,kte,i, &
Expand Down Expand Up @@ -5354,7 +5354,7 @@ SUBROUTINE mynn_mix_chem(kts,kte,i, &
END SUBROUTINE mynn_mix_chem

! ==================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
SUBROUTINE retrieve_exchange_coeffs(kts,kte,&
&dfm,dfh,dz,K_m,K_h)

Expand Down Expand Up @@ -5382,7 +5382,7 @@ SUBROUTINE retrieve_exchange_coeffs(kts,kte,&
END SUBROUTINE retrieve_exchange_coeffs

! ==================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
SUBROUTINE tridiag(n,a,b,c,d)

!! to solve system of linear eqs on tridiagonal matrix n times n
Expand Down Expand Up @@ -5418,7 +5418,7 @@ SUBROUTINE tridiag(n,a,b,c,d)
END SUBROUTINE tridiag

! ==================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
subroutine tridiag2(n,a,b,c,d,x)
implicit none
! a - sub-diagonal (means it is the diagonal below the main diagonal)
Expand Down Expand Up @@ -5453,7 +5453,7 @@ subroutine tridiag2(n,a,b,c,d,x)

end subroutine tridiag2
! ==================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
subroutine tridiag3(kte,a,b,c,d,x)

!ccccccccccccccccccccccccccccccc
Expand Down Expand Up @@ -5495,7 +5495,7 @@ subroutine tridiag3(kte,a,b,c,d,x)
end subroutine tridiag3

! ==================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine calculates hybrid diagnotic boundary-layer height (PBLH).
!!
!! NOTES ON THE PBLH FORMULATION: The 1.5-theta-increase method defines
Expand Down Expand Up @@ -5658,7 +5658,7 @@ END SUBROUTINE GET_PBLH
!> @}

! ==================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine is the Dynamic Multi-Plume (DMP) Mass-Flux Scheme.
!!
!! dmp_mf() calculates the nonlocal turbulent transport from the dynamic
Expand Down Expand Up @@ -6824,7 +6824,7 @@ SUBROUTINE DMP_mf( &

END SUBROUTINE DMP_MF
!=================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This subroutine
subroutine condensation_edmf(QT,THL,P,zagl,THV,QC)
!
Expand Down Expand Up @@ -7384,7 +7384,7 @@ SUBROUTINE SCALE_AWARE(dx,PBL1,Psig_bl,Psig_shcu)
END SUBROUTINE SCALE_AWARE

! =====================================================================
!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! \author JAYMES- added 22 Apr 2015
!! This function calculates saturation vapor pressure. Separate ice and liquid functions
!! are used (identical to those in module_mp_thompson.F, v3.6). Then, the
Expand Down Expand Up @@ -7438,7 +7438,7 @@ END FUNCTION esat_blend

! ====================================================================

!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This function extends function "esat" and returns a "blended"
!! saturation mixing ratio. Tice currently set to 240 K, t0c = 273.15 K.
!!\author JAYMES
Expand Down Expand Up @@ -7495,7 +7495,7 @@ END FUNCTION qsat_blend

! ===================================================================

!>\ingroup gsd_mynn_edmf
!>\ingroup gp_mynnedmf
!! This function interpolates the latent heats of vaporization and sublimation into
!! a single, temperature-dependent, "blended" value, following
!! Chaboureau and Bechtold (2002) \cite Chaboureau_2002, Appendix.
Expand Down
2 changes: 1 addition & 1 deletion physics/SFC_Layer/GFDL/gfdl_sfc_layer.F90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!> \file gfdl_sfc_layer.f
!> \file gfdl_sfc_layer.F90
!! This file contains ...

!> This module contains the CCPP-compliant GFDL surface layer scheme.
Expand Down
Loading

0 comments on commit 283be49

Please sign in to comment.