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 7188 for branches – NEMO

Changeset 7188 for branches


Ignore:
Timestamp:
2016-11-04T06:54:44+01:00 (7 years ago)
Author:
gm
Message:

#1692 - branch SIMPLIF_2_usrdef: e3.=dk[dep.] (discret derivative)

Location:
branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/GYRE/EXP00/namelist_cfg

    r7002 r7188  
    2525&namcfg     !   parameters of the configuration    
    2626!----------------------------------------------------------------------- 
    27    ln_read_cfg = .true.    !  (=T) read the domain configuration in 'domain_cfg.nc" file 
     27   ln_read_cfg = .false.   !  (=T) read the domain configuration in 'domain_cfg.nc" file 
    2828   !                       !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
    2929   ln_write_cfg= .false.   !  (=T) create the domain configuration file 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/GYRE_BFM/EXP00/namelist_cfg

    r6667 r7188  
    2424   ln_read_cfg = .false.   !  (=T) read the domain configuration in 'domain_cfg.nc" file 
    2525   !                       !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
    26    ln_write_cfg= .true.    !  (=T) create the domain configuration file 
     26   ln_write_cfg= .false.   !  (=T) create the domain configuration file 
    2727   ! 
    2828   cp_cfg      = "default" !  name of the configuration 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/GYRE_PISCES/EXP00/namelist_cfg

    r6667 r7188  
    1717   ln_read_cfg = .false.   !  (=T) read the domain configuration in 'domain_cfg.nc" file 
    1818   !                       !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
    19    ln_write_cfg= .true.    !  (=T) create the domain configuration file 
     19   ln_write_cfg= .false.   !  (=T) create the domain configuration file 
    2020   ! 
    2121   cp_cfg      = "default" !  name of the configuration 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/GYRE_XIOS/EXP00/namelist_cfg

    r6667 r7188  
    1717   ln_read_cfg = .false.   !  (=T) read the domain configuration in 'domain_cfg.nc" file 
    1818   !                       !  (=F) user defined configuration  ==>>>  see usrdef(_...) modules 
    19    ln_write_cfg= .true.    !  (=T) create the domain configuration file 
     19   ln_write_cfg= .false.   !  (=T) create the domain configuration file 
    2020   ! 
    2121   cp_cfg      = "default" !  name of the configuration 
     
    4141&namtsd    !   data : Temperature  & Salinity 
    4242!----------------------------------------------------------------------- 
    43    cn_dir        = './'      !  root directory for the location of the runoff files 
    44    ln_tsd_init   = .false.   !  Initialisation of ocean T & S with T &S input data (T) or not (F) 
    45    ln_tsd_tradmp = .false.   !  damping of ocean T & S toward T &S input data (T) or not (F) 
     43   cn_dir        = './'    !  root directory for the location of the runoff files 
     44   ln_tsd_init   = .false. !  Initialisation of ocean T & S with T &S input data (T) or not (F) 
     45   ln_tsd_tradmp = .false. !  damping of ocean T & S toward T &S input data (T) or not (F) 
    4646/ 
    4747!----------------------------------------------------------------------- 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/LOCK_EXCHANGE/MY_SRC/usrdef_zgr.F90

    r6923 r7188  
    122122      !!      vertical scale factors. 
    123123      !! 
    124       !! ** Method  :   z-coordinate system (use in all type of coordinate) 
    125       !!      The depth of model levels is defined from an analytical 
    126       !!      function the derivative of which gives the scale factors. 
    127       !!      both depth and scale factors only depend on k (1d arrays). 
    128       !!              w-level: pdepw_1d  = pdep(k) 
    129       !!                       pe3w_1d(k) = dk(pdep)(k)     = e3(k) 
    130       !!              t-level: pdept_1d  = pdep(k+0.5) 
    131       !!                       pe3t_1d(k) = dk(pdep)(k+0.5) = e3(k+0.5) 
     124      !! ** Method  :   1D z-coordinate system (use in all type of coordinate) 
     125      !!       The depth of model levels is set from dep(k), an analytical function: 
     126      !!                   w-level: depw_1d  = dep(k) 
     127      !!                   t-level: dept_1d  = dep(k+0.5) 
     128      !!       The scale factors are the discrete derivative of the depth: 
     129      !!                   e3w_1d(jk) = dk[ dept_1d ]  
     130      !!                   e3t_1d(jk) = dk[ depw_1d ] 
    132131      !! 
    133132      !!            ===    Here constant vertical resolution   === 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_zgr.F90

    r6923 r7188  
    218218      !!      vertical scale factors. 
    219219      !! 
    220       !! ** Method  :   z-coordinate system (use in all type of coordinate) 
    221       !!      The depth of model levels is defined from an analytical 
    222       !!      function the derivative of which gives the scale factors. 
    223       !!      both depth and scale factors only depend on k (1d arrays). 
    224       !!              w-level: pdepw_1d  = pdep(k) 
    225       !!                       pe3w_1d(k) = dk(pdep)(k)     = e3(k) 
    226       !!              t-level: pdept_1d  = pdep(k+0.5) 
    227       !!                       pe3t_1d(k) = dk(pdep)(k+0.5) = e3(k+0.5) 
     220      !! ** Method  :   1D z-coordinate system (use in all type of coordinate) 
     221      !!       The depth of model levels is set from dep(k), an analytical function: 
     222      !!                   w-level: depw_1d  = dep(k) 
     223      !!                   t-level: dept_1d  = dep(k+0.5) 
     224      !!       The scale factors are the discrete derivative of the depth: 
     225      !!                   e3w_1d(jk) = dk[ dept_1d ]  
     226      !!                   e3t_1d(jk) = dk[ depw_1d ] 
    228227      !! 
    229228      !!            ===    Here constant vertical resolution   === 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90

    r6904 r7188  
    167167   !! masks, top and bottom ocean point position 
    168168   !! --------------------------------------------------------------------- 
     169!!gm Proposition of new name for top/bottom vertical indices 
     170!   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mtk_t, mtk_u, mtk_v   !: top first wet T-, U-, V-, F-level (ISF) 
     171!   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mbk_t, mbk_u, mbk_v   !: bottom last wet T-, U- and V-level 
     172!!gm 
    169173   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mbkt, mbku, mbkv   !: bottom last wet T-, U- and V-level 
    170174   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tmask_i            !: interior domain T-point mask 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r7024 r7188  
    572572      CALL iom_rstput( 0, 0, inum, 'ff_t' , ff_t , ktype = jp_r8 ) 
    573573      ! 
    574       !                             !==  vertical mesh - 3D mask ==! 
     574      !                             !==  vertical mesh ==! 
    575575      !                                                      
    576       CALL iom_rstput( 0, 0, inum, 'gdept_1d', gdept_1d, ktype = jp_r8 )   ! reference 1D-coordinate 
    577       CALL iom_rstput( 0, 0, inum, 'gdepw_1d', gdepw_1d, ktype = jp_r8 ) 
    578       CALL iom_rstput( 0, 0, inum, 'e3t_1d'  , e3t_1d  , ktype = jp_r8 ) 
     576      CALL iom_rstput( 0, 0, inum, 'e3t_1d'  , e3t_1d  , ktype = jp_r8 )   ! reference 1D-coordinate 
    579577      CALL iom_rstput( 0, 0, inum, 'e3w_1d'  , e3w_1d  , ktype = jp_r8 ) 
    580       !                                                      
    581       CALL iom_rstput( 0, 0, inum, 'gdept_0' , gdept_0 , ktype = jp_r8 )   ! depth (t- & w-points) 
    582       CALL iom_rstput( 0, 0, inum, 'gdepw_0' , gdepw_0 , ktype = jp_r8 ) 
    583       ! 
    584       CALL iom_rstput( 0, 0, inum, 'e3t_0'   , e3t_0   , ktype = jp_r8 )   ! vertical scale factors (e 
     578      ! 
     579      CALL iom_rstput( 0, 0, inum, 'e3t_0'   , e3t_0   , ktype = jp_r8 )   ! vertical scale factors 
    585580      CALL iom_rstput( 0, 0, inum, 'e3u_0'   , e3u_0   , ktype = jp_r8 ) 
    586581      CALL iom_rstput( 0, 0, inum, 'e3v_0'   , e3v_0   , ktype = jp_r8 ) 
     
    590585      CALL iom_rstput( 0, 0, inum, 'e3vw_0'  , e3vw_0  , ktype = jp_r8 ) 
    591586      !                                          
    592       !                             !==  ocean top and bottom level  ==!   (caution: multiplied by ssmask) 
    593       ! 
     587      !                             !==  wet top and bottom level  ==!   (caution: multiplied by ssmask) 
     588      ! 
     589      CALL iom_rstput( 0, 0, inum, 'top_level'    , REAL( mikt, wp )*ssmask , ktype = jp_i4 )   ! nb of ocean T-points (ISF) 
    594590      CALL iom_rstput( 0, 0, inum, 'bottom_level' , REAL( mbkt, wp )*ssmask , ktype = jp_i4 )   ! nb of ocean T-points 
    595       CALL iom_rstput( 0, 0, inum, 'top_level'    , REAL( mikt, wp )*ssmask , ktype = jp_i4 )   ! nb of ocean T-points (ISF) 
    596591      ! 
    597592      IF( ln_sco ) THEN             ! s-coordinate: store grid stiffness ratio  (Not required anyway) 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r6977 r7188  
    2929   USE dom_oce        ! ocean domain 
    3030   USE usrdef_zgr     ! user defined vertical coordinate system 
     31   USE depth_e3       ! depth <=> e3 
    3132   ! 
    3233   USE in_out_manager ! I/O manager 
     
    110111      ENDIF 
    111112      ! 
    112 !!gm to be remove when changing the definition of e3 scale factors so that gde3w disappears 
     113!!gm to be remove when removing the OLD definition of e3 scale factors so that gde3w disappears 
    113114      ! Compute gde3w_0 (vertical sum of e3w) 
    114115      gde3w_0(:,:,1) = 0.5_wp * e3w_0(:,:,1) 
     
    189190      INTEGER , DIMENSION(:,:)  , INTENT(out) ::   k_top , k_bot               ! first & last ocean level 
    190191      ! 
     192      INTEGER  ::   jk     ! dummy loop index 
    191193      INTEGER  ::   inum   ! local logical unit 
    192194      REAL(WP) ::   z_zco, z_zps, z_sco, z_cav 
     
    215217      ! 
    216218      !                                   ! reference 1D-coordinate 
    217       CALL iom_get( inum, jpdom_unknown, 'gdept_1d', pdept_1d )    
    218       CALL iom_get( inum, jpdom_unknown, 'gdepw_1d', pdepw_1d ) 
    219219      CALL iom_get( inum, jpdom_unknown, 'e3t_1d'  , pe3t_1d  ) 
    220220      CALL iom_get( inum, jpdom_unknown, 'e3w_1d'  , pe3w_1d  ) 
    221221      ! 
    222       !                                   ! depth 
    223       CALL iom_get( inum, jpdom_data, 'gdept_0', pdept  ) 
    224       CALL iom_get( inum, jpdom_data, 'gdepw_0', pdepw  ) 
    225 !      CALL iom_get( inum, jpdom_data, 'gde3w_0', pde3w ) 
    226       ! 
    227       !                                   ! vertical scale factors 
    228       CALL iom_get( inum, jpdom_data, 'e3t_0'  , pe3t  ) 
    229       CALL iom_get( inum, jpdom_data, 'e3u_0'  , pe3u  ) 
    230       CALL iom_get( inum, jpdom_data, 'e3v_0'  , pe3v  ) 
    231       CALL iom_get( inum, jpdom_data, 'e3f_0'  , pe3f  ) 
    232       CALL iom_get( inum, jpdom_data, 'e3w_0'  , pe3w  ) 
    233       CALL iom_get( inum, jpdom_data, 'e3uw_0' , pe3uw ) 
    234       CALL iom_get( inum, jpdom_data, 'e3vw_0' , pe3vw ) 
    235  
     222      IF(  iom_varid( inum, 'gdept_1d', ldstop = .FALSE. ) > 0  .AND.  & 
     223         & iom_varid( inum, 'gdepw_1d', ldstop = .FALSE. ) > 0    ) THEN 
     224         CALL ctl_warn( 'zgr_read : old definition of 1d depths and scale factors used ', &  
     225            &                      'depths at t- and w-points read in domain_cfg file') 
     226         CALL iom_get( inum, jpdom_unknown, 'gdept_1d', pdept_1d )    
     227         CALL iom_get( inum, jpdom_unknown, 'gdepw_1d', pdepw_1d ) 
     228      ELSE  
     229         CALL e3_to_depth( pe3t_1d, pe3w_1d, pdept_1d, pdepw_1d ) 
     230         IF(lwp) THEN                        ! control print 
     231            WRITE(numout,*) 
     232            WRITE(numout,*) '              Reference 1D z-coordinate depth and scale factors:' 
     233            WRITE(numout, "(9x,' level  gdept_1d  gdepw_1d  e3t_1d   e3w_1d  ')" ) 
     234            WRITE(numout, "(10x, i4, 4f9.2)" ) ( jk, pdept_1d(jk), pdepw_1d(jk), pe3t_1d(jk), pe3w_1d(jk), jk = 1, jpk ) 
     235         ENDIF 
     236      ENDIF 
     237      ! 
     238      !                                   ! 3D vertical scale factors 
     239      CALL iom_get( inum, jpdom_data, 'e3t_0'  , pe3t  , lrowattr=ln_use_jattr ) 
     240      CALL iom_get( inum, jpdom_data, 'e3u_0'  , pe3u  , lrowattr=ln_use_jattr ) 
     241      CALL iom_get( inum, jpdom_data, 'e3v_0'  , pe3v  , lrowattr=ln_use_jattr ) 
     242      CALL iom_get( inum, jpdom_data, 'e3f_0'  , pe3f  , lrowattr=ln_use_jattr ) 
     243      CALL iom_get( inum, jpdom_data, 'e3w_0'  , pe3w  , lrowattr=ln_use_jattr ) 
     244      CALL iom_get( inum, jpdom_data, 'e3uw_0' , pe3uw , lrowattr=ln_use_jattr ) 
     245      CALL iom_get( inum, jpdom_data, 'e3vw_0' , pe3vw , lrowattr=ln_use_jattr ) 
     246      ! 
     247      !                                   ! 3D depths 
     248      IF(  iom_varid( inum, 'gdept_0', ldstop = .FALSE. ) > 0  .AND.  & 
     249         & iom_varid( inum, 'gdepw_0', ldstop = .FALSE. ) > 0    ) THEN 
     250         CALL ctl_warn( 'zgr_read : old definition of depths and scale factors used ', &  
     251            &                      'depths at t- and w-points read in domain_cfg file') 
     252         CALL iom_get( inum, jpdom_data, 'gdept_0' , pdept , lrowattr=ln_use_jattr ) 
     253         CALL iom_get( inum, jpdom_data, 'gdepw_0' , pdepw , lrowattr=ln_use_jattr ) 
     254      ELSE 
     255         CALL e3_to_depth( pe3t, pe3w, pdept, pdepw ) 
     256      ENDIF 
     257      ! 
    236258      !                                   ! ocean top and bottom level 
    237       CALL iom_get( inum, jpdom_data, 'bottom_level' , z2d    )  ! nb of ocean T-points 
     259      CALL iom_get( inum, jpdom_data, 'bottom_level' , z2d  , lrowattr=ln_use_jattr )  ! nb of ocean T-points 
    238260      k_bot(:,:) = INT( z2d(:,:) ) 
    239       CALL iom_get( inum, jpdom_data, 'top_level'    , z2d    )   ! nb of ocean T-points (ISF) 
     261      CALL iom_get( inum, jpdom_data, 'top_level'    , z2d  , lrowattr=ln_use_jattr )   ! nb of ocean T-points (ISF) 
    240262      k_top(:,:) = INT( z2d(:,:) ) 
    241263      ! 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/USR/usrdef_zgr.F90

    r7164 r7188  
    1111 
    1212   !!---------------------------------------------------------------------- 
    13    !!   usr_def_zgr      : user defined vertical coordinate system 
    14    !!       zgr_z        : reference 1D z-coordinate  
    15    !!       zgr_top_bot  : ocean top and bottom level indices 
    16    !!       zgr_zco      : 3D verticl coordinate in pure z-coordinate case 
     13   !!   usr_def_zgr   : user defined vertical coordinate system 
     14   !!      zgr_z      : reference 1D z-coordinate  
     15   !!      zgr_top_bot: ocean top and bottom level indices 
     16   !!      zgr_zco    : 3D verticl coordinate in pure z-coordinate case 
    1717   !!--------------------------------------------------------------------- 
    18    USE oce               ! ocean variables 
    19    USE dom_oce           ! ocean domain 
     18   USE oce            ! ocean variables 
     19   USE dom_oce        ! ocean domain 
     20   USE depth_e3       ! depth <=> e3 
    2021   ! 
    21    USE in_out_manager    ! I/O manager 
    22    USE lbclnk            ! ocean lateral boundary conditions (or mpp link) 
    23    USE lib_mpp           ! distributed memory computing library 
    24    USE wrk_nemo          ! Memory allocation 
    25    USE timing            ! Timing 
     22   USE in_out_manager ! I/O manager 
     23   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
     24   USE lib_mpp        ! distributed memory computing library 
     25   USE wrk_nemo       ! Memory allocation 
     26   USE timing         ! Timing 
    2627 
    2728   IMPLICIT NONE 
     
    7273      ! type of vertical coordinate 
    7374      ! --------------------------- 
    74       ld_zco    = .TRUE.         ! GYRE case:  z-coordinate & no ocean cavities 
     75      ld_zco    = .TRUE.         ! GYRE case:  z-coordinate without ocean cavities 
    7576      ld_zps    = .FALSE. 
    7677      ld_sco    = .FALSE. 
     
    8081      ! Build the vertical coordinate system 
    8182      ! ------------------------------------ 
    82       CALL zgr_z  ( pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d )  ! Reference z-coordinate system 
    83       ! 
    84       CALL zgr_msk_top_bot( k_top , k_bot )                  ! masked top and bottom ocean t-level indices 
    85       ! 
    86       !                                                      ! z-coordinate (3D arrays) from the 1D z-coord. 
     83      CALL zgr_z( pdept_1d, pdepw_1d, pe3t_1d , pe3w_1d )   ! Reference z-coordinate system 
     84      ! 
     85      CALL zgr_msk_top_bot( k_top , k_bot )                 ! masked top and bottom ocean t-level indices 
     86      ! 
     87      !                                                     ! z-coordinate (3D arrays) from the 1D z-coord. 
    8788      CALL zgr_zco( pdept_1d, pdepw_1d, pe3t_1d, pe3w_1d,   &   ! in  : 1D reference vertical coordinate 
    8889         &          pdept   , pdepw   ,                     &   ! out : 3D t & w-points depth 
     
    100101      !!              vertical scale factors. 
    101102      !! 
    102       !! ** Method  :   z-coordinate system (use in all type of coordinate) 
    103       !!              The depth of model levels is defined from an analytical 
    104       !!              function the derivative of which gives the scale factors. 
    105       !!              both depth and scale factors only depend on k (1d arrays). 
    106       !!                 w-level: pdepw_1d  = pdep(k) 
    107       !!                          pe3w_1d(k) = dk(pdep)(k)     = e3(k) 
    108       !!                 t-level: pdept_1d  = pdep(k+0.5) 
    109       !!                          pe3t_1d(k) = dk(pdep)(k+0.5) = e3(k+0.5) 
    110       !! 
    111       !!      Here the Madec & Imbard (1996) function is used 
     103      !! ** Method  :   1D z-coordinate system (use in all type of coordinate) 
     104      !!       The depth of model levels is set from dep(k), an analytical function: 
     105      !!                   w-level: depw_1d  = dep(k) 
     106      !!                   t-level: dept_1d  = dep(k+0.5) 
     107      !!       The scale factors are the discrete derivative of the depth: 
     108      !!                   e3w_1d(jk) = dk[ dept_1d ]  
     109      !!                   e3t_1d(jk) = dk[ depw_1d ] 
     110      !!           with at top and bottom : 
     111      !!                   e3w_1d( 1 ) = 2 * ( dept_1d( 1 ) - depw_1d( 1 ) ) 
     112      !!                   e3t_1d(jpk) = 2 * ( dept_1d(jpk) - depw_1d(jpk) ) 
     113      !!       The depth are then re-computed from the sum of e3. This ensures  
     114      !!    that depths are identical when reading domain_cfg.nc file. Indeed, 
     115      !!    Only e3. are saved in this file, depth are compute by a call to  
     116      !!    the e3_to_depth subroutine. 
     117      !! 
     118      !!       Here the Madec & Imbard (1996) function is used. 
    112119      !! 
    113120      !! ** Action  : - pdept_1d, pdepw_1d : depth of T- and W-point (m) 
     
    156163         pdepw_1d(jk) = ( zsur + za0 * zw + za1 * zacr *  LOG( COSH( (zw-zkth) / zacr ) )  ) 
    157164         pdept_1d(jk) = ( zsur + za0 * zt + za1 * zacr *  LOG( COSH( (zt-zkth) / zacr ) )  ) 
    158          pe3w_1d (jk) =          za0      + za1        * TANH(       (zw-zkth) / zacr   ) 
    159          pe3t_1d (jk) =          za0      + za1        * TANH(       (zt-zkth) / zacr   ) 
    160165      END DO 
    161       pdepw_1d(1) = 0._wp                    ! force first w-level to be exactly at zero 
    162  
    163  
    164 !!gm   This should become the reference ! 
    165 !      IF ( ln_isfcav ) THEN 
    166 ! need to be like this to compute the pressure gradient with ISF. If not, level beneath the ISF are not aligned (sum(e3t) /= depth) 
    167 ! define pe3t_0 and pe3w_0 as the differences between pdept and pdepw respectively 
    168 !         DO jk = 1, jpkm1 
    169 !            pe3t_1d(jk) = pdepw_1d(jk+1)-pdepw_1d(jk)  
    170 !         END DO 
    171 !         pe3t_1d(jpk) = pe3t_1d(jpk-1)   ! we don't care because this level is masked in NEMO 
    172 ! 
    173 !         DO jk = 2, jpk 
    174 !            pe3w_1d(jk) = pdept_1d(jk) - pdept_1d(jk-1)  
    175 !         END DO 
    176 !         pe3w_1d(1  ) = 2._wp * (pdept_1d(1) - pdepw_1d(1))  
    177 !      END IF 
    178 !!gm end 
    179  
     166      ! 
     167      !                       ! e3t and e3w from depth 
     168      CALL depth_to_e3( pdept_1d, pdepw_1d, pe3t_1d, pe3w_1d )  
     169      ! 
     170      !                       ! recompute depths from SUM(e3)  <== needed 
     171      CALL e3_to_depth( pe3t_1d, pe3w_1d, pdept_1d, pdepw_1d )  
     172      ! 
    180173      IF(lwp) THEN                        ! control print 
    181174         WRITE(numout,*) 
     
    184177         WRITE(numout, "(10x, i4, 4f9.2)" ) ( jk, pdept_1d(jk), pdepw_1d(jk), pe3t_1d(jk), pe3w_1d(jk), jk = 1, jpk ) 
    185178      ENDIF 
    186       DO jk = 1, jpk                      ! control positivity 
    187          IF( pe3w_1d (jk) <= 0._wp .OR. pe3t_1d (jk) <= 0._wp )   CALL ctl_stop( 'dom:zgr_z: e3w_1d or e3t_1d =< 0 '    ) 
    188          IF( pdepw_1d(jk) <  0._wp .OR. pdept_1d(jk) <  0._wp )   CALL ctl_stop( 'dom:zgr_z: gdepw_1d or gdept_1d < 0 ' ) 
    189       END DO 
    190179      ! 
    191180      IF( nn_timing == 1 )  CALL timing_stop('zgr_z') 
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90

    r7110 r7188  
    239239      INTEGER  ::   ios, inum     !   -      - 
    240240      REAL(wp) ::   ziglo, zjglo, zkglo, zperio   ! local scalars 
    241       CHARACTER(len=120), DIMENSION(30) ::   cltxt, cltxt2, clnam, clbug 
    242       ! 
    243       NAMELIST/namctl/ ln_ctl  , nn_print, nn_ictls, nn_ictle,   & 
    244          &             nn_isplt, nn_jsplt, nn_jctls, nn_jctle,   & 
     241      CHARACTER(len=120), DIMENSION(30) ::   cltxt, cltxt2, clnam 
     242      ! 
     243      NAMELIST/namctl/ ln_ctl   , nn_print, nn_ictls, nn_ictle,   & 
     244         &             nn_isplt , nn_jsplt, nn_jctls, nn_jctle,   & 
    245245         &             nn_timing, nn_diacfl 
    246246      NAMELIST/namcfg/ ln_read_cfg, ln_write_cfg, cp_cfg, jp_cfg, ln_use_jattr 
     
    250250      cltxt2 = '' 
    251251      clnam  = ''   
    252       clbug  = '' 
    253252      cxios_context = 'nemo' 
    254253      ! 
     
    257256      CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. ) 
    258257      ! 
    259  
    260 !!gm      WRITE(clbug(1),*) ' before namelist / namctl read    nstop', nstop       
    261  
    262258      REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints 
    263259      READ  ( numnam_ref, namctl, IOSTAT = ios, ERR = 901 ) 
    264260901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in reference namelist', .TRUE. ) 
    265  
     261      ! 
    266262      REWIND( numnam_cfg )              ! Namelist namctl in confguration namelist : Control prints 
    267263      READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 ) 
    268264902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. ) 
    269  
    270  
    271 !!gm      WRITE(clbug(2),*) ' before namelist namcfg read    nstop', nstop       
    272  
    273265      ! 
    274266      REWIND( numnam_ref )              ! Namelist namcfg in reference namelist 
    275267      READ  ( numnam_ref, namcfg, IOSTAT = ios, ERR = 903 ) 
    276268903   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in reference namelist', .TRUE. ) 
    277  
     269      ! 
    278270      REWIND( numnam_cfg )              ! Namelist namcfg in confguration namelist 
    279271      READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 
    280272904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )    
    281273 
    282 !!gm      WRITE(clbug(3),*) ' after namelist namcfg read    nstop', nstop 
    283  
    284274      !                             !--------------------------! 
    285275      !                             !  Set global domain size  !   (control print return in cltxt2) 
    286276      !                             !--------------------------! 
    287       IF( ln_read_cfg ) THEN              ! Read sizes in configuration "mesh_mask" file 
     277      IF( ln_read_cfg ) THEN              ! Read sizes in configuration "domain_cfg" file 
    288278         CALL iom_open( 'domain_cfg', inum ) 
    289279         CALL iom_get( inum, 'jpiglo', ziglo  )   ;   jpiglo = INT( ziglo ) 
     
    292282         CALL iom_get( inum, 'jperio', zperio )   ;   jperio = INT( zperio ) 
    293283         CALL iom_close( inum ) 
    294          WRITE(cltxt2(1),*) '~~~~~~~~~~   '       
    295          WRITE(cltxt2(2),*) 'domain_cfg : domain size read in "domain_cfg" file : jp(i,j,k)glo = ' 
    296          WRITE(cltxt2(3),*) '            ', jpiglo, jpjglo, jpkglo         
    297          WRITE(cltxt2(1),*) '~~~~~~~~~~   lateral boudary type of the global domain jperio= ', jperio 
     284         WRITE(cltxt2(1),*) ' '       
     285         WRITE(cltxt2(2),*) 'domain_cfg : domain size read in "domain_cfg" file '          
     286         WRITE(cltxt2(3),*) '~~~~~~~~~~    ' 
     287         WRITE(cltxt2(4),*) '   jpiglo = ', jpiglo, ' jpjglo = ', jpjglo,  ' jpkglo = ', jpkglo 
     288         WRITE(cltxt2(5),*) '   global domain type of lateral boundary   jperio = ', jperio 
    298289         !         
    299290      ELSE                                ! user-defined namelist 
     
    404395         ! 
    405396 
    406          DO ji = 1, SIZE(clbug) 
    407             IF( TRIM(clbug (ji)) /= '' )   WRITE(numout,*) clbug(ji)      ! bug print  
    408          END DO 
    409          WRITE(numout,*) 
    410  
    411  
    412  
    413397 
    414398         WRITE(numout,*) 
     
    425409         WRITE(numout,*) 
    426410         DO ji = 1, SIZE(cltxt2) 
    427 !            IF( TRIM(cltxt2(ji)) /= '' )   WRITE(numout,*) cltxt2(ji)     ! control print of domain size 
    428411            IF( cltxt2(ji) /= '' )   WRITE(numout,*) cltxt2(ji)     ! control print of domain size 
    429412         END DO 
Note: See TracChangeset for help on using the changeset viewer.