[38] | 1 | SUBROUTINE suaer |
---|
[1047] | 2 | use dimradmars_mod, only: longrefvis, longrefir, nsizemax, long1vis, & |
---|
[1246] | 3 | long2vis, long3vis, long1ir, long2ir, long1co2, & |
---|
| 4 | long2co2, nsun, nir,& |
---|
| 5 | naerkind, name_iaer, & |
---|
| 6 | iaer_dust_conrath,iaer_dust_doubleq,& |
---|
| 7 | iaer_dust_submicron,iaer_h2o_ice,& |
---|
[2199] | 8 | iaer_stormdust_doubleq,iaer_topdust_doubleq,& |
---|
[1246] | 9 | file_id,radiustab, gvis, omegavis, & |
---|
| 10 | QVISsQREF, gIR, omegaIR, & |
---|
| 11 | QIRsQREF, QREFvis, QREFir, & |
---|
| 12 | omegaREFvis, omegaREFir, & |
---|
[1047] | 13 | nsize |
---|
[1918] | 14 | use datafile_mod, only: datadir |
---|
[2584] | 15 | USE mod_phys_lmdz_transfert_para, ONLY: bcast |
---|
[38] | 16 | IMPLICIT NONE |
---|
| 17 | !================================================================== |
---|
| 18 | ! Purpose. |
---|
| 19 | ! -------- |
---|
| 20 | ! initialize yomaer, the common that contains the |
---|
| 21 | ! radiative characteristics of the aerosols |
---|
| 22 | ! |
---|
| 23 | ! AUTHORS. |
---|
| 24 | ! -------- |
---|
| 25 | ! Richard Fournier (1996) Francois Forget (1996) |
---|
| 26 | ! Frederic Hourdin |
---|
| 27 | ! Jean-jacques morcrette *ECMWF* |
---|
| 28 | ! MODIF Francois Forget (2000) |
---|
| 29 | ! MODIF Franck Montmessin (add water ice) |
---|
| 30 | ! MODIF J.-B. Madeleine 2008W27 |
---|
| 31 | ! - Optical properties read in ASCII files |
---|
| 32 | ! - Add varying radius of the particules |
---|
| 33 | ! |
---|
| 34 | ! Summary. |
---|
| 35 | ! -------- |
---|
| 36 | ! |
---|
| 37 | ! Read the optical properties -> Mean -> Variable assignment |
---|
| 38 | ! (ASCII files) (see yomaer.h) |
---|
| 39 | ! wvl(nwvl) longsun |
---|
| 40 | ! ep(nwvl) epav QVISsQREF(nsun) |
---|
| 41 | ! omeg(nwvl) omegav omegavis(nsun) |
---|
| 42 | ! gfactor(nwvl) gav gvis(nsun) |
---|
| 43 | ! |
---|
| 44 | !================================================================== |
---|
| 45 | |
---|
| 46 | ! Includes: |
---|
| 47 | |
---|
[1918] | 48 | include "callkeys.h" |
---|
[38] | 49 | |
---|
| 50 | ! Optical properties (read in external ASCII files) |
---|
| 51 | INTEGER :: nwvl ! Number of wavelengths in |
---|
| 52 | ! the domain (VIS or IR) |
---|
| 53 | REAL, DIMENSION(:),& |
---|
| 54 | ALLOCATABLE, SAVE :: wvl ! Wavelength axis |
---|
| 55 | REAL, DIMENSION(:),& |
---|
| 56 | ALLOCATABLE, SAVE :: radiusdyn ! Particle size axis |
---|
| 57 | |
---|
| 58 | REAL, DIMENSION(:,:),& |
---|
| 59 | ALLOCATABLE, SAVE :: ep,& ! Extinction coefficient Qext |
---|
| 60 | omeg,& ! Single Scattering Albedo |
---|
| 61 | gfactor ! Assymetry Factor |
---|
| 62 | |
---|
[2584] | 63 | !$OMP THREADPRIVATE(wvl,radiusdyn,ep,omeg,gfactor) |
---|
| 64 | |
---|
[38] | 65 | ! Local variables: |
---|
| 66 | |
---|
| 67 | INTEGER :: iaer ! Aerosol index |
---|
| 68 | INTEGER :: idomain ! Domain index (1=VIS,2=IR) |
---|
| 69 | INTEGER :: iir ! IR channel index |
---|
| 70 | ! iir=1: 15um CO2 bands |
---|
| 71 | ! iir=2 : CO2 band wings |
---|
| 72 | ! iir=3 : 9 um band |
---|
| 73 | ! iir=4 : Far IR |
---|
| 74 | INTEGER :: isun ! Solar band index |
---|
| 75 | INTEGER :: isize ! Particle size index |
---|
| 76 | INTEGER :: jfile ! ASCII file scan index |
---|
| 77 | INTEGER :: file_unit = 60 |
---|
| 78 | LOGICAL :: file_ok, endwhile |
---|
| 79 | CHARACTER(LEN=132) :: scanline ! ASCII file scanning line |
---|
| 80 | INTEGER :: read_ok |
---|
| 81 | |
---|
| 82 | ! I/O of "aerave" (subroutine averaging spectrally |
---|
| 83 | ! sing.scat.parameters) |
---|
| 84 | |
---|
| 85 | REAL tsun ! Sun brightness temperature (for SW) |
---|
| 86 | REAL tsol ! Surface reference brightness temp (LW) |
---|
| 87 | REAL longref ! reference wavelengths |
---|
| 88 | REAL longsun(nsun+1) ! solar band boundaries |
---|
| 89 | REAL longir(nir+1) ! IR band boundaries |
---|
| 90 | REAL epref ! reference extinction ep |
---|
| 91 | ! at wavelength "longref" |
---|
| 92 | REAL epav(nir) ! average ep |
---|
| 93 | ! (= <Qext>/Qext(longref) if epref=1) |
---|
| 94 | REAL omegav(nir) ! Average sing.scat.albedo |
---|
| 95 | REAL gav(nir) ! Average assymetry parameter |
---|
| 96 | |
---|
[2584] | 97 | !$OMP MASTER |
---|
| 98 | |
---|
[38] | 99 | !================================================================== |
---|
| 100 | !---- Please indicate the names of the optical property files below |
---|
| 101 | ! Please also choose the reference wavelengths of each aerosol |
---|
| 102 | |
---|
| 103 | DO iaer = 1, naerkind ! Loop on aerosol kind |
---|
| 104 | aerkind: SELECT CASE (name_iaer(iaer)) |
---|
| 105 | !================================================================== |
---|
| 106 | CASE("dust_conrath") aerkind ! Typical dust profile |
---|
| 107 | !================================================================== |
---|
| 108 | ! Visible domain: |
---|
| 109 | file_id(iaer,1) = 'optprop_dustvis_TM.dat' !M.Wolff TM |
---|
[222] | 110 | ! file_id(iaer,1) = 'optprop_dustvis_clancy.dat' !Clancy-Lee |
---|
[38] | 111 | ! file_id(iaer,1) = 'optprop_dustvis_ockert.dat' !Ockert-Bell |
---|
| 112 | ! Infrared domain: |
---|
| 113 | file_id(iaer,2) = 'optprop_dustir_TM.dat' !M.Wolff TM |
---|
[222] | 114 | ! Toon-Forget + solsir=2 using Clancy-Lee |
---|
| 115 | ! file_id(iaer,2) = 'optprop_dustir_clancy.dat' |
---|
| 116 | ! Toon-Forget + solsir=2 using Ockert-Bell |
---|
| 117 | ! file_id(iaer,2) = 'optprop_dustir_ockert.dat' |
---|
[38] | 118 | ! Reference wavelength in the visible: |
---|
| 119 | longrefvis(iaer)=0.67E-6 |
---|
| 120 | ! For dust: change readtesassim accordingly; |
---|
| 121 | ! Reference wavelength in the infrared: |
---|
[1353] | 122 | longrefir(iaer)=dustrefir |
---|
[38] | 123 | !================================================================== |
---|
| 124 | CASE("dust_doubleq") aerkind! Two-moment scheme for dust |
---|
| 125 | !================================================================== |
---|
| 126 | ! Visible domain: |
---|
| 127 | file_id(iaer,1) = 'optprop_dustvis_TM_n50.dat' !T-Matrix |
---|
| 128 | ! file_id(iaer,1) = 'optprop_dustvis_n50.dat' !Mie |
---|
| 129 | ! Infrared domain: |
---|
| 130 | file_id(iaer,2) = 'optprop_dustir_n50.dat' !Mie |
---|
| 131 | ! Reference wavelength in the visible: |
---|
| 132 | longrefvis(iaer)=0.67E-6 |
---|
| 133 | ! If not equal to 0.67e-6 -> change readtesassim accordingly; |
---|
| 134 | ! Reference wavelength in the infrared: |
---|
[1353] | 135 | longrefir(iaer)=dustrefir |
---|
[38] | 136 | !================================================================== |
---|
| 137 | CASE("dust_submicron") aerkind ! Small dust population |
---|
| 138 | !================================================================== |
---|
| 139 | ! Visible domain: |
---|
| 140 | file_id(iaer,1) = 'optprop_dustvis_01um_TM.dat' !M.Wolff |
---|
| 141 | ! Infrared domain: |
---|
| 142 | file_id(iaer,2) = 'optprop_dustir_01um_TM.dat' !M.Wolff |
---|
| 143 | ! Reference wavelength in the visible: |
---|
| 144 | longrefvis(iaer)=0.67E-6 |
---|
| 145 | ! If not equal to 0.67e-6 -> change readtesassim accordingly; |
---|
| 146 | ! Reference wavelength in the infrared: |
---|
[1353] | 147 | longrefir(iaer)=dustrefir |
---|
[38] | 148 | !================================================================== |
---|
| 149 | CASE("h2o_ice") aerkind ! Water ice crystals |
---|
| 150 | !================================================================== |
---|
| 151 | ! Visible domain: |
---|
| 152 | file_id(iaer,1) = 'optprop_icevis_n30.dat' !Warren |
---|
| 153 | ! file_id(iaer,1) = 'optprop_icevis.dat' !Warren |
---|
| 154 | ! Infrared domain: |
---|
| 155 | file_id(iaer,2) = 'optprop_iceir_n30.dat' !Warren |
---|
| 156 | ! file_id(iaer,2) = 'optprop_iceir.dat' !Warren |
---|
| 157 | ! Reference wavelength in the visible: |
---|
| 158 | longrefvis(iaer)=0.67E-6 ! 1.5um OMEGA/MEx |
---|
| 159 | ! Reference wavelength in the infrared: |
---|
| 160 | longrefir(iaer)=12.1E-6 ! 825cm-1 TES/MGS |
---|
| 161 | !================================================================== |
---|
[2447] | 162 | CASE("co2_ice") aerkind ! CO2 ice crystals |
---|
| 163 | !================================================================== |
---|
| 164 | ! Visible domain: |
---|
| 165 | file_id(iaer,1) = 'optprop_co2ice_vis_n50.dat' ! |
---|
| 166 | ! Infrared domain: |
---|
| 167 | file_id(iaer,2) = 'optprop_co2ice_ir_n50.dat' ! |
---|
| 168 | ! Reference wavelength in the visible: |
---|
| 169 | longrefvis(iaer) = 0.67E-6 ! 1.5um OMEGA/MEx |
---|
| 170 | ! Reference wavelength in the infrared: |
---|
[2494] | 171 | longrefir(iaer) = 4.26E-6 ! 2347 cm-1 OMEGA/MEx |
---|
[2447] | 172 | !================================================================== |
---|
[1974] | 173 | CASE("stormdust_doubleq") aerkind ! Two-moment scheme for stormdust - radiative properties |
---|
| 174 | !================================================================== |
---|
| 175 | ! Visible domain: |
---|
| 176 | file_id(iaer,1) = 'optprop_dustvis_TM_n50.dat' !T-Matrix |
---|
| 177 | ! Infrared domain: |
---|
| 178 | file_id(iaer,2) = 'optprop_dustir_n50.dat' !Mie |
---|
| 179 | ! Reference wavelength in the visible: |
---|
| 180 | longrefvis(iaer)=0.67E-6 |
---|
| 181 | ! If not equal to 0.67e-6 -> change readtesassim accordingly; |
---|
| 182 | ! Reference wavelength in the infrared: |
---|
| 183 | longrefir(iaer)=dustrefir |
---|
| 184 | !================================================================== |
---|
[2199] | 185 | CASE("topdust_doubleq") aerkind ! Two-moment scheme for topdust - radiative properties |
---|
| 186 | !================================================================== |
---|
| 187 | ! Visible domain: |
---|
| 188 | file_id(iaer,1) = 'optprop_dustvis_TM_n50.dat' !T-Matrix |
---|
| 189 | ! Infrared domain: |
---|
| 190 | file_id(iaer,2) = 'optprop_dustir_n50.dat' !Mie |
---|
| 191 | ! Reference wavelength in the visible: |
---|
| 192 | longrefvis(iaer)=0.67E-6 |
---|
| 193 | ! If not equal to 0.67e-6 -> change readtesassim accordingly; |
---|
| 194 | ! Reference wavelength in the infrared: |
---|
| 195 | longrefir(iaer)=dustrefir |
---|
| 196 | !================================================================== |
---|
[38] | 197 | END SELECT aerkind |
---|
| 198 | !================================================================== |
---|
| 199 | WRITE(*,*) "Scatterer: ",trim(name_iaer(iaer)) |
---|
| 200 | WRITE(*,*) " corresponding files: " |
---|
| 201 | WRITE(*,*) "VIS: ",trim(file_id(iaer,1)) |
---|
| 202 | WRITE(*,*) "IR : ",trim(file_id(iaer,2)) |
---|
| 203 | !================================================================== |
---|
| 204 | ENDDO ! iaer (loop on aerosol kind) |
---|
| 205 | |
---|
| 206 | ! Initializations: |
---|
| 207 | |
---|
| 208 | radiustab(1:naerkind,1:2,1:nsizemax)=0 |
---|
| 209 | |
---|
| 210 | gvis(1:nsun,1:naerkind,1:nsizemax)=0 |
---|
| 211 | omegavis(1:nsun,1:naerkind,1:nsizemax)=0 |
---|
| 212 | QVISsQREF(1:nsun,1:naerkind,1:nsizemax)=0 |
---|
| 213 | |
---|
| 214 | gIR(1:nir,1:naerkind,1:nsizemax)=0 |
---|
| 215 | omegaIR(1:nir,1:naerkind,1:nsizemax)=0 |
---|
| 216 | QIRsQREF(1:nir,1:naerkind,1:nsizemax)=0 |
---|
| 217 | |
---|
| 218 | QREFvis(1:naerkind,1:nsizemax)=0 |
---|
| 219 | QREFir(1:naerkind,1:nsizemax)=0 |
---|
| 220 | omegaREFvis(1:naerkind,1:nsizemax)=0 |
---|
| 221 | omegaREFir(1:naerkind,1:nsizemax)=0 |
---|
| 222 | |
---|
| 223 | DO iaer = 1, naerkind ! Loop on aerosol kind |
---|
| 224 | DO idomain = 1, 2 ! Loop on radiation domain (VIS or IR) |
---|
[2584] | 225 | |
---|
[38] | 226 | !================================================================== |
---|
| 227 | ! 1. READ OPTICAL PROPERTIES |
---|
| 228 | !================================================================== |
---|
| 229 | |
---|
| 230 | ! 1.1 Open the ASCII file |
---|
| 231 | |
---|
[1918] | 232 | INQUIRE(FILE=TRIM(datadir)//& |
---|
| 233 | '/'//TRIM(file_id(iaer,idomain)),& |
---|
[38] | 234 | EXIST=file_ok) |
---|
| 235 | IF(.NOT.file_ok) THEN |
---|
| 236 | write(*,*)'Problem opening ',& |
---|
[1918] | 237 | TRIM(file_id(iaer,idomain)) |
---|
[38] | 238 | write(*,*)'It should be in: ',& |
---|
[1918] | 239 | TRIM(datadir) |
---|
| 240 | write(*,*)'1) You can change this directory address in callfis.def with' |
---|
| 241 | write(*,*)' datadir=/path/to/datafiles' |
---|
[38] | 242 | write(*,*)'2) If ',& |
---|
[1918] | 243 | TRIM(file_id(iaer,idomain)),& |
---|
[38] | 244 | ' is a LMD reference datafile, it' |
---|
| 245 | write(*,*)' can be obtained online on:' |
---|
| 246 | write(*,*)' http://www.lmd.jussieu.fr/',& |
---|
[1381] | 247 | '~lmdz/planets/mars/datadir' |
---|
[38] | 248 | write(*,*)'3) If the name of the file is wrong, you can' |
---|
| 249 | write(*,*)' change it in file phymars/suaer.F90. Just' |
---|
| 250 | write(*,*)' modify the variable called file_id.' |
---|
[2311] | 251 | CALL abort_physic("suaer","missing file "//trim(file_id(iaer,idomain)),1) |
---|
[38] | 252 | ENDIF |
---|
| 253 | OPEN(UNIT=file_unit,& |
---|
[1918] | 254 | FILE=TRIM(datadir)//& |
---|
| 255 | '/'//TRIM(file_id(iaer,idomain)),& |
---|
[38] | 256 | FORM='formatted') |
---|
| 257 | |
---|
| 258 | ! 1.2 Allocate the optical property table |
---|
| 259 | |
---|
| 260 | jfile = 1 |
---|
| 261 | endwhile = .false. |
---|
| 262 | DO WHILE (.NOT.endwhile) |
---|
| 263 | READ(file_unit,*,iostat=read_ok) scanline |
---|
| 264 | if (read_ok.ne.0) then |
---|
| 265 | write(*,*)' readoptprop: Error reading file',& |
---|
[1918] | 266 | TRIM(datadir)//& |
---|
| 267 | '/'//TRIM(file_id(iaer,idomain)) |
---|
[2311] | 268 | call abort_physic("suaer","problem reading "//trim(file_id(iaer,idomain)),1) |
---|
[38] | 269 | endif |
---|
| 270 | IF ((scanline(1:1) .ne. '#').and.& |
---|
| 271 | (scanline(1:1) .ne. ' ')) THEN |
---|
| 272 | BACKSPACE(file_unit) |
---|
| 273 | reading1_seq: SELECT CASE (jfile) ! ==================== |
---|
| 274 | CASE(1) reading1_seq ! nwvl ---------------------------- |
---|
| 275 | read(file_unit,*,iostat=read_ok) nwvl |
---|
| 276 | if (read_ok.ne.0) then |
---|
| 277 | write(*,*)' readoptprop: Error while reading line:',& |
---|
| 278 | trim(scanline) |
---|
| 279 | write(*,*)' of file',& |
---|
[1918] | 280 | TRIM(datadir)//& |
---|
| 281 | '/'//TRIM(file_id(iaer,idomain)) |
---|
[2311] | 282 | call abort_physic("suaer",& |
---|
| 283 | "problem reading "//trim(file_id(iaer,idomain)),1) |
---|
[38] | 284 | endif |
---|
| 285 | jfile = jfile+1 |
---|
| 286 | CASE(2) reading1_seq ! nsize --------------------------- |
---|
| 287 | read(file_unit,*,iostat=read_ok) nsize(iaer,idomain) |
---|
| 288 | if (read_ok.ne.0) then |
---|
| 289 | write(*,*)' readoptprop: Error while reading line:',& |
---|
| 290 | trim(scanline) |
---|
| 291 | write(*,*)' of file',& |
---|
[1918] | 292 | TRIM(datadir)//& |
---|
| 293 | '/'//TRIM(file_id(iaer,idomain)) |
---|
[2311] | 294 | call abort_physic("suaer",& |
---|
| 295 | "problem reading "//trim(file_id(iaer,idomain)),1) |
---|
[38] | 296 | endif |
---|
| 297 | endwhile = .true. |
---|
| 298 | CASE DEFAULT reading1_seq ! ---------------------------- |
---|
| 299 | WRITE(*,*) 'readoptprop: ',& |
---|
| 300 | 'Error while loading optical properties.' |
---|
[2311] | 301 | call abort_physic("suaer",& |
---|
| 302 | "problem loading optical properties",1) |
---|
[38] | 303 | END SELECT reading1_seq ! ============================== |
---|
| 304 | ENDIF |
---|
| 305 | ENDDO |
---|
| 306 | |
---|
| 307 | ALLOCATE(wvl(nwvl)) ! wvl |
---|
| 308 | ALLOCATE(radiusdyn(nsize(iaer,idomain))) ! radiusdyn |
---|
| 309 | ALLOCATE(ep(nwvl,nsize(iaer,idomain))) ! ep |
---|
| 310 | ALLOCATE(omeg(nwvl,nsize(iaer,idomain))) ! omeg |
---|
| 311 | ALLOCATE(gfactor(nwvl,nsize(iaer,idomain))) ! g |
---|
| 312 | |
---|
| 313 | ! 1.3 Read the data |
---|
| 314 | |
---|
| 315 | jfile = 1 |
---|
| 316 | endwhile = .false. |
---|
| 317 | DO WHILE (.NOT.endwhile) |
---|
| 318 | READ(file_unit,*) scanline |
---|
| 319 | IF ((scanline(1:1) .ne. '#').and.& |
---|
| 320 | (scanline(1:1) .ne. ' ')) THEN |
---|
| 321 | BACKSPACE(file_unit) |
---|
| 322 | reading2_seq: SELECT CASE (jfile) ! ==================== |
---|
| 323 | CASE(1) reading2_seq ! wvl ----------------------------- |
---|
| 324 | read(file_unit,*) wvl |
---|
| 325 | jfile = jfile+1 |
---|
| 326 | CASE(2) reading2_seq ! radiusdyn ----------------------- |
---|
| 327 | read(file_unit,*) radiusdyn |
---|
| 328 | jfile = jfile+1 |
---|
| 329 | CASE(3) reading2_seq ! ep ------------------------------ |
---|
| 330 | isize = 1 |
---|
| 331 | DO WHILE (isize .le. nsize(iaer,idomain)) |
---|
| 332 | READ(file_unit,*) scanline |
---|
| 333 | IF ((scanline(1:1) .ne. '#').and.& |
---|
| 334 | (scanline(1:1) .ne. ' ')) THEN |
---|
| 335 | BACKSPACE(file_unit) |
---|
| 336 | read(file_unit,*) ep(:,isize) |
---|
| 337 | isize = isize + 1 |
---|
| 338 | ENDIF |
---|
| 339 | ENDDO |
---|
| 340 | jfile = jfile+1 |
---|
| 341 | CASE(4) reading2_seq ! omeg ---------------------------- |
---|
| 342 | isize = 1 |
---|
| 343 | DO WHILE (isize .le. nsize(iaer,idomain)) |
---|
| 344 | READ(file_unit,*) scanline |
---|
| 345 | IF ((scanline(1:1) .ne. '#').and.& |
---|
| 346 | (scanline(1:1) .ne. ' ')) THEN |
---|
| 347 | BACKSPACE(file_unit) |
---|
| 348 | read(file_unit,*) omeg(:,isize) |
---|
| 349 | isize = isize + 1 |
---|
| 350 | ENDIF |
---|
| 351 | ENDDO |
---|
| 352 | jfile = jfile+1 |
---|
| 353 | CASE(5) reading2_seq ! gfactor ------------------------- |
---|
| 354 | isize = 1 |
---|
| 355 | DO WHILE (isize .le. nsize(iaer,idomain)) |
---|
| 356 | READ(file_unit,*) scanline |
---|
| 357 | IF ((scanline(1:1) .ne. '#').and.& |
---|
| 358 | (scanline(1:1) .ne. ' ')) THEN |
---|
| 359 | BACKSPACE(file_unit) |
---|
| 360 | read(file_unit,*) gfactor(:,isize) |
---|
| 361 | isize = isize + 1 |
---|
| 362 | ENDIF |
---|
| 363 | ENDDO |
---|
| 364 | endwhile = .true. |
---|
| 365 | CASE DEFAULT reading2_seq ! ---------------------------- |
---|
| 366 | WRITE(*,*) 'suaer.F90: ',& |
---|
| 367 | 'Error while loading optical properties.' |
---|
[2311] | 368 | call abort_physic("suaer",& |
---|
| 369 | "problem loading optical properties",1) |
---|
[38] | 370 | END SELECT reading2_seq ! ============================== |
---|
| 371 | ENDIF |
---|
| 372 | ENDDO |
---|
| 373 | |
---|
| 374 | ! 1.4 Close the file |
---|
| 375 | |
---|
[2584] | 376 | CLOSE(file_unit) |
---|
[38] | 377 | |
---|
[2584] | 378 | |
---|
[38] | 379 | !================================================================== |
---|
| 380 | ! 2. AVERAGED PROPERTIES AND VARIABLE ASSIGNMENTS |
---|
| 381 | !================================================================== |
---|
| 382 | domain: SELECT CASE (idomain) |
---|
| 383 | !================================================================== |
---|
| 384 | CASE(1) domain ! VISIBLE DOMAIN (idomain=1) |
---|
| 385 | !================================================================== |
---|
| 386 | |
---|
| 387 | ! 2.1 Parameters |
---|
| 388 | tsun=6000.E+0 |
---|
| 389 | longsun(1)=long1vis |
---|
| 390 | longsun(2)=long2vis |
---|
| 391 | longsun(3)=long3vis |
---|
| 392 | longref=longrefvis(iaer) |
---|
| 393 | epref=1.E+0 |
---|
| 394 | |
---|
| 395 | DO isize=1,nsize(iaer,idomain) |
---|
| 396 | ! test that there is enough room to store the data |
---|
| 397 | if (isize.gt.nsizemax) then |
---|
| 398 | write(*,*) "suaer: Error ! nsizemax is too small!" |
---|
| 399 | write(*,*) " nsizemax=",nsizemax |
---|
| 400 | write(*,*) " you must increase the value of nsizemax" |
---|
[1047] | 401 | write(*,*) " in dimradmars_mod !" |
---|
[2311] | 402 | call abort_physic("suaer","nsizemax too small",1) |
---|
[38] | 403 | endif |
---|
| 404 | ! ------------------------------------------------ |
---|
| 405 | ! 2.2 Save the particle sizes |
---|
| 406 | radiustab(iaer,idomain,isize)=radiusdyn(isize) |
---|
| 407 | ! 2.3 Averaged optical properties (GCM channels) |
---|
| 408 | ! Notice: Aerave also computes the extinction coefficient and |
---|
| 409 | ! single scattering albedo at reference wavelength |
---|
| 410 | ! (called QREFvis and OMEGAREFvis, same in the IR, |
---|
| 411 | ! and not epref, which is a different parameter); |
---|
| 412 | ! Reference wavelengths are defined for each aerosol in |
---|
[1047] | 413 | ! dimradmars_mod. |
---|
[38] | 414 | |
---|
| 415 | CALL aerave ( nwvl,& |
---|
| 416 | wvl(:),ep(:,isize),omeg(:,isize),gfactor(:,isize),& |
---|
| 417 | longref,epref,tsun,& |
---|
| 418 | nsun,longsun, epav,omegav,gav,& |
---|
| 419 | QREFvis(iaer,isize),omegaREFvis(iaer,isize) ) |
---|
| 420 | ! 2.4 Variable assignements (declared by yomaer.h) |
---|
| 421 | DO isun=1,nsun |
---|
| 422 | QVISsQREF(isun,iaer,isize)=epav(isun) |
---|
| 423 | gvis(isun,iaer,isize)=gav(isun) |
---|
| 424 | omegavis(isun,iaer,isize)=omegav(isun) |
---|
| 425 | END DO |
---|
| 426 | ! 2.5 Output display |
---|
[411] | 427 | ! WRITE(*,*) 'Les donnees spectrales :' |
---|
| 428 | ! WRITE(*,*) 'Solaire (SW) ---->' |
---|
| 429 | ! WRITE(*,*) 'Aerosol number: ', iaer |
---|
| 430 | ! WRITE(*,*) 'Rayon aerosol: ', radiustab(iaer,idomain,isize) |
---|
| 431 | ! WRITE(*,*) '<Qext>/Qext(longrefvis) ; omega ; g' |
---|
| 432 | ! DO isun=1,nsun |
---|
| 433 | ! WRITE(*,*) QVISsQREF(isun,iaer,isize),& |
---|
| 434 | ! omegavis(isun,iaer,isize),& |
---|
| 435 | ! gvis(isun,iaer,isize) |
---|
| 436 | ! ENDDO |
---|
| 437 | ! WRITE(*,*) 'QREFvis(',iaer,isize,') = ',QREFvis(iaer,isize) |
---|
| 438 | ! WRITE(*,*) 'omegaREFvis(',iaer,isize,') = ',& |
---|
| 439 | ! omegaREFvis(iaer,isize) |
---|
[38] | 440 | ! ------------------------------------------------ |
---|
| 441 | ENDDO |
---|
| 442 | |
---|
| 443 | !================================================================== |
---|
| 444 | CASE(2) domain ! INFRARED DOMAIN (idomain=2) |
---|
| 445 | !================================================================== |
---|
| 446 | |
---|
| 447 | DO isize=1,nsize(iaer,idomain) ! ---------------------------------- |
---|
| 448 | |
---|
| 449 | ! 2.1 solsir is not used anymore; division of Qext(IR) by solsir |
---|
| 450 | ! has to be done in the input ASCII files (if necessary). |
---|
| 451 | |
---|
| 452 | ! 2.2 Save the particle sizes |
---|
| 453 | radiustab(iaer,idomain,isize)=radiusdyn(isize) |
---|
| 454 | |
---|
| 455 | ! 2.3 Parameters |
---|
| 456 | |
---|
| 457 | tsol=215.D+0 |
---|
| 458 | longir(1)=long1ir |
---|
| 459 | longir(2)=long1co2 |
---|
| 460 | longir(3)=long2co2 |
---|
| 461 | longir(4)=long2ir |
---|
| 462 | longref=longrefir(iaer) |
---|
| 463 | epref=1.E+0 |
---|
| 464 | |
---|
| 465 | ! 2.4 Averaged optical properties (GCM channels) |
---|
| 466 | ! epav is <QIR>/Qext(longrefir) since epref=1 |
---|
| 467 | ! Notice: Aerave also Computes the extinction coefficient at |
---|
| 468 | ! reference wavelength (called QREFvis or QREFir, |
---|
| 469 | ! and not epref, which is a different parameter); |
---|
| 470 | ! Reference wavelengths are defined for each aerosol in |
---|
[1047] | 471 | ! dimradmar_mod. |
---|
[38] | 472 | |
---|
| 473 | CALL aerave ( nwvl,& |
---|
| 474 | wvl(:),ep(:,isize),omeg(:,isize),gfactor(:,isize),& |
---|
| 475 | longref,epref,tsol,& |
---|
| 476 | nir-1,longir,epav,omegav,gav,& |
---|
| 477 | QREFir(iaer,isize),omegaREFir(iaer,isize) ) |
---|
[411] | 478 | ! WRITE(*,*) 'QREFir(',iaer,isize,') = ',QREFir(iaer,isize) |
---|
| 479 | ! WRITE(*,*) 'omegaREFir(',iaer,isize,') = ',& |
---|
| 480 | ! omegaREFir(iaer,isize) |
---|
[38] | 481 | |
---|
| 482 | ! 2.5 Computing <QIR>/Qext(longrefvis) |
---|
| 483 | |
---|
| 484 | DO iir=1,nir-1 |
---|
[411] | 485 | ! WRITE(*,*) 'QIRsQREFir Channel ',iir,': ',epav(iir) |
---|
[38] | 486 | epav(iir)= epav(iir) * QREFir(iaer,isize) / & |
---|
| 487 | QREFvis(iaer,isize) |
---|
| 488 | ENDDO |
---|
[411] | 489 | ! WRITE(*,*) 'Aerosol number', iaer |
---|
| 490 | ! WRITE(*,*) 'Particle size: ',radiustab(iaer,idomain,isize) |
---|
| 491 | ! WRITE(*,*) 'Rapport Solaire/IR:',& |
---|
| 492 | ! QREFvis(iaer,isize) / QREFir(iaer,isize) |
---|
[38] | 493 | |
---|
| 494 | ! 2.6 Variable assignements |
---|
| 495 | ! (variables are declared by yomaer.h) |
---|
| 496 | |
---|
| 497 | ! Single scattering properties |
---|
| 498 | ! in each of the "nir" bands |
---|
[1047] | 499 | ! (cf. dimradmars_mod) |
---|
[38] | 500 | |
---|
| 501 | ! iir=1 : central 15um CO2 bands |
---|
| 502 | QIRsQREF(1,iaer,isize)=epav(2) |
---|
| 503 | omegaIR(1,iaer,isize)=omegav(2) |
---|
| 504 | gIR(1,iaer,isize)=gav(2) |
---|
| 505 | |
---|
| 506 | ! iir=2 : CO2 band wings |
---|
| 507 | ! (same properties than for central part) |
---|
| 508 | QIRsQREF(2,iaer,isize)=epav(2) |
---|
| 509 | omegaIR(2,iaer,isize)=omegav(2) |
---|
| 510 | gIR(2,iaer,isize)=gav(2) |
---|
| 511 | |
---|
| 512 | ! iir=3 : 9 um band [long1ir - long1co2] |
---|
| 513 | QIRsQREF(3,iaer,isize)=epav(1) |
---|
| 514 | omegaIR(3,iaer,isize)=omegav(1) |
---|
| 515 | gIR(3,iaer,isize)=gav(1) |
---|
| 516 | |
---|
| 517 | ! iir=4 : Far IR [long2co2 - long2ir] |
---|
| 518 | QIRsQREF(4,iaer,isize)=epav(3) |
---|
| 519 | omegaIR(4,iaer,isize)=omegav(3) |
---|
| 520 | gIR(4,iaer,isize)=gav(3) |
---|
| 521 | |
---|
| 522 | ! 2.7 Output display |
---|
| 523 | |
---|
[411] | 524 | ! WRITE(*,*) 'AEROSOL PROPERTIES: Number ',iaer |
---|
| 525 | ! WRITE(*,*) 'Thermal IR (LW) ---->' |
---|
| 526 | ! WRITE(*,*) 'Particle size: ',radiustab(iaer,idomain,isize) |
---|
| 527 | ! WRITE(*,*) '<Qext>/Qext(longrefvis) ; omega ; g' |
---|
| 528 | ! DO iir=1,nir |
---|
| 529 | ! WRITE(*,*) QIRsQREF(iir,iaer,isize),omegaIR(iir,iaer,isize),& |
---|
| 530 | ! gIR(iir,iaer,isize) |
---|
| 531 | ! ENDDO |
---|
| 532 | ! WRITE(*,*) 'CO2: <Qabs>/Qext(longrefvis) = ',& |
---|
| 533 | ! QIRsQREF(1,iaer,isize)*(1-omegaIR(1,iaer,isize)) |
---|
| 534 | ! WRITE(*,*) '' |
---|
[38] | 535 | |
---|
| 536 | ENDDO ! isize (particle size) ------------------------------------- |
---|
| 537 | |
---|
| 538 | END SELECT domain |
---|
| 539 | !================================================================== |
---|
| 540 | ! 3. Deallocate temporary variables (read in ASCII files) |
---|
| 541 | !================================================================== |
---|
| 542 | |
---|
| 543 | DEALLOCATE(wvl) ! wvl |
---|
| 544 | DEALLOCATE(radiusdyn) ! radiusdyn |
---|
| 545 | DEALLOCATE(ep) ! ep |
---|
| 546 | DEALLOCATE(omeg) ! omeg |
---|
| 547 | DEALLOCATE(gfactor) ! g |
---|
| 548 | |
---|
[2584] | 549 | |
---|
| 550 | |
---|
[38] | 551 | END DO ! Loop on iaer |
---|
| 552 | END DO ! Loop on idomain |
---|
[2584] | 553 | |
---|
| 554 | !$OMP END MASTER |
---|
| 555 | |
---|
| 556 | call bcast(longrefvis) |
---|
| 557 | call bcast(longrefir) |
---|
| 558 | call bcast(radiustab) |
---|
| 559 | call bcast(gvis) |
---|
| 560 | call bcast(omegavis) |
---|
| 561 | call bcast(QVISsQREF) |
---|
| 562 | call bcast(gIR) |
---|
| 563 | call bcast(omegaIR) |
---|
| 564 | call bcast(QIRsQREF) |
---|
| 565 | call bcast(QREFvis) |
---|
| 566 | call bcast(QREFir) |
---|
| 567 | call bcast(omegaREFvis) |
---|
| 568 | call bcast(omegaREFir) |
---|
| 569 | call bcast(nsize) |
---|
| 570 | |
---|
[38] | 571 | !================================================================== |
---|
| 572 | RETURN |
---|
| 573 | END |
---|