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 2482 – NEMO

Changeset 2482


Ignore:
Timestamp:
2010-12-18T09:43:49+01:00 (13 years ago)
Author:
gm
Message:

v3.3beta: #777 backward compatibility with the setting of the minimum ocean depth: add a namelist param

Location:
branches/nemo_v3_3_beta/NEMOGCM
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/GYRE/EXP00/namelist

    r2473 r2482  
    1414!!             11 - Obs & Assim      (namobs, nam_asminc) 
    1515!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    16 !  CAUTION: some scripts does not support CAPITALs for logical use .true./.false., not .TRUE./.FALSE. 
    1716 
    1817!!====================================================================== 
     
    7877&namdom        !   space and time domain (bathymetry, mesh, timestep) 
    7978!----------------------------------------------------------------------- 
    80    nn_bathy    =    0      !  compute (=0) or read(=1) the bathymetry file 
     79   nn_bathy    =    0      !  compute (=0) or read (=1) the bathymetry file 
    8180   nn_closea    =   0      !  closed seas and lakes are removed (=0) or kept (=1) from the ORCA domain 
    8281   nn_msh      =    0      !  create (=1) a mesh file (coordinates, scale factors, masks) or not (=0) 
     82   rn_hmin     =   -3.     !  minimum depth of the ocean (>0) or minimum number of ocean level (<0) 
    8383   rn_e3zps_min=    5.     !  the thickness of the partial step is set larger than the minimum 
    8484   rn_e3zps_rat=    0.1    !  of e3zps_min and e3zps_rat * e3t   (N.B. 0<e3zps_rat<1) 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/GYRE_LOBSTER/EXP00/namelist

    r2473 r2482  
    1414!!             11 - Obs & Assim      (namobs, nam_asminc) 
    1515!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    16 !  CAUTION: some scripts does not support CAPITALs for logical use .true./.false., not .TRUE./.FALSE. 
    1716 
    1817!!====================================================================== 
     
    7877&namdom        !   space and time domain (bathymetry, mesh, timestep) 
    7978!----------------------------------------------------------------------- 
    80    nn_bathy    =    0      !  compute (=0) or read(=1) the bathymetry file 
     79   nn_bathy    =    0      !  compute (=0) or read (=1) the bathymetry file 
    8180   nn_closea    =   0      !  closed seas and lakes are removed (=0) or kept (=1) from the ORCA domain 
    8281   nn_msh      =    0      !  create (=1) a mesh file (coordinates, scale factors, masks) or not (=0) 
     82   rn_hmin     =   -3.     !  minimum depth of the ocean (>0) or minimum number of ocean level (<0) 
    8383   rn_e3zps_min=    5.     !  the thickness of the partial step is set larger than the minimum 
    8484   rn_e3zps_rat=    0.1    !  of e3zps_min and e3zps_rat * e3t   (N.B. 0<e3zps_rat<1) 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/1_namelist

    r2478 r2482  
    1414!!             11 - Obs & Assim      (namobs, nam_asminc) 
    1515!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    16 !  CAUTION: some scripts does not support CAPITALs for logical use .true./.false., not .TRUE./.FALSE. 
    1716 
    1817!!====================================================================== 
     
    7877&namdom        !   space and time domain (bathymetry, mesh, timestep) 
    7978!----------------------------------------------------------------------- 
    80    nn_bathy    =    1      !  compute (=0) or read(=1) the bathymetry file 
     79   nn_bathy    =    1      !  compute (=0) or read (=1) the bathymetry file 
    8180   nn_closea   =    0      !  closed seas and lakes are removed (=0) or kept (=1) from the ORCA domain 
    8281   nn_msh      =    0      !  create (=1) a mesh file (coordinates, scale factors, masks) or not (=0) 
     82   rn_hmin     =   -3.     !  minimum depth of the ocean (>0) or minimum number of ocean level (<0) 
    8383   rn_e3zps_min=   20.     !  the thickness of the partial step is set larger than the minimum 
    8484   rn_e3zps_rat=    0.1    !  of e3zps_min and e3zps_rat * e3t   (N.B. 0<e3zps_rat<1) 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/namelist

    r2473 r2482  
    1414!!             11 - Obs & Assim      (namobs, nam_asminc) 
    1515!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    16 !  CAUTION: some scripts does not support CAPITALs for logical use .true./.false., not .TRUE./.FALSE. 
    1716 
    1817!!====================================================================== 
     
    7877&namdom        !   space and time domain (bathymetry, mesh, timestep) 
    7978!----------------------------------------------------------------------- 
    80    nn_bathy    =    1      !  compute (=0) or read(=1) the bathymetry file 
     79   nn_bathy    =    1      !  compute (=0) or read (=1) the bathymetry file 
    8180   nn_closea   =    0      !  closed seas and lakes are removed (=0) or kept (=1) from the ORCA domain 
    8281   nn_msh      =    0      !  create (=1) a mesh file (coordinates, scale factors, masks) or not (=0) 
     82   rn_hmin     =   -3.     !  minimum depth of the ocean (>0) or minimum number of ocean level (<0) 
    8383   rn_e3zps_min=   20.     !  the thickness of the partial step is set larger than the minimum 
    8484   rn_e3zps_rat=    0.1    !  of e3zps_min and e3zps_rat * e3t   (N.B. 0<e3zps_rat<1) 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/ORCA2_LIM_PISCES/EXP00/namelist

    r2473 r2482  
    1414!!             11 - Obs & Assim      (namobs, nam_asminc) 
    1515!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    16 !  CAUTION: some scripts does not support CAPITALs for logical use .true./.false., not .TRUE./.FALSE. 
    1716 
    1817!!====================================================================== 
     
    7877&namdom        !   space and time domain (bathymetry, mesh, timestep) 
    7978!----------------------------------------------------------------------- 
    80    nn_bathy    =    1      !  compute (=0) or read(=1) the bathymetry file 
     79   nn_bathy    =    1      !  compute (=0) or read (=1) the bathymetry file 
    8180   nn_closea   =    0      !  closed seas and lakes are removed (=0) or kept (=1) from the ORCA domain 
    8281   nn_msh      =    0      !  create (=1) a mesh file (coordinates, scale factors, masks) or not (=0) 
     82   rn_hmin     =   -3.     !  minimum depth of the ocean (>0) or minimum number of ocean level (<0) 
    8383   rn_e3zps_min=   20.     !  the thickness of the partial step is set larger than the minimum 
    8484   rn_e3zps_rat=    0.1    !  of e3zps_min and e3zps_rat * e3t   (N.B. 0<e3zps_rat<1) 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/ORCA2_OFF_PISCES/EXP00/namelist

    r2473 r2482  
    1414!!             11 - Obs & Assim      (namobs, nam_asminc) 
    1515!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    16 !  CAUTION: some scripts does not support CAPITALs for logical use .true./.false., not .TRUE./.FALSE. 
    1716 
    1817!!====================================================================== 
     
    7877&namdom        !   space and time domain (bathymetry, mesh, timestep) 
    7978!----------------------------------------------------------------------- 
    80    nn_bathy    =    1      !  compute (=0) or read(=1) the bathymetry file 
     79   nn_bathy    =    1      !  compute (=0) or read (=1) the bathymetry file 
    8180   nn_closea   =    0      !  closed seas and lakes are removed (=0) or kept (=1) from the ORCA domain 
    8281   nn_msh      =    1      !  create (=1) a mesh file (coordinates, scale factors, masks) or not (=0) 
     82   rn_hmin     =   -3.     !  minimum depth of the ocean (>0) or minimum number of ocean level (<0) 
    8383   rn_e3zps_min=   20.     !  the thickness of the partial step is set larger than the minimum 
    8484   rn_e3zps_rat=    0.1    !  of e3zps_min and e3zps_rat * e3t   (N.B. 0<e3zps_rat<1) 
  • branches/nemo_v3_3_beta/NEMOGCM/CONFIG/POMME/EXP00/namelist

    r2473 r2482  
    1414!!             11 - Obs & Assim      (namobs, nam_asminc) 
    1515!!>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 
    16 !  CAUTION: some scripts does not support CAPITALs for logical use .true./.false., not .TRUE./.FALSE. 
    1716 
    1817!!====================================================================== 
     
    7877&namdom        !   space and time domain (bathymetry, mesh, timestep) 
    7978!----------------------------------------------------------------------- 
    80    nn_bathy    =    1      !  compute (=0) or read(=1) the bathymetry file 
     79   nn_bathy    =    1      !  compute (=0) or read (=1) the bathymetry file 
    8180   nn_closea   =    0      !  closed seas and lakes are removed (=0) or kept (=1) from the ORCA domain 
    8281   nn_msh      =    0      !  create (=1) a mesh file (coordinates, scale factors, masks) or not (=0) 
     82   rn_hmin     =   -3.     !  minimum depth of the ocean (>0) or minimum number of ocean level (<0) 
    8383   rn_e3zps_min=   25.     !  the thickness of the partial step is set larger than the minimum 
    8484   rn_e3zps_rat=    0.2    !  of e3zps_min and e3zps_rat * e3t   (N.B. 0<e3zps_rat<1) 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OFF_SRC/domrea.F90

    r2464 r2482  
    5757      INTEGER  ::   ik, inum0 , inum1 , inum2 , inum3 , inum4   ! local integers 
    5858      REAL(wp) ::   zrefdep         ! local real 
    59       REAL(wp), DIMENSION(jpi,jpj) ::   zmbk   ! 2D workspace 
     59      REAL(wp), DIMENSION(jpi,jpj) ::   zmbk, zprt, zprw   ! 2D workspace 
    6060      !!---------------------------------------------------------------------- 
    6161 
     
    220220               CALL iom_get( inum4, jpdom_data, 'gdepw', gdepw ) 
    221221            ELSE                                                           ! 2D bottom depth 
    222                CALL iom_get( inum4, jpdom_data, 'hdept', hdept ) 
    223                CALL iom_get( inum4, jpdom_data, 'hdepw', hdepw ) 
     222               CALL iom_get( inum4, jpdom_data, 'hdept', zprt ) 
     223               CALL iom_get( inum4, jpdom_data, 'hdepw', zprw ) 
    224224               ! 
    225225               DO jk = 1, jpk                                              ! deduces the 3D depth 
     
    231231                     ik = mbkt(ji,jj) 
    232232                     IF( ik > 0 ) THEN 
    233                         gdepw(ji,jj,ik+1) = hdepw(ji,jj) 
    234                         gdept(ji,jj,ik  ) = hdept(ji,jj) 
     233                        gdepw(ji,jj,ik+1) = zprw(ji,jj) 
     234                        gdept(ji,jj,ik  ) = zprt(ji,jj) 
    235235                        gdept(ji,jj,ik+1) = gdept(ji,jj,ik) + e3t(ji,jj,ik) 
    236236                     ENDIF 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90

    r2443 r2482  
    1818   !! ---------------------------- 
    1919   !                                              !!* Namelist namdom : time & space domain * 
    20    INTEGER , PUBLIC ::   nn_bathy     =  0         !: = 0/1 ,compute/read the bathymetry file 
    21    REAL(wp), PUBLIC ::   rn_e3zps_min = 5.0_wp     !: miminum thickness for partial steps (meters) 
    22    REAL(wp), PUBLIC ::   rn_e3zps_rat = 0.1_wp     !: minimum thickness ration for partial steps 
    23    INTEGER , PUBLIC ::   nn_msh       = 0          !: = 1 create a mesh-mask file 
    24    INTEGER , PUBLIC ::   nn_acc       = 0          !: = 0/1 use of the acceleration of convergence technique 
    25    REAL(wp), PUBLIC ::   rn_atfp      = 0.1_wp     !: asselin time filter parameter 
     20   INTEGER , PUBLIC ::   nn_bathy     =    0       !: = 0/1 ,compute/read the bathymetry file 
     21   REAL(wp), PUBLIC ::   rn_hmin      =   -3.0_wp  !: minimum ocean depth (>0) or minimum number of ocean levels (<0) 
     22   REAL(wp), PUBLIC ::   rn_e3zps_min =    5.0_wp  !: miminum thickness for partial steps (meters) 
     23   REAL(wp), PUBLIC ::   rn_e3zps_rat =    0.1_wp  !: minimum thickness ration for partial steps 
     24   INTEGER , PUBLIC ::   nn_msh       =    0       !: = 1 create a mesh-mask file 
     25   INTEGER , PUBLIC ::   nn_acc       =    0       !: = 0/1 use of the acceleration of convergence technique 
     26   REAL(wp), PUBLIC ::   rn_atfp      =    0.1_wp  !: asselin time filter parameter 
    2627   REAL(wp), PUBLIC ::   rn_rdt       = 3600._wp   !: time step for the dynamics (and tracer if nacc=0) 
    2728   REAL(wp), PUBLIC ::   rn_rdtmin    = 3600._wp   !: minimum time step on tracers 
    2829   REAL(wp), PUBLIC ::   rn_rdtmax    = 3600._wp   !: maximum time step on tracers 
    2930   REAL(wp), PUBLIC ::   rn_rdth      =  800._wp   !: depth variation of tracer step 
    30    INTEGER , PUBLIC ::   nn_baro      = 64         !: number of barotropic time steps (key_dynspg_ts) 
    31    INTEGER , PUBLIC ::   nn_closea    =         !: =0 suppress closed sea/lake from the ORCA domain or not (=1) 
    32  
    33    !                                          ! old non-DOCTOR names still used in the model 
    34    INTEGER , PUBLIC ::   ntopo                !: = 0/1 ,compute/read the bathymetry file 
    35    REAL(wp), PUBLIC ::   e3zps_min            !: miminum thickness for partial steps (meters) 
    36    REAL(wp), PUBLIC ::   e3zps_rat            !: minimum thickness ration for partial steps 
    37    INTEGER , PUBLIC ::   nmsh                 !: = 1 create a mesh-mask file 
    38    INTEGER , PUBLIC ::   nacc                 !: = 0/1 use of the acceleration of convergence technique 
    39    REAL(wp), PUBLIC ::   atfp                 !: asselin time filter parameter 
    40    REAL(wp), PUBLIC ::   rdt                  !: time step for the dynamics (and tracer if nacc=0) 
    41    REAL(wp), PUBLIC ::   rdtmin               !: minimum time step on tracers 
    42    REAL(wp), PUBLIC ::   rdtmax               !: maximum time step on tracers 
    43    REAL(wp), PUBLIC ::   rdth                 !: depth variation of tracer step 
    44    INTEGER , PUBLIC ::   nclosea              !: =0 suppress closed sea/lake from the ORCA domain or not (=1) 
    45  
    46  
    47    !                                         !!! associated variables 
     31   INTEGER , PUBLIC ::   nn_baro      =   64       !: number of barotropic time steps (key_dynspg_ts) 
     32   INTEGER , PUBLIC ::   nn_closea    =    0       !: =0 suppress closed sea/lake from the ORCA domain or not (=1) 
     33 
     34   !                                    !! old non-DOCTOR names still used in the model 
     35   INTEGER , PUBLIC ::   ntopo           !: = 0/1 ,compute/read the bathymetry file 
     36   REAL(wp), PUBLIC ::   e3zps_min       !: miminum thickness for partial steps (meters) 
     37   REAL(wp), PUBLIC ::   e3zps_rat       !: minimum thickness ration for partial steps 
     38   INTEGER , PUBLIC ::   nmsh            !: = 1 create a mesh-mask file 
     39   INTEGER , PUBLIC ::   nacc            !: = 0/1 use of the acceleration of convergence technique 
     40   REAL(wp), PUBLIC ::   atfp            !: asselin time filter parameter 
     41   REAL(wp), PUBLIC ::   rdt             !: time step for the dynamics (and tracer if nacc=0) 
     42   REAL(wp), PUBLIC ::   rdtmin          !: minimum time step on tracers 
     43   REAL(wp), PUBLIC ::   rdtmax          !: maximum time step on tracers 
     44   REAL(wp), PUBLIC ::   rdth            !: depth variation of tracer step 
     45   INTEGER , PUBLIC ::   nclosea         !: =0 suppress closed sea/lake from the ORCA domain or not (=1) 
     46 
     47 
     48   !                                                  !!! associated variables 
    4849   INTEGER , PUBLIC                 ::   neuler  = 0   !: restart euler forward option (0=Euler) 
    4950   REAL(wp), PUBLIC                 ::   atfp1         !: asselin time filter coeff. (atfp1= 1-2*atfp) 
     
    150151   REAL(wp), PUBLIC, DIMENSION(jpk)     ::   gdept_0, gdepw_0   !: reference depth of t- and w-points (m) 
    151152   REAL(wp), PUBLIC, DIMENSION(jpk)     ::   e3t_0  , e3w_0     !: reference vertical scale factors at T- and W-pts (m) 
    152    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hdept  , hdepw     !: ocean bottom depth at T and W points 
    153153   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   e3tp   , e3wp      !: ocean bottom level thickness at T and W points 
    154154 
     
    163163   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   scosrf, scobot   !: ocean surface and bottom topographies  
    164164   !                                                          !  (if deviating from coordinate surfaces in HYBRID) 
    165    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hifv  , hiff     !: interface depth between stretching    at  V--F 
    166    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hift  , hifu     !: and quasi-uniform spacing                 T--U  points (m) 
     165   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hifv  , hiff     !: interface depth between stretching at  V--F 
     166   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   hift  , hifu     !: and quasi-uniform spacing              T--U  points (m) 
    167167 
    168168   !!---------------------------------------------------------------------- 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domwri.F90

    r2450 r2482  
    5656      !!      if     nmsh <= 3: write full 3D arrays for e3[tuvw] and gdep[tuvw] 
    5757      !!      if 3 < nmsh <= 6: write full 3D arrays for e3[tuvw] and 2D arrays  
    58       !!                        corresponding to the depth of the bottom points hdep[tw] 
     58      !!                        corresponding to the depth of the bottom t- and w-points 
    5959      !!      if 6 < nmsh <= 9: write 2D arrays corresponding to the depth and the 
    60       !!                        thickness of the bottom points hdep[tw] and e3[tw]_ps 
     60      !!                        thickness (e3[tw]_ps) of the bottom points  
    6161      !! 
    6262      !! ** output file :   meshmask.nc  : domain size, horizontal grid-point position, 
    6363      !!                                   masks, depth and vertical scale factors 
    6464      !!---------------------------------------------------------------------- 
    65       INTEGER                          ::   inum0    ! temprary units for 'mesh_mask.nc' file 
    66       INTEGER                          ::   inum1    ! temprary units for 'mesh.nc'      file 
    67       INTEGER                          ::   inum2    ! temprary units for 'mask.nc'      file 
    68       INTEGER                          ::   inum3    ! temprary units for 'mesh_hgr.nc'  file 
    69       INTEGER                          ::   inum4    ! temprary units for 'mesh_zgr.nc'  file 
    70       INTEGER                          ::   ji, jj, jk   ! dummy loop indices 
    71       REAL(wp), DIMENSION(jpi,jpj)     ::   zprt     ! temporary array for bathymetry  
    72       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zdepu    ! 3D depth of U point 
    73       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zdepv    ! 3D depth of V point 
    74       CHARACTER(len=21)                ::   clnam0   ! filename (mesh and mask informations) 
    75       CHARACTER(len=21)                ::   clnam1   ! filename (mesh informations) 
    76       CHARACTER(len=21)                ::   clnam2   ! filename (mask informations) 
    77       CHARACTER(len=21)                ::   clnam3   ! filename (horizontal mesh informations) 
    78       CHARACTER(len=21)                ::   clnam4   ! filename (vertical   mesh informations) 
    79       !!---------------------------------------------------------------------- 
     65      INTEGER           ::   inum0    ! temprary units for 'mesh_mask.nc' file 
     66      INTEGER           ::   inum1    ! temprary units for 'mesh.nc'      file 
     67      INTEGER           ::   inum2    ! temprary units for 'mask.nc'      file 
     68      INTEGER           ::   inum3    ! temprary units for 'mesh_hgr.nc'  file 
     69      INTEGER           ::   inum4    ! temprary units for 'mesh_zgr.nc'  file 
     70      CHARACTER(len=21) ::   clnam0   ! filename (mesh and mask informations) 
     71      CHARACTER(len=21) ::   clnam1   ! filename (mesh informations) 
     72      CHARACTER(len=21) ::   clnam2   ! filename (mask informations) 
     73      CHARACTER(len=21) ::   clnam3   ! filename (horizontal mesh informations) 
     74      CHARACTER(len=21) ::   clnam4   ! filename (vertical   mesh informations) 
     75      INTEGER           ::   ji, jj, jk   ! dummy loop indices 
     76      REAL(wp), DIMENSION(jpi,jpj)     ::   zprt , zprw    ! 2D workspace 
     77      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zdepu, zdepv   ! 3D workspace 
     78     !!---------------------------------------------------------------------- 
    8079 
    8180      IF(lwp) WRITE(numout,*) 
     
    216215            DO jj = 1,jpj    
    217216               DO ji = 1,jpi 
    218                   hdept(ji,jj) = gdept(ji,jj,mbkt(ji,jj)  ) * tmask(ji,jj,1) 
    219                   hdepw(ji,jj) = gdepw(ji,jj,mbkt(ji,jj)+1) * tmask(ji,jj,1) 
     217                  zprt(ji,jj) = gdept(ji,jj,mbkt(ji,jj)  ) * tmask(ji,jj,1) 
     218                  zprw(ji,jj) = gdepw(ji,jj,mbkt(ji,jj)+1) * tmask(ji,jj,1) 
    220219               END DO 
    221220            END DO 
    222             CALL iom_rstput( 0, 0, inum4, 'hdept' , hdept, ktype = jp_r4 )      
    223             CALL iom_rstput( 0, 0, inum4, 'hdepw' , hdepw, ktype = jp_r4 )  
     221            CALL iom_rstput( 0, 0, inum4, 'hdept', zprt, ktype = jp_r4 )      
     222            CALL iom_rstput( 0, 0, inum4, 'hdepw', zprw, ktype = jp_r4 )  
    224223         ENDIF 
    225224         ! 
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r2463 r2482  
    236236         IF( .NOT. ldbletanh ) THEN 
    237237            DO jk = 1, jpk 
    238                zw = FLOAT( jk ) 
    239                zt = FLOAT( jk ) + 0.5_wp 
     238               zw = REAL( jk , wp ) 
     239               zt = REAL( jk , wp ) + 0.5_wp 
    240240               gdepw_0(jk) = ( zsur + za0 * zw + za1 * zacr * LOG ( COSH( (zw-zkth) / zacr ) )  ) 
    241241               gdept_0(jk) = ( zsur + za0 * zt + za1 * zacr * LOG ( COSH( (zt-zkth) / zacr ) )  ) 
     
    248248               zt = FLOAT( jk ) + 0.5_wp 
    249249               ! Double tanh function 
    250                gdepw_0(jk) = ( zsur + za0 * zw + za1 * zacr * LOG ( COSH( (zw-zkth) / zacr ) )    & 
    251      &                                         + za2 * zacr2* LOG ( COSH( (zw-zkth2)/zacr2 ) )  ) 
    252                gdept_0(jk) = ( zsur + za0 * zt + za1 * zacr * LOG ( COSH( (zt-zkth) / zacr ) )    & 
    253      &                                         + za2 * zacr2* LOG ( COSH( (zt-zkth2)/zacr2 ) )  ) 
    254                e3w_0  (jk) =          za0      + za1        * TANH(       (zw-zkth) / zacr   )    & 
    255      &                                         + za2        * TANH(       (zw-zkth2)/zacr2  ) 
    256                e3t_0  (jk) =          za0      + za1        * TANH(       (zt-zkth) / zacr   )    & 
    257      &                                         + za2        * TANH(       (zt-zkth2)/zacr2  ) 
     250               gdepw_0(jk) = ( zsur + za0 * zw + za1 * zacr * LOG ( COSH( (zw-zkth ) / zacr ) )    & 
     251                  &                            + za2 * zacr2* LOG ( COSH( (zw-zkth2) / zacr2 ) )  ) 
     252               gdept_0(jk) = ( zsur + za0 * zt + za1 * zacr * LOG ( COSH( (zt-zkth ) / zacr ) )    & 
     253                  &                            + za2 * zacr2* LOG ( COSH( (zt-zkth2) / zacr2 ) )  ) 
     254               e3w_0  (jk) =          za0      + za1        * TANH(       (zw-zkth ) / zacr  )    & 
     255                  &                            + za2        * TANH(       (zw-zkth2) / zacr2 ) 
     256               e3t_0  (jk) =          za0      + za1        * TANH(       (zt-zkth ) / zacr  )    & 
     257                  &                            + za2        * TANH(       (zt-zkth2) / zacr2 ) 
    258258            END DO 
    259259         ENDIF 
     
    315315      INTEGER  ::   inum                      ! temporary logical unit 
    316316      INTEGER  ::   ii_bump, ij_bump, ih      ! bump center position 
    317       INTEGER  ::   ii0, ii1, ij0, ij1        ! indices 
     317      INTEGER  ::   ii0, ii1, ij0, ij1, ik    ! local indices 
    318318      REAL(wp) ::   r_bump , h_bump , h_oce   ! bump characteristics  
    319       REAL(wp) ::   zi     , zj     , zh      ! temporary scalars 
     319      REAL(wp) ::   zi, zj, zh, zhmin         ! local scalars 
    320320      INTEGER , DIMENSION(jpidta,jpjdta) ::   idta   ! global domain integer data 
    321321      REAL(wp), DIMENSION(jpidta,jpjdta) ::   zdta   ! global domain scalar data 
     
    497497      ENDIF 
    498498      ! 
     499      !                                               ! =========================== ! 
     500      !                                               !     set a minimum depth     ! 
     501      !                                               ! =========================== ! 
     502      IF( rn_hmin < 0._wp ) THEN    ;   ik = INT( rn_hmin ) + 1                                    ! from a nb of level 
     503      ELSE                          ;   ik = MINLOC( gdepw_0, mask = gdepw_0 > rn_hmin, dim = 1 )  ! from a depth 
     504      ENDIF 
     505      zhmin = gdepw_0(ik+1)                                                         ! minimum depth = ik+1 w-levels  
     506      WHERE( bathy(:,:) <= 0._wp )   ;   bathy(:,:) = 0._wp                         ! min=0     over the lands 
     507      ELSE WHERE                     ;   bathy(:,:) = MIN(  zhmin , bathy(:,:)  )   ! min=zhmin over the oceans 
     508      END WHERE 
     509      IF(lwp) write(numout,*) 'Minimum ocean depth: ', zhmin, ' minimum number of ocean levels : ', ik 
     510      ! 
    499511   END SUBROUTINE zgr_bat 
    500512 
     
    797809      REAL(wp) ::   ze3tp , ze3wp    ! Last ocean level thickness at T- and W-points 
    798810      REAL(wp) ::   zdepwp, zdepth   ! Ajusted ocean depth to avoid too small e3t 
    799       REAL(wp) ::   zmax, zmin       ! Maximum and minimum depth 
     811      REAL(wp) ::   zmax             ! Maximum depth 
    800812      REAL(wp) ::   zdiff            ! temporary scalar 
    801813      REAL(wp) ::   zrefdep          ! temporary scalar 
     
    820832      ! bathymetry in level (from bathy_meter) 
    821833      ! =================== 
    822       zmax = gdepw_0(jpk) + e3t_0(jpk)     ! maximum depth (i.e. the last ocean level thickness <= 2*e3t_0(jpkm1) ) 
    823  
    824       zrefdep = 25._wp 
    825       nlbelow = MINLOC( gdepw_0, mask = gdepw_0 > zrefdep, dim = 1 )   ! shallowest W level Below zrefdep 
    826       IF(lwp) write(numout,*) 'Minimum depth level selected: ', nlbelow 
    827       zmin = gdepw_0(nlbelow)              ! minimum depth = nlbelow-1 levels 
    828  
    829       mbathy(:,:) = jpkm1                  ! initialize mbathy to the maximum ocean level available 
    830  
    831       !                                    ! storage of land and island's number (zera and negative values) in mbathy 
    832       WHERE( bathy(:,:) <= 0._wp )   mbathy(:,:) = INT( bathy(:,:) ) 
    833  
    834       ! bounded value of bathy 
    835 !!gm  bathy(:,:) = MIN(  zmax,  MAX( bathy(:,:), zmin )  )     !!gm : simpler   as zmin is > 0 
    836       DO jj = 1, jpj 
    837          DO ji= 1, jpi 
    838             IF( bathy(ji,jj) <= 0._wp ) THEN   ;   bathy(ji,jj) = 0._wp 
    839             ELSE                               ;   bathy(ji,jj) = MIN(  zmax,  MAX( bathy(ji,jj), zmin )  ) 
    840             ENDIF 
    841          END DO 
    842       END DO 
     834      zmax = gdepw_0(jpk) + e3t_0(jpk)          ! maximum depth (i.e. the last ocean level thickness <= 2*e3t_0(jpkm1) ) 
     835      mbathy(:,:) = jpkm1                       ! initialize mbathy to the maximum ocean level available 
     836      bathy(:,:) = MIN( zmax ,  bathy(:,:) )    ! bounded value of bathy (min already set at the end of zgr_bat) 
    843837 
    844838      ! Compute mbathy for ocean points (i.e. the number of ocean levels) 
     
    858852         e3w  (:,:,jk) = e3w_0  (jk) 
    859853      END DO 
    860       hdept(:,:) = gdept(:,:,2 ) 
    861       hdepw(:,:) = gdepw(:,:,3 )      
    862854      !  
    863855      DO jj = 1, jpj 
     
    905897            ik = mbathy(ji,jj) 
    906898            IF( ik > 0 ) THEN               ! ocean point only 
    907                hdept(ji,jj) = gdept(ji,jj,ik  ) 
    908                hdepw(ji,jj) = gdepw(ji,jj,ik+1) 
    909899               e3tp (ji,jj) = e3t(ji,jj,ik  ) 
    910900               e3wp (ji,jj) = e3w(ji,jj,ik  ) 
     
    924914      ! Scale factors and depth at U-, V-, UW and VW-points 
    925915      DO jk = 1, jpk                        ! initialisation to z-scale factors 
    926          e3u (:,:,jk)  = e3t_0(jk) 
    927          e3v (:,:,jk)  = e3t_0(jk) 
    928          e3uw(:,:,jk)  = e3w_0(jk) 
    929          e3vw(:,:,jk)  = e3w_0(jk) 
     916         e3u (:,:,jk) = e3t_0(jk) 
     917         e3v (:,:,jk) = e3t_0(jk) 
     918         e3uw(:,:,jk) = e3w_0(jk) 
     919         e3vw(:,:,jk) = e3w_0(jk) 
    930920      END DO 
    931921      DO jk = 1,jpk                         ! Computed as the minimum of neighbooring scale factors 
Note: See TracChangeset for help on using the changeset viewer.