source: Roms_tools/Roms_Agrif/compute_auxiliary_bounds.h @ 1

Last change on this file since 1 was 1, checked in by cholod, 13 years ago

import Roms_Agrif

  • Property svn:eol-style set to native
File size: 2.5 KB
Line 
1!
2!======================================================================
3! ROMS_AGRIF is a branch of ROMS developped at IRD and INRIA, in France
4! The two other branches from UCLA (Shchepetkin et al) 
5! and Rutgers University (Arango et al) are under MIT/X style license.
6! ROMS_AGRIF specific routines (nesting) are under CeCILL-C license.
7! 
8! ROMS_AGRIF website : http://roms.mpl.ird.fr
9!======================================================================
10!
11/* Auxiliary module "compute_auxiliary_bounds.h":
12---------------------------------------------------------------
13  Compute derived bounds for the loop indices over a subdomain
14 "tile". The extended bounds [labelled by suffix R] are designed
15 to cover also the outer ghost points, if the subdomain "tile" is
16 adjacent to the PHYSICAL boundary.
17
18 NOTE: IstrR,IendR,JstrR,JendR computed by this module DO NOT COVER
19 ghost points associated with the internal computational boundaries
20 of MPI subdomains.
21
22   This module also computes loop-bounds for U- and V-type variables
23 which belong to the interior of the computational domain. These
24 are labelled by suffixes U,V and they step one grid point inward
25 from the side of the subdomain adjacent to the physical boundary.
26   Conversely, for an internal subdomain [which does not have
27 segments of the physical boundary] all variables with suffixes
28 R,U,V are set to the same values are the corresponding non-suffixed
29 variables.
30   Because this module also contains type declarations for these
31 bounds, it must be included just after the last type declaration
32 inside a subroutine, but before the first executable statement.
33*/
34      integer IstrR,IendR,JstrR,JendR
35#ifdef EW_PERIODIC
36# define IstrU Istr
37#else
38      integer IstrU
39#endif
40#ifdef NS_PERIODIC
41# define JstrV Jstr
42#else
43      integer JstrV
44#endif
45
46      if (WESTERN_EDGE) then
47# ifdef EW_PERIODIC
48        IstrR=Istr-2
49# else
50        IstrR=Istr-1
51        IstrU=Istr+1
52# endif
53      else
54        IstrR=Istr
55# ifndef EW_PERIODIC
56        IstrU=Istr
57# endif
58      endif
59
60      if (EASTERN_EDGE) then
61# ifdef EW_PERIODIC
62        IendR=Iend+2
63# else
64        IendR=Iend+1
65# endif
66      else
67        IendR=Iend
68      endif
69
70      if (SOUTHERN_EDGE) then
71# ifdef NS_PERIODIC
72        JstrR=Jstr-2
73# else
74        JstrR=Jstr-1
75        JstrV=Jstr+1
76# endif
77      else
78        JstrR=Jstr
79# ifndef NS_PERIODIC
80        JstrV=Jstr
81# endif
82      endif
83
84      if (NORTHERN_EDGE) then
85# ifdef NS_PERIODIC
86        JendR=Jend+2
87# else
88        JendR=Jend+1
89# endif
90      else
91        JendR=Jend
92      endif
Note: See TracBrowser for help on using the repository browser.