[5309] | 1 | MODULE sisvat_weq_mod |
---|
| 2 | IMPLICIT NONE; PRIVATE |
---|
| 3 | PUBLIC sisvat_weq |
---|
[3792] | 4 | |
---|
[5309] | 5 | LOGICAL :: logWEq |
---|
[3792] | 6 | |
---|
[5309] | 7 | CONTAINS |
---|
[5246] | 8 | |
---|
[5309] | 9 | SUBROUTINE SISVAT_wEq(labWEq, istart) |
---|
[5246] | 10 | |
---|
[5309] | 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 | ! +------------------------------------------------------------------------+ |
---|
[5246] | 23 | |
---|
[5309] | 24 | ! +--Global Variables |
---|
| 25 | ! + ================ |
---|
| 26 | USE VARphy |
---|
| 27 | USE VAR_SV |
---|
| 28 | USE VARxSV |
---|
[5246] | 29 | |
---|
[5309] | 30 | IMPLICIT NONE |
---|
[5246] | 31 | |
---|
[5309] | 32 | CHARACTER(LEN = 6) :: labWEq |
---|
| 33 | INTEGER :: istart |
---|
[5246] | 34 | |
---|
[5309] | 35 | ! +--Local Variables |
---|
| 36 | ! + ================ |
---|
[5246] | 37 | |
---|
[5309] | 38 | INTEGER :: ikl, isn |
---|
| 39 | REAL :: SnoWEQ, IceWEQ |
---|
[5246] | 40 | |
---|
| 41 | |
---|
[5309] | 42 | ! +--Switch Initialization |
---|
| 43 | ! + ===================== |
---|
[5246] | 44 | |
---|
[5309] | 45 | IF (.NOT.logWEq) THEN |
---|
| 46 | logWEq = .TRUE. |
---|
| 47 | open(unit = 45, status = 'unknown', file = 'SISVAT_wEq.ve') |
---|
| 48 | rewind 45 |
---|
| 49 | END IF |
---|
[5246] | 50 | |
---|
| 51 | |
---|
[5309] | 52 | ! +--Snow Water Equivalent |
---|
| 53 | ! + ===================== |
---|
[5246] | 54 | |
---|
[5309] | 55 | ikl = 1 |
---|
| 56 | IF (isnoSV(ikl)>iiceSV(ikl)) THEN |
---|
[5246] | 57 | SnoWEQ = 0. |
---|
[5309] | 58 | DO isn = iiceSV(ikl) + 1, isnoSV(ikl) |
---|
| 59 | SnoWEQ = SnoWEQ + ro__SV(ikl, isn) * dzsnSV(ikl, isn) |
---|
| 60 | END DO |
---|
[5246] | 61 | |
---|
[5309] | 62 | END IF |
---|
[5246] | 63 | |
---|
| 64 | |
---|
[5309] | 65 | ! +--Ice Water Equivalent |
---|
| 66 | ! + ===================== |
---|
| 67 | IF (iiceSV(1)>0) THEN |
---|
[5246] | 68 | IceWEQ = 0. |
---|
[5309] | 69 | DO isn = 1, iiceSV(ikl) |
---|
| 70 | IceWEQ = IceWEQ + ro__SV(ikl, isn) * dzsnSV(ikl, isn) |
---|
| 71 | END DO |
---|
[5246] | 72 | |
---|
[5309] | 73 | END IF |
---|
[5246] | 74 | |
---|
[5309] | 75 | END SUBROUTINE sisvat_weq |
---|
[5246] | 76 | |
---|
[5309] | 77 | END MODULE sisvat_weq_mod |
---|