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 5866 for branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90 – NEMO

Ignore:
Timestamp:
2015-11-06T11:42:35+01:00 (8 years ago)
Author:
gm
Message:

#1613: vvl by default: add ln_linssh and remove key_vvl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/LIM_SRC_3/limsbc.F90

    r5845 r5866  
    335335            sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
    336336 
    337 #if defined key_vvl             
    338 !!gm key_vvl necessary? clem: yes for compilation purpose 
    339337!!gm I really don't like this staff here...  Find a way to put that elsewhere or differently 
    340             DO jk = 1,jpkm1                     ! adjust initial vertical scale factors 
    341                e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    342                e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    343             END DO 
    344             e3t_a(:,:,:) = e3t_b(:,:,:) 
    345             ! Reconstruction of all vertical scale factors at now and before time 
    346             ! steps 
    347             ! ============================================================================= 
    348             ! Horizontal scale factor interpolations 
    349             ! -------------------------------------- 
    350             CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' ) 
    351             CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' ) 
    352             CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' ) 
    353             CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' ) 
    354             CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) 
    355             ! Vertical scale factor interpolations 
    356             ! ------------------------------------ 
    357             CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  ) 
    358             CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) 
    359             CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) 
    360             CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) 
    361             CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 
    362             ! t- and w- points depth 
    363             ! ---------------------- 
     338!!gm 
     339            IF( .NOT.ln_linssh ) THEN 
     340               DO jk = 1,jpkm1                     ! adjust initial vertical scale factors 
     341                  e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
     342                  e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
     343               END DO 
     344               e3t_a(:,:,:) = e3t_b(:,:,:) 
     345               ! Reconstruction of all vertical scale factors at now and before time-steps 
     346               ! ========================================================================= 
     347               ! Horizontal scale factor interpolations 
     348               ! -------------------------------------- 
     349               CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' ) 
     350               CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' ) 
     351               CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' ) 
     352               CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' ) 
     353               CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) 
     354               ! Vertical scale factor interpolations 
     355                 ! ------------------------------------ 
     356               CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  ) 
     357               CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) 
     358               CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) 
     359               CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) 
     360               CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 
     361               ! t- and w- points depth 
     362               ! ---------------------- 
    364363!!gm not sure of that.... 
    365             gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 
    366             gdepw_n(:,:,1) = 0.0_wp 
    367             gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 
    368             DO jk = 2, jpk 
    369                gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk) 
    370                gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) 
    371                gde3w_n(:,:,jk) = gdept_n(:,:,jk  ) - sshn   (:,:) 
    372             END DO 
    373 #endif 
     364               gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 
     365               gdepw_n(:,:,1) = 0.0_wp 
     366               gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 
     367               DO jk = 2, jpk 
     368                  gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk) 
     369                  gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) 
     370                  gde3w_n(:,:,jk) = gdept_n(:,:,jk  ) - sshn   (:,:) 
     371               END DO 
     372            ENDIF 
    374373         ENDIF 
    375374      ENDIF ! .NOT. ln_rstart 
    376375      ! 
    377  
    378376   END SUBROUTINE lim_sbc_init 
    379377 
Note: See TracChangeset for help on using the changeset viewer.