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 1438 for trunk/NEMO/OPA_SRC/DOM/domain.F90 – NEMO

Ignore:
Timestamp:
2009-05-11T16:34:47+02:00 (15 years ago)
Author:
rblod
Message:

Merge VVL branch with the trunk (act II), see ticket #429

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/DOM/domain.F90

    r1335 r1438  
    44   !! Ocean initialization : domain initialization 
    55   !!============================================================================== 
    6  
     6   !! History :  OPA  !  1990-10  (C. Levy - G. Madec)  Original code 
     7   !!                 !  1991-11  (G. Madec) 
     8   !!                 !  1992-01  (M. Imbard) insert time step initialization 
     9   !!                 !  1996-06  (G. Madec) generalized vertical coordinate  
     10   !!                 !  1997-02  (G. Madec) creation of domwri.F 
     11   !!                 !  2001-05  (E.Durand - G. Madec) insert closed sea 
     12   !!   NEMO     1.0  !  2002-08  (G. Madec)  F90: Free form and module 
     13   !!            2.0  !  2005-11  (V. Garnier) Surface pressure gradient organization 
     14   !!---------------------------------------------------------------------- 
     15    
    716   !!---------------------------------------------------------------------- 
    817   !!   dom_init       : initialize the space and time domain 
     
    1019   !!   dom_ctl        : control print for the ocean domain 
    1120   !!---------------------------------------------------------------------- 
    12    !! * Modules used 
    1321   USE oce             !  
    1422   USE dom_oce         ! ocean space and time domain 
     
    3038   PRIVATE 
    3139 
    32    !! * Routine accessibility 
    33    PUBLIC dom_init       ! called by opa.F90 
     40   PUBLIC   dom_init   ! called by opa.F90 
    3441 
    3542   !! * Substitutions 
    3643#  include "domzgr_substitute.h90" 
    37    !!---------------------------------------------------------------------- 
    38    !!   OPA 9.0 , LOCEAN-IPSL (2005)  
     44   !!------------------------------------------------------------------------- 
     45   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
    3946   !! $Id$ 
    40    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    41    !!---------------------------------------------------------------------- 
     47   !! Software is governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     48   !!------------------------------------------------------------------------- 
    4249 
    4350CONTAINS 
     
    5865      !!      - dom_stp: defined the model time step 
    5966      !!      - dom_wri: create the meshmask file if nmsh=1 
    60       !! 
    61       !! History : 
    62       !!        !  90-10  (C. Levy - G. Madec)  Original code 
    63       !!        !  91-11  (G. Madec) 
    64       !!        !  92-01  (M. Imbard) insert time step initialization 
    65       !!        !  96-06  (G. Madec) generalized vertical coordinate  
    66       !!        !  97-02  (G. Madec) creation of domwri.F 
    67       !!        !  01-05  (E.Durand - G. Madec) insert closed sea 
    68       !!   8.5  !  02-08  (G. Madec)  F90: Free form and module 
    69       !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    70       !!---------------------------------------------------------------------- 
    71       !! * Local declarations 
     67      !!---------------------------------------------------------------------- 
    7268      INTEGER ::   jk                ! dummy loop argument 
    7369      INTEGER ::   iconf = 0         ! temporary integers 
     
    9086      CALL dom_msk                        ! Masks 
    9187 
    92       IF( lk_vvl )   CALL dom_vvl_ini     ! Vertical variable mesh 
     88      IF( lk_vvl )   CALL dom_vvl         ! Vertical variable mesh 
    9389 
    9490      ! Local depth or Inverse of the local depth of the water column at u- and v-points 
    9591      ! ------------------------------ 
    9692      ! Ocean depth at U- and V-points 
    97       hu(:,:) = 0. 
    98       hv(:,:) = 0. 
    99  
     93      hu(:,:) = 0.e0 
     94      hv(:,:) = 0.e0 
    10095      DO jk = 1, jpk 
    10196         hu(:,:) = hu(:,:) + fse3u(:,:,jk) * umask(:,:,jk) 
     
    105100      hur(:,:) = fse3u(:,:,1)             ! Lower bound : thickness of the first model level 
    106101      hvr(:,:) = fse3v(:,:,1) 
    107  
    108102      DO jk = 2, jpk                      ! Sum of the vertical scale factors 
    109103         hur(:,:) = hur(:,:) + fse3u(:,:,jk) * umask(:,:,jk) 
    110104         hvr(:,:) = hvr(:,:) + fse3v(:,:,jk) * vmask(:,:,jk) 
    111105      END DO 
    112  
    113106      ! Compute and mask the inverse of the local depth 
    114107      hur(:,:) = 1. / hur(:,:) * umask(:,:,1) 
    115108      hvr(:,:) = 1. / hvr(:,:) * vmask(:,:,1) 
    116109 
    117  
    118110      CALL dom_stp                        ! Time step 
    119111 
     
    121113 
    122114      IF( .NOT.ln_rstart )   CALL dom_ctl    ! Domain control 
    123  
     115      ! 
    124116   END SUBROUTINE dom_init 
    125117 
     
    134126      !!              - namdom namelist 
    135127      !!              - namcla namelist 
    136       !! 
    137       !! History : 
    138       !!   9.0  !  03-08  (G. Madec)  Original code 
    139       !!---------------------------------------------------------------------- 
    140       !! * Modules used 
     128      !!---------------------------------------------------------------------- 
    141129      USE ioipsl 
    142130      NAMELIST/namrun/ no    , cexper, cn_ocerst_in, cn_ocerst_out, ln_rstart, nrstdt,   & 
     
    156144      ENDIF 
    157145 
    158       ! Namelist namrun : parameters of the run 
    159       REWIND( numnam ) 
     146      REWIND( numnam )              ! Namelist namrun : parameters of the run 
    160147      READ  ( numnam, namrun ) 
    161  
    162148      IF(lwp) THEN 
    163149         WRITE(numout,*) '        Namelist namrun' 
     
    228214      ENDIF 
    229215 
    230       ! Namelist namdom : space/time domain (bathymetry, mesh, timestep) 
    231       REWIND( numnam ) 
     216      REWIND( numnam )              ! Namelist namdom : space/time domain (bathymetry, mesh, timestep) 
    232217      READ  ( numnam, namdom ) 
    233218 
     
    252237      ENDIF 
    253238 
    254       ! Default values 
    255239      n_cla = 0 
    256  
    257       ! Namelist cross land advection 
    258       REWIND( numnam ) 
     240      REWIND( numnam )              ! Namelist cross land advection 
    259241      READ  ( numnam, namcla ) 
    260242      IF(lwp) THEN 
     
    264246      ENDIF 
    265247 
    266       IF( nbit_cmp == 1 .AND. n_cla /= 0 ) THEN 
    267          CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require n_cla = 0' ) 
    268       END IF 
    269  
     248      IF( nbit_cmp == 1 .AND. n_cla /= 0 )   CALL ctl_stop( ' Reproductibility tests (nbit_cmp=1) require n_cla = 0' ) 
     249      ! 
    270250   END SUBROUTINE dom_nam 
    271251 
     
    278258      !! 
    279259      !! ** Method  :   compute and print extrema of masked scale factors 
    280       !! 
    281       !! History : 
    282       !!   8.5  !  02-08  (G. Madec)    Original code 
    283       !!---------------------------------------------------------------------- 
    284       !! * Local declarations 
     260      !!---------------------------------------------------------------------- 
    285261      INTEGER ::   iimi1, ijmi1, iimi2, ijmi2, iima1, ijma1, iima2, ijma2 
    286262      INTEGER, DIMENSION(2) ::   iloc      !  
    287263      REAL(wp) ::   ze1min, ze1max, ze2min, ze2max 
    288264      !!---------------------------------------------------------------------- 
    289  
    290       ! Extrema of the scale factors 
    291265 
    292266      IF(lwp)WRITE(numout,*) 
     
    325299         WRITE(numout,"(14x,'e2t mini: ',1f10.2,' at i = ',i5,' j= ',i5)") ze2min, iimi2, ijmi2 
    326300      ENDIF 
    327  
     301      ! 
    328302   END SUBROUTINE dom_ctl 
    329303 
Note: See TracChangeset for help on using the changeset viewer.