Changeset 5158 for LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis
- Timestamp:
- Aug 2, 2024, 2:12:03 PM (5 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/lmdz_sisvat_weq.f90
r5157 r5158 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 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)>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)>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 104 END SUBROUTINE sisvat_weq 77 END MODULE lmdz_sisvat_weq -
LMDZ6/branches/Amaury_dev/libf/phylmd/inlandsis/surf_inlandsis_mod.F90
r5139 r5158 362 362 ! loop on grid cells 363 363 DO ikl = 1, knon 364 364 lati=rlat(ikl2i(ikl)) 365 365 ! approximations for mean_temp and mean_dens 366 366 ! from Feulner et al., 2013 (DOI: 10.1175/JCLI-D-12-00636.1) … … 433 433 ! depth : depth of each layer 434 434 depth = snow_depth 435 doisl = 1, nb_snow_layer435 DO isl = 1, nb_snow_layer 436 436 ! dzsnSV : snow layer thickness 437 437 dzsnSV(ikl, isl) = max(0.01, snow_depth * dz_profil_15(nb_snow_layer - isl + 1))
Note: See TracChangeset
for help on using the changeset viewer.