HOWTO open boundaries
As a regional coastal ocean model GETM supports the specification of lateral open boundary data. Open boundaries are activated in the configuration file getm.inp file.
getm.inp
&domain
openbdy = .true. ! consider open boundaries (default: false)
bdyinfofile = 'bdyinfo.dat' ! ascii file with specifications of open boundaries (openbdy=true)
/
&m2d
bdy2d = .true. ! read in boundary data from file (default: false)
bdyfile_2d = 'bdy_2d.nc' ! netcdf file with boundary data (bdy2d=true)
bdy2d_ramp = 0 ! linear ramp for boundary data (in micro timesteps) (bdy2d=true)
/
&m3d
bdy3d = .true. ! read in boundary data from file (default: false)
bdyfile_3d = 'bdy_3d.nc' ! netcdf file with boundary data (bdy3d=true)
/
bdy2d |
bdy_2d_type |
variables |
.false. | 1 | --- |
2 | ||
.true. | 3 | elev |
4 | elev, u, v |
bdy3d |
bdy_3d_type |
variables |
.true. | 0 | temp, salt |
bdyinfo.dat
GETM is not limited to have the open boundaries at the edges of the topo.nc but defines boundaries as western, northern, eastern and southern (not the real geographic orientation, but orientation on a printout) boundary sections which can be locatede inside the domain. The boundary sections are defined in the bdyinfo.dat file.
a) The principle ordering of the boundaries is (notice order of sequence!) western, northern, eastern and southern boundaries.
b) The sections within one direction are ordered after the start index.
c) The sections must not overlap.
d) If a point belongs to both, a 'vertical' and a 'horizontal' section, it belongs by definition to the 'vertical' section.
e) The first index in the section specification is always <= the last index for all sections and sides
The bdyinfo file has at least four lines (one for each direction) with the number of boundary sections per direction (remember sequence: western, northern, eastern, southern); followed by one line per section giving a constant i-index for western/eastern direction (respectively a const. j index for northern and southern direction) followed by an including first and last j-index for the y axis for western and eastern direction (respectively a first and last i-index for the x axis for northern and southern direction).
The last two digits in each line are related to the type of boundary condition. The first additional integer specifies the 2D boundary type as follows:
1: zero gradient in elevation
2: Sommerfeldt radiation scheme (also known as Chapman, 1985) gradient in elevation
3: Clamped in elevation
4: Flather (1975) condition in elevation
The second integer should just be 0 for now.
Example:
The figure shows the landmask of a setup's topo.nc (50x30 cells), where blue indicates water cells and brown indicates land. The white cells are unspecified in the model setup and MUST be masked out in 'mask.adjust' ; the transitions between water and unspecified cells are open boundaries as well as water cells at the border of the domain. In the figure, the black lines indicate the cell borders. The cells with i-index=1are located between the i=0 and i=1 lines. The water cell in the upper-right corner (j=30,i=38) is defined to be opened to the east in the bdyinfo.dat example (see below).
The bdyinfo.dat is:
1
6 9 12 4 0
2
30 11 20 4 0
30 26 37 4 0
2
50 5 11 4 0
38 21 30 4 0
0
commented:
1 - one western boundary section
6 9 12 4 0 - section located at i=6 and reaches from j=9 up to j=12; Flather condition
2 - two northern boundary sections
30 11 20 4 0- section located at j=30 and reaches from i=11 up to i=20; Flather condition
30 26 37 4 0
2 - two eastern boundary sections
50 5 11 4 0
38 21 30 4 0
0 - no southern boundary sections
bdy_2d.nc
An example file with the mandatory form for the units attribute of the time variable is given below. The time dimension MUST be unlimited. The number of boundary points spans the dimension nbdyp (43 for the bdyinfo.dat above), and the order of points is given as specified in bdyinfo.dat (western boundaries from South to North, northern boundaries from West to East, eastern boundaries from South to North, southern boundaries from West to East). For bdy_2d_type=3 the sea surface elevation elev has to be provided. For bdy_2d_type=4 elev and depth-averaged velocities in local x- and y-direction (u and v) have to be provided.
netcdf bdy_2d {
dimensions:
nbdyp = 43 ;
time = UNLIMITED ; // (2 currently)
variables:
double time(time) ;
time:units = "seconds since 2000-01-01 00:00:00" ;
float elev(time, nbdyp) ;
float u(time, nbdyp) ;
float v(time, nbdyp) ;
}
bdy_3d.nc
An example file with the mandatory form for the units attribute of the time variable is given below. The number of boundary points spans the dimension nbdyp (43 for the bdyinfo.dat above), and the order of points is given as specified in bdyinfo.dat (western boundaries from South to North, northern boundaries from West to East, eastern boundaries from South to North, southern boundaries from West to East). Boundary data are provided in z-coordinate levels, given in variable zax ordered from surface to bottom. For bdy_3d_type=0 the temperature temp and the salinity salt have to be provided.
netcdf bdy_3d {
dimensions:
zax = 10 ;
nbdyp = 43 ;
time = UNLIMITED ; // (2 currently)
variables:
float zax(zax) ;
double time(time) ;
time:units = "seconds since 2000-01-01 00:00:00" ;
float temp(time, nbdyp, zax) ;
float salt(time, nbdyp, zax) ;
}