source: trunk/LMDZ.GENERIC/libf/phystd/forceWCfn.F @ 374

Last change on this file since 374 was 253, checked in by emillour, 13 years ago

Generic GCM

  • Massive update to version 0.7

EM+RW

File size: 1014 bytes
RevLine 
[253]1      subroutine forceWCfn(pplev,pt,dq,dqs)
2
3      implicit none
4
5!==================================================================
6!     
7!     Purpose
8!     -------
9!     Force tracer conservation in a column for a given pair of
10!     delta q, delta q_s
11!
12!     Authors
13!     -------
14!     R. Wordsworth
15!     
16!==================================================================
17
18#include "dimensions.h"
19#include "dimphys.h"
20#include "comcstfi.h"
21#include "tracer.h"
22
23      real masse, Wtot, Wdiff
24
25      real pplev(ngridmx,nlayermx+1)
26      real pt(ngridmx)
27
28      real dqs(ngridmx,nqmx)
29      real dq(ngridmx,nlayermx,nqmx)
30
31      integer iq, ig, ilay
32
33      do iq=1,nqmx
34        do ig=1,ngridmx
35           Wtot = 0.0
36           do ilay=1,nlayermx
37              masse = (pplev(ig,ilay) - pplev(ig,ilay+1))/g
38              Wtot  = Wtot + masse*dq(ig,ilay,iq)
39           enddo
40           Wdiff = Wtot + dqs(ig,iq)
41         
42           dqs(ig,iq) = dqs(ig,iq) - Wdiff
43        enddo
44      enddo
45
46      end
47
Note: See TracBrowser for help on using the repository browser.