[2077] | 1 | ! |
---|
| 2 | ! $Header$ |
---|
| 3 | ! |
---|
| 4 | MODULE icefrac_lsc_mod |
---|
| 5 | |
---|
[2109] | 6 | IMPLICIT NONE |
---|
| 7 | |
---|
[2077] | 8 | CONTAINS |
---|
| 9 | !******************************************************************* |
---|
| 10 | |
---|
[2109] | 11 | SUBROUTINE icefrac_lsc(np,temp, sig, icefrac) |
---|
[2077] | 12 | ! |
---|
| 13 | ! Compute the ice fraction 1-xliq (see e.g. |
---|
| 14 | ! Doutriaux-Boucher & Quaas 2004, section 2.2.) |
---|
| 15 | ! |
---|
[2507] | 16 | ! (JBM 3/14 8/14 5/16) |
---|
[2109] | 17 | |
---|
[2507] | 18 | USE print_control_mod, ONLY: lunout, prt_level |
---|
[4535] | 19 | USE lscp_ini_mod, ONLY: t_glace_min, t_glace_max, exposant_glace, iflag_t_glace |
---|
| 20 | ! lscp_ini contains: |
---|
[2109] | 21 | ! t_glace_min: if T < Tmin, the cloud is only made of water ice |
---|
| 22 | ! t_glace_max: if T > Tmax, the cloud is only made of liquid water |
---|
| 23 | ! exposant_glace: controls the sharpness of the transition |
---|
[2077] | 24 | INTEGER :: np |
---|
| 25 | REAL, DIMENSION(np), INTENT(IN) :: temp ! temperature |
---|
| 26 | REAL, DIMENSION(np), INTENT(IN) :: sig |
---|
| 27 | REAL, DIMENSION(np), INTENT(OUT) :: icefrac |
---|
| 28 | |
---|
[2961] | 29 | REAL :: sig0,www,tmin_tmp,liqfrac_tmp |
---|
[2077] | 30 | INTEGER :: ip |
---|
| 31 | |
---|
| 32 | sig0=0.8 |
---|
| 33 | |
---|
| 34 | DO ip=1,np |
---|
[2507] | 35 | IF (iflag_t_glace.EQ.1) THEN |
---|
| 36 | ! Transition to ice close to surface for T<Tmax |
---|
| 37 | ! w=1 at the surface and 0 for sig < sig0 |
---|
| 38 | www=(max(sig(ip)-sig0,0.))/(1.-sig0) |
---|
| 39 | ELSEIF (iflag_t_glace.GE.2) THEN |
---|
| 40 | ! No convertion to ice close to surface |
---|
| 41 | www = 0. |
---|
| 42 | ENDIF |
---|
[2109] | 43 | tmin_tmp=www*t_glace_max+(1.-www)*t_glace_min |
---|
[2961] | 44 | liqfrac_tmp= (temp(ip)-tmin_tmp) / (t_glace_max-tmin_tmp) |
---|
| 45 | liqfrac_tmp = MIN(MAX(liqfrac_tmp,0.0),1.0) |
---|
| 46 | IF (iflag_t_glace.GE.3) THEN |
---|
| 47 | icefrac(ip) = 1.0-liqfrac_tmp**exposant_glace |
---|
| 48 | ELSE |
---|
| 49 | icefrac(ip) = (1.0-liqfrac_tmp)**exposant_glace |
---|
| 50 | ENDIF |
---|
[2077] | 51 | ENDDO |
---|
| 52 | |
---|
| 53 | RETURN |
---|
| 54 | END SUBROUTINE icefrac_lsc |
---|
| 55 | |
---|
| 56 | !******************************************************************* |
---|
| 57 | ! |
---|
| 58 | END MODULE icefrac_lsc_mod |
---|