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 6914 for branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90 – NEMO

Ignore:
Timestamp:
2016-09-06T13:27:38+02:00 (8 years ago)
Author:
gm
Message:

#1692 - branch SIMPLIF_2_usrdef: final adjustment of OVERFLOW and LOCK-ECHANGE configuration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90

    r6906 r6914  
    22   !!============================================================================== 
    33   !!                       ***  MODULE usrdef_zgr  *** 
     4   !! 
     5   !!                   ===      LOCK_EXCHANGE case      === 
     6   !! 
    47   !! Ocean domain : user defined vertical coordinate system  
    5    !! 
    6    !!                       ===      LOCK_EXCHANGE case      === 
    7    !! 
    88   !!============================================================================== 
    9    !! History :  4.0  ! 2016-08  (G. Madec)  Original code 
     9   !! History :  4.0  ! 2016-08  (G. Madec, S. Flavoni)  Original code 
    1010   !!---------------------------------------------------------------------- 
    1111 
    1212   !!---------------------------------------------------------------------- 
    13    !!   usr_def_zgr      : user defined vertical coordinate system (required) 
    14    !!       zgr_z1d      : reference 1D z-coordinate  
    15    !!       zgr_zps      : 3D vertical coordinate in z-partial cell coordinate 
     13   !!   usr_def_zgr   : user defined vertical coordinate system (required) 
     14   !!       zgr_z1d   : reference 1D z-coordinate  
    1615   !!--------------------------------------------------------------------- 
    17    USE oce               ! ocean variables 
    18    USE dom_oce  ,  ONLY: ln_zco, ln_zps, ln_sco   ! ocean space and time domain 
    19    USE dom_oce  ,  ONLY: nimpp, njmpp             ! ocean space and time domain 
    20    USE dom_oce  ,  ONLY: glamt                    ! ocean space and time domain 
    21    USE usrdef_nam        ! User defined : namelist variables 
     16   USE oce            ! ocean variables 
     17   USE dom_oce ,  ONLY: ln_zco, ln_zps, ln_sco   ! ocean space and time domain 
     18   USE usrdef_nam     ! User defined : namelist variables 
    2219   ! 
    23    USE in_out_manager    ! I/O manager 
    24    USE lbclnk            ! ocean lateral boundary conditions (or mpp link) 
    25    USE lib_mpp           ! distributed memory computing library 
    26    USE wrk_nemo          ! Memory allocation 
    27    USE timing            ! Timing 
     20   USE in_out_manager ! I/O manager 
     21   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
     22   USE lib_mpp        ! distributed memory computing library 
     23   USE wrk_nemo       ! Memory allocation 
     24   USE timing         ! Timing 
    2825 
    2926   IMPLICIT NONE 
     
    6259      INTEGER , DIMENSION(:,:)  , INTENT(out) ::   k_top, k_bot                ! first & last ocean level 
    6360      ! 
    64       INTEGER  ::   ji, jj, jk        ! dummy indices 
    65       INTEGER  ::   ik                ! local integers 
    66       REAL(wp) ::   zfact, z1_jpkm1   ! local scalar 
    67       REAL(wp) ::   ze3min            ! local scalar 
    68       REAL(wp), DIMENSION(jpi,jpj) ::   zht, zhu, z2d   ! 2D workspace 
     61      INTEGER  ::   jk   ! dummy indices 
     62      REAL(wp), DIMENSION(jpi,jpj) ::   z2d   ! 2D workspace 
    6963      !!---------------------------------------------------------------------- 
    7064      ! 
     
    7771      ! --------------------------- 
    7872      ! set in usrdef_nam.F90 by reading the namusr_def namelist only ln_zco 
     73      ln_zco    = .TRUE.       ! z-partial-step coordinate 
    7974      ln_zps    = .FALSE.      ! z-partial-step coordinate 
    8075      ln_sco    = .FALSE.      ! s-coordinate 
     
    8782      !                       !==  UNmasked meter bathymetry  ==! 
    8883      ! 
    89       ! flat bassin (20m deep and 64000m wide) 
     84      ! flat bassin (20m deep and 64000m wide, set through the jpk and jpi (see userdef_nam.F90)) 
    9085      CALL zgr_z1d( pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d )   ! Reference z-coordinate system 
    9186      ! 
     
    9691      ! the ocean basin surrounded by land (1 grid-point) set through lbc_lnk call as jperio=0  
    9792      z2d(:,:) = 1._wp                    ! surface ocean is the 1st level 
    98       CALL lbc_lnk( z2d, 'T', 1. )        ! closed basin  
    99       k_top(:,:) = z2d(:,:) 
     93      CALL lbc_lnk( z2d, 'T', 1. )        ! closed basin since jperio = 0 (see userdef_nam.F90) 
     94      k_top(:,:) = NINT( z2d(:,:) ) 
    10095      ! 
    10196      !                               
    102       IF ( ln_zco ) THEN      !==  z-coordinate  ==!   (step-like topography) 
    103          ! 
    104          !                                !* bottom ocean compute from the depth of grid-points 
    105          k_bot(:,:) = jpkm1 * k_top(:,:)     ! here use k_top as a land mask 
    106          !                                !* horizontally uniform coordinate (reference z-co everywhere) 
    107          DO jk = 1, jpk 
    108             pdept(:,:,jk) = pdept_1d(jk) 
    109             pdepw(:,:,jk) = pdepw_1d(jk) 
    110             pe3t (:,:,jk) = pe3t_1d (jk) 
    111             pe3u (:,:,jk) = pe3t_1d (jk) 
    112             pe3v (:,:,jk) = pe3t_1d (jk) 
    113             pe3f (:,:,jk) = pe3t_1d (jk) 
    114             pe3w (:,:,jk) = pe3w_1d (jk) 
    115             pe3uw(:,:,jk) = pe3w_1d (jk) 
    116             pe3vw(:,:,jk) = pe3w_1d (jk) 
    117          END DO 
    118       ENDIF 
     97      !                       !==  z-coordinate  ==!   (step-like topography) 
    11998      ! 
     99      !                                !* bottom ocean compute from the depth of grid-points 
     100      k_bot(:,:) = jpkm1 * k_top(:,:)     ! here use k_top as a land mask 
     101      !                                !* horizontally uniform coordinate (reference z-co everywhere) 
     102      DO jk = 1, jpk 
     103         pdept(:,:,jk) = pdept_1d(jk) 
     104         pdepw(:,:,jk) = pdepw_1d(jk) 
     105         pe3t (:,:,jk) = pe3t_1d (jk) 
     106         pe3u (:,:,jk) = pe3t_1d (jk) 
     107         pe3v (:,:,jk) = pe3t_1d (jk) 
     108         pe3f (:,:,jk) = pe3t_1d (jk) 
     109         pe3w (:,:,jk) = pe3w_1d (jk) 
     110         pe3uw(:,:,jk) = pe3w_1d (jk) 
     111         pe3vw(:,:,jk) = pe3w_1d (jk) 
     112      END DO 
    120113      ! 
    121114   END SUBROUTINE usr_def_zgr 
Note: See TracChangeset for help on using the changeset viewer.