FMS  2024.03
Flexible Modeling System
topography_mod

Routines for creating land surface topography fields and land-water masks for latitude-longitude grids. More...

Data Types

interface  get_ocean_frac
 Returns fractional area covered by ocean in a grid box. Returns fractional area covered by ocean in the given model grid boxes. More...
 
interface  get_ocean_mask
 Returns a land-ocean mask in a grid box. More...
 
interface  get_topog_mean
 Returns a "realistic" mean surface height field. More...
 
interface  get_water_frac
 Returns fractional area covered by water. More...
 
interface  get_water_mask
 Returns a land-water mask in a grid box. More...
 

Functions/Subroutines

logical function open_topog_file ()
 
logical function open_water_file ()
 
subroutine read_namelist
 Reads the namelist file, write namelist to log file, and initializes constants.
 
subroutine, public topography_init ()
 

Variables

integer, parameter compute_stdev = 123
 
logical, dimension(2) file_is_opened = .false.
 
type(fmsnetcdffile_t), dimension(2) fileobj
 needed for fms2_io
 
integer ipts
 
integer jpts
 
logical module_is_initialized = .FALSE.
 
character(len=fms_path_len) topog_file = 'DATA/navy_topography.data'
 
integer, parameter topog_index = 1
 
character(len=fms_path_len) water_file = 'DATA/navy_pctwater.data'
 
integer, parameter water_index = 2
 

Detailed Description

Routines for creating land surface topography fields and land-water masks for latitude-longitude grids.

Author
Bruce Wyman

This module generates realistic mountains and land-water masks on a specified latitude-longitude grid by interpolating from the 1/6 degree Navy mean topography and percent water data sets. The fields that can be generated are mean and standard deviation of topography within the specified grid boxes; and land-ocean (or water) mask and land-ocean (or water) fractional area.

The interpolation scheme conserves the area-weighted average of the input data by using module horiz_interp.

The interfaces get_gaussian_topog and gaussian_topog_init are documented in gaussian_topog_mod


Data Type Documentation

◆ topography_mod::get_ocean_frac

interface topography_mod::get_ocean_frac

Returns fractional area covered by ocean in a grid box. Returns fractional area covered by ocean in the given model grid boxes.

Parameters
blonThe longitude (in radians) at grid box boundaries.
blatThe latitude (in radians) at grid box boundaries.
ocean_fracThe fractional amount (0 to 1) of ocean in a grid box. The size of this field must be size(blon)-1 by size(blat)-1.
Returns
A logical value of TRUE is returned if the output field was successfully created. A value of FALSE may be returned if the Navy 1/6 degree percent water data set was not readable.

Example usage:

flag = get_ocean_frac( blon, blat, ocean_frac )

Definition at line 129 of file topography.F90.

Private Member Functions

 get_ocean_frac_1d_r4
 
 get_ocean_frac_1d_r8
 
 get_ocean_frac_2d_r4
 
 get_ocean_frac_2d_r8
 

◆ topography_mod::get_ocean_mask

interface topography_mod::get_ocean_mask

Returns a land-ocean mask in a grid box.

Returns a land-ocean mask in the given model grid boxes.

Parameters
blonThe longitude (in radians) at grid box boundaries.
blatThe latitude (in radians) at grid box boundaries.
ocean_fracThe fractional amount (0 to 1) of ocean in a grid box. The size of this field must be size(blon)-1 by size(blat)-1.
Returns
A logical value of TRUE is returned if the output field was successfully created. A value of FALSE may be returned if the Navy 1/6 degree percent water data set was not readable.

Example code:

flag = get_ocean_mask( blon, blat, ocean_mask )

Definition at line 150 of file topography.F90.

Private Member Functions

 get_ocean_mask_1d_r4
 
 get_ocean_mask_1d_r8
 
 get_ocean_mask_2d_r4
 
 get_ocean_mask_2d_r8
 

◆ topography_mod::get_topog_mean

interface topography_mod::get_topog_mean

Returns a "realistic" mean surface height field.

Returns realistic mountains on a latitude-longtude grid. The returned field is the mean topography for the given grid boxes. Computed using a conserving area-weighted interpolation. The current input data set is the 1/6 degree Navy mean topography.

Parameters
blonThe longitude (in radians) at grid box boundaries.
blatThe latitude (in radians) at grid box boundaries.
zmeanThe mean surface height (meters). The size of this field must be size(blon)-1 by size(blat)-1.
Returns
A logical value of TRUE is returned if the surface height field was successfully created. A value of FALSE may be returned if the input topography data set was not readable.


Example usage:

flag = get_topog_mean( blon, blat, zmean )

Definition at line 84 of file topography.F90.

Private Member Functions

 get_topog_mean_1d_r4
 
 get_topog_mean_1d_r8
 
 get_topog_mean_2d_r4
 
 get_topog_mean_2d_r8
 

◆ topography_mod::get_water_frac

interface topography_mod::get_water_frac

Returns fractional area covered by water.

Returns the percent of water in a grid box.

Parameters
blonThe longitude (in radians) at grid box boundaries.
blatThe latitude (in radians) at grid box boundaries.
[out]water_fracThe fractional amount (0 to 1) of water in a grid box. The size of this field must be size(blon)-1 by size(blat)-1.
Returns
A logical value of TRUE is returned if the output field was successfully created. A value of FALSE may be returned if the Navy 1/6 degree percent water data set was not readable.


Example usage:

flag = get_water_frac( blon, blat, water_frac )

Definition at line 170 of file topography.F90.

Private Member Functions

 get_water_frac_1d_r4
 
 get_water_frac_1d_r8
 
 get_water_frac_2d_r4
 
 get_water_frac_2d_r8
 

◆ topography_mod::get_water_mask

interface topography_mod::get_water_mask

Returns a land-water mask in a grid box.

Returns a land-water mask in the given model grid boxes.

Parameters
blonThe longitude (in radians) at grid box boundaries.
blatThe latitude (in radians) at grid box boundaries.
water_maskA binary mask for water (true) or land (false). The size of this field must be size(blon)-1 by size(blat)-1.
Returns
A logical value of TRUE is returned if the output field was successfully created. A value of FALSE may be returned if the Navy 1/6 degree percent water data set was not readable.

Example usage:

flag = get_water_mask( blon, blat, water_mask )

Definition at line 190 of file topography.F90.

Private Member Functions

 get_water_mask_1d_r4
 
 get_water_mask_1d_r8
 
 get_water_mask_2d_r4
 
 get_water_mask_2d_r8