FMS 2025.01-dev
Flexible Modeling System
Loading...
Searching...
No Matches
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.

Public 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.

Public 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.

Public 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.

Public 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.

Public Member Functions

 get_water_mask_1d_r4
 
 get_water_mask_1d_r8
 
 get_water_mask_2d_r4
 
 get_water_mask_2d_r8
 

Function/Subroutine Documentation

◆ open_topog_file()

logical function open_topog_file
private

Definition at line 285 of file topography.F90.

◆ open_water_file()

logical function open_water_file
private

Definition at line 312 of file topography.F90.

◆ read_namelist()

subroutine read_namelist
private

Reads the namelist file, write namelist to log file, and initializes constants.

Definition at line 344 of file topography.F90.

◆ topography_init()

subroutine, public topography_init

Definition at line 273 of file topography.F90.

Variable Documentation

◆ compute_stdev

integer, parameter compute_stdev = 123
private

Definition at line 257 of file topography.F90.

◆ file_is_opened

logical, dimension(2) file_is_opened = .false.
private

Definition at line 226 of file topography.F90.

◆ fileobj

type(fmsnetcdffile_t), dimension(2) fileobj
private

needed for fms2_io

Definition at line 227 of file topography.F90.

◆ ipts

integer ipts
private

Definition at line 256 of file topography.F90.

◆ jpts

integer jpts
private

Definition at line 256 of file topography.F90.

◆ module_is_initialized

logical module_is_initialized = .FALSE.
private

Definition at line 265 of file topography.F90.

◆ topog_file

character(len=fms_path_len) topog_file = 'DATA/navy_topography.data'
private

Definition at line 220 of file topography.F90.

◆ topog_index

integer, parameter topog_index = 1
private

Definition at line 224 of file topography.F90.

◆ water_file

character(len=fms_path_len) water_file = 'DATA/navy_pctwater.data'
private

Definition at line 220 of file topography.F90.

◆ water_index

integer, parameter water_index = 2
private

Definition at line 225 of file topography.F90.