![]() |
mHM
The mesoscale Hydrological Model
|
Routines to read files containing timeseries data. More...
Functions/Subroutines | |
| subroutine, public | read_timeseries (filename, fileunit, periodstart, periodend, optimize, opti_function, data, mask, nmeasperday) |
| Reads time series in ASCII format. | |
Routines to read files containing timeseries data.
This routine is reading time series input data for a particular time period. The files need to have a specific header specified in the different routines.
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_timeseries::read_timeseries | ( | character(len = *), intent(in) | filename, |
| integer(i4), intent(in) | fileunit, | ||
| integer(i4), dimension(3), intent(in) | periodstart, | ||
| integer(i4), dimension(3), intent(in) | periodend, | ||
| logical, intent(in) | optimize, | ||
| integer(i4), intent(in) | opti_function, | ||
| real(dp), dimension(:), intent(out), allocatable | data, | ||
| logical, dimension(:), intent(out), optional, allocatable | mask, | ||
| integer(i4), intent(out), optional | nmeasperday ) |
Reads time series in ASCII format.
Reads time series in ASCII format. Needs specific header lines:
!> <description> !> nodata <nodata value> !> n <number of measurements per day> measurements per day [1, 1440] !> start <YYYY_i4> <MM_i4> <DD_i4> <HH_i4> <MM_i4> (YYYY MM DD HH MM) !> end <YYYY_i4> <MM_i4> <DD_i4> <HH_i4> <MM_i4> (YYYY MM DD HH MM) !>
Line 6 is the first line with data in the following format:
!> <YYYY_i4> <MM_i4> <DD_i4> <HH_i4> <MM_i4> <data_dp> !>
The routine checks for missing data points and if data points are equal distanced. The first data point at each day has to be at HH:MM = 00:00.
| [in] | character(len = *) :: filename | File name |
| [in] | integer(i4) :: fileunit | Unit to open file |
| [in] | integer(i4), dimension(3) :: periodStart | Start day of reading (YYYY,MM,DD) |
| [in] | integer(i4), dimension(3) :: periodEnd | End day of reading (YYYY,MM,DD) |
| [in] | logical :: optimize | optimization flag |
| [in] | integer(i4) :: opti_function | |
| [out] | real(dp), dimension(:) :: data | Data vector |
| [out] | logical, dimension(:), optional :: mask | Mask for nodata values in data |
| [out] | integer(i4), optional :: nMeasPerDay | Number of data points per day |
Definition at line 72 of file mo_read_timeseries.f90.
Referenced by mo_mrm_read_data::mrm_read_discharge().