[1322] | 1 | ! |
---|
| 2 | ! $Id: phys_state_var_mod.F90 1361 2010-04-15 09:29:52Z idelkadi $ |
---|
| 3 | ! |
---|
[909] | 4 | MODULE phys_state_var_mod |
---|
| 5 | ! Variables sauvegardees pour le startphy.nc |
---|
| 6 | !====================================================================== |
---|
| 7 | ! |
---|
| 8 | ! |
---|
| 9 | !====================================================================== |
---|
| 10 | ! Declaration des variables |
---|
| 11 | USE dimphy |
---|
[952] | 12 | INTEGER, PARAMETER :: nlevSTD=17 |
---|
[1350] | 13 | INTEGER, PARAMETER :: nlevSTD8=8 |
---|
| 14 | INTEGER, PARAMETER :: nlevSTD3=3 |
---|
[952] | 15 | INTEGER, PARAMETER :: nout=3 |
---|
| 16 | INTEGER, PARAMETER :: napisccp=1 |
---|
[967] | 17 | INTEGER, SAVE :: radpas |
---|
[1350] | 18 | !$OMP THREADPRIVATE(radpas) |
---|
[1279] | 19 | REAL, SAVE :: dtime, solaire_etat0 |
---|
| 20 | !$OMP THREADPRIVATE(dtime, solaire_etat0) |
---|
[967] | 21 | |
---|
[909] | 22 | REAL, ALLOCATABLE, SAVE :: rlat(:), rlon(:), pctsrf(:,:) |
---|
[967] | 23 | !$OMP THREADPRIVATE(rlat, rlon, pctsrf) |
---|
[909] | 24 | REAL, ALLOCATABLE, SAVE :: ftsol(:,:) |
---|
[967] | 25 | !$OMP THREADPRIVATE(ftsol) |
---|
| 26 | ! character(len=6), SAVE :: ocean |
---|
| 27 | !!!!!!$OMP THREADPRIVATE(ocean) |
---|
| 28 | ! logical, SAVE :: ok_veget |
---|
| 29 | !!!!!!$OMP THREADPRIVATE(ok_veget) |
---|
[909] | 30 | REAL, ALLOCATABLE, SAVE :: falb1(:,:), falb2(:,:) |
---|
[967] | 31 | !$OMP THREADPRIVATE(falb1, falb2) |
---|
[909] | 32 | REAL, ALLOCATABLE, SAVE :: rain_fall(:), snow_fall(:) |
---|
[967] | 33 | !$OMP THREADPRIVATE( rain_fall, snow_fall) |
---|
[909] | 34 | REAL, ALLOCATABLE, SAVE :: solsw(:), sollw(:) |
---|
[967] | 35 | !$OMP THREADPRIVATE(solsw, sollw) |
---|
[909] | 36 | REAL, ALLOCATABLE, SAVE :: radsol(:) |
---|
[967] | 37 | !$OMP THREADPRIVATE(radsol) |
---|
| 38 | |
---|
[909] | 39 | !clesphy0 param physiq |
---|
| 40 | ! |
---|
| 41 | ! Parametres de l'Orographie a l'Echelle Sous-Maille (OESM): |
---|
| 42 | ! |
---|
| 43 | REAL, ALLOCATABLE, SAVE :: zmea(:), zstd(:), zsig(:), zgam(:) |
---|
[967] | 44 | !$OMP THREADPRIVATE(zmea, zstd, zsig, zgam) |
---|
[909] | 45 | REAL, ALLOCATABLE, SAVE :: zthe(:), zpic(:), zval(:) |
---|
[967] | 46 | !$OMP THREADPRIVATE(zthe, zpic, zval) |
---|
[909] | 47 | ! REAL tabcntr0(100) |
---|
| 48 | REAL, ALLOCATABLE, SAVE :: rugoro(:) |
---|
[967] | 49 | !$OMP THREADPRIVATE(rugoro) |
---|
[909] | 50 | REAL, ALLOCATABLE, SAVE :: t_ancien(:,:), q_ancien(:,:) |
---|
[967] | 51 | !$OMP THREADPRIVATE(t_ancien, q_ancien) |
---|
[1054] | 52 | REAL, ALLOCATABLE, SAVE :: u_ancien(:,:), v_ancien(:,:) |
---|
| 53 | !$OMP THREADPRIVATE(u_ancien, v_ancien) |
---|
[909] | 54 | LOGICAL, SAVE :: ancien_ok |
---|
[967] | 55 | !$OMP THREADPRIVATE(ancien_ok) |
---|
[909] | 56 | REAL, ALLOCATABLE, SAVE :: clwcon(:,:),rnebcon(:,:) |
---|
[967] | 57 | !$OMP THREADPRIVATE(clwcon,rnebcon) |
---|
[909] | 58 | REAL, ALLOCATABLE, SAVE :: ratqs(:,:) |
---|
[967] | 59 | !$OMP THREADPRIVATE(ratqs) |
---|
[909] | 60 | REAL, ALLOCATABLE, SAVE :: pbl_tke(:,:,:) ! turb kinetic energy |
---|
[967] | 61 | !$OMP THREADPRIVATE(pbl_tke) |
---|
[927] | 62 | REAL, ALLOCATABLE, SAVE :: zmax0(:), f0(:) ! |
---|
[967] | 63 | !$OMP THREADPRIVATE(zmax0,f0) |
---|
[937] | 64 | REAL, ALLOCATABLE, SAVE :: ema_work1(:,:), ema_work2(:,:) |
---|
[967] | 65 | !$OMP THREADPRIVATE(ema_work1,ema_work2) |
---|
[942] | 66 | REAL, ALLOCATABLE, SAVE :: entr_therm(:,:), fm_therm(:,:) |
---|
[967] | 67 | !$OMP THREADPRIVATE(entr_therm,fm_therm) |
---|
[952] | 68 | REAL, ALLOCATABLE, SAVE :: detr_therm(:,:) |
---|
[967] | 69 | !$OMP THREADPRIVATE(detr_therm) |
---|
[952] | 70 | !IM 150408 |
---|
| 71 | ! pour phsystoke avec thermiques |
---|
| 72 | REAL,ALLOCATABLE,SAVE :: clwcon0th(:,:),rnebcon0th(:,:) |
---|
[967] | 73 | !$OMP THREADPRIVATE(clwcon0th,rnebcon0th) |
---|
[952] | 74 | ! radiation outputs |
---|
| 75 | REAL,ALLOCATABLE,SAVE :: swdn0(:,:), swdn(:,:) |
---|
[967] | 76 | !$OMP THREADPRIVATE(swdn0,swdn) |
---|
[952] | 77 | REAL,ALLOCATABLE,SAVE :: swup0(:,:), swup(:,:) |
---|
[967] | 78 | !$OMP THREADPRIVATE(swup0,swup) |
---|
[952] | 79 | REAL,ALLOCATABLE,SAVE :: SWdn200clr(:), SWdn200(:) |
---|
[967] | 80 | !$OMP THREADPRIVATE(SWdn200clr,SWdn200) |
---|
[952] | 81 | REAL,ALLOCATABLE,SAVE :: SWup200clr(:), SWup200(:) |
---|
[967] | 82 | !$OMP THREADPRIVATE(SWup200clr,SWup200) |
---|
[952] | 83 | REAL,ALLOCATABLE,SAVE :: lwdn0(:,:), lwdn(:,:) |
---|
[967] | 84 | !$OMP THREADPRIVATE(lwdn0,lwdn) |
---|
[952] | 85 | REAL,ALLOCATABLE,SAVE :: lwup0(:,:), lwup(:,:) |
---|
[967] | 86 | !$OMP THREADPRIVATE(lwup0,lwup) |
---|
[952] | 87 | REAL,ALLOCATABLE,SAVE :: LWdn200clr(:), LWdn200(:) |
---|
[967] | 88 | !$OMP THREADPRIVATE(LWdn200clr,LWdn200) |
---|
[952] | 89 | REAL,ALLOCATABLE,SAVE :: LWup200clr(:), LWup200(:) |
---|
[967] | 90 | !$OMP THREADPRIVATE(LWup200clr,LWup200) |
---|
[952] | 91 | REAL,ALLOCATABLE,SAVE :: LWdnTOA(:), LWdnTOAclr(:) |
---|
[967] | 92 | !$OMP THREADPRIVATE(LWdnTOA,LWdnTOAclr) |
---|
[952] | 93 | ! pressure level |
---|
| 94 | REAL,ALLOCATABLE,SAVE :: tsumSTD(:,:,:) |
---|
[967] | 95 | !$OMP THREADPRIVATE(tsumSTD) |
---|
[952] | 96 | REAL,ALLOCATABLE,SAVE :: usumSTD(:,:,:), vsumSTD(:,:,:) |
---|
[967] | 97 | !$OMP THREADPRIVATE(usumSTD,vsumSTD) |
---|
[952] | 98 | REAL,ALLOCATABLE,SAVE :: wsumSTD(:,:,:), phisumSTD(:,:,:) |
---|
[967] | 99 | !$OMP THREADPRIVATE(wsumSTD,phisumSTD) |
---|
[952] | 100 | REAL,ALLOCATABLE,SAVE :: qsumSTD(:,:,:), rhsumSTD(:,:,:) |
---|
[967] | 101 | !$OMP THREADPRIVATE(qsumSTD,rhsumSTD) |
---|
[952] | 102 | REAL,ALLOCATABLE,SAVE :: tnondef(:,:,:) |
---|
[967] | 103 | !$OMP THREADPRIVATE(tnondef) |
---|
[952] | 104 | REAL,ALLOCATABLE,SAVE :: uvsumSTD(:,:,:) |
---|
[967] | 105 | !$OMP THREADPRIVATE(uvsumSTD) |
---|
[952] | 106 | REAL,ALLOCATABLE,SAVE :: vqsumSTD(:,:,:) |
---|
[967] | 107 | !$OMP THREADPRIVATE(vqsumSTD) |
---|
[952] | 108 | REAL,ALLOCATABLE,SAVE :: vTsumSTD(:,:,:) |
---|
[967] | 109 | !$OMP THREADPRIVATE(vTsumSTD) |
---|
[952] | 110 | REAL,ALLOCATABLE,SAVE :: wqsumSTD(:,:,:) |
---|
[967] | 111 | !$OMP THREADPRIVATE(wqsumSTD) |
---|
[952] | 112 | REAL,ALLOCATABLE,SAVE :: vphisumSTD(:,:,:) |
---|
[967] | 113 | !$OMP THREADPRIVATE(vphisumSTD) |
---|
[952] | 114 | REAL,ALLOCATABLE,SAVE :: wTsumSTD(:,:,:) |
---|
[967] | 115 | !$OMP THREADPRIVATE(wTsumSTD) |
---|
[952] | 116 | REAL,ALLOCATABLE,SAVE :: u2sumSTD(:,:,:) |
---|
[967] | 117 | !$OMP THREADPRIVATE(u2sumSTD) |
---|
[952] | 118 | REAL,ALLOCATABLE,SAVE :: v2sumSTD(:,:,:) |
---|
[967] | 119 | !$OMP THREADPRIVATE(v2sumSTD) |
---|
[952] | 120 | REAL,ALLOCATABLE,SAVE :: T2sumSTD(:,:,:) |
---|
[967] | 121 | !$OMP THREADPRIVATE(T2sumSTD) |
---|
[1350] | 122 | !IM begin |
---|
| 123 | REAL,ALLOCATABLE,SAVE :: wlevSTD(:,:), ulevSTD(:,:), vlevSTD(:,:) |
---|
[1361] | 124 | !$OMP THREADPRIVATE(wlevSTD,ulevSTD,vlevSTD) |
---|
[1350] | 125 | REAL,ALLOCATABLE,SAVE :: tlevSTD(:,:), qlevSTD(:,:), rhlevSTD(:,:) |
---|
[1361] | 126 | !$OMP THREADPRIVATE(tlevSTD,qlevSTD,rhlevSTD) |
---|
[1350] | 127 | REAL,ALLOCATABLE,SAVE :: philevSTD(:,:) |
---|
[1361] | 128 | !$OMP THREADPRIVATE(philevSTD) |
---|
[1350] | 129 | REAL,ALLOCATABLE,SAVE :: uvSTD(:,:) |
---|
[1361] | 130 | !$OMP THREADPRIVATE(uvSTD) |
---|
[1350] | 131 | REAL,ALLOCATABLE,SAVE :: vqSTD(:,:) |
---|
[1361] | 132 | !$OMP THREADPRIVATE(vqSTD) |
---|
[1350] | 133 | REAL,ALLOCATABLE,SAVE :: vTSTD(:,:) |
---|
[1361] | 134 | !$OMP THREADPRIVATE(vTSTD) |
---|
[1350] | 135 | REAL,ALLOCATABLE,SAVE :: wqSTD(:,:) |
---|
[1361] | 136 | !$OMP THREADPRIVATE(wqSTD) |
---|
[1350] | 137 | REAL,ALLOCATABLE,SAVE :: vphiSTD(:,:) |
---|
[1361] | 138 | !$OMP THREADPRIVATE(vphiSTD) |
---|
[1350] | 139 | REAL,ALLOCATABLE,SAVE :: wTSTD(:,:) |
---|
[1361] | 140 | !$OMP THREADPRIVATE(wTSTD) |
---|
[1350] | 141 | REAL,ALLOCATABLE,SAVE :: u2STD(:,:) |
---|
[1361] | 142 | !$OMP THREADPRIVATE(u2STD) |
---|
[1350] | 143 | REAL,ALLOCATABLE,SAVE :: v2STD(:,:) |
---|
[1361] | 144 | !$OMP THREADPRIVATE(v2STD) |
---|
[1350] | 145 | REAL,ALLOCATABLE,SAVE :: T2STD(:,:) |
---|
[1361] | 146 | !$OMP THREADPRIVATE(T2STD) |
---|
[1350] | 147 | !IM end |
---|
[952] | 148 | INTEGER,ALLOCATABLE,SAVE :: seed_old(:,:) |
---|
[967] | 149 | !$OMP THREADPRIVATE(seed_old) |
---|
[952] | 150 | REAL,ALLOCATABLE,SAVE :: zuthe(:),zvthe(:) |
---|
[967] | 151 | !$OMP THREADPRIVATE(zuthe,zvthe) |
---|
[952] | 152 | REAL,ALLOCATABLE,SAVE :: alb_neig(:) |
---|
[967] | 153 | !$OMP THREADPRIVATE(alb_neig) |
---|
[952] | 154 | !cloud base mass flux |
---|
| 155 | REAL,ALLOCATABLE,SAVE :: ema_workcbmf(:), ema_cbmf(:) |
---|
[967] | 156 | !$OMP THREADPRIVATE(ema_workcbmf,ema_cbmf) |
---|
[952] | 157 | !cloud base pressure & cloud top pressure |
---|
| 158 | REAL,ALLOCATABLE,SAVE :: ema_pcb(:), ema_pct(:) |
---|
[967] | 159 | !$OMP THREADPRIVATE(ema_pcb,ema_pct) |
---|
[952] | 160 | REAL,ALLOCATABLE,SAVE :: Ma(:,:) ! undilute upward mass flux |
---|
[967] | 161 | !$OMP THREADPRIVATE(Ma) |
---|
[952] | 162 | REAL,ALLOCATABLE,SAVE :: qcondc(:,:) ! in-cld water content from convect |
---|
[967] | 163 | !$OMP THREADPRIVATE(qcondc) |
---|
[952] | 164 | REAL,ALLOCATABLE,SAVE :: wd(:) ! sb |
---|
[967] | 165 | !$OMP THREADPRIVATE(wd) |
---|
[952] | 166 | REAL,ALLOCATABLE,SAVE :: sigd(:) |
---|
[967] | 167 | !$OMP THREADPRIVATE(sigd) |
---|
[952] | 168 | ! |
---|
| 169 | REAL,ALLOCATABLE,SAVE :: cin(:) |
---|
[967] | 170 | !$OMP THREADPRIVATE(cin) |
---|
[952] | 171 | ! ftd : differential heating between wake and environment |
---|
| 172 | REAL,ALLOCATABLE,SAVE :: ftd(:,:) |
---|
[967] | 173 | !$OMP THREADPRIVATE(ftd) |
---|
[952] | 174 | ! fqd : differential moistening between wake and environment |
---|
| 175 | REAL,ALLOCATABLE,SAVE :: fqd(:,:) |
---|
[967] | 176 | !$OMP THREADPRIVATE(fqd) |
---|
[952] | 177 | !34EK |
---|
| 178 | ! -- Variables de controle de ALE et ALP |
---|
| 179 | !ALE : Energie disponible pour soulevement : utilisee par la |
---|
| 180 | ! convection d'Emanuel pour le declenchement et la regulation |
---|
| 181 | REAL,ALLOCATABLE,SAVE :: ALE(:) |
---|
[967] | 182 | !$OMP THREADPRIVATE(ALE) |
---|
[952] | 183 | !ALP : Puissance disponible pour soulevement |
---|
| 184 | REAL,ALLOCATABLE,SAVE :: ALP(:) |
---|
[967] | 185 | !$OMP THREADPRIVATE(ALP) |
---|
[952] | 186 | ! |
---|
| 187 | ! nouvelles variables pour le couplage convection-couche limite |
---|
| 188 | REAL,ALLOCATABLE,SAVE :: Ale_bl(:) |
---|
[967] | 189 | !$OMP THREADPRIVATE(Ale_bl) |
---|
[952] | 190 | REAL,ALLOCATABLE,SAVE :: Alp_bl(:) |
---|
[967] | 191 | !$OMP THREADPRIVATE(Alp_bl) |
---|
[952] | 192 | INTEGER,ALLOCATABLE,SAVE :: lalim_conv(:) |
---|
[967] | 193 | !$OMP THREADPRIVATE(lalim_conv) |
---|
[952] | 194 | REAL,ALLOCATABLE,SAVE :: wght_th(:,:) |
---|
[967] | 195 | !$OMP THREADPRIVATE(wght_th) |
---|
[952] | 196 | ! |
---|
| 197 | ! variables de la wake |
---|
| 198 | ! wake_deltat : ecart de temperature avec la zone non perturbee |
---|
| 199 | ! wake_deltaq : ecart d'humidite avec la zone non perturbee |
---|
| 200 | ! wake_Cstar : vitesse d'etalement de la poche |
---|
| 201 | ! wake_s : fraction surfacique occupee par la poche froide |
---|
[1322] | 202 | ! wake_pe : wake potential energy - WAPE |
---|
[952] | 203 | ! wake_fip : Gust Front Impinging power - ALP |
---|
| 204 | ! dt_wake, dq_wake: LS tendencies due to wake |
---|
| 205 | REAL,ALLOCATABLE,SAVE :: wake_deltat(:,:) |
---|
[967] | 206 | !$OMP THREADPRIVATE(wake_deltat) |
---|
[952] | 207 | REAL,ALLOCATABLE,SAVE :: wake_deltaq(:,:) |
---|
[967] | 208 | !$OMP THREADPRIVATE(wake_deltaq) |
---|
[952] | 209 | REAL,ALLOCATABLE,SAVE :: wake_Cstar(:) |
---|
[967] | 210 | !$OMP THREADPRIVATE(wake_Cstar) |
---|
[952] | 211 | REAL,ALLOCATABLE,SAVE :: wake_s(:) |
---|
[967] | 212 | !$OMP THREADPRIVATE(wake_s) |
---|
[1322] | 213 | REAL,ALLOCATABLE,SAVE :: wake_pe(:) |
---|
| 214 | !$OMP THREADPRIVATE(wake_pe) |
---|
[952] | 215 | REAL,ALLOCATABLE,SAVE :: wake_fip(:) |
---|
[967] | 216 | !$OMP THREADPRIVATE(wake_fip) |
---|
[952] | 217 | REAL,ALLOCATABLE,SAVE :: dt_wake(:,:) |
---|
[967] | 218 | !$OMP THREADPRIVATE(dt_wake) |
---|
[952] | 219 | REAL,ALLOCATABLE,SAVE :: dq_wake(:,:) |
---|
[967] | 220 | !$OMP THREADPRIVATE(dq_wake) |
---|
[952] | 221 | ! |
---|
| 222 | ! pfrac_impa : Produits des coefs lessivage impaction |
---|
| 223 | ! pfrac_nucl : Produits des coefs lessivage nucleation |
---|
| 224 | ! pfrac_1nucl: Produits des coefs lessi nucl (alpha = 1) |
---|
| 225 | REAL,ALLOCATABLE,SAVE :: pfrac_impa(:,:), pfrac_nucl(:,:) |
---|
[967] | 226 | !$OMP THREADPRIVATE(pfrac_impa,pfrac_nucl) |
---|
[952] | 227 | REAL,ALLOCATABLE,SAVE :: pfrac_1nucl(:,:) |
---|
[967] | 228 | !$OMP THREADPRIVATE(pfrac_1nucl) |
---|
[952] | 229 | ! |
---|
| 230 | REAL,ALLOCATABLE,SAVE :: total_rain(:), nday_rain(:) |
---|
[967] | 231 | !$OMP THREADPRIVATE(total_rain,nday_rain) |
---|
[952] | 232 | REAL,ALLOCATABLE,SAVE :: paire_ter(:) |
---|
[967] | 233 | !$OMP THREADPRIVATE(paire_ter) |
---|
[952] | 234 | ! albsol1: albedo du sol total pour SW visible |
---|
| 235 | ! albsol2: albedo du sol total pour SW proche IR |
---|
| 236 | REAL,ALLOCATABLE,SAVE :: albsol1(:), albsol2(:) |
---|
[967] | 237 | !$OMP THREADPRIVATE(albsol1,albsol2) |
---|
[1279] | 238 | |
---|
| 239 | REAL, ALLOCATABLE, SAVE:: wo(:, :, :) |
---|
| 240 | ! column-density of ozone in a layer, in kilo-Dobsons |
---|
| 241 | ! Third dimension has size 1 or 2. |
---|
| 242 | ! "wo(:, :, 1)" is for the average day-night field, |
---|
| 243 | ! "wo(:, :, 2)" is for daylight time. |
---|
| 244 | !$OMP THREADPRIVATE(wo) |
---|
| 245 | |
---|
[952] | 246 | ! heat : chauffage solaire |
---|
| 247 | ! heat0: chauffage solaire ciel clair |
---|
| 248 | ! cool : refroidissement infrarouge |
---|
| 249 | ! cool0 : refroidissement infrarouge ciel clair |
---|
| 250 | ! sollwdown : downward LW flux at surface |
---|
| 251 | ! sollwdownclr : downward CS LW flux at surface |
---|
| 252 | ! toplwdown : downward CS LW flux at TOA |
---|
| 253 | ! toplwdownclr : downward CS LW flux at TOA |
---|
| 254 | REAL,ALLOCATABLE,SAVE :: clwcon0(:,:),rnebcon0(:,:) |
---|
[967] | 255 | !$OMP THREADPRIVATE(clwcon0,rnebcon0) |
---|
[952] | 256 | REAL,ALLOCATABLE,SAVE :: heat(:,:) |
---|
[967] | 257 | !$OMP THREADPRIVATE(heat) |
---|
[952] | 258 | REAL,ALLOCATABLE,SAVE :: heat0(:,:) |
---|
[967] | 259 | !$OMP THREADPRIVATE(heat0) |
---|
[952] | 260 | REAL,ALLOCATABLE,SAVE :: cool(:,:) |
---|
[967] | 261 | !$OMP THREADPRIVATE(cool) |
---|
[952] | 262 | REAL,ALLOCATABLE,SAVE :: cool0(:,:) |
---|
[967] | 263 | !$OMP THREADPRIVATE(cool0) |
---|
[952] | 264 | REAL,ALLOCATABLE,SAVE :: topsw(:), toplw(:) |
---|
[967] | 265 | !$OMP THREADPRIVATE(topsw,toplw) |
---|
[952] | 266 | REAL,ALLOCATABLE,SAVE :: sollwdown(:) |
---|
[967] | 267 | !$OMP THREADPRIVATE(sollwdown) |
---|
[952] | 268 | REAL,ALLOCATABLE,SAVE :: sollwdownclr(:) |
---|
[967] | 269 | !$OMP THREADPRIVATE(sollwdownclr) |
---|
[952] | 270 | REAL,ALLOCATABLE,SAVE :: toplwdown(:) |
---|
[967] | 271 | !$OMP THREADPRIVATE(toplwdown) |
---|
[952] | 272 | REAL,ALLOCATABLE,SAVE :: toplwdownclr(:) |
---|
[967] | 273 | !$OMP THREADPRIVATE(toplwdownclr) |
---|
[952] | 274 | REAL,ALLOCATABLE,SAVE :: topsw0(:),toplw0(:),solsw0(:),sollw0(:) |
---|
[967] | 275 | !$OMP THREADPRIVATE(topsw0,toplw0,solsw0,sollw0) |
---|
[952] | 276 | REAL,ALLOCATABLE,SAVE :: albpla(:) |
---|
[967] | 277 | !$OMP THREADPRIVATE(albpla) |
---|
[952] | 278 | ! pbase : cloud base pressure |
---|
| 279 | ! bbase : cloud base buoyancy |
---|
| 280 | REAL,ALLOCATABLE,SAVE :: cape(:) |
---|
[967] | 281 | !$OMP THREADPRIVATE(cape) |
---|
[952] | 282 | REAL,ALLOCATABLE,SAVE :: pbase(:) |
---|
[967] | 283 | !$OMP THREADPRIVATE(pbase) |
---|
[952] | 284 | REAL,ALLOCATABLE,SAVE :: bbase(:) |
---|
[967] | 285 | !$OMP THREADPRIVATE(bbase) |
---|
[952] | 286 | ! |
---|
| 287 | REAL,SAVE,ALLOCATABLE :: zqasc(:,:) |
---|
[967] | 288 | !$OMP THREADPRIVATE( zqasc) |
---|
[952] | 289 | INTEGER,ALLOCATABLE,SAVE :: ibas_con(:), itop_con(:) |
---|
[967] | 290 | !$OMP THREADPRIVATE(ibas_con,itop_con) |
---|
[952] | 291 | REAL,SAVE,ALLOCATABLE :: rain_con(:) |
---|
[967] | 292 | !$OMP THREADPRIVATE(rain_con) |
---|
[952] | 293 | REAL,SAVE,ALLOCATABLE :: snow_con(:) |
---|
[967] | 294 | !$OMP THREADPRIVATE(snow_con) |
---|
[952] | 295 | ! |
---|
| 296 | REAL,SAVE,ALLOCATABLE :: rlonPOS(:) |
---|
[967] | 297 | !$OMP THREADPRIVATE(rlonPOS) |
---|
[952] | 298 | REAL,SAVE,ALLOCATABLE :: newsst(:) |
---|
[967] | 299 | !$OMP THREADPRIVATE(newsst) |
---|
[952] | 300 | REAL,SAVE,ALLOCATABLE :: u10m(:,:), v10m(:,:) |
---|
[967] | 301 | !$OMP THREADPRIVATE(u10m,v10m) |
---|
[952] | 302 | ! |
---|
| 303 | ! ok_ade=T -ADE=topswad-topsw |
---|
| 304 | ! ok_aie=T -> |
---|
| 305 | ! ok_ade=T -AIE=topswai-topswad |
---|
[1279] | 306 | ! ok_ade=F -AIE=topswai-topsw |
---|
[952] | 307 | ! |
---|
| 308 | !topswad, solswad : Aerosol direct effect |
---|
| 309 | REAL,SAVE,ALLOCATABLE :: topswad(:), solswad(:) |
---|
[967] | 310 | !$OMP THREADPRIVATE(topswad,solswad) |
---|
[952] | 311 | !topswai, solswai : Aerosol indirect effect |
---|
| 312 | REAL,SAVE,ALLOCATABLE :: topswai(:), solswai(:) |
---|
[967] | 313 | !$OMP THREADPRIVATE(topswai,solswai) |
---|
[959] | 314 | |
---|
[1279] | 315 | REAL,SAVE,ALLOCATABLE :: tau_aero(:,:,:,:), piz_aero(:,:,:,:), cg_aero(:,:,:,:) |
---|
| 316 | !$OMP THREADPRIVATE(tau_aero, piz_aero, cg_aero) |
---|
[952] | 317 | REAL,SAVE,ALLOCATABLE :: ccm(:,:,:) |
---|
[967] | 318 | !$OMP THREADPRIVATE(ccm) |
---|
[952] | 319 | |
---|
[909] | 320 | CONTAINS |
---|
| 321 | |
---|
| 322 | !====================================================================== |
---|
[1279] | 323 | SUBROUTINE phys_state_var_init(read_climoz) |
---|
[909] | 324 | use dimphy |
---|
[1299] | 325 | USE control_mod |
---|
[1279] | 326 | use aero_mod |
---|
[909] | 327 | IMPLICIT NONE |
---|
[1279] | 328 | |
---|
| 329 | integer, intent(in):: read_climoz |
---|
| 330 | ! read ozone climatology |
---|
| 331 | ! Allowed values are 0, 1 and 2 |
---|
| 332 | ! 0: do not read an ozone climatology |
---|
| 333 | ! 1: read a single ozone climatology that will be used day and night |
---|
| 334 | ! 2: read two ozone climatologies, the average day and night |
---|
| 335 | ! climatology and the daylight climatology |
---|
| 336 | |
---|
[909] | 337 | #include "indicesol.h" |
---|
[952] | 338 | ALLOCATE(rlat(klon), rlon(klon)) |
---|
| 339 | ALLOCATE(pctsrf(klon,nbsrf)) |
---|
| 340 | ALLOCATE(ftsol(klon,nbsrf)) |
---|
| 341 | ALLOCATE(falb1(klon,nbsrf)) |
---|
| 342 | ALLOCATE(falb2(klon,nbsrf)) |
---|
| 343 | ALLOCATE(rain_fall(klon)) |
---|
| 344 | ALLOCATE(snow_fall(klon)) |
---|
[909] | 345 | ALLOCATE(solsw(klon), sollw(klon)) |
---|
[952] | 346 | ALLOCATE(radsol(klon)) |
---|
| 347 | ALLOCATE(zmea(klon), zstd(klon), zsig(klon), zgam(klon)) |
---|
| 348 | ALLOCATE(zthe(klon), zpic(klon), zval(klon)) |
---|
[909] | 349 | |
---|
[952] | 350 | ALLOCATE(rugoro(klon)) |
---|
| 351 | ALLOCATE(t_ancien(klon,klev), q_ancien(klon,klev)) |
---|
[1054] | 352 | ALLOCATE(u_ancien(klon,klev), v_ancien(klon,klev)) |
---|
[952] | 353 | ALLOCATE(clwcon(klon,klev),rnebcon(klon,klev)) |
---|
| 354 | ALLOCATE(ratqs(klon,klev)) |
---|
[909] | 355 | ALLOCATE(pbl_tke(klon,klev+1,nbsrf)) |
---|
[927] | 356 | ALLOCATE(zmax0(klon), f0(klon)) |
---|
[937] | 357 | ALLOCATE(ema_work1(klon,klev), ema_work2(klon,klev)) |
---|
[942] | 358 | ALLOCATE(entr_therm(klon,klev), fm_therm(klon,klev+1)) |
---|
[952] | 359 | ALLOCATE(detr_therm(klon,klev)) |
---|
| 360 | ! pour phsystoke avec thermiques |
---|
| 361 | ALLOCATE(clwcon0th(klon,klev),rnebcon0th(klon,klev)) |
---|
| 362 | ! radiation outputs |
---|
| 363 | ALLOCATE(swdn0(klon,klevp1), swdn(klon,klevp1)) |
---|
| 364 | ALLOCATE(swup0(klon,klevp1), swup(klon,klevp1)) |
---|
| 365 | ALLOCATE(lwdn0(klon,klevp1), lwdn(klon,klevp1)) |
---|
| 366 | ALLOCATE(lwup0(klon,klevp1), lwup(klon,klevp1)) |
---|
| 367 | ALLOCATE(SWdn200clr(klon), SWdn200(klon)) |
---|
| 368 | ALLOCATE(SWup200clr(klon), SWup200(klon)) |
---|
| 369 | ALLOCATE(LWdn200clr(klon), LWdn200(klon)) |
---|
| 370 | ALLOCATE(LWup200clr(klon), LWup200(klon)) |
---|
| 371 | ALLOCATE(LWdnTOA(klon), LWdnTOAclr(klon)) |
---|
| 372 | ! pressure level |
---|
| 373 | ALLOCATE(tsumSTD(klon,nlevSTD,nout)) |
---|
| 374 | ALLOCATE(usumSTD(klon,nlevSTD,nout), vsumSTD(klon,nlevSTD,nout)) |
---|
| 375 | ALLOCATE(wsumSTD(klon,nlevSTD,nout), phisumSTD(klon,nlevSTD,nout)) |
---|
| 376 | ALLOCATE(qsumSTD(klon,nlevSTD,nout), rhsumSTD(klon,nlevSTD,nout)) |
---|
| 377 | ALLOCATE(tnondef(klon,nlevSTD,nout)) |
---|
| 378 | ALLOCATE(uvsumSTD(klon,nlevSTD,nout)) |
---|
| 379 | ALLOCATE(vqsumSTD(klon,nlevSTD,nout)) |
---|
| 380 | ALLOCATE(vTsumSTD(klon,nlevSTD,nout)) |
---|
| 381 | ALLOCATE(wqsumSTD(klon,nlevSTD,nout)) |
---|
| 382 | ALLOCATE(vphisumSTD(klon,nlevSTD,nout)) |
---|
| 383 | ALLOCATE(wTsumSTD(klon,nlevSTD,nout)) |
---|
| 384 | ALLOCATE(u2sumSTD(klon,nlevSTD,nout)) |
---|
| 385 | ALLOCATE(v2sumSTD(klon,nlevSTD,nout)) |
---|
| 386 | ALLOCATE(T2sumSTD(klon,nlevSTD,nout)) |
---|
[1350] | 387 | !IM beg |
---|
| 388 | ALLOCATE(wlevSTD(klon,nlevSTD), ulevSTD(klon,nlevSTD), vlevSTD(klon,nlevSTD)) |
---|
| 389 | ALLOCATE(tlevSTD(klon,nlevSTD), qlevSTD(klon,nlevSTD), rhlevSTD(klon,nlevSTD)) |
---|
| 390 | ALLOCATE(philevSTD(klon,nlevSTD)) |
---|
| 391 | ALLOCATE(uvSTD(klon,nlevSTD),vqSTD(klon,nlevSTD)) |
---|
| 392 | ALLOCATE(vTSTD(klon,nlevSTD),wqSTD(klon,nlevSTD)) |
---|
| 393 | ALLOCATE(vphiSTD(klon,nlevSTD),wTSTD(klon,nlevSTD)) |
---|
| 394 | ALLOCATE(u2STD(klon,nlevSTD),v2STD(klon,nlevSTD)) |
---|
| 395 | ALLOCATE(T2STD(klon,nlevSTD)) |
---|
| 396 | !IM end |
---|
[952] | 397 | ALLOCATE(seed_old(klon,napisccp)) |
---|
| 398 | ALLOCATE(zuthe(klon),zvthe(klon)) |
---|
| 399 | ALLOCATE(alb_neig(klon)) |
---|
| 400 | !cloud base mass flux |
---|
| 401 | ALLOCATE(ema_workcbmf(klon), ema_cbmf(klon)) |
---|
| 402 | !cloud base pressure & cloud top pressure |
---|
| 403 | ALLOCATE(ema_pcb(klon), ema_pct(klon)) |
---|
| 404 | ! |
---|
| 405 | ALLOCATE(Ma(klon,klev)) |
---|
| 406 | ALLOCATE(qcondc(klon,klev)) |
---|
| 407 | ALLOCATE(wd(klon)) |
---|
| 408 | ALLOCATE(sigd(klon)) |
---|
| 409 | ALLOCATE(cin(klon), ALE(klon), ALP(klon)) |
---|
| 410 | ALLOCATE(ftd(klon,klev), fqd(klon,klev)) |
---|
| 411 | ALLOCATE(Ale_bl(klon)) |
---|
| 412 | ALLOCATE(Alp_bl(klon)) |
---|
| 413 | ALLOCATE(lalim_conv(klon)) |
---|
| 414 | ALLOCATE(wght_th(klon,klev)) |
---|
| 415 | ALLOCATE(wake_deltat(klon,klev), wake_deltaq(klon,klev)) |
---|
[1322] | 416 | ALLOCATE(wake_Cstar(klon), wake_s(klon)) |
---|
| 417 | ALLOCATE(wake_pe(klon), wake_fip(klon)) |
---|
[952] | 418 | ALLOCATE(dt_wake(klon,klev), dq_wake(klon,klev)) |
---|
| 419 | ALLOCATE(pfrac_impa(klon,klev), pfrac_nucl(klon,klev)) |
---|
| 420 | ALLOCATE(pfrac_1nucl(klon,klev)) |
---|
| 421 | ALLOCATE(total_rain(klon), nday_rain(klon)) |
---|
| 422 | ALLOCATE(paire_ter(klon)) |
---|
| 423 | ALLOCATE(albsol1(klon), albsol2(klon)) |
---|
[1279] | 424 | |
---|
| 425 | if (read_climoz <= 1) then |
---|
| 426 | ALLOCATE(wo(klon,klev, 1)) |
---|
| 427 | else |
---|
| 428 | ! read_climoz == 2 |
---|
| 429 | ALLOCATE(wo(klon,klev, 2)) |
---|
| 430 | end if |
---|
| 431 | |
---|
[952] | 432 | ALLOCATE(clwcon0(klon,klev),rnebcon0(klon,klev)) |
---|
| 433 | ALLOCATE(heat(klon,klev), heat0(klon,klev)) |
---|
| 434 | ALLOCATE(cool(klon,klev), cool0(klon,klev)) |
---|
| 435 | ALLOCATE(topsw(klon), toplw(klon)) |
---|
| 436 | ALLOCATE(sollwdown(klon), sollwdownclr(klon)) |
---|
| 437 | ALLOCATE(toplwdown(klon), toplwdownclr(klon)) |
---|
| 438 | ALLOCATE(topsw0(klon),toplw0(klon),solsw0(klon),sollw0(klon)) |
---|
| 439 | ALLOCATE(albpla(klon)) |
---|
| 440 | ALLOCATE(cape(klon)) |
---|
| 441 | ALLOCATE(pbase(klon),bbase(klon)) |
---|
| 442 | ALLOCATE(zqasc(klon,klev)) |
---|
| 443 | ALLOCATE(ibas_con(klon), itop_con(klon)) |
---|
| 444 | ALLOCATE(rain_con(klon), snow_con(klon)) |
---|
| 445 | ALLOCATE(rlonPOS(klon)) |
---|
| 446 | ALLOCATE(newsst(klon)) |
---|
| 447 | ALLOCATE(u10m(klon,nbsrf), v10m(klon,nbsrf)) |
---|
| 448 | ALLOCATE(topswad(klon), solswad(klon)) |
---|
| 449 | ALLOCATE(topswai(klon), solswai(klon)) |
---|
[1279] | 450 | ALLOCATE(tau_aero(klon,klev,naero_grp,nbands),piz_aero(klon,klev,naero_grp,nbands),cg_aero(klon,klev,naero_grp,nbands)) |
---|
| 451 | ALLOCATE(ccm(klon,klev,nbands)) |
---|
[959] | 452 | |
---|
[909] | 453 | END SUBROUTINE phys_state_var_init |
---|
| 454 | |
---|
| 455 | !====================================================================== |
---|
| 456 | SUBROUTINE phys_state_var_end |
---|
| 457 | use dimphy |
---|
[1299] | 458 | use control_mod |
---|
[909] | 459 | IMPLICIT NONE |
---|
| 460 | #include "indicesol.h" |
---|
| 461 | |
---|
[952] | 462 | deallocate(rlat, rlon, pctsrf, ftsol, falb1, falb2) |
---|
| 463 | deallocate(rain_fall, snow_fall, solsw, sollw, radsol) |
---|
| 464 | deallocate(zmea, zstd, zsig, zgam) |
---|
| 465 | deallocate(zthe, zpic, zval) |
---|
| 466 | deallocate(rugoro, t_ancien, q_ancien, clwcon, rnebcon) |
---|
[1054] | 467 | deallocate( u_ancien, v_ancien ) |
---|
[952] | 468 | deallocate(ratqs, pbl_tke) |
---|
| 469 | deallocate(zmax0, f0) |
---|
| 470 | deallocate(ema_work1, ema_work2) |
---|
| 471 | deallocate(entr_therm, fm_therm) |
---|
| 472 | deallocate(detr_therm) |
---|
| 473 | deallocate(clwcon0th, rnebcon0th) |
---|
| 474 | ! radiation outputs |
---|
| 475 | deallocate(swdn0, swdn) |
---|
| 476 | deallocate(swup0, swup) |
---|
| 477 | deallocate(lwdn0, lwdn) |
---|
| 478 | deallocate(lwup0, lwup) |
---|
| 479 | deallocate(SWdn200clr, SWdn200) |
---|
| 480 | deallocate(SWup200clr, SWup200) |
---|
| 481 | deallocate(LWdn200clr, LWdn200) |
---|
| 482 | deallocate(LWup200clr, LWup200) |
---|
| 483 | deallocate(LWdnTOA, LWdnTOAclr) |
---|
| 484 | ! pressure level |
---|
| 485 | deallocate(tsumSTD) |
---|
| 486 | deallocate(usumSTD, vsumSTD) |
---|
| 487 | deallocate(wsumSTD, phisumSTD) |
---|
| 488 | deallocate(tnondef) |
---|
[970] | 489 | deallocate(qsumSTD, rhsumSTD) |
---|
[952] | 490 | deallocate(uvsumSTD) |
---|
| 491 | deallocate(vqsumSTD) |
---|
| 492 | deallocate(vTsumSTD) |
---|
| 493 | deallocate(wqsumSTD) |
---|
| 494 | deallocate(vphisumSTD) |
---|
| 495 | deallocate(wTsumSTD) |
---|
| 496 | deallocate(u2sumSTD) |
---|
| 497 | deallocate(v2sumSTD) |
---|
| 498 | deallocate(T2sumSTD) |
---|
[1350] | 499 | !IM beg |
---|
| 500 | deallocate(wlevSTD,ulevSTD,vlevSTD,tlevSTD,qlevSTD,rhlevSTD,philevSTD) |
---|
| 501 | deallocate(uvSTD,vqSTD,vTSTD,wqSTD,vphiSTD,wTSTD,u2STD,v2STD,T2STD) |
---|
| 502 | !IM end |
---|
[952] | 503 | deallocate(seed_old) |
---|
| 504 | deallocate(zuthe, zvthe) |
---|
| 505 | deallocate(alb_neig) |
---|
| 506 | deallocate(ema_workcbmf, ema_cbmf) |
---|
| 507 | deallocate(ema_pcb, ema_pct) |
---|
| 508 | deallocate(Ma, qcondc) |
---|
| 509 | deallocate(wd, sigd) |
---|
| 510 | deallocate(cin, ALE, ALP) |
---|
| 511 | deallocate(ftd, fqd) |
---|
| 512 | deallocate(Ale_bl, Alp_bl) |
---|
| 513 | deallocate(lalim_conv, wght_th) |
---|
| 514 | deallocate(wake_deltat, wake_deltaq) |
---|
[1322] | 515 | deallocate(wake_Cstar, wake_s, wake_pe, wake_fip) |
---|
[952] | 516 | deallocate(dt_wake, dq_wake) |
---|
| 517 | deallocate(pfrac_impa, pfrac_nucl) |
---|
| 518 | deallocate(pfrac_1nucl) |
---|
| 519 | deallocate(total_rain, nday_rain) |
---|
| 520 | deallocate(paire_ter) |
---|
| 521 | deallocate(albsol1, albsol2) |
---|
| 522 | deallocate(wo) |
---|
| 523 | deallocate(clwcon0,rnebcon0) |
---|
| 524 | deallocate(heat, heat0) |
---|
| 525 | deallocate(cool, cool0) |
---|
| 526 | deallocate(topsw, toplw) |
---|
| 527 | deallocate(sollwdown, sollwdownclr) |
---|
| 528 | deallocate(toplwdown, toplwdownclr) |
---|
| 529 | deallocate(topsw0,toplw0,solsw0,sollw0) |
---|
| 530 | deallocate(albpla) |
---|
| 531 | deallocate(cape) |
---|
| 532 | deallocate(pbase,bbase) |
---|
| 533 | deallocate(zqasc) |
---|
| 534 | deallocate(ibas_con, itop_con) |
---|
| 535 | deallocate(rain_con, snow_con) |
---|
| 536 | deallocate(rlonPOS) |
---|
| 537 | deallocate(newsst) |
---|
| 538 | deallocate(u10m, v10m) |
---|
| 539 | deallocate(topswad, solswad) |
---|
| 540 | deallocate(topswai, solswai) |
---|
[1279] | 541 | deallocate(tau_aero,piz_aero,cg_aero) |
---|
[952] | 542 | deallocate(ccm) |
---|
[959] | 543 | |
---|
[909] | 544 | END SUBROUTINE phys_state_var_end |
---|
| 545 | |
---|
| 546 | END MODULE phys_state_var_mod |
---|