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:
1.0 KB
|
Line | |
---|
1 | subroutine forceWCfn(ngrid,nlayer,nq,pplev,pt,dq,dqs) |
---|
2 | |
---|
3 | USE tracer_h |
---|
4 | |
---|
5 | implicit none |
---|
6 | |
---|
7 | !================================================================== |
---|
8 | ! |
---|
9 | ! Purpose |
---|
10 | ! ------- |
---|
11 | ! Force tracer conservation in a column for a given pair of |
---|
12 | ! delta q, delta q_s |
---|
13 | ! |
---|
14 | ! Authors |
---|
15 | ! ------- |
---|
16 | ! R. Wordsworth |
---|
17 | ! |
---|
18 | !================================================================== |
---|
19 | |
---|
20 | !#include "dimensions.h" |
---|
21 | !#include "dimphys.h" |
---|
22 | #include "comcstfi.h" |
---|
23 | |
---|
24 | INTEGER ngrid,nlayer,nq |
---|
25 | |
---|
26 | real masse, Wtot, Wdiff |
---|
27 | |
---|
28 | real pplev(ngrid,nlayer+1) |
---|
29 | real pt(ngrid) |
---|
30 | |
---|
31 | real dqs(ngrid,nq) |
---|
32 | real dq(ngrid,nlayer,nq) |
---|
33 | |
---|
34 | integer iq, ig, ilay |
---|
35 | |
---|
36 | do iq=1,nq |
---|
37 | do ig=1,ngrid |
---|
38 | Wtot = 0.0 |
---|
39 | do ilay=1,nlayer |
---|
40 | masse = (pplev(ig,ilay) - pplev(ig,ilay+1))/g |
---|
41 | Wtot = Wtot + masse*dq(ig,ilay,iq) |
---|
42 | enddo |
---|
43 | Wdiff = Wtot + dqs(ig,iq) |
---|
44 | |
---|
45 | dqs(ig,iq) = dqs(ig,iq) - Wdiff |
---|
46 | enddo |
---|
47 | enddo |
---|
48 | |
---|
49 | end |
---|
50 | |
---|
Note: See
TracBrowser
for help on using the repository browser.