[728] | 1 | !================================================================== |
---|
| 2 | module radii_mod |
---|
| 3 | !================================================================== |
---|
| 4 | ! module to centralize the radii calculations for aerosols |
---|
| 5 | ! OK for water but should be extended to other aerosols (CO2,...) |
---|
| 6 | !================================================================== |
---|
| 7 | |
---|
| 8 | ! water cloud optical properties |
---|
[1397] | 9 | |
---|
[2297] | 10 | use callkeys_mod, only: radfixed,Nmix_co2 |
---|
[728] | 11 | |
---|
| 12 | real, save :: rad_h2o |
---|
| 13 | real, save :: rad_h2o_ice |
---|
| 14 | real, save :: Nmix_h2o |
---|
| 15 | real, save :: Nmix_h2o_ice |
---|
[1315] | 16 | !$OMP THREADPRIVATE(rad_h2o,rad_h2o_ice,Nmix_h2o,Nmix_h2o_ice) |
---|
[728] | 17 | real, parameter :: coef_chaud=0.13 |
---|
| 18 | real, parameter :: coef_froid=0.09 |
---|
| 19 | |
---|
| 20 | |
---|
[1529] | 21 | contains |
---|
[728] | 22 | |
---|
| 23 | |
---|
| 24 | !================================================================== |
---|
[1308] | 25 | subroutine su_aer_radii(ngrid,nlayer,reffrad,nueffrad) |
---|
[728] | 26 | !================================================================== |
---|
| 27 | ! Purpose |
---|
| 28 | ! ------- |
---|
| 29 | ! Compute the effective radii of liquid and icy water particles |
---|
| 30 | ! |
---|
| 31 | ! Authors |
---|
| 32 | ! ------- |
---|
| 33 | ! Jeremy Leconte (2012) |
---|
| 34 | ! |
---|
| 35 | !================================================================== |
---|
[1521] | 36 | use ioipsl_getin_p_mod, only: getin_p |
---|
[728] | 37 | use radinc_h, only: naerkind |
---|
[1529] | 38 | use aerosol_mod, only: iaero_back2lay, iaero_co2, iaero_dust, & |
---|
[2297] | 39 | iaero_h2o, iaero_h2so4, iaero_nh3, iaero_nlay, iaero_aurora |
---|
[2340] | 40 | use callkeys_mod, only: size_nh3_cloud, nlayaero, aeronlay_size, aeronlay_nueff |
---|
[2005] | 41 | |
---|
[728] | 42 | Implicit none |
---|
| 43 | |
---|
[858] | 44 | integer,intent(in) :: ngrid |
---|
[1308] | 45 | integer,intent(in) :: nlayer |
---|
[728] | 46 | |
---|
[1308] | 47 | real, intent(out) :: reffrad(ngrid,nlayer,naerkind) !aerosols radii (K) |
---|
| 48 | real, intent(out) :: nueffrad(ngrid,nlayer,naerkind) !variance |
---|
[787] | 49 | |
---|
[728] | 50 | logical, save :: firstcall=.true. |
---|
[1315] | 51 | !$OMP THREADPRIVATE(firstcall) |
---|
[2297] | 52 | integer :: iaer, ia |
---|
[728] | 53 | |
---|
| 54 | print*,'enter su_aer_radii' |
---|
| 55 | do iaer=1,naerkind |
---|
| 56 | ! these values will change once the microphysics gets to work |
---|
| 57 | ! UNLESS tracer=.false., in which case we should be working with |
---|
| 58 | ! a fixed aerosol layer, and be able to define reffrad in a |
---|
| 59 | ! .def file. To be improved! |
---|
[2297] | 60 | ! |-> Done in th n-layer aerosol case (JVO 20) |
---|
[728] | 61 | |
---|
| 62 | if(iaer.eq.iaero_co2)then ! CO2 ice |
---|
[1308] | 63 | reffrad(1:ngrid,1:nlayer,iaer) = 1.e-4 |
---|
| 64 | nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 |
---|
[728] | 65 | endif |
---|
| 66 | |
---|
| 67 | if(iaer.eq.iaero_h2o)then ! H2O ice |
---|
[1308] | 68 | reffrad(1:ngrid,1:nlayer,iaer) = 1.e-5 |
---|
| 69 | nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 |
---|
[728] | 70 | endif |
---|
| 71 | |
---|
| 72 | if(iaer.eq.iaero_dust)then ! dust |
---|
[1308] | 73 | reffrad(1:ngrid,1:nlayer,iaer) = 1.e-5 |
---|
| 74 | nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 |
---|
[728] | 75 | endif |
---|
| 76 | |
---|
| 77 | if(iaer.eq.iaero_h2so4)then ! H2O ice |
---|
[1308] | 78 | reffrad(1:ngrid,1:nlayer,iaer) = 1.e-6 |
---|
| 79 | nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 |
---|
[728] | 80 | endif |
---|
[1529] | 81 | |
---|
| 82 | if(iaer.eq.iaero_back2lay)then ! Two-layer aerosols |
---|
[1308] | 83 | reffrad(1:ngrid,1:nlayer,iaer) = 2.e-6 |
---|
| 84 | nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 |
---|
[1026] | 85 | endif |
---|
[728] | 86 | |
---|
[1026] | 87 | |
---|
[1677] | 88 | if(iaer.eq.iaero_nh3)then ! Nh3 cloud |
---|
[2005] | 89 | reffrad(1:ngrid,1:nlayer,iaer) = size_nh3_cloud |
---|
[1677] | 90 | nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 |
---|
| 91 | endif |
---|
[1026] | 92 | |
---|
[2297] | 93 | do ia=1,nlayaero |
---|
| 94 | if(iaer.eq.iaero_nlay(ia))then ! N-layer aerosols |
---|
| 95 | reffrad(1:ngrid,1:nlayer,iaer) = aeronlay_size(ia) |
---|
[2340] | 96 | nueffrad(1:ngrid,1:nlayer,iaer) = aeronlay_nueff(ia) |
---|
[2297] | 97 | endif |
---|
| 98 | enddo |
---|
| 99 | |
---|
[1677] | 100 | if(iaer.eq.iaero_aurora)then ! Auroral aerosols |
---|
[2005] | 101 | reffrad(1:ngrid,1:nlayer,iaer) = 3.e-7 |
---|
[1677] | 102 | nueffrad(1:ngrid,1:nlayer,iaer) = 0.1 |
---|
| 103 | endif |
---|
| 104 | |
---|
| 105 | |
---|
[1026] | 106 | if(iaer.gt.5)then |
---|
| 107 | print*,'Error in callcorrk, naerkind is too high (>5).' |
---|
[728] | 108 | print*,'The code still needs generalisation to arbitrary' |
---|
| 109 | print*,'aerosol kinds and number.' |
---|
| 110 | call abort |
---|
| 111 | endif |
---|
| 112 | |
---|
| 113 | enddo |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | if (radfixed) then |
---|
| 117 | |
---|
[1529] | 118 | write(*,*)"radius of H2O water particles:" |
---|
[728] | 119 | rad_h2o=13. ! default value |
---|
[1315] | 120 | call getin_p("rad_h2o",rad_h2o) |
---|
[728] | 121 | write(*,*)" rad_h2o = ",rad_h2o |
---|
| 122 | |
---|
[1529] | 123 | write(*,*)"radius of H2O ice particles:" |
---|
[728] | 124 | rad_h2o_ice=35. ! default value |
---|
[1315] | 125 | call getin_p("rad_h2o_ice",rad_h2o_ice) |
---|
[728] | 126 | write(*,*)" rad_h2o_ice = ",rad_h2o_ice |
---|
| 127 | |
---|
[1529] | 128 | else |
---|
[728] | 129 | |
---|
| 130 | write(*,*)"Number mixing ratio of H2O water particles:" |
---|
| 131 | Nmix_h2o=1.e6 ! default value |
---|
[1315] | 132 | call getin_p("Nmix_h2o",Nmix_h2o) |
---|
[728] | 133 | write(*,*)" Nmix_h2o = ",Nmix_h2o |
---|
| 134 | |
---|
| 135 | write(*,*)"Number mixing ratio of H2O ice particles:" |
---|
| 136 | Nmix_h2o_ice=Nmix_h2o ! default value |
---|
[1315] | 137 | call getin_p("Nmix_h2o_ice",Nmix_h2o_ice) |
---|
[728] | 138 | write(*,*)" Nmix_h2o_ice = ",Nmix_h2o_ice |
---|
[1529] | 139 | endif |
---|
[728] | 140 | |
---|
| 141 | print*,'exit su_aer_radii' |
---|
| 142 | |
---|
| 143 | end subroutine su_aer_radii |
---|
| 144 | !================================================================== |
---|
| 145 | |
---|
| 146 | |
---|
| 147 | !================================================================== |
---|
[1308] | 148 | subroutine h2o_reffrad(ngrid,nlayer,pq,pt,reffrad,nueffrad) |
---|
[728] | 149 | !================================================================== |
---|
| 150 | ! Purpose |
---|
| 151 | ! ------- |
---|
| 152 | ! Compute the effective radii of liquid and icy water particles |
---|
| 153 | ! |
---|
| 154 | ! Authors |
---|
| 155 | ! ------- |
---|
| 156 | ! Jeremy Leconte (2012) |
---|
| 157 | ! |
---|
| 158 | !================================================================== |
---|
| 159 | use watercommon_h, Only: T_h2O_ice_liq,T_h2O_ice_clouds,rhowater,rhowaterice |
---|
[1384] | 160 | use comcstfi_mod, only: pi |
---|
[728] | 161 | Implicit none |
---|
| 162 | |
---|
[858] | 163 | integer,intent(in) :: ngrid |
---|
[1308] | 164 | integer,intent(in) :: nlayer |
---|
[728] | 165 | |
---|
[1308] | 166 | real, intent(in) :: pq(ngrid,nlayer) !water ice mixing ratios (kg/kg) |
---|
| 167 | real, intent(in) :: pt(ngrid,nlayer) !temperature (K) |
---|
| 168 | real, intent(out) :: reffrad(ngrid,nlayer) !aerosol radii |
---|
| 169 | real, intent(out) :: nueffrad(ngrid,nlayer) ! dispersion |
---|
[787] | 170 | |
---|
[728] | 171 | integer :: ig,l |
---|
| 172 | real zfice ,zrad,zrad_liq,zrad_ice |
---|
| 173 | real,external :: CBRT |
---|
| 174 | |
---|
| 175 | |
---|
| 176 | if (radfixed) then |
---|
[1308] | 177 | do l=1,nlayer |
---|
[787] | 178 | do ig=1,ngrid |
---|
[728] | 179 | zfice = 1.0 - (pt(ig,l)-T_h2O_ice_clouds) / (T_h2O_ice_liq-T_h2O_ice_clouds) |
---|
| 180 | zfice = MIN(MAX(zfice,0.0),1.0) |
---|
[858] | 181 | reffrad(ig,l)= rad_h2o * (1.-zfice) + rad_h2o_ice * zfice |
---|
| 182 | nueffrad(ig,l) = coef_chaud * (1.-zfice) + coef_froid * zfice |
---|
[728] | 183 | enddo |
---|
| 184 | enddo |
---|
| 185 | else |
---|
[1308] | 186 | do l=1,nlayer |
---|
[787] | 187 | do ig=1,ngrid |
---|
[728] | 188 | zfice = 1.0 - (pt(ig,l)-T_h2O_ice_clouds) / (T_h2O_ice_liq-T_h2O_ice_clouds) |
---|
| 189 | zfice = MIN(MAX(zfice,0.0),1.0) |
---|
[1529] | 190 | zrad_liq = CBRT( 3*pq(ig,l)/(4*Nmix_h2o*pi*rhowater) ) |
---|
| 191 | zrad_ice = CBRT( 3*pq(ig,l)/(4*Nmix_h2o_ice*pi*rhowaterice) ) |
---|
[858] | 192 | nueffrad(ig,l) = coef_chaud * (1.-zfice) + coef_froid * zfice |
---|
[728] | 193 | zrad = zrad_liq * (1.-zfice) + zrad_ice * zfice |
---|
[863] | 194 | |
---|
[1529] | 195 | reffrad(ig,l) = min(max(zrad,1.e-6),1000.e-6) |
---|
[728] | 196 | enddo |
---|
| 197 | enddo |
---|
| 198 | end if |
---|
| 199 | |
---|
| 200 | end subroutine h2o_reffrad |
---|
| 201 | !================================================================== |
---|
| 202 | |
---|
| 203 | |
---|
| 204 | !================================================================== |
---|
[1308] | 205 | subroutine h2o_cloudrad(ngrid,nlayer,pql,reffliq,reffice) |
---|
[728] | 206 | !================================================================== |
---|
| 207 | ! Purpose |
---|
| 208 | ! ------- |
---|
| 209 | ! Compute the effective radii of liquid and icy water particles |
---|
| 210 | ! |
---|
| 211 | ! Authors |
---|
| 212 | ! ------- |
---|
| 213 | ! Jeremy Leconte (2012) |
---|
| 214 | ! |
---|
| 215 | !================================================================== |
---|
| 216 | use watercommon_h, Only: rhowater,rhowaterice |
---|
[1384] | 217 | use comcstfi_mod, only: pi |
---|
[728] | 218 | Implicit none |
---|
| 219 | |
---|
[858] | 220 | integer,intent(in) :: ngrid |
---|
[1308] | 221 | integer,intent(in) :: nlayer |
---|
[728] | 222 | |
---|
[1308] | 223 | real, intent(in) :: pql(ngrid,nlayer) !condensed water mixing ratios (kg/kg) |
---|
| 224 | real, intent(out) :: reffliq(ngrid,nlayer),reffice(ngrid,nlayer) !liquid and ice water particle radii (m) |
---|
[787] | 225 | |
---|
[728] | 226 | real,external :: CBRT |
---|
[1283] | 227 | integer :: i,k |
---|
[728] | 228 | |
---|
| 229 | if (radfixed) then |
---|
[1529] | 230 | reffliq(1:ngrid,1:nlayer)= rad_h2o |
---|
| 231 | reffice(1:ngrid,1:nlayer)= rad_h2o_ice |
---|
[728] | 232 | else |
---|
[1529] | 233 | do k=1,nlayer |
---|
| 234 | do i=1,ngrid |
---|
| 235 | reffliq(i,k) = CBRT(3*pql(i,k)/(4*Nmix_h2o*pi*rhowater)) |
---|
| 236 | reffliq(i,k) = min(max(reffliq(i,k),1.e-6),1000.e-6) |
---|
| 237 | |
---|
| 238 | reffice(i,k) = CBRT(3*pql(i,k)/(4*Nmix_h2o_ice*pi*rhowaterice)) |
---|
| 239 | reffice(i,k) = min(max(reffice(i,k),1.e-6),1000.e-6) |
---|
| 240 | enddo |
---|
| 241 | enddo |
---|
[1283] | 242 | endif |
---|
[728] | 243 | |
---|
| 244 | end subroutine h2o_cloudrad |
---|
| 245 | !================================================================== |
---|
| 246 | |
---|
| 247 | |
---|
| 248 | |
---|
| 249 | !================================================================== |
---|
[1308] | 250 | subroutine co2_reffrad(ngrid,nlayer,nq,pq,reffrad) |
---|
[728] | 251 | !================================================================== |
---|
| 252 | ! Purpose |
---|
| 253 | ! ------- |
---|
| 254 | ! Compute the effective radii of co2 ice particles |
---|
| 255 | ! |
---|
| 256 | ! Authors |
---|
| 257 | ! ------- |
---|
| 258 | ! Jeremy Leconte (2012) |
---|
| 259 | ! |
---|
| 260 | !================================================================== |
---|
[858] | 261 | USE tracer_h, only:igcm_co2_ice,rho_co2 |
---|
[1384] | 262 | use comcstfi_mod, only: pi |
---|
[728] | 263 | Implicit none |
---|
| 264 | |
---|
[1308] | 265 | integer,intent(in) :: ngrid,nlayer,nq |
---|
[728] | 266 | |
---|
[1308] | 267 | real, intent(in) :: pq(ngrid,nlayer,nq) !tracer mixing ratios (kg/kg) |
---|
| 268 | real, intent(out) :: reffrad(ngrid,nlayer) !co2 ice particles radii (m) |
---|
[787] | 269 | |
---|
[728] | 270 | integer :: ig,l |
---|
| 271 | real :: zrad |
---|
| 272 | real,external :: CBRT |
---|
| 273 | |
---|
| 274 | |
---|
| 275 | |
---|
| 276 | if (radfixed) then |
---|
[1308] | 277 | reffrad(1:ngrid,1:nlayer) = 5.e-5 ! CO2 ice |
---|
[728] | 278 | else |
---|
[1308] | 279 | do l=1,nlayer |
---|
[787] | 280 | do ig=1,ngrid |
---|
[728] | 281 | zrad = CBRT( 3*pq(ig,l,igcm_co2_ice)/(4*Nmix_co2*pi*rho_co2) ) |
---|
[858] | 282 | reffrad(ig,l) = min(max(zrad,1.e-6),100.e-6) |
---|
[728] | 283 | enddo |
---|
| 284 | enddo |
---|
| 285 | end if |
---|
| 286 | |
---|
| 287 | end subroutine co2_reffrad |
---|
| 288 | !================================================================== |
---|
| 289 | |
---|
| 290 | |
---|
| 291 | |
---|
| 292 | !================================================================== |
---|
[1308] | 293 | subroutine dust_reffrad(ngrid,nlayer,reffrad) |
---|
[728] | 294 | !================================================================== |
---|
| 295 | ! Purpose |
---|
| 296 | ! ------- |
---|
| 297 | ! Compute the effective radii of dust particles |
---|
| 298 | ! |
---|
| 299 | ! Authors |
---|
| 300 | ! ------- |
---|
| 301 | ! Jeremy Leconte (2012) |
---|
| 302 | ! |
---|
| 303 | !================================================================== |
---|
| 304 | Implicit none |
---|
| 305 | |
---|
[858] | 306 | integer,intent(in) :: ngrid |
---|
[1308] | 307 | integer,intent(in) :: nlayer |
---|
[787] | 308 | |
---|
[1308] | 309 | real, intent(out) :: reffrad(ngrid,nlayer) !dust particles radii (m) |
---|
[728] | 310 | |
---|
[1308] | 311 | reffrad(1:ngrid,1:nlayer) = 2.e-6 ! dust |
---|
[728] | 312 | |
---|
| 313 | end subroutine dust_reffrad |
---|
| 314 | !================================================================== |
---|
| 315 | |
---|
| 316 | |
---|
| 317 | !================================================================== |
---|
[1308] | 318 | subroutine h2so4_reffrad(ngrid,nlayer,reffrad) |
---|
[728] | 319 | !================================================================== |
---|
| 320 | ! Purpose |
---|
| 321 | ! ------- |
---|
| 322 | ! Compute the effective radii of h2so4 particles |
---|
| 323 | ! |
---|
| 324 | ! Authors |
---|
| 325 | ! ------- |
---|
| 326 | ! Jeremy Leconte (2012) |
---|
| 327 | ! |
---|
| 328 | !================================================================== |
---|
| 329 | Implicit none |
---|
| 330 | |
---|
[858] | 331 | integer,intent(in) :: ngrid |
---|
[1308] | 332 | integer,intent(in) :: nlayer |
---|
[787] | 333 | |
---|
[1308] | 334 | real, intent(out) :: reffrad(ngrid,nlayer) !h2so4 particle radii (m) |
---|
[728] | 335 | |
---|
[1308] | 336 | reffrad(1:ngrid,1:nlayer) = 1.e-6 ! h2so4 |
---|
[728] | 337 | |
---|
| 338 | end subroutine h2so4_reffrad |
---|
| 339 | !================================================================== |
---|
| 340 | |
---|
[1026] | 341 | !================================================================== |
---|
| 342 | subroutine back2lay_reffrad(ngrid,reffrad,nlayer,pplev) |
---|
| 343 | !================================================================== |
---|
| 344 | ! Purpose |
---|
| 345 | ! ------- |
---|
| 346 | ! Compute the effective radii of particles in a 2-layer model |
---|
| 347 | ! |
---|
| 348 | ! Authors |
---|
| 349 | ! ------- |
---|
| 350 | ! Sandrine Guerlet (2013) |
---|
| 351 | ! |
---|
| 352 | !================================================================== |
---|
[2297] | 353 | use callkeys_mod, only: pres_bottom_tropo,pres_top_tropo,size_tropo, & |
---|
| 354 | pres_bottom_strato,size_strato |
---|
[1026] | 355 | |
---|
[2297] | 356 | Implicit none |
---|
[728] | 357 | |
---|
[1026] | 358 | integer,intent(in) :: ngrid |
---|
| 359 | |
---|
[1308] | 360 | real, intent(out) :: reffrad(ngrid,nlayer) ! particle radii (m) |
---|
[1026] | 361 | REAL,INTENT(IN) :: pplev(ngrid,nlayer+1) ! inter-layer pressure (Pa) |
---|
| 362 | INTEGER,INTENT(IN) :: nlayer ! number of atmospheric layers |
---|
| 363 | REAL :: expfactor |
---|
| 364 | INTEGER l,ig |
---|
| 365 | |
---|
| 366 | reffrad(:,:)=1e-6 !!initialization, not important |
---|
| 367 | DO ig=1,ngrid |
---|
| 368 | DO l=1,nlayer-1 |
---|
| 369 | IF (pplev(ig,l) .le. pres_bottom_tropo .and. pplev(ig,l) .ge. pres_top_tropo) THEN |
---|
| 370 | reffrad(ig,l) = size_tropo |
---|
| 371 | ELSEIF (pplev(ig,l) .lt. pres_top_tropo .and. pplev(ig,l) .gt. pres_bottom_strato) THEN |
---|
| 372 | expfactor=log(size_strato/size_tropo) / log(pres_bottom_strato/pres_top_tropo) |
---|
| 373 | reffrad(ig,l)= size_tropo*((pplev(ig,l)/pres_top_tropo)**expfactor) |
---|
| 374 | ELSEIF (pplev(ig,l) .le. pres_bottom_strato) then |
---|
| 375 | reffrad(ig,l) = size_strato |
---|
| 376 | ENDIF |
---|
| 377 | ENDDO |
---|
| 378 | ENDDO |
---|
| 379 | |
---|
| 380 | end subroutine back2lay_reffrad |
---|
| 381 | !================================================================== |
---|
| 382 | |
---|
| 383 | |
---|
[728] | 384 | end module radii_mod |
---|
| 385 | !================================================================== |
---|