PHYEX 0.9.5
PHYsique EXternalisée
Loading...
Searching...
No Matches
mode_lima_change_shape.F90
Go to the documentation of this file.
2!
3 IMPLICIT NONE
4!
5CONTAINS
6!
7! ######################################################################
8 SUBROUTINE lima_change_shape(CST, LIMAP, KSIZE, &
9 PT, PCTMIN, PDEP, PCI_SHAPE, P_SHCI_HACH)
10! ######################################################################
11!
12!! PURPOSE
13!! -------
14!! The purpose of this routine is to compute the change of shape of small ice
15!! crystals, when plates are in a temperature range of column growth and vice
16!! versa. Plates and columns turn into irregulars definitely.
17!!
18!! QUESTIONS : - Rajouter une valeur seuil sur la quantité de vapeur d'eau
19!! déposée sur les cristaux (PDEP en entrée de la routine pour
20!! l'instant mais qui ne sert pas pour l'instant)?
21!! -
22!!
23!! METHOD
24!! ------
25!!
26!! AUTHOR
27!! ------
28!! M. Claeys * LACy *
29!!
30!! MODIFICATIONS
31!! -------------
32!! Original 07/11/2018
33!! C. Barthe 02/2024: adapt to MNH-V5-7-0 + clean the code
34!! C. Barthe 04/2024: irregular no more used, bullet-rosettes instead (shape n°3)
35!
36!-----------------------------------------------------------------------------
37!
38!* 0. DECLARATIONS
39! ------------
40!
42USE modd_cst, ONLY:cst_t
43USE yomhook, ONLY:lhook, dr_hook, jphook
44!
45IMPLICIT NONE
46!
47!
48!* 0.1 Declaration of dummy arguments
49!
50TYPE(param_lima_t),INTENT(IN)::LIMAP
51TYPE(cst_t),INTENT(IN)::CST
52INTEGER, INTENT(IN) :: KSIZE
53!
54REAL, DIMENSION(KSIZE), INTENT(IN) :: PT ! Temp at t (K)
55REAL, DIMENSION(KSIZE), INTENT(IN) :: PDEP ! water vapor deposited on ice crystals
56REAL, DIMENSION(KSIZE), INTENT(IN) :: PCTMIN
57REAL, DIMENSION(KSIZE,LIMAP%NNB_CRYSTAL_SHAPE), INTENT(IN) :: PCI_SHAPE ! Nb conc. of ice crystal shapes
58REAL, DIMENSION(KSIZE,LIMAP%NNB_CRYSTAL_SHAPE), INTENT(INOUT) :: P_SHCI_HACH ! for budget
59!
60!
61!* 0.2 Declaration of local variables
62!
63REAL, DIMENSION(SIZE(PT)) :: ZTC ! temperature (C)
64REAL, DIMENSION(SIZE(PT)) :: ZFACTOR_PLA_IRR !
65REAL, DIMENSION(SIZE(PT)) :: ZFACTOR_COL_IRR !
66!
67INTEGER, DIMENSION(SIZE(PT)) :: IDX_CHEN
68INTEGER :: II ! index
69!
70CHARACTER(LEN=3), DIMENSION(SIZE(PT)) :: YSHAPE_NAME ! Name of the shape corresponding to
71 ! the temperature growth regime, at t
72!
73! Chen 90
74REAL, DIMENSION(121) :: ZTEMP_CHEN ! Lookup table T (Chen and Lamb, 1994)
75REAL, DIMENSION(SIZE(PT)) :: ZGAM_CHEN_T
76REAL, DIMENSION(121) :: ZGAM_CHEN ! Lookup table gamma(T) (Chen and Lamb, 1994)
77 ! Index_GAM_CHEN = MAX( 1,MIN( 121,INT((XTT-T)*4.0)+1 ) )
78 ! XTT = 273.16 and T is the temperature
79!
80REAL, DIMENSION(SIZE(PT)) :: ZZW1, ZZW2
81!
82REAL :: ZGAMMA_COL, ZGAMMA_PLA, ZGAMMA_IRR
83REAL(KIND=jphook) :: zhook_handle
84!
85!-----------------------------------------------------------------------------
86!
87!* 0. PRELIMINARIES
88! -------------
89!
90IF (lhook) CALL dr_hook('LIMA_CHANGE_SHAPE', 0, zhook_handle)
91zzw1(:) = 0.
92zzw2(:) = 0.
93!
94! Change temperature unit: K --> C
95ztc(:) = pt(:) - cst%XTT
96!
97! Find the ice crystal shape associated with temperature in each grid mesh
98yshape_name(:) = 'IRR'
99WHERE ( (ztc(:) .GT. -3.0) .OR. &
100 ((ztc(:) .LE. -9.0) .AND. (ztc(:) .GT. -20.0)))
101 yshape_name(:) = 'PLA'
102END WHERE
103!
104WHERE (((ztc(:) .LE. -3.0) .AND. (ztc(:) .GT. -9.0)) .OR. &
105 (ztc(:) .LE. -22))
106 yshape_name(:) = 'COL'
107END WHERE
108!
109!
110!* 1. COMPUTE GAMMA(T)
111! ----------------
112!
113! (marine : à mettre dans modd_lima_cold_mixed ?)
114!
115!* 1.1 Table for Gamma and temperature (Chen and Lamb, 1994)
116!
117ztemp_chen(:) = (/ &
118& 0.00, 0.25, 0.50, 0.75, 1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50, &
119& 2.75, 3.00, 3.25, 3.50, 3.75, 4.00, 4.25, 4.50, 4.75, 5.00, 5.25, &
120& 5.50, 5.75, 6.00, 6.25, 6.50, 6.75, 7.00, 7.25, 7.50, 7.75, 8.00, &
121& 8.25, 8.50, 8.75, 9.00, 9.25, 9.50, 9.75, 10.00, 10.25, 10.50, 10.75, &
122& 11.00, 11.25, 11.50, 11.75, 12.00, 12.25, 12.50, 12.75, 13.00, 13.25, 13.50, &
123& 13.75, 14.00, 14.25, 14.50, 14.75, 15.00, 15.25, 15.50, 15.75, 16.00, 16.25, &
124& 16.50, 16.75, 17.00, 17.25, 17.50, 17.75, 18.00, 18.25, 18.50, 18.75, 19.00, &
125& 19.25, 19.50, 19.75, 20.00, 20.25, 20.50, 20.75, 21.00, 21.25, 21.50, 21.75, &
126& 22.00, 22.25, 22.50, 22.75, 23.00, 23.25, 23.50, 23.75, 24.00, 24.25, 24.50, &
127& 24.75, 25.00, 25.25, 25.50, 25.75, 26.00, 26.25, 26.50, 26.75, 27.00, 27.25, &
128& 27.50, 27.75, 28.00, 28.25, 28.50, 28.75, 29.00, 29.25, 29.50, 29.75, 30.00 /)
129!
130ztemp_chen(:) = -ztemp_chen(:)
131!
132zgam_chen(1:121) = (/ &
133& 1.00, 0.98, 0.96, 0.94, 0.92, 0.90, 0.88, 0.86, 0.83, 0.81, 0.78, &
134& 0.76, 0.70, 0.54, 0.47, 0.52, 0.63, 0.81, 1.10, 1.48, 1.91, 2.09, &
135& 2.29, 2.40, 2.45, 2.43, 2.37, 2.29, 2.14, 2.00, 1.86, 1.74, 1.62, &
136& 1.51, 1.40, 1.29, 1.19, 1.10, 1.00, 0.92, 0.85, 0.79, 0.72, 0.67, &
137& 0.62, 0.58, 0.54, 0.50, 0.47, 0.44, 0.41, 0.38, 0.35, 0.33, 0.32, &
138& 0.30, 0.29, 0.29, 0.28, 0.28, 0.28, 0.28, 0.28, 0.29, 0.29, 0.30, &
139& 0.31, 0.32, 0.33, 0.35, 0.37, 0.39, 0.43, 0.46, 0.49, 0.52, 0.56, &
140& 0.61, 0.66, 0.72, 0.79, 0.86, 0.95, 1.05, 1.15, 1.26, 1.38, 1.50, &
141& 1.60, 1.70, 1.78, 1.84, 1.88, 1.91, 1.91, 1.88, 1.86, 1.84, 1.80, &
142& 1.74, 1.70, 1.64, 1.58, 1.55, 1.51, 1.48, 1.45, 1.43, 1.41, 1.39, &
143& 1.38, 1.36, 1.35, 1.34, 1.33, 1.32, 1.31, 1.30, 1.29, 1.29, 1.28 /)
144! Chen data from 0 to -30C and given each -0.25C
145!
146!
147!* 1.2 Find indexes for Gamma
148!
149DO ii = 1, SIZE(pt,1)
150 idx_chen(ii) = minloc(abs(ztemp_chen(:)-ztc(ii)),1)
151 IF (ztc(ii) .GT. ztemp_chen(idx_chen(ii)) .AND. idx_chen(ii) .GT. 1) THEN
152 idx_chen(ii) = idx_chen(ii) - 1
153 END IF
154END DO
155!
156! linear interpolation to find Gamma given the temperature
157!
158zgam_chen_t(:) = zgam_chen(idx_chen(:))
159!
160WHERE (idx_chen(:) .LT. 121 .AND. idx_chen(:) .GT. 0)
161 zgam_chen_t(:) = zgam_chen(idx_chen(:)) + &
162 (ztc(:) - ztemp_chen(idx_chen(:))) * &
163 (zgam_chen(idx_chen(:)+1) - zgam_chen(idx_chen(:))) / &
164 (ztemp_chen(idx_chen(:)+1) - ztemp_chen(idx_chen(:)) )
165END WHERE
166!
167WHERE (idx_chen(:) .EQ. SIZE(ztemp_chen,1))
168 zgam_chen_t(:) = zgam_chen(SIZE(ztemp_chen,1))
169END WHERE
170!
171! Gamma values for plates, columns and irregulars (from Figure 3, Chen and Lamb, 1984)
172zgamma_pla = 0.5
173zgamma_col = 1.5
174zgamma_irr = 1.0
175!
176!
177!* 2. RATE OF TRANSFERT BETWEEN SHAPES
178! --------------------------------
179!!++cb-- 2/11/20 : rajout d'une condition sur la temperature (transfert
180!uniquement pour les temperatures > -20C, au dela, polycristaux)
181!
182! proportion of colums to transfer to irregulars
183zfactor_col_irr(:) = 0.
184WHERE (yshape_name(:) == 'PLA' .AND. pci_shape(:,2) .GT. pctmin(4))
185 zfactor_col_irr(:) = (zgam_chen_t(:) - zgamma_irr) / (zgamma_pla - zgamma_irr)
186END WHERE
187!
188! the factor must be between 0 and 1
189zfactor_col_irr(:) = max(zfactor_col_irr(:), 0.0)
190zfactor_col_irr(:) = min(zfactor_col_irr(:), 1.0)
191!
192! proportion of plates to transfer to irregulars
193zfactor_pla_irr(:) = 0.
194WHERE (yshape_name(:) == 'COL' .AND. pci_shape(:,1) .GT. pctmin(4))
195 zfactor_pla_irr(:) = (zgam_chen_t(:) - zgamma_irr) / (zgamma_col - zgamma_irr)
196END WHERE
197!
198! the factor must be between 0 and 1
199zfactor_pla_irr(:) = max(zfactor_pla_irr(:), 0.0)
200zfactor_pla_irr(:) = min(zfactor_pla_irr(:), 1.0)
201!
202!
203!
204!* 4. CHANGE IN NUMBER CONCENTRATION
205! ------------------------------
206!
207zzw1(:) = pci_shape(:,1) * zfactor_pla_irr(:)
208zzw2(:) = pci_shape(:,2) * zfactor_col_irr(:)
209!
210! for budgets
211p_shci_hach(:,1) = -zzw1(:)
212p_shci_hach(:,2) = -zzw2(:)
213p_shci_hach(:,3) = zzw1(:) + zzw2(:) ! add to bullet-rosettes
214!
215IF (lhook) CALL dr_hook('LIMA_CHANGE_SHAPE', 1, zhook_handle)
216END SUBROUTINE lima_change_shape
217!
218END MODULE mode_lima_change_shape
subroutine lima_change_shape(cst, limap, ksize, pt, pctmin, pdep, pci_shape, p_shci_hach)