An open API service indexing awesome lists of open source software.

https://github.com/ziman/baltrad-merge

Convert raw Baltrad data to bird profiles
https://github.com/ziman/baltrad-merge

Last synced: 11 months ago
JSON representation

Convert raw Baltrad data to bird profiles

Awesome Lists containing this project

README

          

# baltrad-merge

A set of utilities for merging data files coming from Baltrad.

## Principle of operation

* User runs `recurse.py` from this repository.
* Under the hood, `recurse.py` traverses the input directories and launches a
Docker container (sequentially) for each directory with `.h5` files to process.
* Users are not expected to interact with the Docker container directly.

## Installation

1. Install Docker: `https://docs.docker.com/engine/installation/mac/`
2. Pull the Docker image: `docker pull ziman/baltrad-merge`
3. Clone baltrad-merge: `https://github.com/ziman/baltrad-merge`
4. To run, go to directory: `cd baltrad-merge`

## Synopsis

```bash
./recurse.py INPUT OUTPUT WORKDIR --radar RADAR --date-from YYYY/MM/DD --date-to YYYY/MM/DD
```

* `INPUT`: path to input directory
* `OUTPUT`: path to output directory
* `WORKDIR`: path to work directory, will be cleaned up after every run (unless interrupted)
* `--radar` can be specified in multiple ways
* specify country, eg. `--radar fr`
* specify radar within country, eg. `--radar frbou`
* any combination of the above, eg. `--radar 'nl|seang|sevar|frbou|frge'` -- needs the apostrophes! (or double quotes)
* `--date-from YYYY/MM/DD` will start from 00:00 of that day
* `--date-to: YYYY/MM/DD` will stop at 24:00 of that day

### Expected directory structure for `--date-from` and `--date-to`

If you are specifying `--date-from` or `--date-to` (or both), the `INPUT`
directory must contain a hierarchical directory structure in the form
`YYYY/MM/DD`. For example:

* `INPUT/2016/09/21/01/00/bejab_.....h5` is okay
* `INPUT/2016/09/21/myradar/bejab_.....h5` is okay
* `INPUT/myradar/09/21/12/bejab_.....h5` is not okay

In other words, the first three directories subordinate to `INPUT` will be interpreted as `YYYY/MM/DD` if (and only if) `--date-from` or `--date-to` are given.
Any further directory structure does not matter and is up to you.