| 1 | ! |
|---|
| 2 | ! $Header$ |
|---|
| 3 | ! |
|---|
| 4 | MODULE icefrac_lsc_mod |
|---|
| 5 | |
|---|
| 6 | CONTAINS |
|---|
| 7 | !******************************************************************* |
|---|
| 8 | |
|---|
| 9 | SUBROUTINE 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 |
|---|
| 38 | END SUBROUTINE icefrac_lsc |
|---|
| 39 | |
|---|
| 40 | !******************************************************************* |
|---|
| 41 | ! |
|---|
| 42 | END MODULE icefrac_lsc_mod |
|---|