Changeset 1246 for LMDZ4/branches/LMDZ4-dev/libf/phylmd/sw_aeroAR4.F90
- Timestamp:
- Sep 23, 2009, 4:47:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/phylmd/sw_aeroAR4.F90
r1237 r1246 17 17 PTOPSWAERO,PTOPSW0AERO,& 18 18 PSOLSWAERO,PSOLSW0AERO,& 19 PTOPSWCFAERO,PSOLSWCFAERO,& 19 20 ok_ade, ok_aie ) 20 21 21 22 USE dimphy 23 22 24 IMPLICIT NONE 23 25 24 26 #include "YOMCST.h" 27 #include "clesphys.h" 25 28 ! 26 29 ! ------------------------------------------------------------------ … … 144 147 REAL(KIND=8) PTOPSWAIAERO(KDLON) ! SHORTWAVE FLUX AT T.O.A.(+AEROSOL IND) 145 148 REAL(KIND=8) PSOLSWAIAERO(KDLON) ! SHORTWAVE FLUX AT SURFACE(+AEROSOL IND) 146 REAL(KIND=8) PTOPSWAERO(KDLON,9) 147 REAL(KIND=8) PTOPSW0AERO(KDLON,9) 148 REAL(KIND=8) PSOLSWAERO(KDLON,9) 149 REAL(KIND=8) PSOLSW0AERO(KDLON,9) 149 REAL(KIND=8) PTOPSWAERO(KDLON,9) ! SW TOA AS DRF nat & ant 150 REAL(KIND=8) PTOPSW0AERO(KDLON,9) ! SW SRF AS DRF nat & ant 151 REAL(KIND=8) PSOLSWAERO(KDLON,9) ! SW TOA CS DRF nat & ant 152 REAL(KIND=8) PSOLSW0AERO(KDLON,9) ! SW SRF CS DRF nat & ant 153 REAL(KIND=8) PTOPSWCFAERO(KDLON,3) ! SW TOA AS cloudRF nat & ant 154 REAL(KIND=8) PSOLSWCFAERO(KDLON,3) ! SW SRF AS cloudRF nat & ant 150 155 151 156 !jq - Fluxes including aerosol effects … … 172 177 !$OMP THREADPRIVATE(ZFSDN0_AERO) 173 178 174 ! 175 LOGICAL :: AEROSOLFEEDBACK_ACTIVE=.true. 179 ! Key to define the aerosol effect acting on climate 180 ! 0: aerosol feedback active according to ok_ade, ok_aie DEFAULT 181 ! 1: no feedback , zero aerosol fluxes are used for climate, diagnostics according to ok_ade_ok_aie 182 ! 2: feedback according to total aerosol direct effect used for climate, diagnostics according to ok_ade, ok_aie 183 ! 3: feedback according to natural aerosol direct effect used for climate, diagnostics according to ok_ade_ok_aie 184 185 INTEGER :: AEROSOLFEEDBACK_ACTIVE = 0 186 187 IF ((.not. ok_ade) .and. (AEROSOLFEEDBACK_ACTIVE .ge. 2)) THEN 188 print*,'Error: direct effect is not activated but assumed to be active - see sw_aeroAR4.F90' 189 stop 190 ENDIF 191 AEROSOLFEEDBACK_ACTIVE=MIN(MAX(AEROSOLFEEDBACK_ACTIVE,0),3) 192 IF (AEROSOLFEEDBACK_ACTIVE .gt. 3) THEN 193 print*,'Error: AEROSOLFEEDBACK_ACTIVE options go only until 3' 194 stop 195 ENDIF 176 196 177 197 IF(.NOT.initialized) THEN … … 200 220 ENDIF 201 221 202 203 222 IF (appel1er) THEN 204 223 PRINT*, 'SW calling frequency : ', swpas … … 217 236 ENDDO 218 237 219 220 ! clear-sky: 238 ! clear sky is either computed IF no direct effect is asked for, or for extended diag) 239 IF (( lev_histmth .eq. 4 ) .or. ( .not. ok_ade )) THEN 240 241 ! clear-sky: zero aerosol effect 221 242 flag_aer=0.0 222 243 CALL SWU_LMDAR4(PSCT,ZCLDSW0,PPMB,PPSOL,& … … 242 263 ENDDO 243 264 ENDDO 244 245 246 ! cloudy-sky: 265 ENDIF 266 267 ! cloudy sky is either computed IF no indirect effect is asked for, or for extended diag) 268 IF (( lev_histmth .eq. 4 ) .or. ( .not. ok_aie )) THEN 269 ! cloudy-sky: zero aerosol effect 247 270 flag_aer=0.0 248 271 CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,& … … 269 292 ENDDO 270 293 ENDDO 271 294 ENDIF 272 295 273 296 274 297 IF (ok_ade) THEN 275 298 276 ! clear sky (Anne Cozic 03/07/2007) 299 ! clear sky (Anne Cozic 03/07/2007) direct effect of total aerosol 277 300 ! CAS AER (2) 278 301 flag_aer=1.0 … … 301 324 ENDDO 302 325 303 ! cloudy-sky + aerosol dir OB 304 ! ACo AER 326 ! cloudy sky is either computed IF no indirect effect is asked for, or for extended diag) 327 IF (( lev_histmth .eq. 4 ) .or. (.not. ok_aie)) THEN 328 ! cloudy-sky aerosol direct effect of total aerosol 305 329 flag_aer=1.0 306 330 CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,& … … 327 351 ENDDO 328 352 ENDDO 329 330 331 332 !CAS NAT333 ! clear sky 353 ENDIF 354 355 ! natural aeroosl clear sky is computed for extended diag) 356 IF ( lev_histmth .eq. 4 ) THEN 357 ! clear sky direct effect natural aerosol 334 358 flag_aer=1.0 335 359 CALL SWU_LMDAR4(PSCT,ZCLDSW0,PPMB,PPSOL,& … … 350 374 ZFDOWN, ZFUP) 351 375 352 ! Natural aerosol fluxes353 376 DO JK = 1 , KFLEV+1 354 377 DO JL = 1, KDLON … … 357 380 ENDDO 358 381 ENDDO 359 360 ! cloudy-sky 361 ! ACo NAT 382 ENDIF 383 384 ! cloud sky natural is for extended diagnostics 385 IF ( lev_histmth .eq. 4 ) THEN 386 ! cloudy-sky direct effect natural aerosol 362 387 flag_aer=1.0 363 388 CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,& … … 384 409 ENDDO 385 410 ENDDO 386 411 ENDIF 387 412 388 413 ENDIF ! ok_ade 389 414 390 415 ! cloudy sky needs to be computed in all cases IF ok_aie is activated 391 416 IF (ok_aie) THEN 392 !jq cloudy-sky + aerosol direct + aerosol indirect 417 !jq cloudy-sky + aerosol direct + aerosol indirect of total aerosol 393 418 flag_aer=1.0 394 419 CALL SWU_LMDAR4(PSCT,PCLDSW,PPMB,PPSOL,& … … 420 445 itapsw = itapsw + 1 421 446 422 447 IF ( AEROSOLFEEDBACK_ACTIVE .eq. 0) THEN 423 448 IF ( ok_ade .and. ok_aie ) THEN 424 449 ZFSUP(:,:) = ZFSUP_AERO(:,:,4) … … 433 458 ZFSDN0(:,:) = ZFSDN0_AERO(:,:,2) 434 459 ENDIF 435 !MS the following combination would include the direct aerosol effect in cloud regions 436 ! because it takes the total aerosol effect 460 437 461 IF ( (.not. ok_ade) .and. ok_aie ) THEN 462 print*,'Warning: indirect effect in cloudy regions includes direct aerosol effect' 438 463 ZFSUP(:,:) = ZFSUP_AERO(:,:,4) 439 464 ZFSDN(:,:) = ZFSDN_AERO(:,:,4) … … 450 475 ! MS the following allows to compute the forcing diagostics without 451 476 ! letting the aerosol forcing act on the meteorology 452 ! assuming that the no-aerosol case creates the reference meteorological state 453 ! for the natural aerosol state use: *_AERO(:,:3) 454 IF (.not. AEROSOLFEEDBACK_ACTIVE) THEN 455 ZFSUP(:,:) = ZFSUP_AERO(:,:,1) 456 ZFSDN(:,:) = ZFSDN_AERO(:,:,1) 457 ZFSUP0(:,:) = ZFSUP0_AERO(:,:,1) 458 ZFSDN0(:,:) = ZFSDN0_AERO(:,:,1) 477 ! SEE logic above 478 ELSEIF ( AEROSOLFEEDBACK_ACTIVE .gt. 0) THEN 479 ZFSUP(:,:) = ZFSUP_AERO(:,:,AEROSOLFEEDBACK_ACTIVE) 480 ZFSDN(:,:) = ZFSDN_AERO(:,:,AEROSOLFEEDBACK_ACTIVE) 481 ZFSUP0(:,:) = ZFSUP0_AERO(:,:,AEROSOLFEEDBACK_ACTIVE) 482 ZFSDN0(:,:) = ZFSDN0_AERO(:,:,AEROSOLFEEDBACK_ACTIVE) 459 483 ENDIF 460 484 … … 463 487 kpl1 = k+1 464 488 DO i = 1, KDLON 465 466 489 PHEAT(i,k) = -(ZFSUP(i,kpl1)-ZFSUP(i,k))-(ZFSDN(i,k)-ZFSDN(i,kpl1)) 467 490 PHEAT(i,k) = PHEAT(i,k) * RDAY*RG/RCPD / PDP(i,k) 468 491 PHEAT0(i,k) = -(ZFSUP0(i,kpl1)-ZFSUP0(i,k))-(ZFSDN0(i,k)-ZFSDN0(i,kpl1)) 469 492 PHEAT0(i,k) = PHEAT0(i,k) * RDAY*RG/RCPD / PDP(i,k) 470 471 493 ENDDO 472 494 ENDDO 473 495 474 496 DO i = 1, KDLON 497 ! effective SW surface albedo calculation 475 498 PALBPLA(i) = ZFSUP(i,KFLEV+1)/(ZFSDN(i,KFLEV+1)+1.0e-20) 476 ! clear sky 499 500 ! clear sky net fluxes at TOA and SRF 477 501 PSOLSW0(i) = ZFSDN0(i,1) - ZFSUP0(i,1) 478 502 PTOPSW0(i) = ZFSDN0(i,KFLEV+1) - ZFSUP0(i,KFLEV+1) 479 503 504 ! cloudy sky net fluxes at TOA and SRF 480 505 PSOLSW(i) = ZFSDN(i,1) - ZFSUP(i,1) 481 506 PTOPSW(i) = ZFSDN(i,KFLEV+1) - ZFSUP(i,KFLEV+1) 482 507 483 ! MS the following is not output, so commented 484 ! PSOLSW0AERO(i,:) = ZFSDN0_AERO(i,1,:) - ZFSUP0_AERO(i,1,:) 485 ! PTOPSW0AERO(i,:) = & 486 ! ZFSDN0_AERO(i,KFLEV+1,:) - ZFSUP0_AERO(i,KFLEV+1,:) 487 488 ! PSOLSWAERO(i,:) = ZFSDN_AERO(i,1,:) - ZFSUP_AERO(i,1,:) 489 ! PTOPSWAERO(i,:) = & 490 ! ZFSDN_AERO(i,KFLEV+1,:) - ZFSUP_AERO(i,KFLEV+1,:) 491 492 493 if (ok_ade) then 494 PSOLSWADAERO(i) = (ZFSDN_AERO(i,1,2) - ZFSUP_AERO(i,1,2))-(ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3)) 495 PTOPSWADAERO(i) = (ZFSDN_AERO(i,KFLEV+1,2) - ZFSUP_AERO(i,KFLEV+1,2))- (ZFSDN_AERO(i,KFLEV+1,3) - ZFSUP_AERO(i,KFLEV+1,3)) 496 497 PSOLSWAD0AERO(i) = (ZFSDN0_AERO(i,1,2) - ZFSUP0_AERO(i,1,2))-(ZFSDN0_AERO(i,1,3) - ZFSUP0_AERO(i,1,3)) 498 PTOPSWAD0AERO(i) = (ZFSDN0_AERO(i,KFLEV+1,2) - ZFSUP0_AERO(i,KFLEV+1,2))-(ZFSDN0_AERO(i,KFLEV+1,3) - ZFSUP0_AERO(i,KFLEV+1,3)) 499 endif 500 501 if (ok_aie) then 508 509 ! net anthropogenic forcing direct and 1st indirect effect diagnostics 510 ! requires a natural aerosol field read and used 511 ! Difference of net fluxes from double call to radiation 512 513 514 IF (ok_ade) THEN 515 516 ! indices 1: natural; 2 anthropogenic 517 ! TOA/SRF all sky natural forcing 518 PSOLSWAERO(i,1) = (ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3))-(ZFSDN_AERO(i,1,1) - ZFSUP_AERO(i,1,1)) 519 PTOPSWAERO(i,1) = (ZFSDN_AERO(i,KFLEV+1,3) - ZFSUP_AERO(i,KFLEV+1,3))- (ZFSDN_AERO(i,KFLEV+1,1) - ZFSUP_AERO(i,KFLEV+1,1)) 520 521 ! TOA/SRF all sky anthropogenic forcing 522 PSOLSWAERO(i,2) = (ZFSDN_AERO(i,1,2) - ZFSUP_AERO(i,1,2))-(ZFSDN_AERO(i,1,3) - ZFSUP_AERO(i,1,3)) 523 PTOPSWAERO(i,2) = (ZFSDN_AERO(i,KFLEV+1,2) - ZFSUP_AERO(i,KFLEV+1,2))- (ZFSDN_AERO(i,KFLEV+1,3) - ZFSUP_AERO(i,KFLEV+1,3)) 524 525 ! TOA/SRF clear sky natural forcing 526 PSOLSW0AERO(i,1) = (ZFSDN0_AERO(i,1,3) - ZFSUP0_AERO(i,1,3))-(ZFSDN0_AERO(i,1,1) - ZFSUP0_AERO(i,1,1)) 527 PTOPSW0AERO(i,1) = (ZFSDN0_AERO(i,KFLEV+1,3) - ZFSUP0_AERO(i,KFLEV+1,3))-(ZFSDN0_AERO(i,KFLEV+1,1) - ZFSUP0_AERO(i,KFLEV+1,1)) 528 529 ! TOA/SRF clear sky anthropogenic forcing 530 PSOLSW0AERO(i,2) = (ZFSDN0_AERO(i,1,2) - ZFSUP0_AERO(i,1,2))-(ZFSDN0_AERO(i,1,3) - ZFSUP0_AERO(i,1,3)) 531 PTOPSW0AERO(i,2) = (ZFSDN0_AERO(i,KFLEV+1,2) - ZFSUP0_AERO(i,KFLEV+1,2))-(ZFSDN0_AERO(i,KFLEV+1,3) - ZFSUP0_AERO(i,KFLEV+1,3)) 532 533 ! Cloud forcing indices 1: natural; 2 anthropogenic; 3: zero aerosol direct effect 534 ! Instantaneously computed cloudy sky direct aerosol effect, cloud forcing due to aerosols above clouds 535 ! natural 536 PSOLSWCFAERO(i,1) = PSOLSWAERO(i,1) - PSOLSW0AERO(i,1) 537 PTOPSWCFAERO(i,1) = PTOPSWAERO(i,1) - PTOPSW0AERO(i,1) 538 539 ! Instantaneously computed cloudy SKY DIRECT aerosol effect, cloud forcing due to aerosols above clouds 540 ! anthropogenic 541 PSOLSWCFAERO(i,2) = PSOLSWAERO(i,2) - PSOLSW0AERO(i,2) 542 PTOPSWCFAERO(i,2) = PTOPSWAERO(i,2) - PTOPSW0AERO(i,2) 543 544 ! Cloudforcing without aerosol 545 ! zero 546 PSOLSWCFAERO(i,3) = (ZFSDN_AERO(i,1,1) - ZFSUP_AERO(i,1,1))-(ZFSDN0_AERO(i,1,1) - ZFSUP0_AERO(i,1,1)) 547 PTOPSWCFAERO(i,3) = (ZFSDN_AERO(i,KFLEV+1,1) - ZFSUP_AERO(i,KFLEV+1,1))- (ZFSDN0_AERO(i,KFLEV+1,1) - ZFSUP0_AERO(i,KFLEV+1,1)) 548 549 ! direct anthropogenic forcing , as in old LMDzT, however differences of net fluxes 550 PSOLSWADAERO(i) = PSOLSWAERO(i,2) 551 PTOPSWADAERO(i) = PTOPSWAERO(i,2) 552 PSOLSWAD0AERO(i) = PSOLSW0AERO(i,2) 553 PTOPSWAD0AERO(i) = PTOPSW0AERO(i,2) 554 555 ENDIF 556 557 558 IF (ok_aie) THEN 502 559 PSOLSWAIAERO(i) = (ZFSDN_AERO(i,1,4) - ZFSUP_AERO(i,1,4))-(ZFSDN_AERO(i,1,2) - ZFSUP_AERO(i,1,2)) 503 560 PTOPSWAIAERO(i) = (ZFSDN_AERO(i,KFLEV+1,4) - ZFSUP_AERO(i,KFLEV+1,4))-(ZFSDN_AERO(i,KFLEV+1,2) - ZFSUP_AERO(i,KFLEV+1,2)) 504 endif 561 ENDIF 505 562 506 563 ENDDO 507 564 END SUBROUTINE SW_AEROAR4 508
Note: See TracChangeset
for help on using the changeset viewer.