GithubHelp home page GithubHelp logo

beaker-climate-data-utility's Introduction

Beaker Climate Data Utility

About

Beaker Climate Data Utility is a Beaker module designed to handle geographical/climate data. It provides a set of tools for detecting the resolution of a dataset, which can be particularly useful when regridding a dataset or when the resolution is unknown.

Before and After regridding operations:

before_regridding_image after_regridding_image

Startup

To use Beaker Climate Data Utility, follow these steps:

  1. Navigate to the project directory: cd beaker-climate-data-utility
  2. Create a .env file and fill it out with the necessary environment variables. Refer to the envfile.sample file for the required variables.
  3. Launch the container using Docker Compose: docker-compose up -d
  4. Access the Beaker Climate Data Utility application at http://localhost:8888/dev_ui?

You can view the logs with docker logs -f beaker-climate-data-utility-jupyter-1

Usage

Once in the user interface, you can use the notebook like a regular Jupyter notebook. There is also an LLM assistant you can use to access special features in the notebook.

The kernel can interface with dataset storage on the HMI server through custom messages.

To retrieve a dataset from the HMI server, send a custom message named download_dataset_request with the payload:

{
    "uuid":"<your id here>",
    "filename":"<your filename here>"
}

This dataset will be loaded into the jupyter notebook environment as an xarray dataset called dataset.

To save a dataset to the HMI server, you need to send a custom message named save_dataset_request and provide the name of the xarray dataset variable you want to save with a payload:

{
    "dataset":<your dataset variable name here>,
    "filename":"<your chosen filename for the persisted data here>"
}

This will return a dataset uuid from the HMI server with your new dataset.

You can request the LLM to provide you plotting code in order to preview netcdf files. The LLM will ask for a variable name in the notebook, and if you have any particular geographical column names, a data variable name, and a time slice index. There are defaults for latter 3 values.

You can request the LLM to provide regridding code in order to regrid a netcdf dataset.

beaker-climate-data-utility's People

Contributors

sorrento110 avatar

Watchers

Matthew Printz avatar Charles Coleman avatar Brandon Rose avatar  avatar Joshua Cruz avatar

beaker-climate-data-utility's Issues

Support for downscaling

This issue is to migrate this repo/context into darpa-askem/beaker-kernel as its own context. The Dockerfile might need to be slightly updated to support the relevant dependencies but otherwise it should basically be compatible in that environment.

Then--we need to update the regridding function to be more flexible based on this thread.

We also need to ensure that the regridding/downscaling tool can check for _bnds type variables and exclude them or drop them out of the process as they seem to cause problems.

Basic testing

  1. set up this repo based on the README
  2. navigate to localhost:8888
  3. select the climate data utility beaker context and load it
  4. send a custom message of type download_dataset_request with the payload {"uuid": "149efd94-dc91-4673-9245-443ad61276ea", "filename": "cmip6-6e565455-9589-4d7c-8960-18c47ed6b9b7.nc"}
  5. watch logs, check that dataset is an xarray variable in the notebook

Now, after migrating this context to the DARPA-ASKEM/beaker-kernel you should be able to follow the same steps if the migration of the context worked as expected.

Next steps

  1. try regridding the dataset to 2 degree resolution with a mean aggregation and plot the before/after results. The resulting plot should be more coarse grained than the "before"
  2. try downscaling going to 0.1 degree resolution via interpolation. check the before/after as well by plotting.

Determine data I/O needs with Uncharted

Assess how data should enter environment and be saved. Are they as datasets in TDS? If dataset a is regridded do we now have dataset b or is it some modification to dataset a with a new file created/saved to S3?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.