Ignore:
Timestamp:
Apr 13, 2010, 5:12:56 PM (14 years ago)
Author:
Laurent Fairhead
Message:

Additions to aerosol outputs for CMIP5 exercise
(Needed because of chageset r1346 LF)


Additions aux sorties aérosols pour l'exercice CMIP5
(Nécessaires suite au changeset r1346 LF)

Michael, Anne

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4V5.0-dev/libf/phylmd/newmicro.F

    r1306 r1347  
    1111
    1212      USE dimphy
     13      USE phys_local_var_mod, only: scdnc,cldncl,reffclwtop,lcc,
     14     .                              reffclws,reffclwc,cldnvi,lcc3d,
     15     .                              lcc3dcon,lcc3dstra
     16      USE phys_state_var_mod, only: rnebcon,clwcon
    1317      IMPLICIT none
    1418c======================================================================
     
    4650#include "radepsi.h"
    4751#include "radopt.h"
     52c choix de l'hypothese de recouvrememnt nuageuse
     53      LOGICAL RANDOM,MAXIMUM_RANDOM,MAXIMUM,FIRST
     54      parameter (RANDOM=.FALSE., MAXIMUM_RANDOM=.TRUE., MAXIMUM=.FALSE.)
     55c Hypoyhese de recouvrement : MAXIMUM_RANDOM
     56      INTEGER flag_max
     57      REAL phase3d(klon, klev),dh(klon, klev),pdel(klon, klev),
     58     .     zrho(klon, klev)
     59      REAL tcc(klon), ftmp(klon), lcc_integrat(klon), height(klon)
     60      REAL thres_tau,thres_neb
     61      PARAMETER (thres_tau=0.3, thres_neb=0.001)
     62      REAL t_tmp
     63      REAL gravit
     64      PARAMETER (gravit=9.80616)  !m/s2
     65      REAL pqlwpcon(klon, klev), pqlwpstra(klon, klev)
     66c
    4867      REAL paprs(klon,klev+1), pplay(klon,klev)
    4968      REAL t(klon,klev)
     
    131150      xflwc = 0.d0
    132151      xfiwc = 0.d0
     152
     153! Initialisation
     154      reliq=0.
     155      reice=0.
    133156
    134157      DO k = 1, klev
     
    471494         pcl(i)=1.-pcl(i)
    472495      ENDDO
    473      
     496
     497c ========================================================
     498! DIAGNOSTICS CALCULATION FOR CMIP5 PROTOCOL
     499c ========================================================
     500!! change by Nicolas Yan (LSCE)
     501!! Cloud Droplet Number Concentration (CDNC) : 3D variable
     502!! Fractionnal cover by liquid water cloud (LCC3D) : 3D variable
     503!! Cloud Droplet Number Concentration at top of cloud (CLDNCL) : 2D variable
     504!! Droplet effective radius at top of cloud (REFFCLWTOP) : 2D variable
     505!! Fractionnal cover by liquid water at top of clouds (LCC) : 2D variable
     506      IF (ok_newmicro) THEN
     507         IF (ok_aie) THEN
     508            DO k = 1, klev
     509               DO i = 1, klon
     510                  phase3d(i,k)=1-zfice2(i,k)
     511                  IF (pclc(i,k) .LE. seuil_neb) THEN
     512                     lcc3d(i,k)=seuil_neb*phase3d(i,k)
     513                  ELSE
     514                     lcc3d(i,k)=pclc(i,k)*phase3d(i,k)
     515                  ENDIF
     516                  scdnc(i,k)=lcc3d(i,k)*cdnc(i,k) ! m-3
     517               ENDDO
     518            ENDDO
     519
     520            DO i=1,klon
     521               lcc(i)=0.
     522               reffclwtop(i)=0.
     523               cldncl(i)=0.
     524               IF(RANDOM .OR. MAXIMUM_RANDOM) tcc(i) = 1.
     525               IF(MAXIMUM) tcc(i) = 0.
     526            ENDDO
     527     
     528            FIRST=.TRUE.
     529
     530            DO i=1,klon
     531               DO k=klev-1,1,-1 !From TOA down
     532
     533
     534            ! Test, if the cloud optical depth exceeds the necessary
     535            ! threshold:
     536
     537             IF (pcltau(i,k).GT.thres_tau .AND. pclc(i,k).GT.thres_neb)
     538     .                                                             THEN
     539               ! To calculate the right Temperature at cloud top,
     540               ! interpolate it between layers:
     541                  t_tmp = t(i,k) +
     542     .              (paprs(i,k+1)-pplay(i,k))/(pplay(i,k+1)-pplay(i,k))
     543     .              * ( t(i,k+1) - t(i,k) )
     544
     545                  IF(MAXIMUM) THEN
     546                    IF(FIRST) THEN
     547                       write(*,*)'Hypothese de recouvrement: MAXIMUM'
     548                       FIRST=.FALSE.
     549                    ENDIF
     550                    flag_max= -1.
     551                    ftmp(i) = MAX(tcc(i),pclc(i,k))
     552                  ENDIF
     553
     554                  IF(RANDOM) THEN
     555                    IF(FIRST) THEN
     556                       write(*,*)'Hypothese de recouvrement: RANDOM'
     557                       FIRST=.FALSE.
     558                    ENDIF
     559                    flag_max= 1.
     560                    ftmp(i) = tcc(i) * (1-pclc(i,k))
     561                  ENDIF
     562
     563                  IF(MAXIMUM_RANDOM) THEN
     564                    IF(FIRST) THEN
     565                       write(*,*)'Hypothese de recouvrement: MAXIMUM_
     566     .                         RANDOM'
     567                       FIRST=.FALSE.
     568                    ENDIF
     569                    flag_max= 1.
     570                    ftmp(i) = tcc(i) *
     571     .              (1. - MAX(pclc(i,k),pclc(i,k+1))) /
     572     .              (1. - MIN(pclc(i,k+1),1.-thres_neb))
     573                  ENDIF
     574c Effective radius of cloud droplet at top of cloud (m)
     575                  reffclwtop(i) = reffclwtop(i) + rad_chaud_tab(i,k) *
     576     .           1.0E-06 * phase3d(i,k) * ( tcc(i) - ftmp(i))*flag_max
     577c CDNC at top of cloud (m-3)
     578                  cldncl(i) = cldncl(i) + cdnc(i,k) * phase3d(i,k) *
     579     .                 (tcc(i) - ftmp(i))*flag_max
     580c Liquid Cloud Content at top of cloud
     581                  lcc(i) = lcc(i) + phase3d(i,k) * (tcc(i)-ftmp(i))*
     582     .                    flag_max
     583c Total Cloud Content at top of cloud
     584                  tcc(i)=ftmp(i)
     585             
     586          ENDIF ! is there a visible, not-too-small cloud? 
     587          ENDDO ! loop over k
     588
     589          IF(RANDOM .OR. MAXIMUM_RANDOM) tcc(i)=1.-tcc(i)
     590         ENDDO ! loop over i
     591
     592!! Convective and Stratiform Cloud Droplet Effective Radius (REFFCLWC  REFFCLWS)
     593            DO i = 1, klon
     594               DO k = 1, klev
     595                  pqlwpcon(i,k)=rnebcon(i,k)*clwcon(i,k) ! fraction eau liquide convective
     596                  pqlwpstra(i,k)=pclc(i,k)*phase3d(i,k)-pqlwpcon(i,k) ! fraction eau liquide stratiforme
     597                  IF (pqlwpstra(i,k) .LE. 0.0) pqlwpstra(i,k)=0.0
     598! Convective Cloud Droplet Effective Radius (REFFCLWC) : variable 3D
     599                  reffclwc(i,k)=1.1
     600     &                 *((pqlwpcon(i,k)*pplay(i,k)/(RD * T(i,k)))
     601     &                 /(4./3*RPI*1000.*cdnc(i,k)) )**(1./3.)
     602                  reffclwc(i,k) = MAX(reffclwc(i,k) * 1e6, 5.)
     603
     604! Stratiform Cloud Droplet Effective Radius (REFFCLWS) : variable 3D
     605                  IF ((pclc(i,k)-rnebcon(i,k)) .LE. seuil_neb) THEN ! tout sous la forme convective
     606                     reffclws(i,k)=0.0
     607                     lcc3dstra(i,k)= 0.0
     608                  ELSE
     609                     reffclws(i,k) = (pclc(i,k)*phase3d(i,k)*
     610     &                               rad_chaud_tab(i,k)-
     611     &                            pqlwpcon(i,k)*reffclwc(i,k))
     612                     IF(reffclws(i,k) .LE. 0.0) reffclws(i,k)=0.0
     613                     lcc3dstra(i,k)=pqlwpstra(i,k)
     614                 ENDIF
     615!Convertion from um to m
     616                  IF(rnebcon(i,k). LE. seuil_neb) THEN
     617                    reffclwc(i,k) = reffclwc(i,k)*seuil_neb*clwcon(i,k)
     618     &                              *1.0E-06
     619                    lcc3dcon(i,k)= seuil_neb*clwcon(i,k)
     620                  ELSE
     621                    reffclwc(i,k) = reffclwc(i,k)*pqlwpcon(i,k)
     622     &                              *1.0E-06
     623                    lcc3dcon(i,k) = pqlwpcon(i,k)
     624                  ENDIF
     625
     626                  reffclws(i,k) = reffclws(i,k)*1.0E-06
     627
     628               ENDDO !klev
     629            ENDDO !klon
     630
     631!! Column Integrated Cloud Droplet Number (CLDNVI) : variable 2D
     632            DO k = 1, klev
     633               DO i = 1, klon
     634                   pdel(i,k) = paprs(i,k)-paprs(i,k+1)
     635                   zrho(i,k)=pplay(i,k)/t(i,k)/RD                  ! kg/m3
     636                   dh(i,k)=pdel(i,k)/(gravit*zrho(i,k)) ! hauteur de chaque boite (m)
     637               ENDDO
     638            ENDDO
     639c
     640            DO i = 1, klon
     641               cldnvi(i)=0.
     642               lcc_integrat(i)=0.
     643               height(i)=0.
     644               DO k = 1, klev
     645                  cldnvi(i)=cldnvi(i)+cdnc(i,k)*lcc3d(i,k)*dh(i,k)
     646                  lcc_integrat(i)=lcc_integrat(i)+lcc3d(i,k)*dh(i,k)
     647                  height(i)=height(i)+dh(i,k)
     648               ENDDO ! klev
     649               lcc_integrat(i)=lcc_integrat(i)/height(i)
     650               IF (lcc_integrat(i) .LE. 1.0E-03) THEN
     651                  cldnvi(i)=cldnvi(i)*lcc(i)/seuil_neb
     652               ELSE
     653                  cldnvi(i)=cldnvi(i)*lcc(i)/lcc_integrat(i)
     654               ENDIF
     655            ENDDO ! klon
     656           
     657            DO i = 1, klon
     658               DO k = 1, klev
     659                IF (scdnc(i,k) .LE. 0.0) scdnc(i,k)=0.0
     660                IF (reffclws(i,k) .LE. 0.0) reffclws(i,k)=0.0
     661                IF (reffclwc(i,k) .LE. 0.0) reffclwc(i,k)=0.0
     662                IF (lcc3d(i,k) .LE. 0.0) lcc3d(i,k)=0.0
     663                IF (lcc3dcon(i,k) .LE. 0.0) lcc3dcon(i,k)=0.0
     664                IF (lcc3dstra(i,k) .LE. 0.0) lcc3dstra(i,k)=0.0
     665               ENDDO
     666               IF (reffclwtop(i) .LE. 0.0) reffclwtop(i)=0.0
     667               IF (cldncl(i) .LE. 0.0) cldncl(i)=0.0
     668               IF (cldnvi(i) .LE. 0.0) cldnvi(i)=0.0
     669               IF (lcc(i) .LE. 0.0) lcc(i)=0.0
     670            ENDDO
     671
     672         ENDIF !ok_aie
     673      ENDIF !ok newmicro
     674c
    474675C
    475676      RETURN
Note: See TracChangeset for help on using the changeset viewer.