dm_dwd_mosmix_station_catalog_read Function

public function dm_dwd_mosmix_station_catalog_read(stations, unit, header) result(rc)

Reads MOSMIX stations from CFG catalog file. On error, the array is allocated but of size 0. Pass the file unit to the function:

integer :: stat, unit
type(dwd_mosmix_station_type), allocatable :: stations(:)

open (action='read', file='catalog.cfg', iostat=stat, newunit=unit, status='old')
if (stat /= 0) error stop
rc = dm_dwd_mosmix_station_catalog_read(stations, unit)
close (unit)

The MOSMIX station catalog has the following format:

ID    ICAO NAME                 LAT    LON     ELEV
----- ---- -------------------- -----  ------- -----
01001 ENJA JAN MAYEN             70.56   -8.40    10
01008 ENSB SVALBARD              78.15   15.28    29
01025 ---- TROMSOE               69.41   18.55    10

The catalog file can be downloaded from:

  • https://www.dwd.de/DE/leistungen/met_verfahren_mosmix/mosmix_stationskatalog.cfg?view=nasPublication&nn=16102

Or, use local catalog file share/dmdwd/catalog.cfg.

The function returns the following error codes:

  • E_ALLOC if memory allocation failed.
  • E_EMPTY if no records have been read.
  • E_FORMAT if line format is invalid.
  • E_READ if file reading failed.

Arguments

Type IntentOptional Attributes Name
type(dwd_mosmix_station_type), intent(out), allocatable :: stations(:)

Stations read from file.

integer, intent(in) :: unit

File unit.

logical, intent(in), optional :: header

File contains header.

Return Value integer


Calls

proc~~dm_dwd_mosmix_station_catalog_read~~CallsGraph proc~dm_dwd_mosmix_station_catalog_read dm_dwd_mosmix_station_catalog_read interface~dm_present dm_present proc~dm_dwd_mosmix_station_catalog_read->interface~dm_present