Last change
on this file since 3380 was
3184,
checked in by afalco, 10 months ago
|
Pluto PCM:
Added LMDZ.PLUTO, a copy of the generic model,
cleaned from some unnecessary modules (water, ...)
AF
|
File size:
1003 bytes
|
Line | |
---|
1 | subroutine forceWCfn(ngrid,nlayer,nq,pplev,pt,dq,dqs) |
---|
2 | |
---|
3 | USE tracer_h |
---|
4 | use comcstfi_mod, only: g |
---|
5 | |
---|
6 | implicit none |
---|
7 | |
---|
8 | !================================================================== |
---|
9 | ! |
---|
10 | ! Purpose |
---|
11 | ! ------- |
---|
12 | ! Force tracer conservation in a column for a given pair of |
---|
13 | ! delta q, delta q_s |
---|
14 | ! |
---|
15 | ! Authors |
---|
16 | ! ------- |
---|
17 | ! R. Wordsworth |
---|
18 | ! |
---|
19 | !================================================================== |
---|
20 | |
---|
21 | INTEGER ngrid,nlayer,nq |
---|
22 | |
---|
23 | real masse, Wtot, Wdiff |
---|
24 | |
---|
25 | real pplev(ngrid,nlayer+1) |
---|
26 | real pt(ngrid) |
---|
27 | |
---|
28 | real dqs(ngrid,nq) |
---|
29 | real dq(ngrid,nlayer,nq) |
---|
30 | |
---|
31 | integer iq, ig, ilay |
---|
32 | |
---|
33 | do iq=1,nq |
---|
34 | do ig=1,ngrid |
---|
35 | Wtot = 0.0 |
---|
36 | do ilay=1,nlayer |
---|
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.