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 2528 for trunk/NEMOGCM/NEMO/OPA_SRC/par_oce.F90 – NEMO

Ignore:
Timestamp:
2010-12-27T18:33:53+01:00 (13 years ago)
Author:
rblod
Message:

Update NEMOGCM from branch nemo_v3_3_beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/par_oce.F90

    • Property svn:eol-style deleted
    r1647 r2528  
    44   !! Ocean :   set the ocean parameters 
    55   !!====================================================================== 
    6    !! History : 
    7    !!   4.0  !  91     (Imbard, Levy, Madec)  Original code 
    8    !!   9.0  !  04-01  (G. Madec, J.-M. Molines)  Free form and module 
    9    !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    10    !!---------------------------------------------------------------------- 
    11    !!  OPA 9.0 , LOCEAN-IPSL (2005)  
    12    !! $Id$  
    13    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
    14    !!---------------------------------------------------------------------- 
    15    !! * Modules used 
     6   !! History :  OPA  !  1991     (Imbard, Levy, Madec)  Original code 
     7   !!   NEMO     1.0  !  2004-01  (G. Madec, J.-M. Molines)  Free form and module 
     8   !!            3.3  !  2010-09  (C. Ethe) TRA-TRC merge: add jpts, jp_tem & jp_sal 
     9   !!---------------------------------------------------------------------- 
    1610   USE par_kind          ! kind parameters 
    1711 
     
    2216   !!   Domain decomposition 
    2317   !!---------------------------------------------------------------------- 
    24    !! * if we dont use massively parallel computer (parameters jpni=jpnj=1) 
    25    !!      so jpiglo=jpi and jpjglo=jpj 
    26  
     18   !! if we dont use massively parallel computer (parameters jpni=jpnj=1) so jpiglo=jpi and jpjglo=jpj 
    2719#if ! defined key_mpp_dyndist  
    28    INTEGER, PUBLIC, PARAMETER ::    &  !:  
    29       jpni   = 1,                   &  !: number of processors following i  
     20   INTEGER, PUBLIC, PARAMETER ::    &  !: 
     21# if ! defined key_nproci 
     22      jpni   = 1,                   &  !: number of processors following i 
    3023      jpnj   = 1,                   &  !: number of processors following j 
    3124      jpnij  = 1                       !: nb of local domain = nb of processors  
    3225      !                                !  ( <= jpni x jpnj ) 
    33 #else 
    34    INTEGER, PUBLIC ::               &  ! 
    35       jpni      ,                   &  !: number of processors following i  
    36       jpnj      ,                   &  !: number of processors following j 
    37       jpnij                            !: nb of local domain = nb of processors  
     26# else 
     27      jpni   = key_nproci,          &  !: number of processors following i 
     28      jpnj   = key_nprocj,          &  !: number of processors following j 
     29#  if ! defined key_nprocij 
     30      jpnij  = key_nproci * key_nprocj !: nb of local domain = nb of processors  
    3831      !                                !  ( <= jpni x jpnj ) 
    39 #endif 
    40  
    41    INTEGER, PUBLIC, PARAMETER ::    &  !: 
    42       jpr2di = 0,                   &  !: number of columns for extra outer halo  
    43       jpr2dj = 0,                   &  !: number of rows    for extra outer halo  
    44       jpreci = 1,                   &  !: number of columns for overlap  
    45       jprecj = 1                       !: number of rows    for overlap  
     32#  else 
     33      jpnij  = key_nprocij             !: nb of local domain = nb of processors  
     34      !                                !  ( <= jpni x jpnj ) 
     35#  endif 
     36# endif 
     37#else 
     38   INTEGER, PUBLIC            ::   jpni         !: number of processors following i  
     39   INTEGER, PUBLIC            ::   jpnj         !: number of processors following j 
     40   INTEGER, PUBLIC            ::   jpnij        !: nb of local domain = nb of processors ( <= jpni x jpnj ) 
     41#endif 
     42   INTEGER, PUBLIC, PARAMETER ::   jpr2di = 0   !: number of columns for extra outer halo  
     43   INTEGER, PUBLIC, PARAMETER ::   jpr2dj = 0   !: number of rows    for extra outer halo  
     44   INTEGER, PUBLIC, PARAMETER ::   jpreci = 1   !: number of columns for overlap  
     45   INTEGER, PUBLIC, PARAMETER ::   jprecj = 1   !: number of rows    for overlap  
    4646 
    4747   !! Ocean Domain sizes 
     
    6161   !!--------------------------------------------------------------------- 
    6262#             include "par_ORCA_R2.h90" 
     63#elif defined key_orca_r1 
     64   !!--------------------------------------------------------------------- 
     65   !!   'key_orca_r1'   :                           global ocean : ORCA R1 
     66   !!--------------------------------------------------------------------- 
     67#             include "par_ORCA_R1.h90" 
    6368#elif defined key_orca_r05 
    6469   !!--------------------------------------------------------------------- 
     
    100105   !!   default option  :                               small closed basin 
    101106   !!--------------------------------------------------------------------- 
    102    CHARACTER(len=16), PUBLIC, PARAMETER ::   &  !: 
    103       cp_cfg = "default"               !: name of the configuration 
    104    INTEGER, PARAMETER ::            &  !: 
    105       jp_cfg = 0  ,                 &  !: resolution of the configuration 
    106  
    107       ! data size                     !!! * size of all input files * 
    108       jpidta  = 10,                 &  !: 1st lateral dimension ( >= jpi ) 
    109       jpjdta  = 12,                 &  !: 2nd    "         "    ( >= jpj ) 
    110       jpkdta  = 31,                 &  !: number of levels      ( >= jpk ) 
    111  
    112       ! global or zoom domain size    !!! * computational domain * 
    113       jpiglo  = jpidta,             &  !: 1st dimension of global domain --> i 
    114       jpjglo  = jpjdta,             &  !: 2nd    "                  "    --> j 
    115       jpk     = jpkdta,             &  !: number of vertical levels 
    116       ! zoom starting position  
    117       jpizoom =   1   ,             &  !: left bottom (i,j) indices of the zoom 
    118       jpjzoom =   1   ,             &  !: in data domain indices 
    119  
    120       ! Domain characteristics 
    121       jperio  =  0                     !: lateral cond. type (between 0 and 6) 
    122          !                             !  = 0 closed 
    123          !                             !  = 1 cyclic East-West 
    124          !                             !  = 2 equatorial symmetric 
    125          !                             !  = 3 North fold T-point pivot 
    126          !                             !  = 4 cyclic East-West AND North fold T-point pivot 
    127          !                             !  = 5 North fold F-point pivot 
    128          !                             !  = 6 cyclic East-West AND North fold F-point pivot 
    129  
    130       !!  Values set to pp_not_used indicates that this parameter is not used in THIS config. 
    131       !!  Values set to pp_to_be_computed  indicates that variables will be computed in domzgr 
    132       REAL(wp), PARAMETER ::   &  !: 
    133          pp_not_used       = 999999._wp , &  !: 
    134          pp_to_be_computed = 999999._wp      !: 
     107   CHARACTER(len=16), PUBLIC, PARAMETER ::   cp_cfg = "default"   !: name of the configuration 
     108   INTEGER          , PUBLIC, PARAMETER ::   jp_cfg = 0           !: resolution of the configuration 
     109 
     110   ! data size                                       !!! * size of all input files * 
     111   INTEGER, PUBLIC, PARAMETER ::   jpidta  = 10       !: 1st lateral dimension ( >= jpi ) 
     112   INTEGER, PUBLIC, PARAMETER ::   jpjdta  = 12       !: 2nd    "         "    ( >= jpj ) 
     113   INTEGER, PUBLIC, PARAMETER ::   jpkdta  = 31       !: number of levels      ( >= jpk ) 
     114 
     115   ! global or zoom domain size                      !!! * computational domain * 
     116   INTEGER, PUBLIC, PARAMETER ::   jpiglo  = jpidta   !: 1st dimension of global domain --> i 
     117   INTEGER, PUBLIC, PARAMETER ::   jpjglo  = jpjdta   !: 2nd    -                  -    --> j 
     118   INTEGER, PUBLIC, PARAMETER ::   jpk     = jpkdta   !: number of vertical levels 
     119   ! zoom starting position  
     120   INTEGER, PUBLIC, PARAMETER ::   jpizoom =   1      !: left bottom (i,j) indices of the zoom 
     121   INTEGER, PUBLIC, PARAMETER ::   jpjzoom =   1      !: in data domain indices 
     122 
     123   ! Domain characteristics 
     124   INTEGER, PUBLIC, PARAMETER ::   jperio  =  0       !: lateral cond. type (between 0 and 6) 
     125   !                                                  !  = 0 closed                 ;   = 1 cyclic East-West 
     126   !                                                  !  = 2 equatorial symmetric   ;   = 3 North fold T-point pivot 
     127   !                                                  !  = 4 cyclic East-West AND North fold T-point pivot 
     128   !                                                  !  = 5 North fold F-point pivot 
     129   !                                                  !  = 6 cyclic East-West AND North fold F-point pivot 
     130 
     131   !!  Values set to pp_not_used indicates that this parameter is not used in THIS config. 
     132   !!  Values set to pp_to_be_computed  indicates that variables will be computed in domzgr 
     133   REAL(wp), PUBLIC, PARAMETER ::   pp_not_used       = 999999._wp   !: vertical grid parameter 
     134   REAL(wp), PUBLIC, PARAMETER ::   pp_to_be_computed = 999999._wp   !:    -      -       - 
    135135 
    136136 
    137137   !! Horizontal grid parameters for domhgr 
    138138   !! ===================================== 
    139  
    140    INTEGER, PUBLIC, PARAMETER   ::   &  !: 
    141       jphgr_msh = 0            !: type of horizontal mesh 
    142       !                        !  = 0 curvilinear coordinate on the sphere 
    143       !                        !      read in coordinate.nc file 
    144       !                        !  = 1 geographical mesh on the sphere 
    145       !                        !      with regular grid-spacing 
    146       !                        !  = 2 f-plane with regular grid-spacing 
    147       !                        !  = 3 beta-plane with regular grid-spacing 
    148       !                        !  = 4 Mercator grid with T/U point at the equator  with 
    149       !                        !      isotropic resolution (e1_deg) 
    150  
    151    REAL(wp) , PUBLIC, PARAMETER ::   &   !: 
    152       ppglam0  =    0.0_wp,   &  !: longitude of first raw and column T-point (jphgr_msh = 1) 
    153       ppgphi0  =  -35.0_wp,   &  !: latitude  of first raw and column T-point (jphgr_msh = 1) 
    154       !                          !  latitude for the Coriolis or Beta parameter (jphgr_msh = 2 or 3) 
    155       ppe1_deg =    1.0_wp,   &  !: zonal      grid-spacing (degrees) 
    156       ppe2_deg =    0.5_wp,   &  !: meridional grid-spacing (degrees) 
    157       ppe1_m   = 5000.0_wp,   &  !: zonal      grid-spacing (degrees) 
    158       ppe2_m   = 5000.0_wp       !: meridional grid-spacing (degrees) 
     139   INTEGER, PUBLIC, PARAMETER  ::   jphgr_msh = 0   !: type of horizontal mesh 
     140   !                                                !  = 0 curvilinear coordinate on the sphere read in coordinate.nc 
     141   !                                                !  = 1 geographical mesh on the sphere with regular grid-spacing 
     142   !                                                !  = 2 f-plane with regular grid-spacing 
     143   !                                                !  = 3 beta-plane with regular grid-spacing 
     144   !                                                !  = 4 Mercator grid with T/U point at the equator 
     145 
     146   REAL(wp) , PUBLIC, PARAMETER ::   ppglam0  =    0.0_wp   !: longitude of first raw and column T-point (jphgr_msh = 1) 
     147   REAL(wp) , PUBLIC, PARAMETER ::   ppgphi0  =  -35.0_wp   !: latitude  of first raw and column T-point (jphgr_msh = 1) 
     148   !                                                        !  used for Coriolis & Beta parameters (jphgr_msh = 2 or 3) 
     149   REAL(wp) , PUBLIC, PARAMETER ::   ppe1_deg =    1.0_wp   !: zonal      grid-spacing (degrees) 
     150   REAL(wp) , PUBLIC, PARAMETER ::   ppe2_deg =    0.5_wp   !: meridional grid-spacing (degrees) 
     151   REAL(wp) , PUBLIC, PARAMETER ::   ppe1_m   = 5000.0_wp   !: zonal      grid-spacing (degrees) 
     152   REAL(wp) , PUBLIC, PARAMETER ::   ppe2_m   = 5000.0_wp   !: meridional grid-spacing (degrees) 
    159153 
    160154   !! Vertical grid parameter for domzgr 
    161155   !! ================================== 
    162  
    163    REAL(wp), PUBLIC, PARAMETER  ::   &  !: 
    164       &     ppsur = -4762.96143546300_wp ,  &  !: ORCA r4, r2 and r05 coefficients 
    165       &     ppa0  =   255.58049070440_wp ,  &  !: (default coefficients) 
    166       &     ppa1  =   245.58132232490_wp ,  &  !: 
    167       &     ppkth =    21.43336197938_wp ,  &  !: 
    168       &     ppacr =     3.00000000000_wp       !: 
    169  
    170    !!  If both ppa0 ppa1 and ppsur are specified to 0, then 
    171    !!  they are computed from ppdzmin, pphmax , ppkth, ppacr in dom_zgr 
    172  
    173    REAL(wp), PUBLIC, PARAMETER ::   &  !: 
    174       &     ppdzmin = 10._wp             ,  &  !: Minimum vertical spacing 
    175       &     pphmax  = 5000._wp                 !: Maximum depth 
    176  
    177    !!--------------------------------------------------------------------- 
    178 #endif 
    179  
    180    !!--------------------------------------------------------------------- 
    181    !! Domain Matrix size 
    182    !!--------------------------------------------------------------------- 
    183    INTEGER  &  !: 
    184 #if !defined key_agrif 
    185       ,PARAMETER  & 
    186 #endif 
    187     :: & 
    188       jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ,   &  !: first  dimension 
    189       jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ,   &  !: second dimension 
    190       jpim1 = jpi-1,                                             &  !: inner domain indices 
    191       jpjm1 = jpj-1,                                             &  !:   "            " 
    192       jpkm1 = jpk-1,                                             &  !:   "            " 
    193       jpij  = jpi*jpj                                               !:  jpi x jpj 
    194  
     156   REAL(wp), PUBLIC, PARAMETER ::   ppsur = -4762.96143546300_wp   !: ORCA r4, r2 and r05 coefficients 
     157   REAL(wp), PUBLIC, PARAMETER ::   ppa0  =   255.58049070440_wp   !: (default coefficients) 
     158   REAL(wp), PUBLIC, PARAMETER ::   ppa1  =   245.58132232490_wp   !: 
     159   REAL(wp), PUBLIC, PARAMETER ::   ppkth =    21.43336197938_wp   !: 
     160   REAL(wp), PUBLIC, PARAMETER ::   ppacr =     3.00000000000_wp   !: 
     161   ! 
     162   !  If both ppa0 ppa1 and ppsur are specified to 0, then 
     163   !  they are computed from ppdzmin, pphmax , ppkth, ppacr in dom_zgr 
     164   REAL(wp), PUBLIC, PARAMETER ::   ppdzmin = 10._wp     !: Minimum vertical spacing 
     165   REAL(wp), PUBLIC, PARAMETER ::   pphmax  = 5000._wp   !: Maximum depth 
     166   ! 
     167   LOGICAL , PUBLIC, PARAMETER ::   ldbletanh = .TRUE.   !: Use/do not use double tanf function for vertical coordinates 
     168   REAL(wp), PUBLIC, PARAMETER ::   ppa2  =   100.760928500000_wp   !: Double tanh function parameters 
     169   REAL(wp), PUBLIC, PARAMETER ::   ppkth2=    48.029893720000_wp   !: 
     170   REAL(wp), PUBLIC, PARAMETER ::   ppacr2=    13.000000000000_wp   !: 
     171   ! 
     172#endif 
     173 
     174 
     175   !!--------------------------------------------------------------------- 
     176   !! Active tracer parameters 
     177   !!--------------------------------------------------------------------- 
     178   INTEGER, PUBLIC, PARAMETER ::   jpts   = 2    !: Number of active tracers (=2, i.e. T & S ) 
     179   INTEGER, PUBLIC, PARAMETER ::   jp_tem = 1    !: indice for temperature 
     180   INTEGER, PUBLIC, PARAMETER ::   jp_sal = 2    !: indice for salinity 
     181 
     182   !!--------------------------------------------------------------------- 
     183   !! Domain Matrix size  (if AGRIF, they are not all parameters) 
     184   !!--------------------------------------------------------------------- 
    195185#if defined key_agrif 
    196    !!--------------------------------------------------------------------- 
    197    !! Agrif variables 
    198    !!--------------------------------------------------------------------- 
    199    INTEGER, PUBLIC, PARAMETER :: nbghostcells = 1 
    200    INTEGER, PUBLIC :: nbcellsx = jpiglo - 2 - 2*nbghostcells 
    201    INTEGER, PUBLIC :: nbcellsy = jpjglo - 2 - 2*nbghostcells 
    202 #endif 
     186   INTEGER, PUBLIC, PARAMETER ::   nbghostcells = 1                             !: number of ghost cells 
     187   INTEGER, PUBLIC            ::   nbcellsx     = jpiglo - 2 - 2*nbghostcells   !: number of cells in i-direction 
     188   INTEGER, PUBLIC            ::   nbcellsy     = jpjglo - 2 - 2*nbghostcells   !: number of cells in j-direction 
     189   ! 
     190   INTEGER, PUBLIC            ::   jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci   !: first  dimension 
     191   INTEGER, PUBLIC            ::   jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj   !: second dimension 
     192   INTEGER, PUBLIC            ::   jpim1 = jpi-1                                            !: inner domain indices 
     193   INTEGER, PUBLIC            ::   jpjm1 = jpj-1                                            !:   -     -      - 
     194   INTEGER, PUBLIC            ::   jpkm1 = jpk-1                                            !:   -     -      - 
     195   INTEGER, PUBLIC            ::   jpij  = jpi*jpj                                          !:  jpi x jpj 
     196#else 
     197   INTEGER, PUBLIC, PARAMETER ::   jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci   !: first  dimension 
     198   INTEGER, PUBLIC, PARAMETER ::   jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj   !: second dimension 
     199   INTEGER, PUBLIC, PARAMETER ::   jpim1 = jpi-1                                            !: inner domain indices 
     200   INTEGER, PUBLIC, PARAMETER ::   jpjm1 = jpj-1                                            !:   -     -      - 
     201   INTEGER, PUBLIC, PARAMETER ::   jpkm1 = jpk-1                                            !:   -     -      - 
     202   INTEGER, PUBLIC, PARAMETER ::   jpij  = jpi*jpj                                          !:  jpi x jpj 
     203#endif 
     204 
    203205   !!--------------------------------------------------------------------- 
    204206   !! Optimization/control flags 
     
    210212#endif 
    211213 
    212 #if defined key_vectopt_memory 
    213    LOGICAL, PUBLIC, PARAMETER ::   lk_vopt_mem  = .TRUE.   !: vector optimization flag 
    214 #else 
    215    LOGICAL, PUBLIC, PARAMETER ::   lk_vopt_mem  = .FALSE.  !: vector optimization flag 
    216 #endif 
    217  
    218214#if defined key_vectopt_loop 
    219215   LOGICAL, PUBLIC, PARAMETER ::   lk_vopt_loop = .TRUE.   !: vector optimization flag 
     
    222218#endif 
    223219 
     220   !!---------------------------------------------------------------------- 
     221   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     222   !! $Id$  
     223   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    224224   !!====================================================================== 
    225225END MODULE par_oce 
Note: See TracChangeset for help on using the changeset viewer.