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 5829 for branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90 – NEMO

Ignore:
Timestamp:
2015-10-24T15:03:08+02:00 (9 years ago)
Author:
gm
Message:

#1593: Simplification LDF-ADV: remove key_noslip_accurate & minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5721_CNRS9_NOC3_LDF/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90

    r5737 r5829  
    688688      !!                - vertical interpolation: simple averaging 
    689689      !!---------------------------------------------------------------------- 
    690       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in    ) ::  pe3_in     ! input e3 to be interpolated 
    691       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( inout ) ::  pe3_out    ! output interpolated e3 
    692       CHARACTER(LEN=*), INTENT( in )                    ::  pout       ! grid point of out scale factors 
    693       !                                                                !   =  'U', 'V', 'W, 'F', 'UW' or 'VW' 
     690      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) ::  pe3_in    ! input e3 to be interpolated 
     691      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) ::  pe3_out   ! output interpolated e3 
     692      CHARACTER(LEN=*)                , INTENT(in   ) ::  pout      ! grid point of out scale factors 
     693      !                                                             !   =  'U', 'V', 'W, 'F', 'UW' or 'VW' 
    694694      ! 
    695695      INTEGER ::   ji, jj, jk                                          ! dummy loop indices 
    696       LOGICAL ::   l_is_orca                                           ! local logical 
    697       !!---------------------------------------------------------------------- 
     696      !!---------------------------------------------------------------------- 
     697      ! 
    698698      IF( nn_timing == 1 )  CALL timing_start('dom_vvl_interpol') 
    699          ! 
    700       l_is_orca = .FALSE. 
    701       IF( cp_cfg == "orca" .AND. jp_cfg == 2 ) l_is_orca = .TRUE.      ! ORCA R2 configuration - will need to correct some locations 
    702  
    703       SELECT CASE ( pout ) 
    704          !               ! ------------------------------------- ! 
    705       CASE( 'U' )        ! interpolation from T-point to U-point ! 
    706          !               ! ------------------------------------- ! 
    707          ! horizontal surface weighted interpolation 
     699      ! 
     700      SELECT CASE ( pout )    !==  type of interpolation  ==! 
     701         ! 
     702      CASE( 'U' )                   !* from T- to U-point : hor. surface weighted mean 
    708703         DO jk = 1, jpk 
    709704            DO jj = 1, jpjm1 
     
    715710            END DO 
    716711         END DO 
    717          ! 
    718          ! boundary conditions 
    719712         CALL lbc_lnk( pe3_out(:,:,:), 'U', 1._wp ) 
    720713         pe3_out(:,:,:) = pe3_out(:,:,:) + e3u_0(:,:,:) 
    721          !               ! ------------------------------------- ! 
    722       CASE( 'V' )        ! interpolation from T-point to V-point ! 
    723          !               ! ------------------------------------- ! 
    724          ! horizontal surface weighted interpolation 
     714         ! 
     715      CASE( 'V' )                   !* from T- to V-point : hor. surface weighted mean 
    725716         DO jk = 1, jpk 
    726717            DO jj = 1, jpjm1 
     
    732723            END DO 
    733724         END DO 
    734          ! 
    735          ! boundary conditions 
    736725         CALL lbc_lnk( pe3_out(:,:,:), 'V', 1._wp ) 
    737726         pe3_out(:,:,:) = pe3_out(:,:,:) + e3v_0(:,:,:) 
    738          !               ! ------------------------------------- ! 
    739       CASE( 'F' )        ! interpolation from U-point to F-point ! 
    740          !               ! ------------------------------------- ! 
    741          ! horizontal surface weighted interpolation 
     727         ! 
     728      CASE( 'F' )                   !* from U-point to F-point : hor. surface weighted mean 
    742729         DO jk = 1, jpk 
    743730            DO jj = 1, jpjm1 
     
    749736            END DO 
    750737         END DO 
    751          ! 
    752          ! boundary conditions 
    753738         CALL lbc_lnk( pe3_out(:,:,:), 'F', 1._wp ) 
    754739         pe3_out(:,:,:) = pe3_out(:,:,:) + e3f_0(:,:,:) 
    755          !               ! ------------------------------------- ! 
    756       CASE( 'W' )        ! interpolation from T-point to W-point ! 
    757          !               ! ------------------------------------- ! 
    758          ! vertical simple interpolation 
     740         ! 
     741      CASE( 'W' )                   !* from T- to W-point : vertical simple mean 
     742         ! 
    759743         pe3_out(:,:,1) = e3w_0(:,:,1) + pe3_in(:,:,1) - e3t_0(:,:,1) 
    760          ! - ML - The use of mask in this formaula enables the special treatment of the last w- point without indirect adressing 
     744         ! - ML - The use of mask in this formulea enables the special treatment of the last w-point without indirect adressing 
     745!!gm BUG? use here wmask in case of ISF ?  to be checked 
    761746         DO jk = 2, jpk 
    762747            pe3_out(:,:,jk) = e3w_0(:,:,jk) + ( 1.0_wp - 0.5_wp * tmask(:,:,jk) ) * ( pe3_in(:,:,jk-1) - e3t_0(:,:,jk-1) )   & 
    763748               &                            +            0.5_wp * tmask(:,:,jk)   * ( pe3_in(:,:,jk  ) - e3t_0(:,:,jk  ) ) 
    764749         END DO 
    765          !               ! -------------------------------------- ! 
    766       CASE( 'UW' )       ! interpolation from U-point to UW-point ! 
    767          !               ! -------------------------------------- ! 
    768          ! vertical simple interpolation 
     750         ! 
     751      CASE( 'UW' )                  !* from U- to UW-point : vertical simple mean 
     752         ! 
    769753         pe3_out(:,:,1) = e3uw_0(:,:,1) + pe3_in(:,:,1) - e3u_0(:,:,1) 
    770754         ! - ML - The use of mask in this formaula enables the special treatment of the last w- point without indirect adressing 
     755!!gm BUG? use here wumask in case of ISF ?  to be checked 
    771756         DO jk = 2, jpk 
    772757            pe3_out(:,:,jk) = e3uw_0(:,:,jk) + ( 1.0_wp - 0.5_wp * umask(:,:,jk) ) * ( pe3_in(:,:,jk-1) - e3u_0(:,:,jk-1) )   & 
    773758               &                             +            0.5_wp * umask(:,:,jk)   * ( pe3_in(:,:,jk  ) - e3u_0(:,:,jk  ) ) 
    774759         END DO 
    775          !               ! -------------------------------------- ! 
    776       CASE( 'VW' )       ! interpolation from V-point to VW-point ! 
    777          !               ! -------------------------------------- ! 
    778          ! vertical simple interpolation 
     760         ! 
     761      CASE( 'VW' )                  !* from V- to VW-point : vertical simple mean 
     762         ! 
    779763         pe3_out(:,:,1) = e3vw_0(:,:,1) + pe3_in(:,:,1) - e3v_0(:,:,1) 
    780764         ! - ML - The use of mask in this formaula enables the special treatment of the last w- point without indirect adressing 
     765!!gm BUG? use here wvmask in case of ISF ?  to be checked 
    781766         DO jk = 2, jpk 
    782767            pe3_out(:,:,jk) = e3vw_0(:,:,jk) + ( 1.0_wp - 0.5_wp * vmask(:,:,jk) ) * ( pe3_in(:,:,jk-1) - e3v_0(:,:,jk-1) )   & 
     
    785770      END SELECT 
    786771      ! 
    787  
    788772      IF( nn_timing == 1 )  CALL timing_stop('dom_vvl_interpol') 
    789  
     773      ! 
    790774   END SUBROUTINE dom_vvl_interpol 
     775 
    791776 
    792777   SUBROUTINE dom_vvl_rst( kt, cdrw ) 
     
    802787      !!                they are set to 0. 
    803788      !!---------------------------------------------------------------------- 
    804       !! * Arguments 
    805789      INTEGER         , INTENT(in) ::   kt     ! ocean time-step 
    806790      CHARACTER(len=*), INTENT(in) ::   cdrw   ! "READ"/"WRITE" flag 
    807       !! * Local declarations 
     791      ! 
    808792      INTEGER ::   jk 
    809793      INTEGER ::   id1, id2, id3, id4, id5     ! local integers 
     
    900884            END IF 
    901885         ENDIF 
    902  
     886         ! 
    903887      ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN   ! Create restart file 
    904888         !                                   ! =================== 
     
    920904            CALL iom_rstput( kt, nitrst, numrow, 'hdiv_lf', hdiv_lf(:,:,:) ) 
    921905         ENDIF 
    922  
    923       ENDIF 
     906         ! 
     907      ENDIF 
     908      ! 
    924909      IF( nn_timing == 1 )  CALL timing_stop('dom_vvl_rst') 
    925  
     910      ! 
    926911   END SUBROUTINE dom_vvl_rst 
    927912 
     
    934919      !!                for vertical coordinate 
    935920      !!---------------------------------------------------------------------- 
    936       INTEGER ::   ioptio 
    937       INTEGER ::   ios 
    938  
     921      INTEGER ::   ioptio, ios 
     922      !! 
    939923      NAMELIST/nam_vvl/ ln_vvl_zstar, ln_vvl_ztilde, ln_vvl_layer, ln_vvl_ztilde_as_zstar, & 
    940                       & ln_vvl_zstar_at_eqtor      , rn_ahe3     , rn_rst_e3t            , & 
    941                       & rn_lf_cutoff               , rn_zdef_max , ln_vvl_dbg                ! not yet implemented: ln_vvl_kepe 
     924         &              ln_vvl_zstar_at_eqtor      , rn_ahe3     , rn_rst_e3t            , & 
     925         &              rn_lf_cutoff               , rn_zdef_max , ln_vvl_dbg                ! not yet implemented: ln_vvl_kepe 
    942926      !!----------------------------------------------------------------------  
    943  
     927      ! 
    944928      REWIND( numnam_ref )              ! Namelist nam_vvl in reference namelist :  
    945929      READ  ( numnam_ref, nam_vvl, IOSTAT = ios, ERR = 901) 
    946930901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_vvl in reference namelist', lwp ) 
    947  
     931      ! 
    948932      REWIND( numnam_cfg )              ! Namelist nam_vvl in configuration namelist : Parameters of the run 
    949933      READ  ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 ) 
    950934902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist', lwp ) 
    951935      IF(lwm) WRITE ( numond, nam_vvl ) 
    952  
     936      ! 
    953937      IF(lwp) THEN                    ! Namelist print 
    954938         WRITE(numout,*) 
     
    983967         WRITE(numout,*) '                                         ln_vvl_dbg     = ', ln_vvl_dbg 
    984968      ENDIF 
    985  
     969      ! 
    986970      ioptio = 0                      ! Parameter control 
    987       IF( ln_vvl_ztilde_as_zstar ) ln_vvl_ztilde = .true. 
    988       IF( ln_vvl_zstar           )        ioptio = ioptio + 1 
    989       IF( ln_vvl_ztilde          )        ioptio = ioptio + 1 
    990       IF( ln_vvl_layer           )        ioptio = ioptio + 1 
    991  
     971      IF( ln_vvl_ztilde_as_zstar )   ln_vvl_ztilde = .true. 
     972      IF( ln_vvl_zstar           )   ioptio = ioptio + 1 
     973      IF( ln_vvl_ztilde          )   ioptio = ioptio + 1 
     974      IF( ln_vvl_layer           )   ioptio = ioptio + 1 
     975      ! 
    992976      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE vertical coordinate in namelist nam_vvl' ) 
    993977      IF( .NOT. ln_vvl_zstar .AND. nn_isf .NE. 0) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' ) 
    994  
     978      ! 
    995979      IF(lwp) THEN                   ! Print the choice 
    996980         WRITE(numout,*) 
     
    1003987         ! IF( .NOT. ln_vvl_kepe ) WRITE(numout,*) '              kinetic to potential energy transfer : option not used' 
    1004988      ENDIF 
    1005  
     989      ! 
    1006990#if defined key_agrif 
    1007991      IF (.NOT.Agrif_Root()) CALL ctl_stop( 'AGRIF not implemented with non-linear free surface (key_vvl)' ) 
    1008992#endif 
    1009  
     993      ! 
    1010994   END SUBROUTINE dom_vvl_ctl 
    1011995 
Note: See TracChangeset for help on using the changeset viewer.