M.Mazoyer+C.Lac 26/04/2016 : DTHRAD used for radiative cooling when LACTIT
authorGaelle Tanguy <gaelle.tanguy@meteo.fr>
Tue, 26 Apr 2016 11:45:42 +0000 (11:45 +0000)
committerPhilippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Thu, 19 May 2016 14:44:49 +0000 (16:44 +0200)
src/MNH/modeln.f90
src/MNH/rain_c2r2_khko.f90

index 4e8b927..9cb3df5 100644 (file)
@@ -236,6 +236,7 @@ END MODULE MODI_MODEL_n
 !!                   Sep 2015 (S. Bielli) : Remove YDADFILE from argument call 
 !!                              of write_phys_param
 !!      J.Escobar : 19/04/2016 : Pb IOZ/NETCDF , missing OPARALLELIO=.FALSE. for PGD files
+!!      M.Mazoyer : 04/2016      DTHRAD used for radiative cooling when LACTIT
 !!-------------------------------------------------------------------------------
 !
 !*       0.     DECLARATIONS
@@ -297,7 +298,7 @@ USE MODD_PRECIP_n
 USE MODD_BIKHARDT_n
 USE MODD_DEEP_CONVECTION_n
 USE MODD_NSV
-USE MODD_RADIATIONS_n, ONLY : XTSRAD,XSCAFLASWD,XDIRFLASWD,XDIRSRFSWD, XAER
+USE MODD_RADIATIONS_n, ONLY : XTSRAD,XSCAFLASWD,XDIRFLASWD,XDIRSRFSWD, XAER, XDTHRAD
 USE MODD_SERIES_n, ONLY: NFREQSERIES
 USE MODD_CH_AERO_n,    ONLY: XSOLORG, XMI
 USE MODD_CH_MNHC_n,    ONLY: LUSECHEM,LCH_CONV_LINOX,LUSECHAQ,LUSECHIC, &
@@ -1457,10 +1458,10 @@ XTIME_LES_BU_PROCESS = 0.
 CALL MPPDB_CHECK3DM("before ADVEC_METSV:XU/V/W/TH/TKE/T,XRHODJ",PRECISION,&
                    &  XUT, XVT, XWT, XTHT, XTKET,XRHODJ)
  CALL ADVECTION_METSV ( CLUOUT, YFMFILE, GCLOSE_OUT,CUVW_ADV_SCHEME, &
-                 CMET_ADV_SCHEME, CSV_ADV_SCHEME, NSPLIT,            &
+                 CMET_ADV_SCHEME, CSV_ADV_SCHEME, CCLOUD, NSPLIT,    &
                  LSPLIT_CFL, XSPLIT_CFL, LCFL_WRIT,                  &
                  CLBCX, CLBCY, NRR, NSV, KTCOUNT, XTSTEP,            &
-                 XUT, XVT, XWT, XTHT, XRT, XTKET, XSVT,              &
+                 XUT, XVT, XWT, XTHT, XRT, XTKET, XSVT, XPABST,      &
                  XTHVREF, XRHODJ, XDXX, XDYY, XDZZ, XDZX, XDZY,      &
                  XRTHS, XRRS, XRTKES, XRSVS,                         &
                  XRTHS_CLD, XRRS_CLD, XRSVS_CLD, XRTKEMS             )
@@ -1658,7 +1659,7 @@ IF (CCLOUD /= 'NONE' .AND. CELEC == 'NONE') THEN
                           GCLOSE_OUT, LSUBG_COND,LSIGMAS,CSUBG_AUCV,XTSTEP,    &
                           XZZ, XRHODJ, XRHODREF, XEXNREF,                      &
                           XPABST, XTHT,XRT,XSIGS,VSIGQSAT,XMFCONV,XTHM,XRCM,   &
-                          XPABSM, ZWT_ACT_NUC, XRTHS, XRRS,                    &
+                          XPABSM, ZWT_ACT_NUC,XDTHRAD, XRTHS, XRRS,            &
                           XSVT, XRSVS,                                         &
                           XSRCT, XCLDFR,XCIT,                                  &
                           LSEDIC,LACTIT, LSEDC, LSEDI, LRAIN, LWARM, LHHONI,   &
@@ -1676,7 +1677,7 @@ IF (CCLOUD /= 'NONE' .AND. CELEC == 'NONE') THEN
                           GCLOSE_OUT, LSUBG_COND,LSIGMAS,CSUBG_AUCV,XTSTEP,    &
                           XZZ, XRHODJ, XRHODREF, XEXNREF,                      &
                           XPABST, XTHT,XRT,XSIGS,VSIGQSAT,XMFCONV,XTHM,XRCM,   &
-                          XPABSM, ZWT_ACT_NUC, XRTHS, XRRS,                    &
+                          XPABSM, ZWT_ACT_NUC,XDTHRAD, XRTHS, XRRS,            &
                           XSVT, XRSVS,                                         &
                           XSRCT, XCLDFR,XCIT,                                  &
                           LSEDIC,LACTIT, LSEDC, LSEDI, LRAIN, LWARM, LHHONI,   &
@@ -1698,7 +1699,7 @@ IF (CCLOUD /= 'NONE' .AND. CELEC == 'NONE') THEN
                           GCLOSE_OUT, LSUBG_COND,LSIGMAS,CSUBG_AUCV,           &
                           XTSTEP,XZZ, XRHODJ, XRHODREF, XEXNREF,               &
                           XPABST, XTHT,XRT,XSIGS,VSIGQSAT,XMFCONV,XTHM,XRCM,   &
-                          XPABSM, ZWT_ACT_NUC, XRTHS, XRRS,                    &
+                          XPABSM, ZWT_ACT_NUC,XDTHRAD, XRTHS, XRRS,            &
                           XSVT, XRSVS,                                         &
                           XSRCT, XCLDFR,XCIT,                                  &
                           LSEDIC, LACTIT, LSEDC, LSEDI, LRAIN, LWARM, LHHONI,  &
@@ -1714,7 +1715,7 @@ IF (CCLOUD /= 'NONE' .AND. CELEC == 'NONE') THEN
                           GCLOSE_OUT, LSUBG_COND,LSIGMAS,CSUBG_AUCV,           &
                           XTSTEP,XZZ, XRHODJ, XRHODREF, XEXNREF,               &
                           XPABST, XTHT,XRT,XSIGS,VSIGQSAT,XMFCONV,XTHM,XRCM,   &
-                          XPABSM, ZWT_ACT_NUC, XRTHS, XRRS,                    &
+                          XPABSM, ZWT_ACT_NUC,XDTHRAD, XRTHS, XRRS,            &
                           XSVT, XRSVS,                                         &
                           XSRCT, XCLDFR,XCIT,                                  &
                           LSEDIC, LACTIT, LSEDC, LSEDI, LRAIN, LWARM, LHHONI,  &
index e255b5d..be8cc75 100644 (file)
@@ -19,7 +19,7 @@ INTERFACE
                             PRHODREF, PEXNREF,                                  &
                             PPABST, PTHT, PRVT, PRCT,                           &
                             PRRT, PTHM, PRCM, PPABSM,                           &
-                            PW_NU, PTHS, PRVS, PRCS, PRRS,                      &
+                            PW_NU,PDTHRAD, PTHS, PRVS, PRCS, PRRS,              &
                             PCNT, PCCT, PCRT, PCNS, PCCS, PCRS,                 &
                             PINPRC, PINPRR, PINPRR3D, PEVAP3D,PAEROT,           &
                             PSOLORG, PMI, HACTCCN                               )
@@ -61,6 +61,7 @@ REAL, DIMENSION(:,:,:),   INTENT(IN)    :: PRCM    ! Cloud water m.r. at time t-
 !
 REAL, DIMENSION(:,:,:),   INTENT(IN)    :: PW_NU   ! updraft velocity used for
                                                    ! the nucleation param.
+REAL, DIMENSION(:,:,:),   INTENT(IN)    :: PDTHRAD ! THeta RADiative Tendancy
 REAL, DIMENSION(:,:,:),   INTENT(INOUT) :: PTHS    ! Theta source
 REAL, DIMENSION(:,:,:),   INTENT(INOUT) :: PRVS    ! Water vapor m.r. source
 REAL, DIMENSION(:,:,:),   INTENT(INOUT) :: PRCS    ! Cloud water m.r. source
@@ -92,7 +93,7 @@ END MODULE MODI_RAIN_C2R2_KHKO
                             PRHODREF, PEXNREF,                                  &
                             PPABST, PTHT, PRVT,  PRCT,                          &
                             PRRT, PTHM, PRCM, PPABSM,                           &
-                            PW_NU, PTHS, PRVS, PRCS, PRRS,                      &
+                            PW_NU,PDTHRAD, PTHS, PRVS, PRCS, PRRS,              &
                             PCNT, PCCT,  PCRT, PCNS, PCCS, PCRS,                &
                             PINPRC, PINPRR, PINPRR3D, PEVAP3D,PAEROT,           &
                             PSOLORG, PMI, HACTCCN                               )
@@ -208,6 +209,8 @@ END MODULE MODI_RAIN_C2R2_KHKO
 !!      G.Tanguy             07/14     FUSION C2R2 and KHKO
 !!      J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 
 !!      J.Escobar : 07/10/2015 , Bug in parallel run , => comment test on INUCT>1 containing GET_HALO  
+!!      M.Mazoyer : 04/2016 : Temperature radiative tendency used for  
+!!                            activation by cooling (OACTIT)
 !-------------------------------------------------------------------------------
 !
 !*       0.    DECLARATIONS
@@ -274,6 +277,7 @@ REAL, DIMENSION(:,:,:),   INTENT(IN)    :: PRCM    ! Cloud water m.r. at time t-
 !
 REAL, DIMENSION(:,:,:),   INTENT(IN)    :: PW_NU   ! updraft velocity used for
                                                    ! the nucleation param.
+REAL, DIMENSION(:,:,:),   INTENT(IN)    :: PDTHRAD ! THeta RADiative Tendancy
 REAL, DIMENSION(:,:,:),   INTENT(INOUT) :: PTHS    ! Theta source
 REAL, DIMENSION(:,:,:),   INTENT(INOUT) :: PRVS    ! Water vapor m.r. source
 REAL, DIMENSION(:,:,:),   INTENT(INOUT) :: PRCS    ! Cloud water m.r. source
@@ -604,11 +608,12 @@ ZZW1LOG(:,:,:)= 0. ! supersaturation
 ZTDT(:,:,:)   = 0.
 ZDRC(:,:,:)   = 0.
 IF (OACTIT) THEN
-  ZTM(:,:,:)    = PTHM(:,:,:) * (PPABSM(:,:,:)/XP00)**(XRD/XCPD)
-  ZTDT(:,:,:)   = (ZT(:,:,:)-ZTM(:,:,:))/PTSTEP                              ! dT/dt
-  ZDRC(:,:,:)   = (PRCT(:,:,:)-PRCM(:,:,:))/PTSTEP                           ! drc/dt
-  ZTDT(:,:,:)   = MIN(0.,ZTDT(:,:,:)+(XG*PW_NU(:,:,:))/XCPD- &
-  (XLVTT+(XCPV-XCL)*(ZT(:,:,:)-XTT))*ZDRC(:,:,:)/XCPD)
+! ZTM(:,:,:)    = PTHM(:,:,:) * (PPABSM(:,:,:)/XP00)**(XRD/XCPD)
+! ZTDT(:,:,:)   = (ZT(:,:,:)-ZTM(:,:,:))/PTSTEP                              ! dT/dt
+! ZDRC(:,:,:)   = (PRCT(:,:,:)-PRCM(:,:,:))/PTSTEP                           ! drc/dt
+! ZTDT(:,:,:)   = MIN(0.,ZTDT(:,:,:)+(XG*PW_NU(:,:,:))/XCPD- &
+! (XLVTT+(XCPV-XCL)*(ZT(:,:,:)-XTT))*ZDRC(:,:,:)/XCPD)
+  ZTDT(:,:,:)   =  PDTHRAD(:,:,:)*(PPABST(:,:,:)/XP00)**(XRD/XCPD)
 END IF
 !
 !  optimization by looking for locations where
@@ -710,8 +715,23 @@ INUCT = COUNTJV( GNUCT(:,:,:),I1(:),I2(:),I3(:))
     ZZW3(:) = 1.0
   ELSE
     IF (OACTIT) THEN
+!     ZZW4(:)=XPSI1( IVEC1(:)+1)*ZZW2(:)+XPSI3(IVEC1(:)+1)*ZTDTBIS(:)
+!     ZZW5(:)=XPSI1( IVEC1(:))*ZZW2(:)+XPSI3(IVEC1(:))*ZTDTBIS(:)
+      ZZW4(:) =0.0
+      ZZW5(:) =0.0
+      WHERE  (ZZW2(:)>= XWMIN .AND. ZTDTBIS(:) < XTMIN )
       ZZW4(:)=XPSI1( IVEC1(:)+1)*ZZW2(:)+XPSI3(IVEC1(:)+1)*ZTDTBIS(:)
       ZZW5(:)=XPSI1( IVEC1(:))*ZZW2(:)+XPSI3(IVEC1(:))*ZTDTBIS(:)
+      ELSEWHERE  (ZZW2(:)< XWMIN .AND. ZTDTBIS(:) < XTMIN )
+      ZZW4(:)=XPSI3(IVEC1(:)+1)*ZTDTBIS(:)
+      ZZW5(:)=XPSI3(IVEC1(:))*ZTDTBIS(:)
+      ELSEWHERE  (ZZW2(:)< XWMIN .AND. ZTDTBIS(:) >= XTMIN  )  
+      ZZW4(:)=0.0
+      ZZW5(:)=0.0
+      ELSEWHERE  (ZZW2(:)>= XWMIN .AND. ZTDTBIS(:) >= XTMIN  ) 
+      ZZW4(:)=XPSI1( IVEC1(:)+1)*ZZW2(:)
+      ZZW5(:)=XPSI1( IVEC1(:))*ZZW2(:)
+      END WHERE
       WHERE (ZZW4(:) < 0. .OR. ZZW5(:) < 0.)
              ZZW4(:) = 0.
              ZZW5(:) = 0.
@@ -892,11 +912,12 @@ ZZW1LOG(:,:,:)= 0. ! supersaturation
 ZTDT(:,:,:)   = 0.
 ZDRC(:,:,:)   = 0.
 IF (OACTIT) THEN
-  ZTM(:,:,:)    = PTHM(:,:,:) * (PPABSM(:,:,:)/XP00)**(XRD/XCPD)
-  ZTDT(:,:,:)   = (ZT(:,:,:)-ZTM(:,:,:))/PTSTEP                              ! dT/dt
-  ZDRC(:,:,:)   = (PRCT(:,:,:)-PRCM(:,:,:))/PTSTEP                           ! drc/dt
-  ZTDT(:,:,:)   = MIN(0.,ZTDT(:,:,:)+(XG*PW_NU(:,:,:))/XCPD- &
-  (XLVTT+(XCPV-XCL)*(ZT(:,:,:)-XTT))*ZDRC(:,:,:)/XCPD)
+! ZTM(:,:,:)    = PTHM(:,:,:) * (PPABSM(:,:,:)/XP00)**(XRD/XCPD)
+! ZTDT(:,:,:)   = (ZT(:,:,:)-ZTM(:,:,:))/PTSTEP                              ! dT/dt
+! ZDRC(:,:,:)   = (PRCT(:,:,:)-PRCM(:,:,:))/PTSTEP                           ! drc/dt
+! ZTDT(:,:,:)   = MIN(0.,ZTDT(:,:,:)+(XG*PW_NU(:,:,:))/XCPD- &
+! (XLVTT+(XCPV-XCL)*(ZT(:,:,:)-XTT))*ZDRC(:,:,:)/XCPD)
+  ZTDT(:,:,:)   =  PDTHRAD(:,:,:)*(PPABST(:,:,:)/XP00)**(XRD/XCPD)
 END IF
 !
 !  optimization by looking for locations where