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 1125 for trunk/NEMO/OPA_SRC/BDY/bdy_oce.F90 – NEMO

Ignore:
Timestamp:
2008-06-23T11:05:02+02:00 (16 years ago)
Author:
ctlod
Message:

trunk: BDY package code review (coding rules), see ticket: #214

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/BDY/bdy_oce.F90

    r1058 r1125  
    44   !! Unstructured Open Boundary Cond. :   define related variables 
    55   !!====================================================================== 
    6 #if defined key_bdy || defined key_bdy_tides 
     6   !! History :  1.0  !  2001-05  (J. Chanut, A. Sellar)  Original code 
     7   !!            3.0  !  2008-04  (NEMO team)  add in the reference version      
    78   !!---------------------------------------------------------------------- 
    8    !!   'key_bdy' :                    Unstructured Open Boundary Condition 
     9#if defined key_bdy  
    910   !!---------------------------------------------------------------------- 
    10    !! History : 
    11    !!  9.0   01/05   (J. Chanut, A. Sellar)  Original code 
     11   !!   'key_bdy'                      Unstructured Open Boundary Condition 
    1212   !!---------------------------------------------------------------------- 
    13    !! * Modules used 
    1413   USE par_oce         ! ocean parameters 
    1514   USE bdy_par         ! Unstructured boundary parameters 
     
    2120   !! Namelist variables 
    2221   !!---------------------------------------------------------------------- 
    23  
    24    CHARACTER(len=80) :: & 
    25       filbdy_mask, &         !: Name of unstruct. bdy mask file 
    26       filbdy_data_T, &       !: Name of unstruct. bdy data file at T points 
    27       filbdy_data_U, &       !: Name of unstruct. bdy data file at U points 
    28       filbdy_data_V, &       !: Name of unstruct. bdy data file at V points 
    29       filbdy_data_bt_T, &    !: Name of unstruct. bdy data file at T points for barotropic variables 
    30       filbdy_data_bt_U, &    !: Name of unstruct. bdy data file at U points for barotropic variables 
    31       filbdy_data_bt_V       !: Name of unstruct. bdy data file at V points for barotropic variables 
    32  
    33    LOGICAL ::  & 
    34       ln_bdy_clim =.false.!: if true, we assume that bdy data files contain  
    35                           !  1 time dump (-->bdy forcing will be constant)  
    36                           !  or 12 months  (-->bdy forcing will be cyclic)  
    37    LOGICAL ::  & 
    38       ln_bdy_fla =.false. !: if true, flather boundary conditions 
    39  
    40    LOGICAL ::  & 
    41       ln_bdy_vol =.false. !: if true, volume correction              
    42  
    43    LOGICAL ::  & 
    44       ln_bdy_mask = .false. !: if true, read bdymask from file 
    45  
    46    INTEGER ::  & 
    47       nb_rimwidth = 7,  & !: boundary rim width 
    48       nbdy_dta = 1     !: = 0 use the initial state as bdy dta 
    49                           !: = 1 read bdy data in netcdf file 
    50    INTEGER ::  &  
    51       volbdy = 1          !: = 0 the total volume will have the variability  
    52                           !       of the surface Flux E-P else (volbdy = 1)  
    53                           !       the volume will be constant 
    54                           !  = 1 the volume will be constant during all the  
    55                           !       integration. 
     22   CHARACTER(len=80) ::   filbdy_mask        !: Name of unstruct. bdy mask file 
     23   CHARACTER(len=80) ::   filbdy_data_T      !: Name of unstruct. bdy data file at T points 
     24   CHARACTER(len=80) ::   filbdy_data_U      !: Name of unstruct. bdy data file at U points 
     25   CHARACTER(len=80) ::   filbdy_data_V      !: Name of unstruct. bdy data file at V points 
     26   CHARACTER(len=80) ::   filbdy_data_bt_T   !: Name of unstruct. bdy data file at T points for barotropic variables 
     27   CHARACTER(len=80) ::   filbdy_data_bt_U   !: Name of unstruct. bdy data file at U points for barotropic variables 
     28   CHARACTER(len=80) ::   filbdy_data_bt_V   !: Name of unstruct. bdy data file at V points for barotropic variables 
     29   ! 
     30   LOGICAL ::   ln_bdy_tides = .false.  !: =T apply tidal harmonic forcing along open boundaries 
     31   LOGICAL ::   ln_bdy_vol  = .false.   !: =T volume correction              
     32   LOGICAL ::   ln_bdy_mask = .false.   !: =T read bdymask from file 
     33   LOGICAL ::   ln_bdy_clim = .false.   !: if true, we assume that bdy data files contain  
     34   !                                    !  1 time dump  (-->bdy forcing will be constant)  
     35   !                                    !  or 12 months (-->bdy forcing will be cyclic)  
     36   LOGICAL ::   ln_bdy_dyn_fla  = .false. !: =T Flather boundary conditions on barotropic velocities 
     37   LOGICAL ::   ln_bdy_dyn_frs  = .false. !: =T FRS boundary conditions on velocities 
     38   LOGICAL ::   ln_bdy_tra_frs  = .false. !: =T FRS boundary conditions on tracers (T and S) 
     39   LOGICAL ::   ln_bdy_ice_frs  = .false. !: =T FRS boundary conditions on seaice (leads fraction, ice depth, snow depth) 
     40   ! 
     41   INTEGER ::   nb_rimwidth = 7         !: boundary rim width 
     42   INTEGER ::   nbdy_dta    = 1          !: = 0 use the initial state as bdy dta or = 1 read it in a NetCDF file 
     43   INTEGER ::   volbdy      = 1         !: = 0 the total volume will have the variability of the surface Flux E-P  
     44   !                                    !  = 1 the volume will be constant during all the integration. 
    5645 
    5746   !!---------------------------------------------------------------------- 
    5847   !! Global variables 
    5948   !!---------------------------------------------------------------------- 
    60  
    61    REAL(wp), DIMENSION(jpi, jpj) ::  & !: 
    62       bdytmask, &  !: Mask defining computational domain at T-points 
    63       bdyumask, &  !: Mask defining computational domain at U-points 
    64       bdyvmask     !: Mask defining computational domain at V-points 
     49   REAL(wp), DIMENSION(jpi,jpj) ::   bdytmask   !: Mask defining computational domain at T-points 
     50   REAL(wp), DIMENSION(jpi,jpj) ::   bdyumask   !: Mask defining computational domain at U-points 
     51   REAL(wp), DIMENSION(jpi,jpj) ::   bdyvmask   !: Mask defining computational domain at V-points 
    6552 
    6653   !!---------------------------------------------------------------------- 
    6754   !! Unstructured open boundary data variables 
    6855   !!---------------------------------------------------------------------- 
     56   INTEGER, DIMENSION(jpbgrd) ::   nblen                  !: Size of bdy data on a proc for each grid type 
     57   INTEGER, DIMENSION(jpbgrd) ::   nblenrim               !: Size of bdy data on a proc for first rim ind 
     58   INTEGER, DIMENSION(jpbgrd) ::   nblendta               !: Size of bdy data in file 
    6959 
    70    INTEGER, DIMENSION(jpbgrd) ::  & 
    71       nblen  = 0, & !: Size of bdy data on a proc for each grid type 
    72       nblenrim = 0,  & !: Size of bdy data on a proc for first rim ind 
    73       nblendta = 0        !: Size of bdy data in file 
     60   INTEGER, DIMENSION(jpbdim,jpbgrd) ::   nbi, nbj        !: i and j indices of bdy dta 
     61   INTEGER, DIMENSION(jpbdim,jpbgrd) ::   nbr             !: Discrete distance from rim points 
     62   INTEGER, DIMENSION(jpbdim,jpbgrd) ::   nbmap           !: Indices of data in file for data in memory  
     63     
     64   REAL(wp) ::   bdysurftot                             !: Lateral surface of unstructured open boundary 
    7465 
    75    INTEGER, DIMENSION(jpbdim, jpbgrd) ::  &  
    76       nbi, nbj,      & !: i and j indices of bdy dta 
    77       nbr,     & !: Discrete distance from rim points 
    78       nbmap      !: Indices of data in file for data in memory  
    79      
    80    REAL(wp) :: & 
    81       bdysurftot    !: Lateral surface of unstructured open boundary 
     66   REAL(wp), DIMENSION(jpbdim)        ::   flagu, flagv   !: Flag for normal velocity compnt for velocity components 
     67   REAL(wp), DIMENSION(jpbdim,jpbgrd) ::   nbw            !: Rim weights of bdy data 
    8268 
    83    REAL(wp), DIMENSION(jpbdim) ::  & 
    84       flagu,      & !: Flag for normal velocity compnt for u-velocity 
    85       flagv      !: Flag for normal velocity compnt for v-velocity 
     69   REAL(wp), DIMENSION(jpbdim)     ::   sshbdy            !: Now clim of bdy sea surface height (Flather) 
     70   REAL(wp), DIMENSION(jpbdim)     ::   ubtbdy, vbtbdy    !: Now clim of bdy barotropic velocity components 
     71   REAL(wp), DIMENSION(jpbdim,jpk) ::   tbdy  , sbdy      !: Now clim of bdy temperature and salinity   
     72   REAL(wp), DIMENSION(jpbdim,jpk) ::   ubdy  , vbdy    !: Now clim of bdy velocity components 
     73   REAL(wp), DIMENSION(jpbdim) ::   sshtide               !: Tidal boundary array : SSH 
     74   REAL(wp), DIMENSION(jpbdim) ::   utide, vtide          !: Tidal boundary array : U and V 
    8675 
    87    REAL(wp), DIMENSION(jpbdim, jpbgrd) ::  & 
    88       nbw        !: Rim weights of bdy data 
    89  
    90    REAL(wp), DIMENSION(jpbdim) ::  & 
    91       sshbdy,     & !: Now clim of bdy sea surface height (Flather) 
    92       ubtbdy, vbtbdy   !: Now clim of bdy barotropic velocity components 
    93  
    94    REAL(wp), DIMENSION(jpbdim,jpk) ::  & 
    95       tbdy, sbdy, & !: Now clim of bdy temperature and salinity   
    96       ubdy, vbdy    !: Now clim of bdy velocity components 
    97  
    98 #if defined key_bdy_tides 
    99    REAL(wp), DIMENSION(jpbdim) ::  & 
    100       sshtide,          & !: Tidal boundary array : SSH 
    101       utide,            & !: Tidal boundary array : U 
    102       vtide           !: Tidal boundary array : V 
    103 #endif 
    104            
    10576#else 
    10677   !!---------------------------------------------------------------------- 
    107    !!   Default option :                                       Empty module 
     78   !!   Dummy module                NO Unstructured Open Boundary Condition 
    10879   !!---------------------------------------------------------------------- 
    10980#endif 
    11081 
     82   !!---------------------------------------------------------------------- 
     83   !! NEMO/OPA 3.0 , LOCEAN-IPSL (2008)  
     84   !! $Id: $  
     85   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    11186   !!====================================================================== 
    11287END MODULE bdy_oce 
Note: See TracChangeset for help on using the changeset viewer.