1 | MODULE lmdz_sisvat_weq |
---|
2 | IMPLICIT NONE; PRIVATE |
---|
3 | PUBLIC sisvat_weq |
---|
4 | |
---|
5 | LOGICAL :: logWEq |
---|
6 | |
---|
7 | CONTAINS |
---|
8 | |
---|
9 | SUBROUTINE SISVAT_wEq(labWEq, istart) |
---|
10 | |
---|
11 | ! +------------------------------------------------------------------------+ |
---|
12 | ! | MAR SISVAT_wEq 22-09-2001 MAR | |
---|
13 | ! | SubRoutine SISVAT_wEq computes the Snow/Ice Water Equivalent | |
---|
14 | ! | | |
---|
15 | ! | | |
---|
16 | ! | Preprocessing Option: SISVAT IO (not always a standard preprocess.) | |
---|
17 | ! | ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ | |
---|
18 | ! | FILE | CONTENT | |
---|
19 | ! | ~~~~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
---|
20 | ! | # SISVAT_wEq.ve | #ve: OUTPUT/Verification: Snow/Ice Water Eqv. | |
---|
21 | ! | | unit 45, SubRoutine SISVAT_wEq **ONLY** | |
---|
22 | ! +------------------------------------------------------------------------+ |
---|
23 | |
---|
24 | ! +--Global Variables |
---|
25 | ! + ================ |
---|
26 | USE VARphy |
---|
27 | USE VAR_SV |
---|
28 | USE VARxSV |
---|
29 | |
---|
30 | IMPLICIT NONE |
---|
31 | |
---|
32 | CHARACTER(LEN = 6) :: labWEq |
---|
33 | INTEGER :: istart |
---|
34 | |
---|
35 | ! +--Local Variables |
---|
36 | ! + ================ |
---|
37 | |
---|
38 | INTEGER :: ikl, isn |
---|
39 | REAL :: SnoWEQ, IceWEQ |
---|
40 | |
---|
41 | |
---|
42 | ! +--Switch Initialization |
---|
43 | ! + ===================== |
---|
44 | |
---|
45 | IF (.NOT.logWEq) THEN |
---|
46 | logWEq = .TRUE. |
---|
47 | open(unit = 45, status = 'unknown', file = 'SISVAT_wEq.ve') |
---|
48 | rewind 45 |
---|
49 | END IF |
---|
50 | |
---|
51 | |
---|
52 | ! +--Snow Water Equivalent |
---|
53 | ! + ===================== |
---|
54 | |
---|
55 | ikl = 1 |
---|
56 | IF (isnoSV(ikl)>iiceSV(ikl)) THEN |
---|
57 | SnoWEQ = 0. |
---|
58 | DO isn = iiceSV(ikl) + 1, isnoSV(ikl) |
---|
59 | SnoWEQ = SnoWEQ + ro__SV(ikl, isn) * dzsnSV(ikl, isn) |
---|
60 | END DO |
---|
61 | |
---|
62 | END IF |
---|
63 | |
---|
64 | |
---|
65 | ! +--Ice Water Equivalent |
---|
66 | ! + ===================== |
---|
67 | IF (iiceSV(1)>0) THEN |
---|
68 | IceWEQ = 0. |
---|
69 | DO isn = 1, iiceSV(ikl) |
---|
70 | IceWEQ = IceWEQ + ro__SV(ikl, isn) * dzsnSV(ikl, isn) |
---|
71 | END DO |
---|
72 | |
---|
73 | END IF |
---|
74 | |
---|
75 | END SUBROUTINE sisvat_weq |
---|
76 | |
---|
77 | END MODULE lmdz_sisvat_weq |
---|