UPP  11.0.0
 All Data Structures Files Functions Variables Pages
CALWXT_BOURG.f File Reference

Subroutine that calculates precipitation type (Bourgouin). More...

Go to the source code of this file.

Functions/Subroutines

subroutine calwxt_bourg_post (im, ista_2l, iend_2u, ista, iend, jm, jsta_2l, jend_2u, jsta, jend, lm, lp1, iseed, g, pthresh, t, q, pmid, pint, lmh, prec, zint, ptype, me)
 calwxt_bourg_post Subroutine that calculates precipitation type (Bourgouin). More...
 

Detailed Description

Subroutine that calculates precipitation type (Bourgouin).

This routine computes precipitation type. using a decision tree approach that uses the so-called "energy method" of Bourgouin of AES (Canada) 1992.

Parameters
[in]iminteger i dimension.
[in]jminteger j dimension.
[in]jsta_2linteger j dimension start point (including haloes).
[in]jend_2uinteger j dimension end point (including haloes).
[in]jstainteger j dimension start point (excluding haloes).
[in]jendinteger j dimension end point (excluding haloes).
[in]lminteger k dimension.
[in]lp1integer k dimension plus 1.
[in]iseedinteger random number seed.
[in]greal gravity (m/s**2).
[in]pthreshreal precipitation threshold (m).
[in]treal(im,jsta_2l:jend_2u,lm) mid layer temp (K).
[in]qreal(im,jsta_2l:jend_2u,lm) specific humidity (kg/kg).
[in]pmidreal(im,jsta_2l:jend_2u,lm) mid layer pressure (Pa).
[in]pintreal(im,jsta_2l:jend_2u,lp1) interface pressure (Pa).
[in]lmhreal(im,jsta_2l:jend_2u) max number of layers.
[in]precreal(im,jsta_2l:jend_2u) precipitation (m).
[in]zintreal(im,jsta_2l:jend_2u,lp1) interface height (m).
[out]ptypeinteger(im,jm) instantaneous weather type () acts like a 4 bit binary 1111 = rain/freezing rain/ice pellets/snow.
                   where the one's digit is for snow
                         the two's digit is for ice pellets
                         the four's digit is for freezing rain
                         and the eight's digit is for rain
                         in other words...
                         ptype=1 snow
                         ptype=2 ice pellets/mix with ice pellets
                         ptype=4 freezing rain/mix with freezing rain
                         ptype=8 rain
[in]meinteger Identifier for the processor used in the current instance.

Program history log:

Date Programmer Comments
1999-07-06 M Baldwin Initial
1999-09-20 M Baldwin make more consistent with bourgouin (1992)
2005-08-24 G Manikin added to wrf post
2007-06-19 M Iredell mersenne twister, best practices
2015-??-?? S Moorthi changed random number call and optimization and cleanup
2021-10-31 J Meng 2D DECOMPOSITION

Remarks: vertical order of arrays must be layer 1 = top and layer lmh = bottom

Author
M Baldwin np22
Date
1999-07-06

Definition in file CALWXT_BOURG.f.

Function/Subroutine Documentation

subroutine calwxt_bourg_post ( integer, intent(in)  im,
integer, intent(in)  ista_2l,
integer, intent(in)  iend_2u,
integer, intent(in)  ista,
integer, intent(in)  iend,
integer, intent(in)  jm,
integer, intent(in)  jsta_2l,
integer, intent(in)  jend_2u,
integer, intent(in)  jsta,
integer, intent(in)  jend,
integer, intent(in)  lm,
integer, intent(in)  lp1,
integer, intent(in)  iseed,
real, intent(in)  g,
real, intent(in)  pthresh,
real, dimension(ista_2l:iend_2u,jsta_2l:jend_2u,lm), intent(in)  t,
real, dimension(ista_2l:iend_2u,jsta_2l:jend_2u,lm), intent(in)  q,
real, dimension(ista_2l:iend_2u,jsta_2l:jend_2u,lm), intent(in)  pmid,
real, dimension(ista_2l:iend_2u,jsta_2l:jend_2u,lp1), intent(in)  pint,
real, dimension(ista_2l:iend_2u,jsta_2l:jend_2u), intent(in)  lmh,
real, dimension(ista_2l:iend_2u,jsta_2l:jend_2u), intent(in)  prec,
real, dimension(ista_2l:iend_2u,jsta_2l:jend_2u,lp1), intent(in)  zint,
integer, dimension(ista:iend,jsta:jend), intent(out)  ptype,
integer, intent(in)  me 
)

calwxt_bourg_post Subroutine that calculates precipitation type (Bourgouin).

Parameters
[in]iminteger i dimension.
[in]ista_2linteger i dimension start point (including haloes).
[in]iend_2uinteger i dimension end point (including haloes).
[in]istainteger i dimension start point (excluding haloes).
[in]iendinteger i dimension end point (excluding haloes).
[in]jminteger j dimension.
[in]jsta_2linteger j dimension start point (including haloes).
[in]jend_2uinteger j dimension end point (including haloes).
[in]jstainteger j dimension start point (excluding haloes).
[in]jendinteger j dimension end point (excluding haloes).
[in]lminteger k dimension.
[in]lp1integer k dimension plus 1.
[in]iseedinteger random number seed.
[in]greal gravity (m/s**2).
[in]pthreshreal precipitation threshold (m).
[in]treal(im,jsta_2l:jend_2u,lm) mid layer temp (K).
[in]qreal(im,jsta_2l:jend_2u,lm) specific humidity (kg/kg).
[in]pmidreal(im,jsta_2l:jend_2u,lm) mid layer pressure (Pa).
[in]pintreal(im,jsta_2l:jend_2u,lp1) interface pressure (Pa).
[in]lmhreal(im,jsta_2l:jend_2u) max number of layers.
[in]precreal(im,jsta_2l:jend_2u) precipitation (m).
[in]zintreal(im,jsta_2l:jend_2u,lp1) interface height (m).
[out]ptypeinteger(im,jm) instantaneous weather type () acts like a 4 bit binary 1111 = rain/freezing rain/ice pellets/snow.
[in]meinteger Identifier for the processor used in the current instance.

Definition at line 82 of file CALWXT_BOURG.f.

Referenced by surfce().