Module topog_mod
OVERVIEW
topog_mod Generate topography for ocean model.
The topography can be idealized or remapped from some source topography data.
The type of topography is specified by the namelist variable "topography" and
"topog_depend_on_vgrid". See the documentation of namelist variable "topography"
and "topog_depend_on_vgrid" for details.
OTHER MODULES USED
mpp_mod
mpp_domains_mod
mpp_io_mod
fms_mod
axis_utils_mod
grids_type_mod
grids_util_mod
horiz_interp_mod
constants_mod
PUBLIC INTERFACE
PUBLIC DATA
None.
PUBLIC ROUTINES

topog_init
call topog_init (Topog, Hgrid)

DESCRIPTION
 Read topography namelist.

INPUT

Hgrid  A derivedtype variable that contains horizontal grid information. [type(hgrid_data_type)] 

INPUT/OUTPUT

Topog  A derivedtype variable that contains topography. [type(topog_data_type)] 

generate_topog
call generate_topog (Hgrid, Topog, Vgrid)

DESCRIPTION
 Call horiz_interp to calculate regridded topography.
Perform topography checks

INPUT

Hgrid  A derivedtype variable that contains horizontal grid information. [type(hgrid_data_type)] 
Vgrid  A derivedtype variable that contains vertical grid information. [type(vgrid_data_type), optional] 

INPUT/OUTPUT

Topog  A derivedtype variable that contains topography data. [type(topog_data_type)] 

write_topog_meta
call write_topog_meta (unit, axis_x, axis_y)

DESCRIPTION

INPUT

unit  The unit corresponding the output netcdf file. Always is returned by mpp_open. [integer] 
axis_x, axis_y  axis of Tcell center [type(axistype)] 

write_topog_data
call write_topog_data (unit,Topog)

DESCRIPTION

INPUT

unit  The unit corresponding the output netcdf file. Always is returned by mpp_open. [integer] 
Topog  A derivedtype variable that contains topography data. [type(topog_data_type)] 

topog_end
call topog_end ( Topog )

DESCRIPTION
 Deallocates memory used by "topog_data_type" variables.

INPUT/OUTPUT

Topog  A derivedtype variable that contains topography data. [type(topog_data_type)] 
NAMELIST
&topog_nml

topography
rectangular_basin : Constructing a rectangular basin with a flat bottom
bowl : From "Simulation of densitydriven frictional downslope
flow in zcoordinate mocean models" Winton et al.
JPO, Vol 28, No 11, 21632174, November 1998
gaussian : sets "kmt" to a gaussian bump on a sloping bottom.
idealized : generates an "idealized" not very realistic topography.
all_land : constructing a all land topography.
from_file : Remap the topography onto the current grid from some source data file.
[character(len=24)]

topog_depend_on_vgrid
when topography /= "from_file", topog_depend_on_vgrid must be true (default value).
When it is false, topography is obtained by a simple remapping onto current grid.
[logical]

topog_file
name of topograhy file (e.g. scripps, navy_topo, ...)
[character(len=128)]

topog_field
name of topography field in file
[character(len=24)]

flat_bottom
generate flat bottom over ocean points. Default value is false.
[logical]

full_cell
do not generate partial bottom cells. Default value is false.
[logical]

fill_isolated_cells
Do not allow nonadvective tracer cells (strongly recommended). Default value is true.
[logical]

dont_change_landmask
Do not change land/sea mask when filling isolated cells. Default value is false.
[logical]

fill_shallow
Make cells less than minimum depth land. Default value is false.
[logical]

fill_first_row
if true make first row of ocean model all land points for ice model when
topography is "from_file". It will do nothing when topography is not "from_file".
Default value is true.
[logical]

deepen_shallow
Make cells less than minimum depth equal to minimum depth. Default value is false.
[logical]

round_shallow
Make cells land if depth is less than 1/2 mimumim depth, otherwise make ocean. Default value is false.
[logical]

gauss_amp
height of gaussian bump as percentage of ocean depth
[real]

gauss_scale
width of gaussian bump as percentag e of basin width
[real]

slope_x
rise of the ocean floor to the east for the gaussian bump
[real, units: (m/deg)]

slope_y
rise of the ocean floor to the north for the gaussian bump
[real, units: (m/deg)]

bowl_south
southern boundary of Winton bowl
[real, units: degrees]

bowl_north
northern boundary of Winton bowl
[real, units: degrees]

bowl_west
western boundary of Winton bowl
[real, units: degrees]

bowl_east
eastern boundary of Winton bowl
[real, units: degrees]

bowl_min_depth
minimum depth of Winton bowl
[real, units: meters]

bowl_max_depth
maximum depth of Winton bowl
[real, units: meters]

kmt_min
minimum number of vertical levels
[integer]

filter_topog
apply filter to topography. Default value is false.
[logical]

num_filter_pass
number of passes of spatial filter
[integer]

adjust_topo
adjust topography (enforce_min_depth;remove_isolated_cells;restrict_partial_cells)
Strongly recommended. Default value is true.
[logical]

fraction_full_cell
Fraction of the associated full cell that a corresponding partial cell thickness
is no smaller than. That is, we maintain
partial_cell_min_dht(i,j,k) = fraction_full_cell*full_cell_dzt(k)
If fraction_full_cell=0.0, then partial_cell_min_dht = min(zw(1), 50.0)
[real]

scale_factor
scaling factor for topography data (e.g. 1 to flip sign or 0.01 to convert from centimeters)
[real]

smooth_topo_allow_deepening
allow filter to deepen cells. Default value is false.
[logical]

interp_method
specifying the remapping method when remampping topography from source data to current grid.
Its value can be "spherical" or " bilinear". Default value is "bilinear". when the source
topography is on the regular grid (nml src_is_spherical is true), "bilinear" interpolation
is recommanded, since bilinear interpolation will provide more smooth results than
"spherical" interpolation (especially when interpolating from coarse grid to fine grid).
Plus bilinear interpolation is much more efficiency than "spherical interpolation".
When the source data is on nonregular grid (nml src_is_spherical is false), "bilinear"
interpolation may not work well because the destination is not inside the source grid,
in this case, you need to set interp_method to "spherical".
[character(len=64)]

num_nbrs
Number of nearest neighbors for regridding.
[integer]

max_dist
Maximum region of influence around destination grid points.
[real, units: radians]

src_is_spherical
Determine if the source grid is spherical grid or not. If true, source grid is spherical grid,
otherwise not. Default value is .true. When src_is_spherical is .true., lon_field and lat_field
need to be set.
[logical]

lon_field
name of geographic longitude field in source file
[character(len=24)]

lat_field
name of geographic latitude field in source file
[character(len=24)]

debug
Control standard output. Default value is true so to show lots of information.
[logical]
DATA SETS
None.
ERROR MESSAGES
None.