Changeset 1801
- Timestamp:
- Oct 19, 2017, 11:26:24 PM (7 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90
r1715 r1801 366 366 write(*,*) "ok_slab_heat_transp = ",ok_slab_heat_transp 367 367 368 ! Photochemistry and chemistry in the thermosphere 369 370 write(*,*) "Use photochemistry ?" 371 photochem=.false. ! default value 372 call getin_p("photochem",photochem) 373 write(*,*) "photochem = ",photochem 374 375 write(*,*)"Production of haze ?" 376 haze=.false. ! default value 377 call getin_p("haze",haze) 378 write(*,*)" haze = ",haze 368 379 369 380 … … 763 774 ! allocate "comsoil_h" arrays 764 775 call ini_comsoil_h(ngrid) 765 776 766 777 END SUBROUTINE inifis 767 778 -
trunk/LMDZ.GENERIC/libf/phystd/initracer.F
r1764 r1801 49 49 !! we allocate once for all arrays in common in tracer_h.F90 50 50 !! (supposedly those are not used before call to initracer) 51 IF (.NOT.ALLOCATED(noms)) ALLOCATE(noms(nq))52 ALLOCATE(mmol(nq))53 ALLOCATE(radius(nq))54 ALLOCATE(rho_q(nq))55 ALLOCATE(qext(nq))56 ALLOCATE(alpha_lift(nq))57 ALLOCATE(alpha_devil(nq))58 ALLOCATE(qextrhor(nq))59 ALLOCATE(igcm_dustbin(nq))51 IF (.NOT.ALLOCATED(noms)) ALLOCATE(noms(nq)) 52 IF (.NOT.ALLOCATED(mmol)) ALLOCATE(mmol(nq)) 53 IF (.NOT.ALLOCATED(radius)) ALLOCATE(radius(nq)) 54 IF (.NOT.ALLOCATED(rho_q)) ALLOCATE(rho_q(nq)) 55 IF (.NOT.ALLOCATED(qext)) ALLOCATE(qext(nq)) 56 IF (.NOT.ALLOCATED(alpha_lift)) ALLOCATE(alpha_lift(nq)) 57 IF (.NOT.ALLOCATED(alpha_devil)) ALLOCATE(alpha_devil(nq)) 58 IF (.NOT.ALLOCATED(qextrhor)) ALLOCATE(qextrhor(nq)) 59 IF (.NOT.ALLOCATED(igcm_dustbin)) ALLOCATE(igcm_dustbin(nq)) 60 60 !! initialization 61 61 alpha_lift(:)=0. … … 100 100 igcm_h2o2=0 101 101 igcm_n2=0 102 igcm_n=0 103 igcm_n2d=0 104 igcm_no=0 105 igcm_no2=0 102 106 igcm_ar=0 103 107 igcm_ar_n2=0 104 108 igcm_co2_ice=0 109 110 igcm_ch4=0 111 igcm_ch3=0 112 igcm_ch=0 113 igcm_3ch2=0 114 igcm_1ch2=0 115 igcm_cho=0 116 igcm_ch2o=0 117 igcm_ch3o=0 118 igcm_c=0 119 igcm_c2=0 120 igcm_c2h=0 121 igcm_c2h2=0 122 igcm_c2h3=0 123 igcm_c2h4=0 124 igcm_c2h6=0 125 igcm_ch2co=0 126 igcm_ch3co=0 127 igcm_hcaer=0 128 105 129 106 130 write(*,*) 'initracer: noms() ', noms … … 162 186 count=count+1 163 187 ! write(*,*) 'h2o_ice: count=',count 188 endif 189 if (noms(iq).eq."co") then 190 igcm_co=iq 191 mmol(igcm_co)=28. 192 count=count+1 193 endif 194 if (noms(iq).eq."o") then 195 igcm_o=iq 196 mmol(igcm_o)=16. 197 count=count+1 198 endif 199 if (noms(iq).eq."o1d") then 200 igcm_o1d=iq 201 mmol(igcm_o1d)=16. 202 count=count+1 203 endif 204 if (noms(iq).eq."o2") then 205 igcm_o2=iq 206 mmol(igcm_o2)=32. 207 count=count+1 208 endif 209 if (noms(iq).eq."o3") then 210 igcm_o3=iq 211 mmol(igcm_o3)=48. 212 count=count+1 213 endif 214 if (noms(iq).eq."h") then 215 igcm_h=iq 216 mmol(igcm_h)=1. 217 count=count+1 218 endif 219 if (noms(iq).eq."h2") then 220 igcm_h2=iq 221 mmol(igcm_h2)=2. 222 count=count+1 223 endif 224 if (noms(iq).eq."oh") then 225 igcm_oh=iq 226 mmol(igcm_oh)=17. 227 count=count+1 228 endif 229 if (noms(iq).eq."ho2") then 230 igcm_ho2=iq 231 mmol(igcm_ho2)=33. 232 count=count+1 233 endif 234 if (noms(iq).eq."h2o2") then 235 igcm_h2o2=iq 236 mmol(igcm_h2o2)=34. 237 count=count+1 238 endif 239 if (noms(iq).eq."n2") then 240 igcm_n2=iq 241 mmol(igcm_n2)=28. 242 count=count+1 243 endif 244 if (noms(iq).eq."ch4") then 245 igcm_ch4=iq 246 mmol(igcm_ch4)=16. 247 count=count+1 248 endif 249 if (noms(iq).eq."ar") then 250 igcm_ar=iq 251 mmol(igcm_ar)=40. 252 count=count+1 253 endif 254 if (noms(iq).eq."n") then 255 igcm_n=iq 256 mmol(igcm_n)=14. 257 count=count+1 258 endif 259 if (noms(iq).eq."no") then 260 igcm_no=iq 261 mmol(igcm_no)=30. 262 count=count+1 263 endif 264 if (noms(iq).eq."no2") then 265 igcm_no2=iq 266 mmol(igcm_no2)=46. 267 count=count+1 268 endif 269 if (noms(iq).eq."n2d") then 270 igcm_n2d=iq 271 mmol(igcm_n2d)=28. 272 count=count+1 273 endif 274 if (noms(iq).eq."ch3") then 275 igcm_ch3=iq 276 mmol(igcm_ch3)=15. 277 count=count+1 278 endif 279 if (noms(iq).eq."ch") then 280 igcm_ch=iq 281 mmol(igcm_ch)=13. 282 count=count+1 283 endif 284 if (noms(iq).eq."3ch2") then 285 igcm_3ch2=iq 286 mmol(igcm_3ch2)=14. 287 count=count+1 288 endif 289 if (noms(iq).eq."1ch2") then 290 igcm_1ch2=iq 291 mmol(igcm_1ch2)=14. 292 count=count+1 293 endif 294 if (noms(iq).eq."cho") then 295 igcm_cho=iq 296 mmol(igcm_cho)=29. 297 count=count+1 298 endif 299 if (noms(iq).eq."ch2o") then 300 igcm_ch2o=iq 301 mmol(igcm_ch2o)=30. 302 count=count+1 303 endif 304 if (noms(iq).eq."ch3o") then 305 igcm_ch3o=iq 306 mmol(igcm_ch3o)=31. 307 count=count+1 308 endif 309 if (noms(iq).eq."c") then 310 igcm_c=iq 311 mmol(igcm_c)=12. 312 count=count+1 313 endif 314 if (noms(iq).eq."c2") then 315 igcm_c2=iq 316 mmol(igcm_c2)=24. 317 count=count+1 318 endif 319 if (noms(iq).eq."c2h") then 320 igcm_c2h=iq 321 mmol(igcm_c2h)=25. 322 count=count+1 323 endif 324 if (noms(iq).eq."c2h2") then 325 igcm_c2h2=iq 326 mmol(igcm_c2h2)=26. 327 count=count+1 328 endif 329 if (noms(iq).eq."c2h3") then 330 igcm_c2h3=iq 331 mmol(igcm_c2h3)=27. 332 count=count+1 333 endif 334 if (noms(iq).eq."c2h4") then 335 igcm_c2h4=iq 336 mmol(igcm_c2h4)=28. 337 count=count+1 338 endif 339 if (noms(iq).eq."c2h6") then 340 igcm_c2h6=iq 341 mmol(igcm_c2h6)=30. 342 count=count+1 343 endif 344 if (noms(iq).eq."ch2co") then 345 igcm_ch2co=iq 346 mmol(igcm_ch2co)=42. 347 count=count+1 348 endif 349 if (noms(iq).eq."ch3co") then 350 igcm_ch3co=iq 351 mmol(igcm_ch3co)=43. 352 count=count+1 353 endif 354 if (noms(iq).eq."hcaer") then 355 igcm_hcaer=iq 356 mmol(igcm_hcaer)=50. 357 count=count+1 164 358 endif 165 359 enddo ! of do iq=1,nq … … 331 525 end if ! (water) 332 526 527 528 ! 529 ! some extra (possibly redundant) sanity checks for tracers: 530 ! --------------------------------------------------------- 531 if (water) then 532 ! verify that we indeed have h2o_vap and h2o_ice tracers 533 if (igcm_h2o_vap.eq.0) then 534 write(*,*) "initracer: error !!" 535 write(*,*) " cannot use water option without ", 536 & "an h2o_vap tracer !" 537 stop 538 endif 539 if (igcm_h2o_ice.eq.0) then 540 write(*,*) "initracer: error !!" 541 write(*,*) " cannot use water option without ", 542 & "an h2o_ice tracer !" 543 stop 544 endif 545 endif 546 547 333 548 c Output for records: 334 549 c ~~~~~~~~~~~~~~~~~~ -
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r1699 r1801 47 47 use time_phylmdz_mod, only: daysec 48 48 use callkeys_mod 49 use conc_mod 49 50 use vertical_layers_mod, only: presnivs, pseudoalt 50 51 use mod_phys_lmdz_omp_data, ONLY: is_omp_master … … 88 89 ! VI. Tracers 89 90 ! VI.1. Water and water ice. 90 ! VI.2. Aerosols and particles. 91 ! VI.3. Updates (pressure variations, surface budget). 92 ! VI.4. Slab Ocean. 93 ! VI.5. Surface Tracer Update. 91 ! VI.2 Photochemistry 92 ! VI.3. Aerosols and particles. 93 ! VI.4. Updates (pressure variations, surface budget). 94 ! VI.5. Slab Ocean. 95 ! VI.6. Surface Tracer Update. 94 96 ! 95 97 ! VII. Surface and sub-surface soil temperature. … … 159 161 ! No more ngridmx/nqmx, F90 commons and adaptation to parallel: A. Spiga (2012) 160 162 ! Purge of the code : M. Turbet (2015) 163 ! Photochemical core developped by F. Lefevre: B. Charnay (2017) 161 164 !================================================================== 162 165 … … 313 316 real dqvaplscale(ngrid,nlayer) ! Largescale routine. 314 317 real dqcldlscale(ngrid,nlayer) ! Largescale routine. 318 REAL zdqchim(ngrid,nlayer,nq) ! Calchim_asis routine 319 REAL zdqschim(ngrid,nq) ! Calchim_asis routine 320 321 REAL array_zero1(ngrid) 322 REAL array_zero2(ngrid,nlayer) 315 323 316 324 ! For Winds : (m/s/s) … … 529 537 if (tracer) then 530 538 call initracer(ngrid,nq,nametrac) 539 if(photochem) then 540 call ini_conc_mod(ngrid,nlayer) 541 endif 531 542 endif 532 543 … … 847 858 (pplay(1:ngrid,l)*cell_area(1:ngrid)) 848 859 enddo 860 861 ! ---------------------------------------------------------------- 862 ! Compute mean mass, cp, and R 863 ! -------------------------------- 864 865 if(photochem) then 866 call concentrations(ngrid,nlayer,nq,pplay,pt,pdt,pq,pdq,ptimestep) 867 endif 849 868 850 869 !--------------------------------- … … 1410 1429 end if ! end of 'water' 1411 1430 1431 ! ------------------------- 1432 ! VI.2. Photochemistry 1412 1433 ! ------------------------- 1413 ! VI.2. Aerosol particles 1434 1435 IF (photochem) then 1436 1437 DO ig=1,ngrid 1438 array_zero1(ig)=0.0 1439 DO l=1,nlayer 1440 array_zero2(ig,l)=0. 1441 ENDDO 1442 ENDDO 1443 1444 call calchim_asis(ngrid,nlayer,nq, & 1445 ptimestep,pplay,pplev,pt,pdt,dist_star,mu0, & 1446 fract,zzlev,zzlay,zday,pq,pdq,zdqchim,zdqschim, & 1447 array_zero1,array_zero1, & 1448 pu,pdu,pv,pdv,array_zero2,array_zero2) 1449 1450 ! increment values of tracers: 1451 DO iq=1,nq ! loop on all tracers; tendencies for non-chemistry 1452 ! tracers is zero anyways 1453 DO l=1,nlayer 1454 DO ig=1,ngrid 1455 pdq(ig,l,iq)=pdq(ig,l,iq)+zdqchim(ig,l,iq) 1456 ENDDO 1457 ENDDO 1458 ENDDO ! of DO iq=1,nq 1459 1460 1461 ! increment surface values of tracers: 1462 DO iq=1,nq ! loop on all tracers; tendencies for non-chemistry 1463 ! tracers is zero anyways 1464 DO ig=1,ngrid 1465 ! dqsurf(ig,iq)=dqsurf(ig,iq)+zdqschim(ig,iq) 1466 ENDDO 1467 ENDDO ! of DO iq=1,nq 1468 1469 END IF ! of IF (photochem) 1470 1471 1472 1473 ! ------------------------- 1474 ! VI.3. Aerosol particles 1414 1475 ! ------------------------- 1415 1476 … … 1464 1525 1465 1526 ! --------------- 1466 ! VI. 3. Updates1527 ! VI.4. Updates 1467 1528 ! --------------- 1468 1529 … … 1500 1561 1501 1562 ! ------------------ 1502 ! VI. 4. Slab Ocean1563 ! VI.5. Slab Ocean 1503 1564 ! ------------------ 1504 1565 … … 1536 1597 1537 1598 ! ----------------------------- 1538 ! VI. 5. Surface Tracer Update1599 ! VI.6. Surface Tracer Update 1539 1600 ! ----------------------------- 1540 1601
Note: See TracChangeset
for help on using the changeset viewer.