Public Repository

Last pushed: 2 months ago
Short Description
Image for running bluesky (https://github.com/pnwairfire/bluesky/)
Full Description

The BlueSky software included in this docker image is provided for research purposes only. It's output may not accurately reflect actual smoke due to numerous reasons. Data are provisional; use at own risk.


To use, first install docker.

Next, if not on linux, create a vm to run the docker daemon and initialize the docker environment:

docker-machine create --driver virtualbox docker-default   # only needs to be done once
docker-machine start docker-default   # needs to be done subsequently
eval "$(docker-machine env docker-default)"  # at the beginning of each terminal session

Finally, grab the image and run it:

docker pull pnwairfire/bluesky
docker run pnwairfire/bluesky bsp -h  # to see options

Note, on linux, you may need to use sudo for some or all docker commands.

To run bluesky with piped input, use something like the following:

echo '{
    "fire_information": [{
        "id": "SF11C14225236095807750",
        "event_of": {
            "id": "SF11E826544",
            "name": "Natural Fire near Snoqualmie Pass, WA"
        },
        "location": {
            "perimeter": {
                "type": "MultiPolygon",
                "coordinates": [
                    [
                        [
                            [-121.4522115, 47.4316976],
                            [-121.3990506, 47.4316976],
                            [-121.3990506, 47.4099293],
                            [-121.4522115, 47.4099293],
                            [-121.4522115, 47.4316976]
                        ]
                    ]
                ]
            },
            "ecoregion": "southern",
            "utc_offset": "-09:00"
        },
        "growth": [{
            "pct": 100,
            "start": "20150120",
            "end": "20150120"
        }]
    }]
}' | docker run -i pnwairfire/bluesky bsp ingestion fuelbeds consumption emissions

Another example, running through vsmoke dispersion:

echo '{
    "config": {
        "emissions": {
            "species": ["PM25"]
        },
        "dispersion": {
            "start": "2014-05-30T00:00:00",
            "num_hours": 24,
            "model": "vsmoke",
            "dest_dir": "/bluesky-output/bsp-dispersion-output/"
        },
        "export": {
            "modes": ["localsave"],
            "extra_exports": ["dispersion"],
            "localsave": {
                "dest_dir": "/bluesky-output/bsp-local-exports/"
            }
        }
    },
    "fire_information": [
        {
            "meta":{
                "vsmoke": {
                    "wd": 30,
                    "ws": 10
                }
            },
            "event_of": {
                "id": "SF11E826544",
                "name": "Fire Near Wolf Creek, Winthrop, WA"
            },
            "id": "SF11C14225236095807750",
            "type": "natural",
            "location": {
                "area": 10000,
                "ecoregion": "western",
                "latitude": 48.4956218,
                "longitude": -120.2663579,
                "utc_offset": "-07:00"
            },
            "growth": [
                {
                    "start": "2014-05-29T17:00:00",
                    "end": "2014-05-30T17:00:00",
                    "pct": 100.0
                }
            ]
        }
    ]
}' | docker run -i -v $HOME:/bluesky-output/ pnwairfire/bluesky bsp  ingestion fuelbeds consumption emissions timeprofiling dispersion | python -m json.tool > out.json

To run bluesky with file input, you'll need to use the '-v' option to mount host machine directories in your container. For example, suppose you've got fire json input data in /foo/bar/fires.json, you could run something like the following:

docker run -v /foo/bar/:/input/ pnwairfire/bluesky \
    bsp -i /input/fires.json \
    ingestion fuelbeds consumption emissions
Docker Pull Command
Owner
pnwairfire

Comments (0)