Changeset 7626
- Timestamp:
- 2017-01-31T17:06:10+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/CO6_shelfclimate/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90
r7566 r7626 58 58 59 59 REAL(wp) :: rbcp ! Brown & Campana parameters for semi-implicit hpg 60 !JT 61 INTEGER :: warn_1, warn_2 ! indicators for warning statement 62 INTEGER , PUBLIC :: nn_tranxticing ! region mean calculation 63 !JT 60 64 61 65 !! * Substitutions … … 93 97 INTEGER, INTENT(in) :: kt ! ocean time-step index 94 98 !! 95 INTEGER :: jk, jn ! dummy loop indices 96 REAL(wp) :: zfact ! local scalars 99 !JT INTEGER :: jk, jn ! dummy loop indices 100 !JT REAL(wp) :: zfact ! local scalars 101 INTEGER :: ji,jj,jk, jn ! dummy loop indices 102 REAL(wp) :: zfact, zfreeze ! local scalars 97 103 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrdt, ztrds 104 INTEGER :: ios ! Local integer output status for namelist read 98 105 !!---------------------------------------------------------------------- 99 106 ! … … 106 113 ! 107 114 rbcp = 0.25_wp * (1._wp + atfp) * (1._wp + atfp) * ( 1._wp - atfp) ! Brown & Campana parameter for semi-implicit hpg 115 116 117 118 119 NAMELIST/nam_tranxticing/ nn_tranxticing 120 121 REWIND ( numnam_ref ) ! Read Namelist nam_diatmb in referdiatmbence namelist : TMB diagnostics 122 READ ( numnam_ref, nam_tranxticing, IOSTAT=ios, ERR= 901 ) 123 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_tranxticing in reference namelist', lwp ) 124 125 REWIND( numnam_cfg ) ! Namelist nam_diatmb in configuration namelist TMB diagnostics 126 READ ( numnam_cfg, nam_tranxticing, IOSTAT = ios, ERR = 902 ) 127 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_tranxticing in configuration namelist', lwp ) 128 IF(lwm) WRITE ( numond, nam_tranxticing ) 129 130 IF(lwp) THEN ! Control print 131 WRITE(numout,*) 132 WRITE(numout,*) 'tra_nxt : Catching Icing' 133 WRITE(numout,*) '~~~~~~~~~~~~' 134 WRITE(numout,*) 'Namelist nam_tranxticing : catch freezing points ' 135 WRITE(numout,*) 'Int switch for icing catch (0=Off; 1=Error; 2 Warn (verbose); 3 Warn (Quiet); nn_tranxticing = ', nn_tranxticing 136 ENDIF 137 138 108 139 ENDIF 109 140 … … 151 182 ENDIF 152 183 ! 184 #if ( ! defined key_lim3 && ! defined key_lim2 && ! key_cice ) 185 186 IF (nn_tranxticing .GT. 0) THEN 187 IF ( kt == nit000 ) warn_1=0 188 warn_2=0 189 DO jk = 1, jpkm1 190 DO jj = 1, jpj 191 DO ji = 1, jpi 192 IF ( tsa(ji,jj,jk,jp_tem) .lt. 0.0 ) THEN 193 ! calculate the freezing point 194 zfreeze = ( -0.0575_wp + 1.710523E-3 * Sqrt (Abs(tsn(ji,jj,jk,jp_sal))) & 195 - 2.154996E-4 * tsn(ji,jj,jk,jp_sal) ) * tsn(ji,jj,jk,jp_sal) - 7.53E-4 * ( 10.0_wp + fsdept(ji,jj,jk) ) 196 IF ( tsn(ji,jj,jk,jp_tem) .lt. zfreeze ) THEN 197 IF (nn_tranxticing .lt. 3) THEN 198 199 WRITE(numout,300) ' tranxticing: ', & 200 & kt,zfreeze,tsn(ji,jj,jk,jp_tem),ji,jj,jk,narea,ji-1+njmpp-1+jpjzoom,jj-1+nimpp-1+jpizoom 201 202 300 FORMAT(A14,1X,I7,1X,f9.2,1X,f9.2,1X,I4,1X,I4,1X,I4,1X,I4,1X,I4,1X,I4) 203 204 ENDIF 205 tsn(ji,jj,jk,jp_tem)=zfreeze 206 warn_2=1 207 ENDIF 208 ENDIF 209 END DO 210 END DO 211 END DO 212 CALL mpp_max(warn_1) 213 CALL mpp_max(warn_2) 214 IF ( (warn_1 == 0) .AND. (warn_2 /= 0) ) THEN 215 IF(lwp) THEN 216 217 IF (nn_tranxticing .GT. 1) CALL ctl_warn( ' tranxticing: Temperatures dropping below freezing point, ', & 218 & ' being forced to freezing point, no longer conservative' ) 219 220 IF (nn_tranxticing .EQ. 1) CALL ctl_stop( ' tranxticing: Temperatures dropping below freezing point, ', & 221 & ' being forced to freezing point, no longer conservative' ) 222 223 ENDIF 224 warn_1=1 225 ENDIF 226 ENDIF 227 #endif 228 153 229 ! trends computation 154 230 IF( l_trdtra ) THEN ! trend of the Asselin filter (tb filtered - tb)/dt
Note: See TracChangeset
for help on using the changeset viewer.