[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 |
---|
| 9 | |
---|
| 10 | real, save :: rad_h2o |
---|
| 11 | real, save :: rad_h2o_ice |
---|
| 12 | real, save :: Nmix_h2o |
---|
| 13 | real, save :: Nmix_h2o_ice |
---|
| 14 | real, parameter :: coef_chaud=0.13 |
---|
| 15 | real, parameter :: coef_froid=0.09 |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | contains |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | !================================================================== |
---|
[787] | 22 | subroutine su_aer_radii(ngrid,reffrad,nueffrad) |
---|
[728] | 23 | !================================================================== |
---|
| 24 | ! Purpose |
---|
| 25 | ! ------- |
---|
| 26 | ! Compute the effective radii of liquid and icy water particles |
---|
| 27 | ! |
---|
| 28 | ! Authors |
---|
| 29 | ! ------- |
---|
| 30 | ! Jeremy Leconte (2012) |
---|
| 31 | ! |
---|
| 32 | !================================================================== |
---|
| 33 | ! to use 'getin' |
---|
| 34 | use ioipsl_getincom |
---|
| 35 | use radinc_h, only: naerkind |
---|
| 36 | use aerosol_mod |
---|
[787] | 37 | USE tracer_h |
---|
[728] | 38 | Implicit none |
---|
| 39 | |
---|
| 40 | #include "callkeys.h" |
---|
| 41 | #include "dimensions.h" |
---|
| 42 | #include "dimphys.h" |
---|
| 43 | |
---|
[787] | 44 | integer :: ngrid |
---|
[728] | 45 | |
---|
[787] | 46 | real, intent(inout) :: reffrad(ngrid,nlayermx,naerkind) !aerosols radii (K) |
---|
| 47 | real, intent(inout) :: nueffrad(ngrid,nlayermx,naerkind) !variance |
---|
| 48 | |
---|
[728] | 49 | logical, save :: firstcall=.true. |
---|
| 50 | integer :: iaer |
---|
| 51 | |
---|
| 52 | print*,'enter su_aer_radii' |
---|
| 53 | do iaer=1,naerkind |
---|
| 54 | ! these values will change once the microphysics gets to work |
---|
| 55 | ! UNLESS tracer=.false., in which case we should be working with |
---|
| 56 | ! a fixed aerosol layer, and be able to define reffrad in a |
---|
| 57 | ! .def file. To be improved! |
---|
| 58 | |
---|
| 59 | if(iaer.eq.iaero_co2)then ! CO2 ice |
---|
[787] | 60 | reffrad(1:ngrid,1:nlayermx,iaer) = 1.e-4 |
---|
| 61 | nueffrad(1:ngrid,1:nlayermx,iaer) = 0.1 |
---|
[728] | 62 | endif |
---|
| 63 | |
---|
| 64 | if(iaer.eq.iaero_h2o)then ! H2O ice |
---|
[787] | 65 | reffrad(1:ngrid,1:nlayermx,iaer) = 1.e-5 |
---|
| 66 | nueffrad(1:ngrid,1:nlayermx,iaer) = 0.1 |
---|
[728] | 67 | endif |
---|
| 68 | |
---|
| 69 | if(iaer.eq.iaero_dust)then ! dust |
---|
[787] | 70 | reffrad(1:ngrid,1:nlayermx,iaer) = 1.e-5 |
---|
| 71 | nueffrad(1:ngrid,1:nlayermx,iaer) = 0.1 |
---|
[728] | 72 | endif |
---|
| 73 | |
---|
| 74 | if(iaer.eq.iaero_h2so4)then ! H2O ice |
---|
[787] | 75 | reffrad(1:ngrid,1:nlayermx,iaer) = 1.e-6 |
---|
| 76 | nueffrad(1:ngrid,1:nlayermx,iaer) = 0.1 |
---|
[728] | 77 | endif |
---|
| 78 | |
---|
| 79 | if(iaer.gt.4)then |
---|
| 80 | print*,'Error in callcorrk, naerkind is too high (>4).' |
---|
| 81 | print*,'The code still needs generalisation to arbitrary' |
---|
| 82 | print*,'aerosol kinds and number.' |
---|
| 83 | call abort |
---|
| 84 | endif |
---|
| 85 | |
---|
| 86 | enddo |
---|
| 87 | |
---|
| 88 | |
---|
| 89 | if (radfixed) then |
---|
| 90 | |
---|
| 91 | write(*,*)"radius of H2O water particles:" |
---|
| 92 | rad_h2o=13. ! default value |
---|
| 93 | call getin("rad_h2o",rad_h2o) |
---|
| 94 | write(*,*)" rad_h2o = ",rad_h2o |
---|
| 95 | |
---|
| 96 | write(*,*)"radius of H2O ice particles:" |
---|
| 97 | rad_h2o_ice=35. ! default value |
---|
| 98 | call getin("rad_h2o_ice",rad_h2o_ice) |
---|
| 99 | write(*,*)" rad_h2o_ice = ",rad_h2o_ice |
---|
| 100 | |
---|
| 101 | else |
---|
| 102 | |
---|
| 103 | write(*,*)"Number mixing ratio of H2O water particles:" |
---|
| 104 | Nmix_h2o=1.e6 ! default value |
---|
| 105 | call getin("Nmix_h2o",Nmix_h2o) |
---|
| 106 | write(*,*)" Nmix_h2o = ",Nmix_h2o |
---|
| 107 | |
---|
| 108 | write(*,*)"Number mixing ratio of H2O ice particles:" |
---|
| 109 | Nmix_h2o_ice=Nmix_h2o ! default value |
---|
| 110 | call getin("Nmix_h2o_ice",Nmix_h2o_ice) |
---|
| 111 | write(*,*)" Nmix_h2o_ice = ",Nmix_h2o_ice |
---|
| 112 | endif |
---|
| 113 | |
---|
| 114 | print*,'exit su_aer_radii' |
---|
| 115 | |
---|
| 116 | end subroutine su_aer_radii |
---|
| 117 | !================================================================== |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | !================================================================== |
---|
[787] | 121 | subroutine h2o_reffrad(ngrid,nq,pq,pt,reffrad,nueffrad) |
---|
[728] | 122 | !================================================================== |
---|
| 123 | ! Purpose |
---|
| 124 | ! ------- |
---|
| 125 | ! Compute the effective radii of liquid and icy water particles |
---|
| 126 | ! |
---|
| 127 | ! Authors |
---|
| 128 | ! ------- |
---|
| 129 | ! Jeremy Leconte (2012) |
---|
| 130 | ! |
---|
| 131 | !================================================================== |
---|
| 132 | use radinc_h, only: naerkind |
---|
| 133 | use watercommon_h, Only: T_h2O_ice_liq,T_h2O_ice_clouds,rhowater,rhowaterice |
---|
| 134 | use aerosol_mod, only : iaero_h2o |
---|
[787] | 135 | USE tracer_h |
---|
[728] | 136 | Implicit none |
---|
| 137 | |
---|
| 138 | #include "callkeys.h" |
---|
| 139 | #include "dimensions.h" |
---|
| 140 | #include "dimphys.h" |
---|
| 141 | #include "comcstfi.h" |
---|
| 142 | |
---|
[787] | 143 | integer :: ngrid,nq |
---|
[728] | 144 | |
---|
[787] | 145 | real, intent(in) :: pq(ngrid,nlayermx,nq) !tracer mixing ratios (kg/kg) |
---|
| 146 | real, intent(in) :: pt(ngrid,nlayermx) !temperature (K) |
---|
| 147 | real, intent(inout) :: reffrad(ngrid,nlayermx,naerkind) !aerosols radii (K) |
---|
| 148 | real, intent(inout) :: nueffrad(ngrid,nlayermx,naerkind) ! dispersion |
---|
| 149 | |
---|
[728] | 150 | integer :: ig,l |
---|
| 151 | real zfice ,zrad,zrad_liq,zrad_ice |
---|
| 152 | real,external :: CBRT |
---|
| 153 | |
---|
| 154 | |
---|
| 155 | if (radfixed) then |
---|
| 156 | do l=1,nlayermx |
---|
[787] | 157 | do ig=1,ngrid |
---|
[728] | 158 | zfice = 1.0 - (pt(ig,l)-T_h2O_ice_clouds) / (T_h2O_ice_liq-T_h2O_ice_clouds) |
---|
| 159 | zfice = MIN(MAX(zfice,0.0),1.0) |
---|
| 160 | reffrad(ig,l,iaero_h2o)= rad_h2o * (1.-zfice) + rad_h2o_ice * zfice |
---|
| 161 | nueffrad(ig,l,iaero_h2o) = coef_chaud * (1.-zfice) + coef_froid * zfice |
---|
| 162 | enddo |
---|
| 163 | enddo |
---|
| 164 | else |
---|
| 165 | do l=1,nlayermx |
---|
[787] | 166 | do ig=1,ngrid |
---|
[728] | 167 | zfice = 1.0 - (pt(ig,l)-T_h2O_ice_clouds) / (T_h2O_ice_liq-T_h2O_ice_clouds) |
---|
| 168 | zfice = MIN(MAX(zfice,0.0),1.0) |
---|
| 169 | zrad_liq = CBRT( 3*pq(ig,l,igcm_h2o_ice)/(4*Nmix_h2o*pi*rhowater) ) |
---|
| 170 | zrad_ice = CBRT( 3*pq(ig,l,igcm_h2o_ice)/(4*Nmix_h2o_ice*pi*rhowaterice) ) |
---|
| 171 | nueffrad(ig,l,iaero_h2o) = coef_chaud * (1.-zfice) + coef_froid * zfice |
---|
| 172 | zrad = zrad_liq * (1.-zfice) + zrad_ice * zfice |
---|
| 173 | reffrad(ig,l,iaero_h2o) = min(max(zrad,1.e-6),100.e-6) |
---|
| 174 | enddo |
---|
| 175 | enddo |
---|
| 176 | end if |
---|
| 177 | |
---|
| 178 | end subroutine h2o_reffrad |
---|
| 179 | !================================================================== |
---|
| 180 | |
---|
| 181 | |
---|
| 182 | !================================================================== |
---|
[787] | 183 | subroutine h2o_cloudrad(ngrid,pql,reffliq,reffice) |
---|
[728] | 184 | !================================================================== |
---|
| 185 | ! Purpose |
---|
| 186 | ! ------- |
---|
| 187 | ! Compute the effective radii of liquid and icy water particles |
---|
| 188 | ! |
---|
| 189 | ! Authors |
---|
| 190 | ! ------- |
---|
| 191 | ! Jeremy Leconte (2012) |
---|
| 192 | ! |
---|
| 193 | !================================================================== |
---|
| 194 | use watercommon_h, Only: rhowater,rhowaterice |
---|
[787] | 195 | USE tracer_h |
---|
[728] | 196 | Implicit none |
---|
| 197 | |
---|
| 198 | #include "callkeys.h" |
---|
| 199 | #include "dimensions.h" |
---|
| 200 | #include "dimphys.h" |
---|
| 201 | #include "comcstfi.h" |
---|
| 202 | |
---|
[787] | 203 | integer :: ngrid |
---|
[728] | 204 | |
---|
[787] | 205 | real, intent(in) :: pql(ngrid,nlayermx) !condensed water mixing ratios (kg/kg) |
---|
| 206 | real, intent(out) :: reffliq(ngrid,nlayermx),reffice(ngrid,nlayermx) !liquid and ice water particle radii (K) |
---|
| 207 | |
---|
[728] | 208 | real,external :: CBRT |
---|
| 209 | |
---|
| 210 | |
---|
| 211 | if (radfixed) then |
---|
[787] | 212 | reffliq(1:ngrid,1:nlayermx)= rad_h2o |
---|
| 213 | reffice(1:ngrid,1:nlayermx)= rad_h2o_ice |
---|
[728] | 214 | else |
---|
[787] | 215 | reffliq(1:ngrid,1:nlayermx) = CBRT( 3*pql(1:ngrid,1:nlayermx)/(4*Nmix_h2o*pi*rhowater) ) |
---|
| 216 | reffliq(1:ngrid,1:nlayermx) = min(max(reffliq(1:ngrid,1:nlayermx),1.e-6),100.e-6) |
---|
| 217 | reffice(1:ngrid,1:nlayermx) = CBRT( 3*pql(1:ngrid,1:nlayermx)/(4*Nmix_h2o_ice*pi*rhowaterice) ) |
---|
| 218 | reffice(1:ngrid,1:nlayermx) = min(max(reffice(1:ngrid,1:nlayermx),1.e-6),100.e-6) |
---|
[728] | 219 | end if |
---|
| 220 | |
---|
| 221 | end subroutine h2o_cloudrad |
---|
| 222 | !================================================================== |
---|
| 223 | |
---|
| 224 | |
---|
| 225 | |
---|
| 226 | !================================================================== |
---|
[787] | 227 | subroutine co2_reffrad(ngrid,nq,pq,reffrad) |
---|
[728] | 228 | !================================================================== |
---|
| 229 | ! Purpose |
---|
| 230 | ! ------- |
---|
| 231 | ! Compute the effective radii of co2 ice particles |
---|
| 232 | ! |
---|
| 233 | ! Authors |
---|
| 234 | ! ------- |
---|
| 235 | ! Jeremy Leconte (2012) |
---|
| 236 | ! |
---|
| 237 | !================================================================== |
---|
| 238 | use radinc_h, only: naerkind |
---|
| 239 | use aerosol_mod, only : iaero_co2 |
---|
[787] | 240 | USE tracer_h |
---|
[728] | 241 | Implicit none |
---|
| 242 | |
---|
| 243 | #include "callkeys.h" |
---|
| 244 | #include "dimensions.h" |
---|
| 245 | #include "dimphys.h" |
---|
| 246 | #include "comcstfi.h" |
---|
| 247 | |
---|
[787] | 248 | integer :: ngrid,nq |
---|
[728] | 249 | |
---|
[787] | 250 | real, intent(in) :: pq(ngrid,nlayermx,nq) !tracer mixing ratios (kg/kg) |
---|
| 251 | real, intent(inout) :: reffrad(ngrid,nlayermx,naerkind) !aerosols radii (K) |
---|
| 252 | |
---|
[728] | 253 | integer :: ig,l |
---|
| 254 | real :: zrad |
---|
| 255 | real,external :: CBRT |
---|
| 256 | |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | if (radfixed) then |
---|
[787] | 260 | reffrad(1:ngrid,1:nlayermx,iaero_co2) = 5.e-5 ! CO2 ice |
---|
[728] | 261 | else |
---|
| 262 | do l=1,nlayermx |
---|
[787] | 263 | do ig=1,ngrid |
---|
[728] | 264 | zrad = CBRT( 3*pq(ig,l,igcm_co2_ice)/(4*Nmix_co2*pi*rho_co2) ) |
---|
| 265 | reffrad(ig,l,iaero_co2) = min(max(zrad,1.e-6),100.e-6) |
---|
| 266 | enddo |
---|
| 267 | enddo |
---|
| 268 | end if |
---|
| 269 | |
---|
| 270 | end subroutine co2_reffrad |
---|
| 271 | !================================================================== |
---|
| 272 | |
---|
| 273 | |
---|
| 274 | |
---|
| 275 | !================================================================== |
---|
[787] | 276 | subroutine dust_reffrad(ngrid,reffrad) |
---|
[728] | 277 | !================================================================== |
---|
| 278 | ! Purpose |
---|
| 279 | ! ------- |
---|
| 280 | ! Compute the effective radii of dust particles |
---|
| 281 | ! |
---|
| 282 | ! Authors |
---|
| 283 | ! ------- |
---|
| 284 | ! Jeremy Leconte (2012) |
---|
| 285 | ! |
---|
| 286 | !================================================================== |
---|
| 287 | use radinc_h, only: naerkind |
---|
| 288 | use aerosol_mod, only : iaero_dust |
---|
| 289 | Implicit none |
---|
| 290 | |
---|
| 291 | #include "callkeys.h" |
---|
| 292 | #include "dimensions.h" |
---|
| 293 | #include "dimphys.h" |
---|
| 294 | |
---|
[787] | 295 | integer :: ngrid |
---|
| 296 | |
---|
| 297 | real, intent(inout) :: reffrad(ngrid,nlayermx,naerkind) !aerosols radii (K) |
---|
[728] | 298 | |
---|
[787] | 299 | reffrad(1:ngrid,1:nlayermx,iaero_dust) = 2.e-6 ! dust |
---|
[728] | 300 | |
---|
| 301 | end subroutine dust_reffrad |
---|
| 302 | !================================================================== |
---|
| 303 | |
---|
| 304 | |
---|
| 305 | !================================================================== |
---|
[787] | 306 | subroutine h2so4_reffrad(ngrid,reffrad) |
---|
[728] | 307 | !================================================================== |
---|
| 308 | ! Purpose |
---|
| 309 | ! ------- |
---|
| 310 | ! Compute the effective radii of h2so4 particles |
---|
| 311 | ! |
---|
| 312 | ! Authors |
---|
| 313 | ! ------- |
---|
| 314 | ! Jeremy Leconte (2012) |
---|
| 315 | ! |
---|
| 316 | !================================================================== |
---|
| 317 | use radinc_h, only: naerkind |
---|
| 318 | use aerosol_mod, only : iaero_h2so4 |
---|
| 319 | Implicit none |
---|
| 320 | |
---|
| 321 | #include "callkeys.h" |
---|
| 322 | #include "dimensions.h" |
---|
| 323 | #include "dimphys.h" |
---|
| 324 | |
---|
[787] | 325 | integer :: ngrid |
---|
| 326 | |
---|
| 327 | real, intent(inout) :: reffrad(ngrid,nlayermx,naerkind) !aerosols radii (K) |
---|
[728] | 328 | |
---|
[787] | 329 | reffrad(1:ngrid,1:nlayermx,iaero_h2so4) = 1.e-6 ! h2so4 |
---|
[728] | 330 | |
---|
| 331 | end subroutine h2so4_reffrad |
---|
| 332 | !================================================================== |
---|
| 333 | |
---|
| 334 | |
---|
| 335 | |
---|
| 336 | end module radii_mod |
---|
| 337 | !================================================================== |
---|