source: trunk/LMDZ.GENERIC/libf/phystd/evap.F @ 1351

Last change on this file since 1351 was 1308, checked in by emillour, 10 years ago

Generic GCM:
Some cleanup to simplify dynamics/physics interactions by getting rid
of dimphys.h (i.e. the nlayermx parameter) and minimizing use of
dimension.h in the physics.
EM

File size: 2.2 KB
Line 
1      subroutine evap(ngrid,nlayer,nq,dtime,pt, pq, pdq, pdt, 
2     $     dqevap,dtevap, qevap, tevap)
3       
4      use watercommon_h
5      USE tracer_h
6
7      implicit none
8
9!#include "dimensions.h"
10!#include "dimphys.h"
11#include "comcstfi.h"
12
13!==================================================================
14!     
15!     Purpose
16!     -------
17!     Evaporation of all water in the atmopshere.
18!     
19!     Authors
20!     -------
21!     Adapted from the LMDTERRE code by B. Charnay (2010)
22!     Original author Z. X. Li (1993)
23!     
24!==================================================================
25
26      INTEGER ngrid,nlayer,nq
27
28! Arguments:
29      REAL pt(ngrid,nlayer)
30      REAL pq(ngrid,nlayer,nq)
31      REAL pdt(ngrid,nlayer)
32      REAL pdq(ngrid,nlayer,nq)
33      REAL dqevap(ngrid,nlayer)
34      REAL dtevap(ngrid,nlayer)
35      REAL qevap(ngrid,nlayer,nq)
36      REAL dtime
37 
38! Local:
39      REAL tevap(ngrid,nlayer)
40      REAL zlvdcp
41      REAL zlsdcp
42      REAL zdelta
43      INTEGER l,ig
44
45!
46! Re-evaporer l'eau liquide nuageuse
47!
48
49      DO l=1,nlayer
50        DO ig=1,ngrid
51         qevap(ig,l,igcm_h2o_vap)=pq(ig,l,igcm_h2o_vap)
52     s                            +pdq(ig,l,igcm_h2o_vap)*dtime
53         qevap(ig,l,igcm_h2o_ice)=pq(ig,l,igcm_h2o_ice)
54     s                            +pdq(ig,l,igcm_h2o_ice)*dtime
55         tevap(ig,l)=pt(ig,l)+pdt(ig,l)*dtime
56        ENDDO
57      ENDDO
58
59      DO l = 1, nlayer
60        DO ig = 1, ngrid
61         zlvdcp=RLVTT/RCPD!/(1.0+RVTMP2*qevap(ig,l,igcm_h2o_vap))
62         zlsdcp=RLSTT/RCPD!/(1.0+RVTMP2*qevap(ig,l,igcm_h2o_vap))
63         ! ignoring qevap term creates huge difference when qevap large!!!
64
65         zdelta = MAX(0.,SIGN(1.,T_h2O_ice_liq-tevap(ig,l))) ! what is this?
66                                                  ! for division between water / liquid
67         dqevap(ig,l) = MAX(0.0,qevap(ig,l,igcm_h2o_ice))/dtime
68         dtevap(ig,l) = - dqevap(ig,l)*RLVTT/RCPD ! exactly as in largescale.F
69!         dtevap(ig,l) = - dqevap(ig,l)
70!     s                       * (zlvdcp*(1.-zdelta)+zlsdcp*zdelta)
71         qevap(ig,l,igcm_h2o_vap) = qevap(ig,l,igcm_h2o_vap)   
72     s                              +dqevap(ig,l)*dtime
73         qevap(ig,l,igcm_h2o_ice) = 0.0
74         tevap(ig,l) = tevap(ig,l)+dtevap(ig,l)*dtime
75
76        ENDDO
77      ENDDO
78
79      END
Note: See TracBrowser for help on using the repository browser.