Changeset 5309 for LMDZ6/trunk/libf/phylmd/inlandsis
- Timestamp:
- Nov 1, 2024, 12:39:44 PM (6 weeks ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/inlandsis/sisvat_weq_mod.f90
r5308 r5309 1 MODULE sisvat_weq_mod 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 1 40 2 41 3 subroutine SISVAT_wEq( labWEq ,istart) 42 ! +--Switch Initialization 43 ! + ===================== 4 44 5 ! +------------------------------------------------------------------------+ 6 ! | MAR SISVAT_wEq 22-09-2001 MAR | 7 ! | SubRoutine SISVAT_wEq computes the Snow/Ice Water Equivalent | 8 ! | | 9 ! | | 10 ! | Preprocessing Option: SISVAT IO (not always a standard preprocess.) | 11 ! | ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ | 12 ! | FILE | CONTENT | 13 ! | ~~~~~~~~~~~~~~~~~~~~~+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 14 ! | # SISVAT_wEq.ve | #ve: OUTPUT/Verification: Snow/Ice Water Eqv. | 15 ! | | unit 45, SubRoutine SISVAT_wEq **ONLY** | 16 ! +------------------------------------------------------------------------+ 45 IF (.NOT.logWEq) THEN 46 logWEq = .TRUE. 47 open(unit = 45, status = 'unknown', file = 'SISVAT_wEq.ve') 48 rewind 45 49 END IF 17 50 18 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 19 63 20 64 21 ! +--Global Variables 22 ! + ================ 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 23 72 24 use VARphy 25 use VAR_SV 26 use VARxSV 73 END IF 27 74 28 IMPLICIT NONE75 END SUBROUTINE sisvat_weq 29 76 30 31 32 character(len=6) :: labWEq 33 integer :: istart 34 35 logical :: logWEq 36 common/SISVAT_wEq_L/logWEq 37 38 39 ! +--Local Variables 40 ! + ================ 41 42 integer :: ikl ,isn 43 real :: SnoWEQ,IceWEQ 44 45 46 ! +--Switch Initialization 47 ! + ===================== 48 49 IF (.NOT.logWEq) THEN 50 logWEq = .true. 51 open(unit=45,status='unknown',file='SISVAT_wEq.ve') 52 rewind 45 53 END IF 54 55 56 ! +--Snow Water Equivalent 57 ! + ===================== 58 59 ikl = 1 60 IF (isnoSV(ikl).gt.iiceSV(ikl)) THEN 61 62 SnoWEQ = 0. 63 DO isn = iiceSV(ikl)+1 ,isnoSV(ikl) 64 SnoWEQ = SnoWEQ + ro__SV(ikl,isn) * dzsnSV(ikl,isn) 65 END DO 66 67 END IF 68 69 70 ! +--Ice Water Equivalent 71 ! + ===================== 72 73 IF (iiceSV(1).gt.0) THEN 74 75 IceWEQ = 0. 76 DO isn = 1 ,iiceSV(ikl) 77 IceWEQ = IceWEQ + ro__SV(ikl,isn) * dzsnSV(ikl,isn) 78 END DO 79 80 END IF 81 82 83 ! +--OUTPUT 84 ! + ====== 85 86 !! IF (istart.eq.1) THEN 87 !! write(45,45)dahost,i___SV(lwriSV(1)),j___SV(lwriSV(1)), 88 !! . n___SV(lwriSV(1)) 89 !! 45 format(a18,10('-'),'Pt.',3i4,60('-')) 90 !! END IF 91 92 !! write(45,450) labWEq,IceWEQ,iiceSV(ikl),SnoWEQ 93 !! . ,IceWEQ+SnoWEQ,isnoSV(ikl) 94 !! . ,drr_SV(ikl)*dt__SV 95 !! . ,dsn_SV(ikl)*dt__SV 96 !! . ,BufsSV(ikl) 97 !! 450 format(a6,3x,' I+S =',f11.4,'(',i2,') +',f11.4,' =', 98 !! . f11.4,'(',i2,')', 99 !! . ' drr =', f7.4, 100 !! . ' dsn =', f7.4, 101 !! . ' Buf =', f7.4) 102 103 return 104 end subroutine sisvat_weq 77 END MODULE sisvat_weq_mod
Note: See TracChangeset
for help on using the changeset viewer.