Changeset 1486 for trunk/NEMO
- Timestamp:
- 2009-07-07T12:09:51+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMO/OPA_SRC/DIA/diahth.F90
r1485 r1486 101 101 ! ----------------------- ! 102 102 103 ! search last level above 20C 104 ikc(:,:) = COUNT( tn >= 20., dim = 3 )103 ! search last level above 20C (beware temperature is not always decreasing with depth) 104 ikc(:,:) = MAXLOC( fsdept(:,:,1:jpkm1), mask = tn(:,:,1:jpkm1) >= 20., dim = 3 ) ! ikc = 0 if mask always equal to false 105 105 ! Depth of 20C isotherm, linear interpolation 106 106 DO jj = 1, jpj 107 107 DO ji = 1, jpi 108 iid = MAX( 1, ikc(ji,jj))108 iid = MAX( 1, ikc(ji,jj) ) ! make sure that iid /= 0 (these points are masked later) 109 109 zd = fsdept(ji,jj,iid) + ( fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid) ) & 110 110 & * ( 20.*tmask(ji,jj,iid+1) - tn(ji,jj,iid) ) & … … 115 115 END DO 116 116 END DO 117 WHERE(ikc == 0 ) hd20 = 0.e0 117 WHERE(ikc == 0 ) hd20 = 0.e0 ! set to 0 points where tn is always < 20 (not very good for temporal mean...) 118 118 CALL iom_put( "20d", hd20 ) ! depth of the 20 isotherm 119 119 … … 122 122 ! ----------------------- ! 123 123 124 ! search last level above 28C 125 ikc(:,:) = COUNT( tn >= 28., dim = 3 )124 ! search last level above 28C (beware temperature is not always decreasing with depth) 125 ikc(:,:) = MAXLOC( fsdept(:,:,1:jpkm1), mask = tn(:,:,1:jpkm1) >= 28., dim = 3 ) ! ikc = 0 if mask always equal to false 126 126 ! Depth of 28C isotherm, linear interpolation 127 127 DO jj = 1, jpj 128 128 DO ji = 1, jpi 129 iid = MAX( 1, ikc(ji,jj))129 iid = MAX( 1, ikc(ji,jj) ) ! make sure that iid /= 0 (these points are masked later) 130 130 zd = fsdept(ji,jj,iid) + ( fsdept(ji,jj,iid+1) - fsdept(ji,jj,iid) ) & 131 131 & * ( 28.*tmask(ji,jj,iid+1) - tn(ji,jj,iid) ) & … … 136 136 END DO 137 137 END DO 138 WHERE(ikc == 0 ) hd28 = 0.e0 138 WHERE(ikc == 0 ) hd28 = 0.e0 ! set to 0 points where tn is always < 28 (not very good for temporal mean...) 139 139 CALL iom_put( "28d", hd28 ) ! depth of the 28 isotherm 140 140 … … 146 146 ilevel = 0 147 147 zthick_0 = 0.e0 148 DO jk = 1, jpk -1148 DO jk = 1, jpkm1 149 149 zthick_0 = zthick_0 + e3t_0(jk) 150 150 IF( zthick_0 < 300. ) ilevel = jk
Note: See TracChangeset
for help on using the changeset viewer.