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

Changeset 2463


Ignore:
Timestamp:
2010-12-08T12:28:00+01:00 (13 years ago)
Author:
gm
Message:

v3.3beta: #766 & #671 share the deepest ocean level indices: bug correction in domzgr.F90

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r2460 r2463  
    1818 
    1919   !!---------------------------------------------------------------------- 
    20    !!   dom_zgr         : defined the ocean vertical coordinate system 
    21    !!       zgr_bat     : bathymetry fields (levels and meters) 
    22    !!       zgr_bat_zoom: modify the bathymetry field if zoom domain 
    23    !!       zgr_bat_ctl : check the bathymetry files 
    24    !!       zgr_z       : reference z-coordinate  
    25    !!       zgr_zco     : z-coordinate  
    26    !!       zgr_zps     : z-coordinate with partial steps 
    27    !!       zgr_sco     : s-coordinate 
    28    !!       fssig       : sigma coordinate non-dimensional function 
    29    !!       dfssig      : derivative of the sigma coordinate function    !!gm  (currently missing!) 
     20   !!   dom_zgr          : defined the ocean vertical coordinate system 
     21   !!       zgr_bat      : bathymetry fields (levels and meters) 
     22   !!       zgr_bat_zoom : modify the bathymetry field if zoom domain 
     23   !!       zgr_bat_ctl  : check the bathymetry files 
     24   !!       zgr_bot_level: deepest ocean level for t-, u, and v-points 
     25   !!       zgr_z        : reference z-coordinate  
     26   !!       zgr_zco      : z-coordinate  
     27   !!       zgr_zps      : z-coordinate with partial steps 
     28   !!       zgr_sco      : s-coordinate 
     29   !!       fssig        : sigma coordinate non-dimensional function 
     30   !!       dfssig       : derivative of the sigma coordinate function    !!gm  (currently missing!) 
    3031   !!--------------------------------------------------------------------- 
    31    USE oce              ! ocean variables 
    32    USE dom_oce          ! ocean domain 
    33    USE closea           ! closed seas 
    34    USE c1d              ! 1D vertical configuration 
    35    USE in_out_manager   ! I/O manager 
    36    USE iom              ! I/O library 
    37    USE lbclnk           ! ocean lateral boundary conditions (or mpp link) 
    38    USE lib_mpp          ! distributed memory computing library 
     32   USE oce               ! ocean variables 
     33   USE dom_oce           ! ocean domain 
     34   USE closea            ! closed seas 
     35   USE c1d               ! 1D vertical configuration 
     36   USE in_out_manager    ! I/O manager 
     37   USE iom               ! I/O library 
     38   USE lbclnk            ! ocean lateral boundary conditions (or mpp link) 
     39   USE lib_mpp           ! distributed memory computing library 
    3940 
    4041   IMPLICIT NONE 
    4142   PRIVATE 
    4243 
    43    PUBLIC   dom_zgr     ! called by dom_init.F90 
     44   PUBLIC   dom_zgr      ! called by dom_init.F90 
    4445 
    4546   !                                       !!* Namelist namzgr_sco * 
     
    104105      IF( ln_sco ) ioptio = ioptio + 1 
    105106      IF( ioptio /= 1 )   CALL ctl_stop( ' none or several vertical coordinate options used' ) 
    106  
     107      ! 
    107108      ! Build the vertical coordinate system 
    108109      ! ------------------------------------ 
    109                      CALL zgr_z        ! Reference z-coordinate system (always called) 
    110                      CALL zgr_bat      ! Bathymetry fields (levels and meters) 
    111       IF( ln_zco )   CALL zgr_zco      ! z-coordinate 
    112       IF( ln_zps )   CALL zgr_zps      ! Partial step z-coordinate 
    113       IF( ln_sco )   CALL zgr_sco      ! s-coordinate or hybrid z-s coordinate 
    114  
     110                          CALL zgr_z            ! Reference z-coordinate system (always called) 
     111                          CALL zgr_bat          ! Bathymetry fields (levels and meters) 
     112      IF( ln_zco      )   CALL zgr_zco          ! z-coordinate 
     113      IF( ln_zps      )   CALL zgr_zps          ! Partial step z-coordinate 
     114      IF( ln_sco      )   CALL zgr_sco          ! s-coordinate or hybrid z-s coordinate 
     115      ! 
     116      ! final adjustment of mbathy & check  
     117      ! ----------------------------------- 
     118      IF( lzoom       )   CALL zgr_bat_zoom     ! correct mbathy in case of zoom subdomain 
     119      IF( .NOT.lk_c1d )   CALL zgr_bat_ctl      ! check bathymetry (mbathy) and suppress isoated ocean points 
     120                          CALL zgr_bot_level    ! deepest ocean level for t-, u- and v-points 
     121      ! 
     122      ! 
    115123      IF( nprint == 1 .AND. lwp )   THEN 
    116124         WRITE(numout,*) ' MIN val mbathy ', MINVAL( mbathy(:,:) ), ' MAX ', MAXVAL( mbathy(:,:) ) 
     
    488496         END DO 
    489497      ENDIF 
    490       !                                               ! =============== ! 
    491       IF( lzoom       )   CALL zgr_bat_zoom           !   Zoom domain   ! 
    492       !                                               ! =============== ! 
    493       ! 
    494       !                                               ! =================== ! 
    495       IF( .NOT.lk_c1d )   CALL zgr_bat_ctl            !   Bathymetry check  ! 
    496       !                                               ! =================== ! 
    497       ! 
    498       !                                               ! ========================= ! 
    499                           CALL zgr_bot_level          !   level of ocean bottom   ! 
    500       !                                               ! ========================= ! 
     498      ! 
    501499   END SUBROUTINE zgr_bat 
    502500 
     
    747745   END SUBROUTINE zgr_zco 
    748746 
    749    !!---------------------------------------------------------------------- 
    750    !!   Default option :                      zco, zps and/or sco available (gedp & e3 are 3D arrays) 
    751    !!---------------------------------------------------------------------- 
    752747 
    753748   SUBROUTINE zgr_zps 
     
    989984         gdep3w(:,:,jk) = gdep3w(:,:,jk-1) + e3w(:,:,jk)  
    990985      END DO 
    991            
     986         
    992987      !                                               ! ================= ! 
    993988      IF(lwp .AND. ll_print) THEN                     !   Control print   ! 
     
    10181013      ENDIF   
    10191014      ! 
    1020       !                                               ! =============== ! 
    1021       IF( lzoom )   CALL zgr_bat_zoom                 !   Zoom domain   ! 
    1022       !                                               ! =============== ! 
    1023       ! 
    1024       !                                               ! =================== ! 
    1025       IF( .NOT. lk_c1d )    CALL zgr_bat_ctl          !   Bathymetry check  ! 
    1026       !                                               ! =================== ! 
    10271015   END SUBROUTINE zgr_zps 
    10281016 
     
    15011489         &                                                       ' MAX ', MAXVAL( mbathy(:,:) ) 
    15021490 
    1503  
    1504       !                                               ! =========== 
    1505       IF( lzoom )   CALL zgr_bat_zoom                 ! Zoom domain  
    1506       !                                               ! =========== 
    1507       ! 
    1508       !                                               ! =================== ! 
    1509       IF( .NOT. lk_c1d )    CALL zgr_bat_ctl          !   Bathymetry check  ! 
    1510       !                                               ! =================== ! 
    1511       ! 
    15121491      !                                               ! ============= 
    15131492      IF(lwp) THEN                                    ! Control print 
Note: See TracChangeset for help on using the changeset viewer.