source: LMDZ5/trunk/libf/phylmd/icefrac_lsc_mod.F90 @ 2077

Last change on this file since 2077 was 2077, checked in by fhourdin, 10 years ago

Modification relative à la phase mixte des nuages :

  1. on fait tendre t_glace_min vers t_glace_max (en principe 0°C) linéairerment entre p/ps = 0.8 et p/ps=1.
  2. Passage de tableau à la routine icefrac_lsc en remplacement d'une fonction scalaire.
  3. Changement de nom pour le module (le module icefrac_lsc_mod.F90 contenant maintenant la routine icefrac_lsc).

Mofication concerning the mixte phase of clouds

  1. t_glace_min -> t_glace_max when p/ps : 0.8 -> 1
  2. passing arrays instead of scalars to icefrac_lsc (which becomes a routine rather than a function).
  3. Changing the name microphys_mod.F90 -> icerfrac_lsc_mod.F90
  • Property svn:executable set to *
File size: 1.1 KB
Line 
1!
2! $Header$
3!
4MODULE icefrac_lsc_mod
5
6CONTAINS
7!*******************************************************************
8
9SUBROUTINE icefrac_lsc(np,temp, sig, tmin, tmax, nexpo,icefrac)
10  IMPLICIT NONE
11  !
12  ! Compute the ice fraction 1-xliq (see e.g.
13  ! Doutriaux-Boucher & Quaas 2004, section 2.2.)
14  !
15  ! (JBM 3/14)
16  INTEGER :: np
17  REAL, DIMENSION(np), INTENT(IN) :: temp ! temperature
18  REAL, DIMENSION(np), INTENT(IN) :: sig
19  REAL, DIMENSION(np), INTENT(OUT) :: icefrac
20
21  REAL :: tmin ! if T < Tmin, the cloud is only made of water ice
22  REAL :: tmax ! if T > Tmax, the cloud is only made of liquid water
23  REAL :: nexpo ! controls the sharpness of the transition
24  REAL :: sig0,www,tmin_tmp,icefrac_tmp
25  INTEGER :: ip
26
27  sig0=0.8
28
29  DO ip=1,np
30     www=(max(sig(ip)-sig0,0.))/(1.-sig0) ! w=1 at the surface and 0 for sig < sig0
31     tmin_tmp=www*tmax+(1.-www)*tmin
32     icefrac_tmp= 1.0 - (temp(ip)-tmin_tmp) / (tmax-tmin_tmp)
33     icefrac_tmp = MIN(MAX(icefrac_tmp,0.0),1.0)
34     icefrac(ip) = icefrac_tmp**nexpo
35  ENDDO
36
37  RETURN
38END SUBROUTINE icefrac_lsc
39
40!*******************************************************************
41!
42END MODULE icefrac_lsc_mod
Note: See TracBrowser for help on using the repository browser.