source: trunk/LMDZ.GENERIC/libf/phystd/totalcloudfrac.F90 @ 775

Last change on this file since 775 was 728, checked in by jleconte, 13 years ago

18/07/2012 == JL

  • New water cycle scheme:
    • largescale now in F90. Robustness increased by i) including evap inside largescale ii) computing the

condensed water amount iteratively

  • same improvements in moistadj.
  • Water thermodynamical data and saturation curves centralized in module watercommn_h
    • The saturation curves used are now Tetens formula as they are analyticaly inversible (Ts(P)-> Ps(T)).

New saturation curve yields very good agreement with the former one.

  • Saturation curves are now generalized for arbitrary water amount (not just q<<1)
  • The old watersat should be removed soon.
  • The effect of water vapor on total (surface) pressure can be taken into account by setting

mass_redistrib=.true. in callphys.def (routine mass_redistribution inspired from co2_condense in martian
model but with a different scheme as many routines evaporate/condense water vapor).

  • New cloud and precipitation scheme (JL + BC):
    • The default recovery assumption for computing the total cloud fraction has been changed (total random gave too

large cloud fractions). See totalcloudfrac.F90 for details and to change this.

  • Totalcloudfraction now set the total cloud fraction to the fraction of the

optically thickest cloud and totalcloudfrac is thus called in aeropacity.

  • Only the total cloud fraction is used to compute optical depth in aeropacity (no more effective

optical depth with exponential formula).

  • 4 precipitation schemes are now available (see rain.F90 for details). The choice can be made using precip_scheme

in callphys.def. Usage of the more physically based model of Boucher et al 95 (precip_scheme=4) is recommended.
default behavior is set to the former "simple scheme" (precip_scheme=1).

  • See rain.f90 to determine the parameter to be defined in callphys.def as a function of the precipitation scheme used.
  • Physiq.F90 now written in a matricial (more F90) way.
  • Radii (H2O and CO2 cloud particles, aerosols, duts, ...) calculations now centralized in module radii_mod.F90

and work with the new aerosol scheme implemented by Laura K. Some inconsistency may remain in callsedim.


Implementation compiled with ifort and pgf90.
gcm.e runs in Earth and Early Mars case with CO2 and H2O cycle + dust.

File size: 3.2 KB
Line 
1      subroutine totalcloudfrac(rneb,totalrneb,pplev,pq,tau)
2
3      use watercommon_h
4      implicit none
5
6!==================================================================
7!     
8!     Purpose
9!     -------
10!     Calculates the total cloud fraction
11!     
12!     Authors
13!     -------
14!     Adapted from the LMDTERRE code by B Charnay (2010)
15!     
16!==================================================================
17
18#include "dimensions.h"
19#include "dimphys.h"
20#include "comcstfi.h"
21#include "tracer.h"
22#include "fisice.h"
23#include "comgeomfi.h"
24#include "comdiurn.h"
25#include "callkeys.h"
26
27
28      real rneb(ngridmx,nlayermx)             ! cloud fraction     
29      real pplev(ngridmx,nlayermx+1)
30      real pq(ngridmx,nlayermx,nqmx)
31      real tau(ngridmx,nlayermx)
32
33      real totalrneb(ngridmx)                 ! total cloud fraction
34      real, dimension(nlayermx+1) :: masse
35      integer, parameter          :: recovery=7
36      integer ltau_max
37      real massetot
38
39! hypothesis behind recovery. value:
40! 1 = random recovery
41! 2 = maximal recovery
42! 3 = minimal recovery
43! 4 = fixed recovery
44! 5 = recovery on the thicker layer
45!     Local variables
46      integer ig, l
47      real clear,tau_min
48      real, parameter ::  tau_c=0.1 !threshold of optical depth for the calculation of total cloud fraction
49      real rneb2(nlayermx)
50
51
52      do ig=1,ngridmx
53         totalrneb(ig) = 0.
54
55         if (recovery.eq.1) then
56            clear = (1.-rneb(ig,1))
57            do l=2,nlayermx       
58               clear = clear*(1.-rneb(ig,l))
59            enddo
60            totalrneb(ig) = 1.-clear
61
62         elseif (recovery.eq.2) then
63            totalrneb(ig) = rneb(ig,1)
64            do l=2,14 !nlayermx       
65               totalrneb(ig) = max(rneb(ig,l),totalrneb(ig))
66            enddo
67           
68         elseif (recovery.eq.3) then
69            totalrneb(ig) = rneb(ig,1)
70            do l=2,nlayermx       
71               totalrneb(ig) = min(rneb(ig,l),totalrneb(ig))
72            enddo
73         
74         elseif (recovery.eq.4) then
75            totalrneb(ig) = CLFfixval
76
77         elseif (recovery.eq.5) then
78            totalrneb(ig) = rneb(ig,1)           
79            do l=1,nlayermx
80               masse(l)=pq(ig,l,igcm_h2o_ice)*(pplev(ig,l)-pplev(ig,l+1))
81            enddo
82            ltau_max=maxloc(masse,dim=1)
83            totalrneb(ig) = rneb(ig,ltau_max)
84
85         elseif (recovery.eq.6) then
86            totalrneb(ig) = 0.           
87            do l=1,nlayermx
88               masse(l)=pq(ig,l,igcm_h2o_ice)*(pplev(ig,l)-pplev(ig,l+1))
89               masse(l)=max(masse(l),0.)
90            enddo
91            massetot=sum(masse,dim=1)
92            do l=1,nlayermx
93               totalrneb(ig) = totalrneb(ig)+rneb(ig,l)*masse(l)/massetot
94            enddo
95
96         elseif (recovery.eq.7) then
97
98            rneb2(:)=rneb(ig,1:nlayermx)
99            tau_min=MIN(tau_c,MAXVAL(tau(ig,1:nlayermx))/2.)
100            do l=1,nlayermx
101               if(tau(ig,l)<tau_min) rneb2(l)=0.       
102            enddo
103            totalrneb(ig)=maxval(rneb2(1:nlayermx))
104
105         endif                  ! (recovery=)   
106
107         totalrneb(ig) = min(1.,totalrneb(ig))
108         totalrneb(ig) = max(0.,totalrneb(ig))
109         
110      enddo                     ! (ig=)
111     
112     
113    end subroutine totalcloudfrac
Note: See TracBrowser for help on using the repository browser.