source: LMDZ5/branches/testing/libf/phylmd/microphys_mod.F90 @ 2056

Last change on this file since 2056 was 2056, checked in by Laurent Fairhead, 10 years ago

Merged trunk changes r1997:2055 into testing branch

  • Property svn:executable set to *
File size: 820 bytes
Line 
1!
2! $Header$
3!
4MODULE microphys_mod
5
6CONTAINS
7!*******************************************************************
8
9FUNCTION icefrac_lsc(temp, tmin, tmax, nexpo)
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  REAL :: icefrac_lsc ! ice fraction
17  REAL :: temp ! temperature
18  REAL :: tmin ! if T < Tmin, the cloud is only made of water ice
19  REAL :: tmax ! if T > Tmax, the cloud is only made of liquid water
20  REAL :: nexpo ! controls the sharpness of the transition
21
22  icefrac_lsc = 1.0 - (temp-tmin) / (tmax-tmin)
23  icefrac_lsc = MIN(MAX(icefrac_lsc,0.0),1.0)
24  icefrac_lsc = icefrac_lsc**nexpo
25
26  RETURN
27END FUNCTION icefrac_lsc
28
29!*******************************************************************
30!
31END MODULE microphys_mod
Note: See TracBrowser for help on using the repository browser.