- Timestamp:
- 2018-08-02T08:19:03+02:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2018/dev_r9838_ENHANCE04_RK3/src/OCE/DOM/iscplrst.F90
r10009 r10023 13 13 USE oce ! global tra/dyn variable 14 14 USE dom_oce ! ocean space and time domain 15 USE domvvl ! 15 16 USE domwri ! ocean space and time domain 16 17 USE phycst ! physical constants … … 149 150 zwmaskn(:,:,1) = tmask (:,:,1) 150 151 zwmaskb(:,:,1) = ptmask_b(:,:,1) 151 DO jk = 2, jpk152 DO jk = 2, jpk 152 153 zwmaskn(:,:,jk) = tmask (:,:,jk) * tmask (:,:,jk-1) 153 154 zwmaskb(:,:,jk) = ptmask_b(:,:,jk) * ptmask_b(:,:,jk-1) … … 179 180 ssh(:,:,Nnn) = ssh(:,:,Nnn) * ssmask(:,:) 180 181 182 !!gm BUGs.... 183 ! 184 ! for me ht_0, hu_0, hv_0 and hf_0 should be recomputed whatever the value of ln_linssh 185 ! further more mask at all grid-point should be recomputed 186 ! and mikt, u, v, f also... 187 ! 188 ! perhaps, not, if dom_cfg.nc file has been modified.... 189 ! 190 ! Pierre we should discuss of that ! 191 192 193 194 181 195 !============================================================================= 182 196 !PM: Is this needed since introduction of VVL by default? 183 197 IF ( .NOT.ln_linssh ) THEN 184 ! Reconstruction of all vertical scale factors at now time steps 185 ! ====================================================================== 198 ! Reconstruction of all vertical scale factors at now time steps 199 ! ====================================================================== 200 201 202 CALL ctl_stop( 'iscplrst : gm: here there is a BUG: not all required fields are defined') 203 204 ! 205 ! !* NOW fields : 206 CALL ssh2e3_now ! set: ht , hu , hv , r1_hu, r1_hv 207 ! ! e3t, e3u , e3v, e3f (from 1 to jpkm1) 208 ! ! e3w, e3uw, e3vw (from 1 to jpk ) 209 ! ! gdept, gdepw, gde3w (from 1 to jpk ) 210 ! 211 212 186 213 187 214 !!gm Question : bug ???? … … 193 220 ! Note that the former calculation were using ht_0 so if it as not been updated ===>>> BUG 194 221 !!gm 195 196 197 ! Horizontal scale factor interpolations198 ! --------------------------------------199 DO jj = 1, jpj200 DO ji = 1, jpi201 IF ( tmask(ji,jj,1) == 0._wp .OR. ptmask_b(ji,jj,1) == 0._wp ) THEN202 DO jk = 1, jpk203 e3t_n(ji,jj,jk) = e3t_0(ji,jj,jk) * ( 1._wp + ssh(ji,jj,Nnn) * r1_ht_0(ji,jj) * tmask(ji,jj,jk) )204 END DO205 ENDIF206 END DO207 END DO208 !209 !!gm Note that if this routine is called in dom_vvl_init then all the lines below are uselss !!!210 !! they are a duplication of dom_vvl_init lines211 212 ! !== now fields ==!213 !214 ! !* ssh at u- and v-points)215 DO jj = 1, jpjm1 ; DO ji = 1, jpim1 ! start from 1 due to f-point216 zsshu(ji,jj) = 0.5_wp * ( ssh(ji ,jj,Nnn) + ssh(ji+1,jj ,Nnn) ) * ssumask(ji,jj)217 zsshv(ji,jj) = 0.5_wp * ( ssh(ji ,jj,Nnn) + ssh(ji ,jj+1,Nnn) ) * ssvmask(ji,jj)218 zsshf(ji,jj) = 0.25_wp * ( ssh(ji ,jj,Nnn) + ssh(ji ,jj+1,Nnn) &219 & + ssh(ji+1,jj,Nnn) + ssh(ji+1,jj+1,Nnn) ) * ssfmask(ji,jj)220 END DO ; END DO221 CALL lbc_lnk_multi( zsshu(:,:),'U', 1._wp , zsshu(:,:),'V', 1._wp , zsshf(:,:),'F', 1._wp )222 !223 ! !* hu and hv (and their inverse)224 ht_n (:,:) = ht_0(:,:) + ssh (:,:,Nnn)225 hu_n (:,:) = hu_0(:,:) + zsshu(:,:)226 hv_n (:,:) = hv_0(:,:) + zsshv(:,:)227 r1_hu_n(:,:) = ssumask(:,:) / ( hu_n(:,:) + 1._wp - ssumask(:,:) ) ! ss mask mask due to ISF228 r1_hv_n(:,:) = ssvmask(:,:) / ( hv_n(:,:) + 1._wp - ssvmask(:,:) )229 !230 ! !* e3u, e3uw and e3v, e3vw231 z_ssh_h0(:,:) = ssh(:,:,Nnn) * r1_ht_0(:,:) ! t-point232 DO jk = 1, jpkm1233 e3w_n(:,:,jk) = e3w_0(:,:,jk) * ( 1._wp + z_ssh_h0(:,:) * tmask(:,:,jk) )234 END DO235 z_ssh_h0(:,:) = zsshu(:,:) * r1_hu_0(:,:) ! u-point236 DO jk = 1, jpkm1237 e3u_n (:,:,jk) = e3u_0 (:,:,jk) * ( 1._wp + z_ssh_h0(:,:) * umask(:,:,jk) )238 e3uw_n(:,:,jk) = e3uw_0(:,:,jk) * ( 1._wp + z_ssh_h0(:,:) * wumask(:,:,jk) )239 END DO240 z_ssh_h0(:,:) = zsshv(:,:) * r1_hv_0(:,:) ! v-point241 DO jk = 1, jpkm1242 e3v_n (:,:,jk) = e3v_0 (:,:,jk) * ( 1._wp + z_ssh_h0(:,:) * vmask(:,:,jk) )243 e3vw_n(:,:,jk) = e3vw_0(:,:,jk) * ( 1._wp + z_ssh_h0(:,:) * wvmask(:,:,jk) )244 END DO245 z_ssh_h0(:,:) = zsshf(:,:) * r1_hf_0(:,:) ! f-point246 DO jk = 1, jpkm1247 e3f_n(:,:,jk) = e3f_0(:,:,jk) * ( 1._wp + z_ssh_h0(:,:) * fmask(:,:,jk) )248 END DO249 250 z_ssh_h0(:,:) = 1._wp + ssh(:,:,Nnn) * r1_ht_0(:,:) ! t-point251 !252 IF( ln_isfcav ) THEN ! iceshelf cavities : ssh scaling not applied over the iceshelf thickness253 DO jk = 1, jpkm1254 gdept_n(:,:,jk) = ( gdept_0(:,:,jk) - risfdep(:,:) ) * z_ssh_h0(:,:) + risfdep(:,:)255 gdepw_n(:,:,jk) = ( gdepw_0(:,:,jk) - risfdep(:,:) ) * z_ssh_h0(:,:) + risfdep(:,:)256 gde3w_n(:,:,jk) = gdept_n(:,:,jk) - ssh(:,:,Nnn)257 END DO258 ELSE259 DO jk = 1, jpkm1260 gdept_n(:,:,jk) = gdept_0(:,:,jk) * z_ssh_h0(:,:)261 gdepw_n(:,:,jk) = gdepw_0(:,:,jk) * z_ssh_h0(:,:)262 gde3w_n(:,:,jk) = gdept_n(:,:,jk) - ssh(:,:,Nnn)263 END DO264 ENDIF265 266 222 ENDIF 267 223
Note: See TracChangeset
for help on using the changeset viewer.