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 6004 for branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM – NEMO

Ignore:
Timestamp:
2015-12-04T17:05:58+01:00 (9 years ago)
Author:
gm
Message:

#1613: vvl by default, step III: Merge with the trunk (free surface simplification) (see wiki)

Location:
branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90

    r5563 r6004  
    2626   !! 
    2727   !!---------------------------------------------------------------------- 
    28    USE dom_oce         ! ocean space and time domain 
    29    USE phycst          ! physical constants 
    30    USE in_out_manager  ! I/O manager 
    31    USE iom             ! 
    32    USE ioipsl, ONLY :   ymds2ju   ! for calendar 
    33    USE prtctl          ! Print control 
    34    USE trc_oce, ONLY : lk_offline ! offline flag 
    35    USE timing          ! Timing 
    36    USE restart         ! restart 
     28   USE dom_oce        ! ocean space and time domain 
     29   USE phycst         ! physical constants 
     30   USE in_out_manager ! I/O manager 
     31   USE iom            ! 
     32   USE ioipsl  , ONLY :   ymds2ju   ! for calendar 
     33   USE prtctl         ! Print control 
     34   USE trc_oce , ONLY : lk_offline ! offline flag 
     35   USE timing         ! Timing 
     36   USE restart        ! restart 
    3737 
    3838   IMPLICIT NONE 
     
    4343   PUBLIC   day_mth    ! Needed by TAM 
    4444 
    45    INTEGER, PUBLIC ::   nsecd, nsecd05, ndt, ndt05 ! (PUBLIC for TAM) 
     45   INTEGER, PUBLIC ::   nsecd, nsecd05, ndt, ndt05   !: (PUBLIC for TAM) 
    4646 
    4747   !!---------------------------------------------------------------------- 
  • branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/dom_oce.F90

    r5866 r6004  
    4646   LOGICAL , PUBLIC ::   ln_crs          !: Apply grid coarsening to dynamical model output or online passive tracers 
    4747 
     48   !! Free surface parameters 
     49   !! ======================= 
     50   LOGICAL , PUBLIC :: ln_dynspg_exp     !: Explicit free surface flag 
     51   LOGICAL , PUBLIC :: ln_dynspg_ts      !: Split-Explicit free surface flag 
     52 
    4853   !! Time splitting parameters 
    4954   !! ========================= 
    5055   LOGICAL,  PUBLIC :: ln_bt_fw          !: Forward integration of barotropic sub-stepping 
    5156   LOGICAL,  PUBLIC :: ln_bt_av          !: Time averaging of barotropic variables 
    52    LOGICAL,  PUBLIC :: ln_bt_nn_auto     !: Set number of barotropic iterations automatically 
     57   LOGICAL,  PUBLIC :: ln_bt_auto        !: Set number of barotropic iterations automatically 
    5358   INTEGER,  PUBLIC :: nn_bt_flt         !: Filter choice 
    5459   INTEGER,  PUBLIC :: nn_baro           !: Number of barotropic iterations during one baroclinic step (rdt) 
    55    REAL(wp), PUBLIC :: rn_bt_cmax        !: Maximum allowed courant number (used if ln_bt_nn_auto=T) 
     60   REAL(wp), PUBLIC :: rn_bt_cmax        !: Maximum allowed courant number (used if ln_bt_auto=T) 
    5661 
    5762   !! Horizontal grid parameters for domhgr 
    5863   !! ===================================== 
    59    INTEGER       ::   jphgr_msh        !: type of horizontal mesh 
     64   INTEGER       ::   jphgr_msh          !: type of horizontal mesh 
    6065   !                                       !  = 0 curvilinear coordinate on the sphere read in coordinate.nc 
    6166   !                                       !  = 1 geographical mesh on the sphere with regular grid-spacing 
     
    6469   !                                       !  = 4 Mercator grid with T/U point at the equator 
    6570 
    66    REAL(wp)      ::   ppglam0              !: longitude of first raw and column T-point (jphgr_msh = 1) 
    67    REAL(wp)      ::   ppgphi0              !: latitude  of first raw and column T-point (jphgr_msh = 1) 
     71   REAL(wp)      ::   ppglam0            !: longitude of first raw and column T-point (jphgr_msh = 1) 
     72   REAL(wp)      ::   ppgphi0            !: latitude  of first raw and column T-point (jphgr_msh = 1) 
    6873   !                                                        !  used for Coriolis & Beta parameters (jphgr_msh = 2 or 3) 
    69    REAL(wp)      ::   ppe1_deg             !: zonal      grid-spacing (degrees) 
    70    REAL(wp)      ::   ppe2_deg             !: meridional grid-spacing (degrees) 
    71    REAL(wp)      ::   ppe1_m               !: zonal      grid-spacing (degrees) 
    72    REAL(wp)      ::   ppe2_m               !: meridional grid-spacing (degrees) 
     74   REAL(wp)      ::   ppe1_deg           !: zonal      grid-spacing (degrees) 
     75   REAL(wp)      ::   ppe2_deg           !: meridional grid-spacing (degrees) 
     76   REAL(wp)      ::   ppe1_m             !: zonal      grid-spacing (degrees) 
     77   REAL(wp)      ::   ppe2_m             !: meridional grid-spacing (degrees) 
    7378 
    7479   !! Vertical grid parameter for domzgr 
    7580   !! ================================== 
    76    REAL(wp)      ::   ppsur                !: ORCA r4, r2 and r05 coefficients 
    77    REAL(wp)      ::   ppa0                 !: (default coefficients) 
    78    REAL(wp)      ::   ppa1                 !: 
    79    REAL(wp)      ::   ppkth                !: 
    80    REAL(wp)      ::   ppacr                !: 
     81   REAL(wp)      ::   ppsur              !: ORCA r4, r2 and r05 coefficients 
     82   REAL(wp)      ::   ppa0               !: (default coefficients) 
     83   REAL(wp)      ::   ppa1               !: 
     84   REAL(wp)      ::   ppkth              !: 
     85   REAL(wp)      ::   ppacr              !: 
    8186   ! 
    8287   !  If both ppa0 ppa1 and ppsur are specified to 0, then 
    8388   !  they are computed from ppdzmin, pphmax , ppkth, ppacr in dom_zgr 
    84    REAL(wp)      ::   ppdzmin              !: Minimum vertical spacing 
    85    REAL(wp)      ::   pphmax               !: Maximum depth 
     89   REAL(wp)      ::   ppdzmin            !: Minimum vertical spacing 
     90   REAL(wp)      ::   pphmax             !: Maximum depth 
    8691   ! 
    87    LOGICAL       ::   ldbletanh            !: Use/do not use double tanf function for vertical coordinates 
    88    REAL(wp)      ::   ppa2                 !: Double tanh function parameters 
    89    REAL(wp)      ::   ppkth2               !: 
    90    REAL(wp)      ::   ppacr2               !: 
     92   LOGICAL       ::   ldbletanh          !: Use/do not use double tanf function for vertical coordinates 
     93   REAL(wp)      ::   ppa2               !: Double tanh function parameters 
     94   REAL(wp)      ::   ppkth2             !: 
     95   REAL(wp)      ::   ppacr2             !: 
    9196 
    9297   !                                    !! old non-DOCTOR names still used in the model 
     
    102107   REAL(wp), PUBLIC ::   rdth            !: depth variation of tracer step 
    103108 
    104    !                                                  !!! associated variables 
    105    INTEGER , PUBLIC                 ::   neuler        !: restart euler forward option (0=Euler) 
    106    REAL(wp), PUBLIC                 ::   atfp1         !: asselin time filter coeff. (atfp1= 1-2*atfp) 
     109   !                                   !!! associated variables 
     110   INTEGER , PUBLIC ::   neuler          !: restart euler forward option (0=Euler) 
     111   REAL(wp), PUBLIC ::   atfp1           !: asselin time filter coeff. (atfp1= 1-2*atfp) 
     112    
    107113   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   rdttra  !: vertical profile of tracer time step 
    108114   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) ::   r2dtra  !: = 2*rdttra except at nit000 (=rdttra) if neuler=0 
     
    211217   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   e3tp    , e3wp     !: ocean bottom level thickness at T and W points 
    212218 
     219!!gm  This should be removed from here....  ==>>> only used in domzgr at initialization phase 
    213220   !! s-coordinate and hybrid z-s-coordinate 
    214221   !! =----------------======--------------- 
     
    224231   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   hift  , hifu       !: and quasi-uniform spacing             t--u points (m) 
    225232   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   rx1                !: Maximum grid stiffness ratio 
     233!!gm end 
    226234 
    227235   !!---------------------------------------------------------------------- 
     
    229237   !! --------------------------------------------------------------------- 
    230238   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mbathy             !: number of ocean level (=0, 1, ... , jpk-1) 
    231    INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mbkt               !: vertical index of the bottom last T- ocean level 
    232    INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mbku, mbkv         !: vertical index of the bottom last U- and W- ocean level 
    233    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   bathy                              !: ocean depth (meters) 
     239   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mbkt, mbku, mbkv   !: vertical index of the bottom last T-, U- & V ocean level 
     240   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   bathy              !: ocean depth (meters) 
    234241   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tmask_i, umask_i, vmask_i, fmask_i !: interior domain T-point mask 
    235    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   bmask                              !: land/ocean mask of barotropic stream function 
    236242 
    237243   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   misfdep                 !: top first ocean level                (ISF) 
     
    364370      ALLOCATE( mbathy(jpi,jpj) , bathy(jpi,jpj) ,                                      & 
    365371         &     tmask_i(jpi,jpj) , umask_i(jpi,jpj), vmask_i(jpi,jpj), fmask_i(jpi,jpj), & 
    366          &     bmask  (jpi,jpj) ,                                                       & 
    367372         &     mbkt   (jpi,jpj) , mbku (jpi,jpj) , mbkv(jpi,jpj) , STAT=ierr(9) ) 
    368373 
  • branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90

    r5883 r6004  
    1313   !!            3.3  !  2010-11  (G. Madec)  initialisation in C1D configuration 
    1414   !!            3.6  !  2013     ( J. Simeon, C. Calone, G. Madec, C. Ethe ) Online coarsening of outputs 
    15    !!             -   ! 2015-11  (G. Madec, A. Coward)  time varying zgr by default 
     15   !!            3.7  ! 2015-11  (G. Madec, A. Coward)  time varying zgr by default 
    1616   !!---------------------------------------------------------------------- 
    1717    
     
    7070      !!              - 1D configuration, move Coriolis, u and v at T-point 
    7171      !!---------------------------------------------------------------------- 
    72       INTEGER ::   jk          ! dummy loop argument 
     72      INTEGER ::   jk          ! dummy loop indices 
    7373      INTEGER ::   iconf = 0   ! local integers 
    74       REAL(wp), POINTER, DIMENSION(:,:)   ::  z1_hu_0, z1_hv_0 
     74      REAL(wp), POINTER, DIMENSION(:,:) ::   z1_hu_0, z1_hv_0 
    7575      !!---------------------------------------------------------------------- 
    7676      ! 
     
    427427      INTEGER  ::   ji, jj, jk  
    428428      REAL(wp) ::   zrxmax 
    429       REAL(wp), DIMENSION(4) :: zr1 
     429      REAL(wp), DIMENSION(4) ::   zr1 
    430430      !!---------------------------------------------------------------------- 
    431431      rx1(:,:) = 0._wp 
     
    444444                    &       / ( gdepw_0(ji+1,jj,jk  )+gdepw_0(ji  ,jj,jk  )               & 
    445445                    &          -gdepw_0(ji+1,jj,jk+1)-gdepw_0(ji  ,jj,jk+1) + rsmall )  ) * umask(ji  ,jj,jk) 
    446                zr1(3) =ABS(  ( gdepw_0(ji,jj+1,jk  )-gdepw_0(ji,jj  ,jk  )               & 
     446               zr1(3) = ABS(  ( gdepw_0(ji,jj+1,jk  )-gdepw_0(ji,jj  ,jk  )               & 
    447447                    &          +gdepw_0(ji,jj+1,jk+1)-gdepw_0(ji,jj  ,jk+1) )             & 
    448448                    &       / ( gdepw_0(ji,jj+1,jk  )+gdepw_0(ji,jj  ,jk  )               & 
  • branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domhgr.F90

    r5845 r6004  
    391391         ! 
    392392#if defined key_agrif 
    393          IF ( cp_cfg == 'eel' .AND. jp_cfg == 6 ) THEN    ! for EEL6 configuration only 
    394             IF( .NOT. Agrif_Root() ) THEN 
    395               zphi0 = ppgphi0 - REAL( Agrif_Parent(jpjglo)/2 )*Agrif_Parent(ppe2_m)   & 
    396                &              / (ra * rad)         ! CAUTIOn : split in 2 lignes for AGRIF 
     393         IF( cp_cfg == 'eel' .AND. jp_cfg == 6 ) THEN       ! for EEL6 configuration only 
     394            IF( .NOT.Agrif_Root() ) THEN 
     395              zphi0 = ppgphi0 - REAL( Agrif_Parent(jpjglo)/2)*Agrif_Parent(ppe2_m) / (ra * rad) 
    397396            ENDIF 
    398397         ENDIF 
  • branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90

    r5845 r6004  
    77   !!            6.0  ! 1993-03  (M. Guyon)  symetrical conditions (M. Guyon) 
    88   !!            7.0  ! 1996-01  (G. Madec)  suppression of common work arrays 
    9    !!             -   ! 1996-05  (G. Madec)  mask computed from tmask and sup- 
    10    !!                 !                      pression of the double computation of bmask 
     9   !!             -   ! 1996-05  (G. Madec)  mask computed from tmask 
    1110   !!            8.0  ! 1997-02  (G. Madec)  mesh information put in domhgr.F 
    1211   !!            8.1  ! 1997-07  (G. Madec)  modification of mbathy and fmask 
     
    2524   USE oce             ! ocean dynamics and tracers 
    2625   USE dom_oce         ! ocean space and time domain 
     26   ! 
    2727   USE in_out_manager  ! I/O manager 
    2828   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    29    USE lib_mpp 
    30    USE dynspg_oce      ! choice/control of key cpp for surface pressure gradient 
     29   USE lib_mpp         ! 
    3130   USE wrk_nemo        ! Memory allocation 
    3231   USE timing          ! Timing 
     
    3534   PRIVATE 
    3635 
    37    PUBLIC   dom_msk         ! routine called by inidom.F90 
     36   PUBLIC   dom_msk    ! routine called by inidom.F90 
    3837 
    3938   !                            !!* Namelist namlbc : lateral boundary condition * 
     
    9089      !! 
    9190      !!      N.B. If nperio not equal to 0, the land/ocean mask arrays 
    92       !!      are defined with the proper value at lateral domain boundaries, 
    93       !!      but bmask. indeed, bmask defined the domain over which the 
    94       !!      barotropic stream function is computed. this domain cannot 
    95       !!      contain identical columns because the matrix associated with 
    96       !!      the barotropic stream function equation is then no more inverti- 
    97       !!      ble. therefore bmask is set to 0 along lateral domain boundaries 
    98       !!      even IF nperio is not zero. 
     91      !!      are defined with the proper value at lateral domain boundaries. 
    9992      !! 
    10093      !!      In case of open boundaries (lk_bdy=T): 
    10194      !!        - tmask is set to 1 on the points to be computed bay the open 
    10295      !!          boundaries routines. 
    103       !!        - bmask is  set to 0 on the open boundaries. 
    10496      !! 
    10597      !! ** Action :   tmask    : land/ocean mask at t-point (=0. or 1.) 
     
    108100      !!               fmask    : land/ocean mask at f-point (=0. or 1.) 
    109101      !!                          =rn_shlat along lateral boundaries 
    110       !!               bmask    : land/ocean mask at barotropic stream 
    111       !!                          function point (=0. or 1.) and set to 0 along lateral boundaries 
    112102      !!               tmask_i  : interior ocean mask 
    113103      !!---------------------------------------------------------------------- 
     
    255245      END DO 
    256246 
    257       ! 4. ocean/land mask for the elliptic equation 
    258       ! -------------------------------------------- 
    259       bmask(:,:) = ssmask(:,:)       ! elliptic equation is written at t-point 
    260       ! 
    261       !                               ! Boundary conditions 
    262       !                                    ! cyclic east-west : bmask must be set to 0. on rows 1 and jpi 
    263       IF( nperio == 1 .OR. nperio == 4 .OR. nperio == 6 ) THEN 
    264          bmask( 1 ,:) = 0._wp 
    265          bmask(jpi,:) = 0._wp 
    266       ENDIF 
    267       IF( nperio == 2 ) THEN               ! south symmetric :  bmask must be set to 0. on row 1 
    268          bmask(:, 1 ) = 0._wp 
    269       ENDIF 
    270       !                                    ! north fold :  
    271       IF( nperio == 3 .OR. nperio == 4 ) THEN   ! T-pt pivot : bmask set to 0. on row jpj and on half jpjglo-1 row 
    272          DO ji = 1, jpi                       
    273             ii = ji + nimpp - 1 
    274             bmask(ji,jpj-1) = bmask(ji,jpj-1) * tpol(ii) 
    275             bmask(ji,jpj  ) = 0._wp 
    276          END DO 
    277       ENDIF 
    278       IF( nperio == 5 .OR. nperio == 6 ) THEN   ! F-pt pivot and T-pt elliptic eq. : bmask set to 0. on row jpj 
    279          bmask(:,jpj) = 0._wp 
    280       ENDIF 
    281       ! 
    282       IF( lk_mpp ) THEN                    ! mpp specificities 
    283          !                                      ! bmask is set to zero on the overlap region 
    284          IF( nbondi /= -1 .AND. nbondi /= 2 )   bmask(  1 :jpreci,:) = 0._wp 
    285          IF( nbondi /=  1 .AND. nbondi /= 2 )   bmask(nlci:jpi   ,:) = 0._wp 
    286          IF( nbondj /= -1 .AND. nbondj /= 2 )   bmask(:,  1 :jprecj) = 0._wp 
    287          IF( nbondj /=  1 .AND. nbondj /= 2 )   bmask(:,nlcj:jpj   ) = 0._wp 
    288          ! 
    289          IF( npolj == 3 .OR. npolj == 4 ) THEN  ! north fold : bmask must be set to 0. on rows jpj-1 and jpj 
    290             DO ji = 1, nlci 
    291                ii = ji + nimpp - 1 
    292                bmask(ji,nlcj-1) = bmask(ji,nlcj-1) * tpol(ii) 
    293                bmask(ji,nlcj  ) = 0._wp 
    294             END DO 
    295          ENDIF 
    296          IF( npolj == 5 .OR. npolj == 6 ) THEN  ! F-pt pivot and T-pt elliptic eq. : bmask set to 0. on row jpj 
    297             DO ji = 1, nlci 
    298                bmask(ji,nlcj  ) = 0._wp 
    299             END DO 
    300          ENDIF 
    301       ENDIF 
    302  
    303247      ! Lateral boundary conditions on velocity (modify fmask) 
    304248      ! ---------------------------------------      
  • branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90

    r5883 r6004  
    6464#  include "vectopt_loop_substitute.h90" 
    6565   !!---------------------------------------------------------------------- 
    66    !! NEMO/OPA 3.3 , NEMO-Consortium (2010)  
     66   !! NEMO/OPA 3.7 , NEMO-Consortium (2015)  
    6767   !! $Id$ 
    6868   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    120120      !!---------------------------------------------------------------------- 
    121121      ! 
    122       IF( nn_timing == 1 )  CALL timing_start('dom_vvl_init') 
     122      IF( nn_timing == 1 )   CALL timing_start('dom_vvl_init') 
    123123      ! 
    124124      IF(lwp) WRITE(numout,*) 
     
    270270      INTEGER, INTENT( in ), OPTIONAL ::   kcall   ! optional argument indicating call sequence 
    271271      ! 
    272       INTEGER                                :: ji, jj, jk            ! dummy loop indices 
    273       INTEGER , DIMENSION(3)                 :: ijk_max, ijk_min      ! temporary integers 
    274       REAL(wp)                               :: z2dt                  ! temporary scalars 
    275       REAL(wp)                               :: z_tmin, z_tmax        ! temporary scalars 
    276       LOGICAL                                :: ll_do_bclinic         ! temporary logical 
    277       REAL(wp), POINTER, DIMENSION(:,:,:) :: ze3t 
    278       REAL(wp), POINTER, DIMENSION(:,:  ) :: zht, z_scale, zwu, zwv, zhdiv 
     272      INTEGER                ::   ji, jj, jk            ! dummy loop indices 
     273      INTEGER , DIMENSION(3) ::   ijk_max, ijk_min      ! temporary integers 
     274      REAL(wp)               ::   z2dt, z_tmin, z_tmax  ! local scalars 
     275      LOGICAL                ::   ll_do_bclinic         ! local logical 
     276      REAL(wp), POINTER, DIMENSION(:,:,:) ::   ze3t 
     277      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zht, z_scale, zwu, zwv, zhdiv 
    279278      !!---------------------------------------------------------------------- 
    280279      ! 
    281280      IF( ln_linssh )   RETURN      ! No calculation in linear free surface 
    282281      ! 
    283       IF( nn_timing == 1 )  CALL timing_start('dom_vvl_sf_nxt') 
     282      IF( nn_timing == 1 )   CALL timing_start('dom_vvl_sf_nxt') 
    284283      ! 
    285284      CALL wrk_alloc( jpi,jpj,zht,   z_scale, zwu, zwv, zhdiv ) 
    286285      CALL wrk_alloc( jpi,jpj,jpk,   ze3t ) 
    287286 
    288       IF(kt == nit000)  THEN 
     287      IF( kt == nit000 ) THEN 
    289288         IF(lwp) WRITE(numout,*) 
    290289         IF(lwp) WRITE(numout,*) 'dom_vvl_sf_nxt : compute after scale factors' 
     
    312311      IF( ln_vvl_ztilde .OR. ln_vvl_layer .AND. ll_do_bclinic ) THEN   ! z_tilde or layer coordinate ! 
    313312         !                                                            ! ------baroclinic part------ ! 
    314  
    315313         ! I - initialization 
    316314         ! ================== 
     
    638636               zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk)) 
    639637               gdepw_n(ji,jj,jk) = gdepw_n(ji,jj,jk-1) + e3t_n(ji,jj,jk-1) 
    640                gdept_n(ji,jj,jk) =      zcoef  * ( gdepw_n(ji,jj,jk  ) + 0.5 * e3w_n(ji,jj,jk))  & 
    641                    &               + (1-zcoef) * ( gdept_n(ji,jj,jk-1) +       e3w_n(ji,jj,jk))  
     638               gdept_n(ji,jj,jk) =    zcoef  * ( gdepw_n(ji,jj,jk  ) + 0.5 * e3w_n(ji,jj,jk) )  & 
     639                   &             + (1-zcoef) * ( gdept_n(ji,jj,jk-1) +       e3w_n(ji,jj,jk) )  
    642640               gde3w_n(ji,jj,jk) = gdept_n(ji,jj,jk) - sshn(ji,jj) 
    643641            END DO 
  • branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90

    r5866 r6004  
    158158      ! 
    159159      IF( nprint == 1 .AND. lwp )   THEN 
    160          WRITE(numout,*) ' MIN val mbathy ', MINVAL( mbathy(:,:) ), ' MAX ', MAXVAL( mbathy(:,:) ) 
     160         WRITE(numout,*) ' MIN val mbathy  ', MINVAL( mbathy(:,:) ), ' MAX ', MAXVAL( mbathy(:,:) ) 
    161161         WRITE(numout,*) ' MIN val depth t ', MINVAL( gdept_0(:,:,:) ),   & 
    162             &                   ' w ',  MINVAL( gdepw_0(:,:,:) ), '3w ', MINVAL( gde3w_0(:,:,:) ) 
    163          WRITE(numout,*) ' MIN val e3    t ', MINVAL( e3t_0(:,:,:) ), ' f ', MINVAL( e3f_0(:,:,:) ),  & 
    164             &                   ' u ',   MINVAL( e3u_0(:,:,:) ), ' u ', MINVAL( e3v_0(:,:,:) ),  & 
    165             &                   ' uw',   MINVAL( e3uw_0(:,:,:)), ' vw', MINVAL( e3vw_0(:,:,:)),   & 
    166             &                   ' w ',   MINVAL( e3w_0(:,:,:) ) 
     162            &                          ' w ', MINVAL( gdepw_0(:,:,:) ), '3w ', MINVAL( gde3w_0(:,:,:) ) 
     163         WRITE(numout,*) ' MIN val e3    t ', MINVAL(   e3t_0(:,:,:) ), ' f ', MINVAL(  e3f_0(:,:,:) ),  & 
     164            &                          ' u ', MINVAL(   e3u_0(:,:,:) ), ' u ', MINVAL(  e3v_0(:,:,:) ),  & 
     165            &                          ' uw', MINVAL(  e3uw_0(:,:,:) ), ' vw', MINVAL( e3vw_0(:,:,:)),   & 
     166            &                          ' w ', MINVAL(  e3w_0(:,:,:) ) 
    167167 
    168168         WRITE(numout,*) ' MAX val depth t ', MAXVAL( gdept_0(:,:,:) ),   & 
    169             &                   ' w ',  MAXVAL( gdepw_0(:,:,:) ), '3w ', MAXVAL( gde3w_0(:,:,:) ) 
    170          WRITE(numout,*) ' MAX val e3    t ', MAXVAL( e3t_0(:,:,:) ), ' f ', MAXVAL( e3f_0(:,:,:) ),  & 
    171             &                   ' u ',   MAXVAL( e3u_0(:,:,:) ), ' u ', MAXVAL( e3v_0(:,:,:) ),  & 
    172             &                   ' uw',   MAXVAL( e3uw_0(:,:,:)), ' vw', MAXVAL( e3vw_0(:,:,:)),   & 
    173             &                   ' w ',   MAXVAL( e3w_0(:,:,:) ) 
     169            &                          ' w ', MAXVAL( gdepw_0(:,:,:) ), '3w ', MAXVAL( gde3w_0(:,:,:) ) 
     170         WRITE(numout,*) ' MAX val e3    t ', MAXVAL(   e3t_0(:,:,:) ), ' f ', MAXVAL(  e3f_0(:,:,:) ),  & 
     171            &                          ' u ', MAXVAL(   e3u_0(:,:,:) ), ' u ', MAXVAL(  e3v_0(:,:,:) ),  & 
     172            &                          ' uw', MAXVAL(  e3uw_0(:,:,:) ), ' vw', MAXVAL(  e3vw_0(:,:,:) ),  & 
     173            &                          ' w ', MAXVAL(  e3w_0(:,:,:) ) 
    174174      ENDIF 
    175175      ! 
     
    910910      !!                      
    911911      !! ** Purpose :   the depth and vertical scale factor in partial step 
    912       !!      reference z-coordinate case 
     912      !!              reference z-coordinate case 
    913913      !! 
    914914      !! ** Method  :   Partial steps : computes the 3D vertical scale factors 
     
    11801180      ! Compute gde3w_0 (vertical sum of e3w) 
    11811181      IF ( ln_isfcav ) THEN ! if cavity 
    1182          WHERE (misfdep == 0) misfdep = 1 
     1182         WHERE( misfdep == 0 )  misfdep = 1 
    11831183         DO jj = 1,jpj 
    11841184            DO ji = 1,jpi 
     
    11871187                  gde3w_0(ji,jj,jk) = gde3w_0(ji,jj,jk-1) + e3w_0(ji,jj,jk)  
    11881188               END DO 
    1189                IF (misfdep(ji,jj) .GE. 2) gde3w_0(ji,jj,misfdep(ji,jj)) = risfdep(ji,jj) + 0.5_wp * e3w_0(ji,jj,misfdep(ji,jj)) 
     1189               IF( misfdep(ji,jj) >= 2 )  gde3w_0(ji,jj,misfdep(ji,jj)) = risfdep(ji,jj) + 0.5_wp * e3w_0(ji,jj,misfdep(ji,jj)) 
    11901190               DO jk = misfdep(ji,jj) + 1, jpk 
    11911191                  gde3w_0(ji,jj,jk) = gde3w_0(ji,jj,jk-1) + e3w_0(ji,jj,jk)  
     
    12351235      !!--------------------------------------------------------------------- 
    12361236      ! 
    1237       IF( nn_timing == 1 )  CALL timing_start('zgr_isf') 
     1237      IF( nn_timing == 1 )   CALL timing_start('zgr_isf') 
    12381238      ! 
    12391239      CALL wrk_alloc( jpi,jpj,   zbathy, zmask, zrisfdep) 
     
    17071707      CALL wrk_dealloc( jpi, jpj, zmisfdep, zmbathy ) 
    17081708      ! 
    1709       IF( nn_timing == 1 )  CALL timing_stop('zgr_isf') 
     1709      IF( nn_timing == 1 )   CALL timing_stop('zgr_isf') 
    17101710      !       
    17111711   END SUBROUTINE 
     
    20292029      CALL lbc_lnk( e3uw_0, 'U', 1._wp ) 
    20302030      CALL lbc_lnk( e3vw_0, 'V', 1._wp ) 
    2031  
    2032       gdepw_n(:,:,:) = gdepw_0(:,:,:) 
    20332031      ! 
    20342032      WHERE( e3t_0 (:,:,:) == 0._wp )   e3t_0 (:,:,:) = 1._wp 
     
    25622560      ! 
    25632561      zn1  =  1._wp / REAL( jpkm1, wp ) 
    2564       zn2  =  1. -  zn1 
     2562      zn2  =  1._wp -  zn1 
    25652563      ! 
    25662564      za1 = (rn_alpha+2.0_wp)*zn1**(rn_alpha+1.0_wp)-(rn_alpha+1.0_wp)*zn1**(rn_alpha+2.0_wp)  
  • branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90

    r5883 r6004  
    3535   USE dtauvd          ! data: U & V current             (dta_uvd routine) 
    3636   USE domvvl          ! varying vertical mesh 
    37    USE dynspg_oce      ! pressure gradient schemes 
    38    USE dynspg_flt      ! filtered free surface 
    39    USE sol_oce         ! ocean solver variables 
    4037   ! 
    4138   USE in_out_manager  ! I/O manager 
     
    133130         !  
    134131      ENDIF 
    135       ! 
    136       IF( lk_agrif ) THEN                  ! read free surface arrays in restart file 
    137          IF( ln_rstart ) THEN 
    138             IF( lk_dynspg_flt )  THEN      ! read or initialize the following fields 
    139                !                           ! gcx, gcxb for agrif_opa_init 
    140                IF( sol_oce_alloc()  > 0 )   CALL ctl_stop('agrif sol_oce_alloc: allocation of arrays failed') 
    141                CALL flt_rst( nit000, 'READ' ) 
    142             ENDIF 
    143          ENDIF                             ! explicit case not coded yet with AGRIF 
    144       ENDIF 
    145       ! 
    146132      !  
    147133      ! Initialize "now" and "before" barotropic velocities: 
    148       ! Do it whatever the free surface method, these arrays 
    149       ! being eventually used 
    150       ! 
     134      ! Do it whatever the free surface method, these arrays being eventually used 
    151135      ! 
    152136      un_b(:,:) = 0._wp   ;   vn_b(:,:) = 0._wp 
    153137      ub_b(:,:) = 0._wp   ;   vb_b(:,:) = 0._wp 
    154138      ! 
     139!!gm  the use of umsak & vmask is not necessary belox as un, vn, ub, vb are always masked 
    155140      DO jk = 1, jpkm1 
    156141         DO jj = 1, jpj 
     
    165150      END DO 
    166151      ! 
    167       un_b(:,:) = un_b(:,:) * r1_hu_n  (:,:) 
    168       vn_b(:,:) = vn_b(:,:) * r1_hv_n  (:,:) 
     152      un_b(:,:) = un_b(:,:) * r1_hu_n(:,:) 
     153      vn_b(:,:) = vn_b(:,:) * r1_hv_n(:,:) 
    169154      ! 
    170155      ub_b(:,:) = ub_b(:,:) * r1_hu_b(:,:) 
    171156      vb_b(:,:) = vb_b(:,:) * r1_hv_b(:,:) 
    172       ! 
    173157      ! 
    174158      IF( nn_timing == 1 )   CALL timing_stop('istate_init') 
     
    438422      !!                 p=integral [ rau*g dz ] 
    439423      !!---------------------------------------------------------------------- 
    440       USE dynspg          ! surface pressure gradient             (dyn_spg routine) 
    441424      USE divhor          ! hor. divergence                       (div_hor routine) 
    442425      USE lbclnk          ! ocean lateral boundary condition (or mpp link) 
    443426      ! 
    444427      INTEGER ::   ji, jj, jk        ! dummy loop indices 
    445       INTEGER ::   indic             ! ??? 
    446428      REAL(wp) ::   zmsv, zphv, zmsu, zphu, zalfg     ! temporary scalars 
    447429      REAL(wp), POINTER, DIMENSION(:,:,:) :: zprn 
     
    510492      vb(:,:,:) = vn(:,:,:) 
    511493       
    512       ! WARNING !!!!! 
    513       ! after initializing u and v, we need to calculate the initial streamfunction bsf. 
    514       ! Otherwise, only the trend will be computed and the model will blow up (inconsistency). 
    515       ! to do that, we call dyn_spg with a special trick: 
    516       ! we fill ua and va with the velocities divided by dt, and the streamfunction will be brought to the 
    517       ! right value assuming the velocities have been set up in one time step. 
    518       ! we then set bsfd to zero (first guess for next step is d(psi)/dt = 0.) 
    519       !  sets up s false trend to calculate the barotropic streamfunction. 
    520  
    521       ua(:,:,:) = ub(:,:,:) / rdt 
    522       va(:,:,:) = vb(:,:,:) / rdt 
    523  
    524       ! calls dyn_spg. we assume euler time step, starting from rest. 
    525       indic = 0 
    526       CALL dyn_spg( nit000, indic )       ! surface pressure gradient 
    527       ! 
    528       ! the new velocity is ua*rdt 
    529       ! 
    530       CALL lbc_lnk( ua, 'U', -1. ) 
    531       CALL lbc_lnk( va, 'V', -1. ) 
    532  
    533       ub(:,:,:) = ua(:,:,:) * rdt 
    534       vb(:,:,:) = va(:,:,:) * rdt 
    535       ua(:,:,:) = 0.e0 
    536       va(:,:,:) = 0.e0 
    537       un(:,:,:) = ub(:,:,:) 
    538       vn(:,:,:) = vb(:,:,:) 
    539494      ! 
    540495!!gm  Check  here call to div_hor should not be necessary 
Note: See TracChangeset for help on using the changeset viewer.