init_domain() - initialise the computational domain

INTERFACE:

    subroutine init_domain(input_dir)
    IMPLICIT NONE
DESCRIPTION:

This routine is responsible for setting up the bathymetry and the grid information.
The following steps are done in $ init\_domain()$:

1:
partition of the calculation domain - important for parallel runs
2:
reading bathymetry and grid information through the generic subroutine $ read\_topo\_file$
3:
optionally set minimum depth in regions
4:
optionally adjust the depth in regions
5:
optionally adjust the depth in regions
6:
calculate the mask for T-points
7:
optionally adjust the mask in regions
8:
read boundary information and adjust masks
9:
calculate masks for U-, V- and X-points
10:
calculate additional grid-information - like $ latu$ and $ latv$
11:
calculate metrics - i.e. all necessary grid-spacings
12:
calculate Coriolis parameter - can be constant or spatially varying
INPUT/OUTPUT PARAMETERS:
    character(len=*)                    :: input_dir
REVISION HISTORY:
LOCAL VARIABLES:
    integer                   :: rc
    integer                   :: np,sz
    integer                   :: i,j,n
    integer                   :: kdum
    character(len=PATH_MAX)   :: bathymetry               = 'topo.nc'
    integer                   :: vel_depth_method=0
    character(len=PATH_MAX)   :: bdyinfofile              = 'bdyinfo.dat'
    character(len=PATH_MAX)   :: min_depth_file           = 'minimum_depth.dat'
    character(len=PATH_MAX)   :: bathymetry_adjust_file   = 'bathymetry.adjust'
    character(len=PATH_MAX)   :: mask_adjust_file         = 'mask.adjust'
    namelist /domain/ &
              vert_cord,maxdepth,                               &
              bathy_format,bathymetry,vel_depth_method,         &
              longitude,latitude,f_plane,openbdy,bdyinfofile,   &
              crit_depth,min_depth,kdum,ddu,ddl,                &
              d_gamma,gamma_surf,il,ih,jl,jh,z0_method,z0_const



kklingbe 2017-10-02