Routines for creating land surface topography fields and land-water masks for latitude-longitude grids.
More...
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
◆ 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
-
blon | The longitude (in radians) at grid box boundaries. |
blat | The latitude (in radians) at grid box boundaries. |
ocean_frac | The 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
-
blon | The longitude (in radians) at grid box boundaries. |
blat | The latitude (in radians) at grid box boundaries. |
ocean_frac | The 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
-
blon | The longitude (in radians) at grid box boundaries. |
blat | The latitude (in radians) at grid box boundaries. |
zmean | The 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
-
| blon | The longitude (in radians) at grid box boundaries. |
| blat | The latitude (in radians) at grid box boundaries. |
[out] | water_frac | The 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
-
blon | The longitude (in radians) at grid box boundaries. |
blat | The latitude (in radians) at grid box boundaries. |
water_mask | A 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 |
|
◆ open_topog_file()
logical function open_topog_file |
|
private |
◆ open_water_file()
logical function open_water_file |
|
private |
◆ read_namelist()
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 |
◆ compute_stdev
integer, parameter compute_stdev = 123 |
|
private |
◆ file_is_opened
logical, dimension(2) file_is_opened = .false. |
|
private |
◆ fileobj
◆ ipts
◆ jpts
◆ module_is_initialized
logical module_is_initialized = .FALSE. |
|
private |
◆ topog_file
character(len=fms_path_len) topog_file = 'DATA/navy_topography.data' |
|
private |
◆ topog_index
integer, parameter topog_index = 1 |
|
private |
◆ water_file
character(len=fms_path_len) water_file = 'DATA/navy_pctwater.data' |
|
private |
◆ water_index
integer, parameter water_index = 2 |
|
private |