New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 10023 for NEMO/branches/2018/dev_r9838_ENHANCE04_RK3/src/OCE/DOM/iscplrst.F90 – NEMO

Ignore:
Timestamp:
2018-08-02T08:19:03+02:00 (6 years ago)
Author:
gm
Message:

#1911 (ENHANCE-04): RK3 branch - step II.2 bug correction in dynnxt + domvvl_RK3 creation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2018/dev_r9838_ENHANCE04_RK3/src/OCE/DOM/iscplrst.F90

    r10009 r10023  
    1313   USE oce             ! global tra/dyn variable 
    1414   USE dom_oce         ! ocean space and time domain 
     15   USE domvvl          ! 
    1516   USE domwri          ! ocean space and time domain 
    1617   USE phycst          ! physical constants 
     
    149150      zwmaskn(:,:,1) = tmask   (:,:,1) 
    150151      zwmaskb(:,:,1) = ptmask_b(:,:,1) 
    151       DO jk = 2,jpk 
     152      DO jk = 2, jpk 
    152153         zwmaskn(:,:,jk) =  tmask  (:,:,jk) *  tmask  (:,:,jk-1) 
    153154         zwmaskb(:,:,jk) = ptmask_b(:,:,jk) * ptmask_b(:,:,jk-1) 
     
    179180      ssh(:,:,Nnn) = ssh(:,:,Nnn) * ssmask(:,:) 
    180181 
     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 
    181195!============================================================================= 
    182196!PM: Is this needed since introduction of VVL by default? 
    183197      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 
    186213       
    187214!!gm Question : bug ???? 
     
    193220      ! Note that the former calculation were using ht_0  so if it as not been updated ===>>> BUG 
    194221!!gm 
    195        
    196        
    197       ! Horizontal scale factor interpolations 
    198       ! -------------------------------------- 
    199          DO jj = 1, jpj 
    200             DO ji = 1, jpi 
    201                IF ( tmask(ji,jj,1) == 0._wp .OR. ptmask_b(ji,jj,1) == 0._wp ) THEN 
    202                   DO jk = 1, jpk 
    203                      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 DO 
    205                ENDIF 
    206             END DO 
    207          END DO 
    208          ! 
    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 lines 
    211  
    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-point 
    216             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 DO       
    221          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 ISF 
    228          r1_hv_n(:,:) = ssvmask(:,:) / ( hv_n(:,:) + 1._wp - ssvmask(:,:) ) 
    229          ! 
    230          !                                            !* e3u, e3uw  and  e3v, e3vw 
    231          z_ssh_h0(:,:) = ssh(:,:,Nnn) * r1_ht_0(:,:)         ! t-point 
    232          DO jk = 1, jpkm1 
    233             e3w_n(:,:,jk) = e3w_0(:,:,jk) * ( 1._wp + z_ssh_h0(:,:) * tmask(:,:,jk) ) 
    234          END DO 
    235          z_ssh_h0(:,:) = zsshu(:,:) * r1_hu_0(:,:)           ! u-point 
    236          DO jk = 1, jpkm1 
    237             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 DO 
    240          z_ssh_h0(:,:) = zsshv(:,:) * r1_hv_0(:,:)           ! v-point 
    241          DO jk = 1, jpkm1 
    242             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 DO 
    245          z_ssh_h0(:,:) = zsshf(:,:) * r1_hf_0(:,:)           ! f-point 
    246          DO jk = 1, jpkm1 
    247             e3f_n(:,:,jk) = e3f_0(:,:,jk) * ( 1._wp + z_ssh_h0(:,:) * fmask(:,:,jk) ) 
    248          END DO 
    249  
    250          z_ssh_h0(:,:) = 1._wp + ssh(:,:,Nnn) * r1_ht_0(:,:)    ! t-point 
    251          ! 
    252          IF( ln_isfcav ) THEN    ! iceshelf cavities : ssh scaling not applied over the iceshelf thickness  
    253             DO jk = 1, jpkm1 
    254                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 DO 
    258          ELSE 
    259             DO jk = 1, jpkm1 
    260                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 DO 
    264          ENDIF 
    265           
    266222      ENDIF 
    267223 
Note: See TracChangeset for help on using the changeset viewer.