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_2 – 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_2/limsbc_2.F90

    r5862 r5866  
    469469         sshn(:,:) = sshn(:,:) - snwice_mass(:,:) * r1_rau0 
    470470         sshb(:,:) = sshb(:,:) - snwice_mass(:,:) * r1_rau0 
    471 !!gm  like for lim3 : 
    472 #if defined key_vvl             
     471!!gm I really don't like this staff here...  Find a way to put that elsewhere or differently 
    473472!!gm 
    474          do jk = 1,jpkm1                     ! adjust initial vertical scale factors 
    475           e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    476           e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
    477          end do 
    478          e3t_a(:,:,:) = e3t_b(:,:,:) 
    479          ! Reconstruction of all vertical scale factors at now and before time steps 
    480          ! ============================================================================= 
    481          ! Horizontal scale factor interpolations 
    482          ! -------------------------------------- 
    483          CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' ) 
    484          CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' ) 
    485          CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' ) 
    486          CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' ) 
    487          CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) 
    488          ! Vertical scale factor interpolations 
    489          ! ------------------------------------ 
    490          CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  ) 
    491          CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) 
    492          CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) 
    493          CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) 
    494          CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 
    495          ! t- and w- points depth 
    496          ! ---------------------- 
    497          gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 
    498          gdepw_n(:,:,1) = 0.0_wp 
    499          gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 
    500          DO jk = 2, jpk 
    501             gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk) 
    502             gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) 
    503             gde3w_n(:,:,jk) = gdept_n(:,:,jk  ) - sshn   (:,:) 
    504          END DO 
    505 !!gm 
    506 #endif 
    507 !!gm 
     473         IF( .NOT. ln_linssh ) THEN 
     474 
     475            do jk = 1,jpkm1                     ! adjust initial vertical scale factors 
     476               e3t_n(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshn(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
     477               e3t_b(:,:,jk) = e3t_0(:,:,jk)*( 1._wp + sshb(:,:)*tmask(:,:,1)/(ht_0(:,:) + 1.0 - tmask(:,:,1)) ) 
     478            end do 
     479            e3t_a(:,:,:) = e3t_b(:,:,:) 
     480            ! Reconstruction of all vertical scale factors at now and before time steps 
     481            !        ! Horizontal scale factor interpolations 
     482            CALL dom_vvl_interpol( e3t_b(:,:,:), e3u_b(:,:,:), 'U' ) 
     483            CALL dom_vvl_interpol( e3t_b(:,:,:), e3v_b(:,:,:), 'V' ) 
     484            CALL dom_vvl_interpol( e3t_n(:,:,:), e3u_n(:,:,:), 'U' ) 
     485            CALL dom_vvl_interpol( e3t_n(:,:,:), e3v_n(:,:,:), 'V' ) 
     486            CALL dom_vvl_interpol( e3u_n(:,:,:), e3f_n(:,:,:), 'F' ) 
     487            !        ! Vertical scale factor interpolations 
     488            CALL dom_vvl_interpol( e3t_n(:,:,:), e3w_n (:,:,:), 'W'  ) 
     489            CALL dom_vvl_interpol( e3u_n(:,:,:), e3uw_n(:,:,:), 'UW' ) 
     490            CALL dom_vvl_interpol( e3v_n(:,:,:), e3vw_n(:,:,:), 'VW' ) 
     491            CALL dom_vvl_interpol( e3u_b(:,:,:), e3uw_b(:,:,:), 'UW' ) 
     492            CALL dom_vvl_interpol( e3v_b(:,:,:), e3vw_b(:,:,:), 'VW' ) 
     493            !        ! t- and w- points depth 
     494            gdept_n(:,:,1) = 0.5_wp * e3w_n(:,:,1) 
     495            gdepw_n(:,:,1) = 0.0_wp 
     496            gde3w_n(:,:,1) = gdept_n(:,:,1) - sshn(:,:) 
     497            DO jk = 2, jpk 
     498               gdept_n(:,:,jk) = gdept_n(:,:,jk-1) + e3w_n(:,:,jk) 
     499               gdepw_n(:,:,jk) = gdepw_n(:,:,jk-1) + e3t_n(:,:,jk-1) 
     500               gde3w_n(:,:,jk) = gdept_n(:,:,jk  ) - sshn   (:,:) 
     501            END DO 
     502         ENDIF 
     503!!gm end 
    508504      ENDIF 
    509505      ! 
Note: See TracChangeset for help on using the changeset viewer.