UPP  001
 All Data Structures Files Functions Pages
CALWXT_EXPLICIT.f
1  SUBROUTINE calwxt_explicit_post(LMH,THS,PMID,PREC,SR,F_RIMEF,IWX)
2 !
3 ! FILE: CALWXT.f
4 ! WRITTEN: 24 AUGUST 2005, G MANIKIN and B FERRIER
5 !
6 ! ROUTINE TO COMPUTE PRECIPITATION TYPE USING EXPLICIT FIELDS
7 ! FROM THE MODEL MICROPHYSICS
8 
9  use params_mod, only: p1000, capa
10  use ctlblk_mod, only: jsta, jend, modelname, pthresh, im, jsta_2l, &
11  jend_2u, lm
12 !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
13  implicit none
14 !
15 ! LIST OF VARIABLES NEEDED
16 ! PARAMETERS:
17 !
18 ! INPUT:
19  real,dimension(im,jsta_2l:jend_2u,lm),intent(in) :: f_rimef, pmid
20  REAL,dimension(im,jsta_2l:jend_2u), intent(in) :: lmh, prec, ths, sr
21  integer,dimension(im,jsta:jend), intent(inout) :: iwx
22  integer i,j,lmhk
23  real psfc,tskin,snow
24 !
25 ! ALLOCATE LOCAL STORAGE
26 !
27 !$omp parallel do private(i,j)
28  DO j=jsta,jend
29  DO i=1,im
30  iwx(i,j) = 0
31  ENDDO
32  ENDDO
33 
34 !
35 !$omp parallel do private(j,i,lmhk,psfc,tskin)
36  DO j=jsta,jend
37  DO i=1,im
38  lmhk=lmh(i,j)
39 !
40 ! SKIP THIS POINT IF NO PRECIP THIS TIME STEP
41 !
42  IF (prec(i,j) <= pthresh) cycle
43 !
44 ! A SNOW RATIO LESS THAN 0.5 ELIMINATES SNOW AND SLEET
45 ! USE THE SKIN TEMPERATURE TO DISTINGUISH RAIN FROM FREEZING RAIN
46 ! NOTE THAT 2-M TEMPERATURE MAY BE A BETTER CHOICE IF THE MODEL
47 ! HAS A COLD BIAS FOR SKIN TEMPERATURE
48 !
49  IF (sr(i,j) < 0.5) THEN
50 ! SURFACE (SKIN) POTENTIAL TEMPERATURE AND TEMPERATURE.
51  psfc = pmid(i,j,lmhk)
52  tskin = ths(i,j)*(psfc/p1000)**capa
53 
54  IF (tskin < 273.15) THEN
55 ! FREEZING RAIN = 4
56  iwx(i,j) = iwx(i,j)+4
57  ELSE
58 ! RAIN = 8
59  iwx(i,j) = iwx(i,j)+8
60  ENDIF
61  ELSE
62 !
63 ! DISTINGUISH SNOW FROM SLEET WITH THE RIME FACTOR
64 !
65  IF(f_rimef(i,j,lmhk) >= 10) THEN
66 ! SLEET = 2
67  iwx(i,j) = iwx(i,j)+2
68  ELSE
69 ! SNOW = 1
70  iwx(i,j) = iwx(i,j)+1
71  ENDIF
72  ENDIF
73  enddo
74  enddo
75 !
76  RETURN
77  END