![]() |
mHM
The mesoscale Hydrological Model
|
Reads spatial input data. More...
Data Types | |
| interface | read_spatial_data_ascii |
| Reads spatial data files of ASCII format. More... | |
| interface | read_spatial_data_nc |
| Reads spatial data files of nc format. More... | |
| interface | read_spatial_data_nc_or_ascii |
| Reads spatial data files of nc or ASCII format. More... | |
Functions/Subroutines | |
| subroutine | read_spatial_data_ascii_dp (filename, fileunit, header_ncols, header_nrows, header_xllcorner, header_yllcorner, header_cellsize, data, mask) |
| TODO: add description. | |
| subroutine | read_spatial_data_ascii_i4 (filename, fileunit, header_ncols, header_nrows, header_xllcorner, header_yllcorner, header_cellsize, data, mask) |
| TODO: add description. | |
| subroutine, public | read_header_ascii (filename, fileunit, header_ncols, header_nrows, header_xllcorner, header_yllcorner, header_cellsize, header_nodata) |
| Reads header lines of ASCII files. | |
| subroutine, public | check_uniform_axis (var, cellsize, origin, increasing, tol) |
| check if given axis is a uniform axis. | |
| logical function | is_x_axis (var) |
| check if given variable is a x-axis. | |
| logical function | is_y_axis (var) |
| check if given variable is a y-axis. | |
| logical function | is_lon_coord (var) |
| check if given variable is a lon coordinate. | |
| logical function | is_lat_coord (var) |
| check if given variable is a lat coordinate. | |
| subroutine, public | get_header_info_from_nc (nc, var, nx, ny, xll, yll, cellsize, mask) |
| initialize grid from a netcdf dataset | |
| subroutine | read_spatial_data_nc_i4 (ncname, varname, data, maskout, ncols, nrows, xllcorner, yllcorner, cellsize, nodata_value) |
| Read file from filepath. | |
| subroutine | read_spatial_data_nc_dp (ncname, varname, data, maskout, ncols, nrows, xllcorner, yllcorner, cellsize, nodata_value) |
| Read file from filepath. | |
| subroutine | read_spatial_data_nc_or_ascii_dp (filepath, fileunit, header_ncols, header_nrows, header_xllcorner, header_yllcorner, header_cellsize, data, maskout, out_ncols, out_nrows, out_xllcorner, out_yllcorner, out_cellsize, out_nodata_value) |
| Read file from filepath. | |
| subroutine | read_spatial_data_nc_or_ascii_i4 (filepath, fileunit, header_ncols, header_nrows, header_xllcorner, header_yllcorner, header_cellsize, data, maskout, out_ncols, out_nrows, out_xllcorner, out_yllcorner, out_cellsize, out_nodata_value) |
| Read file from filepath. | |
Reads spatial input data.
This module is to read spatial input data, e.g. dem, aspect, flow direction. The module provides a subroutine for ASCII files. (Subroutine for NetCDF files will come with release 5.1). The data are read from the specified directory.
COPYING and COPYING.LESSER provided with this software. The complete GNU license text can also be found at http://www.gnu.org/licenses/.
| subroutine, public mo_read_spatial_data::check_uniform_axis | ( | type(ncvariable), intent(in) | var, |
| real(dp), intent(out), optional | cellsize, | ||
| real(dp), intent(out), optional | origin, | ||
| logical, intent(out), optional | increasing, | ||
| real(dp), intent(in), optional | tol ) |
check if given axis is a uniform axis.
| [in] | var | NetCDF variable for corresponding axis |
| [out] | cellsize | cellsize of the uniform axis |
| [out] | origin | origin of the axis vertices |
| [out] | increasing | whether the axis has increasing values |
| [in] | tol | tolerance for cell size comparisson (default: 1.e-7) |
Definition at line 469 of file mo_read_spatial_data.f90.
Referenced by get_header_info_from_nc().
| subroutine, public mo_read_spatial_data::get_header_info_from_nc | ( | type(ncdataset), intent(in) | nc, |
| character(*), intent(in) | var, | ||
| integer(i4), intent(out) | nx, | ||
| integer(i4), intent(out) | ny, | ||
| real(dp), intent(out) | xll, | ||
| real(dp), intent(out) | yll, | ||
| real(dp), intent(out) | cellsize, | ||
| logical, dimension(:,:), intent(out), optional, allocatable | mask ) |
initialize grid from a netcdf dataset
initialize grid from a netcdf dataset and a reference variable.
| [in] | nc | NetCDF Dataset |
| [in] | var | nc variable name to determine the grid from |
| [out] | nx | size of the x coordinate |
| [out] | ny | size of the y coordinate |
| [out] | xll | x lower left corner |
| [out] | yll | y lower left corner |
Definition at line 652 of file mo_read_spatial_data.f90.
References check_uniform_axis(), is_lat_coord(), is_lon_coord(), is_x_axis(), and is_y_axis().
Referenced by mo_read_spatial_data::read_spatial_data_nc::read_spatial_data_nc_dp(), and mo_read_spatial_data::read_spatial_data_nc::read_spatial_data_nc_i4().
|
private |
check if given variable is a lat coordinate.
logical :: is_lat_coord | [in] | var | NetCDF variable to check |
Definition at line 620 of file mo_read_spatial_data.f90.
References is_lat_coord().
Referenced by get_header_info_from_nc(), and is_lat_coord().
|
private |
check if given variable is a lon coordinate.
logical :: is_lon_coord | [in] | var | NetCDF variable to check |
Definition at line 588 of file mo_read_spatial_data.f90.
References is_lon_coord().
Referenced by get_header_info_from_nc(), and is_lon_coord().
|
private |
check if given variable is a x-axis.
logical :: is_x_axis | [in] | var | NetCDF variable to check |
Definition at line 542 of file mo_read_spatial_data.f90.
References is_x_axis().
Referenced by get_header_info_from_nc(), and is_x_axis().
|
private |
check if given variable is a y-axis.
logical :: is_y_axis | [in] | var | NetCDF variable to check |
Definition at line 565 of file mo_read_spatial_data.f90.
References is_y_axis().
Referenced by get_header_info_from_nc(), and is_y_axis().
| subroutine, public mo_read_spatial_data::read_header_ascii | ( | character(len = *), intent(in) | filename, |
| integer(i4), intent(in) | fileunit, | ||
| integer(i4), intent(out) | header_ncols, | ||
| integer(i4), intent(out) | header_nrows, | ||
| real(dp), intent(out) | header_xllcorner, | ||
| real(dp), intent(out) | header_yllcorner, | ||
| real(dp), intent(out) | header_cellsize, | ||
| real(dp), intent(out) | header_nodata ) |
Reads header lines of ASCII files.
Reads header lines of ASCII files, e.g. dem, aspect, flow direction.
| [in] | character(len = *) :: filename | Name of file and its location |
| [in] | integer(i4) :: fileunit | File unit for open file |
| [out] | integer(i4) :: header_nCols | Reference number of columns |
| [out] | integer(i4) :: header_nRows | Reference number of rows |
| [out] | real(dp) :: header_xllcorner | Reference lower left corner (x) |
| [out] | real(dp) :: header_yllcorner | Reference lower left corner (y) |
| [out] | real(dp) :: header_cellsize | Reference cell size [m] |
| [out] | real(dp) :: header_nodata | Reference nodata value |
Definition at line 417 of file mo_read_spatial_data.f90.
References mo_common_constants::nodata_dp.
Referenced by mo_meteo_handler::init_level2(), mo_common_read_data::read_dem(), mo_read_spatial_data::read_spatial_data_ascii::read_spatial_data_ascii_dp(), mo_read_spatial_data::read_spatial_data_ascii::read_spatial_data_ascii_i4(), mo_read_spatial_data::read_spatial_data_nc_or_ascii::read_spatial_data_nc_or_ascii_dp(), and mo_read_spatial_data::read_spatial_data_nc_or_ascii::read_spatial_data_nc_or_ascii_i4().
|
private |
TODO: add description.
TODO: add description
| [in] | character(len = *) :: filename | filename with location |
| [in] | integer(i4) :: fileunit | unit for opening the file |
| [in] | integer(i4) :: header_nCols | number of columns of data fields: |
| [in] | integer(i4) :: header_nRows | number of rows of data fields: |
| [in] | real(dp) :: header_xllcorner | header read in lower left corner |
| [in] | real(dp) :: header_yllcorner | header read in lower left corner |
| [in] | real(dp) :: header_cellsize | header read in cellsize |
| [out] | real(dp), dimension(:, :) :: data | data |
| [out] | logical, dimension(:, :) :: mask | mask |
Definition at line 136 of file mo_read_spatial_data.f90.
|
private |
TODO: add description.
TODO: add description
| [in] | character(len = *) :: filename | filename with location |
| [in] | integer(i4) :: fileunit | unit for opening the file |
| [in] | integer(i4) :: header_nCols | number of columns of data fields: |
| [in] | integer(i4) :: header_nRows | number of rows of data fields: |
| [in] | real(dp) :: header_xllcorner | header read in lower left corner |
| [in] | real(dp) :: header_yllcorner | header read in lower left corner |
| [in] | real(dp) :: header_cellsize | header read in cellsize |
| [out] | integer(i4), dimension(:, :) :: data | data |
| [out] | logical, dimension(:, :) :: mask | mask |
Definition at line 276 of file mo_read_spatial_data.f90.
|
private |
Read file from filepath.
If there is a nc file with the correct name it is prefered over the asci file.
TODO: add description
Definition at line 824 of file mo_read_spatial_data.f90.
|
private |
Read file from filepath.
If there is a nc file with the correct name it is prefered over the asci file.
TODO: add description
Definition at line 764 of file mo_read_spatial_data.f90.
|
private |
Read file from filepath.
If there is a nc file with the correct name it is prefered over the asci file.
TODO: add description
Definition at line 884 of file mo_read_spatial_data.f90.
|
private |
Read file from filepath.
If there is a nc file with the correct name it is prefered over the asci file.
TODO: add description
Definition at line 1002 of file mo_read_spatial_data.f90.