Coder Social home page Coder Social logo

fdb-tools's Introduction

FDB Tools

Scripts/notebooks to set up and demonstrate FDB and MARS at MeteoSwiss.

FDB Installation

Before running the FDB scripts you should have FDB installed via spack, eg.

mkdir spack-env && cat > spack-env/spack.yaml << EOF
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
  # add package specs to the `specs` list
  specs: 
    - [email protected] 
    - [email protected]  ~mpi 
    - [email protected] jp2k=none +fortran 
    - [email protected]
    - hdf5 ~mpi
  view: false
  concretizer:
    unify: true
  config:
    install_tree:
      root: $SCRATCH/spack-root
EOF
spack env activate -p spack-env
spack install

To make sure you have FDB installed, make sure a path is returned by

spack location -i fdb

pyFDB Installation

To run the notebook to read from FDB with python, you also need to install pyFDB from local a clone (not yet available on PyPI) and earthkit-data. See below steps.

conda create -n fdb
conda activate fdb
python -m pip install --upgrade git+https://github.com/ecmwf/pyfdb.git@master
pip install earthkit-data

Required Environment Variables

The setup.sh script sets up the following variables, for a new FDB on your $SCRATCH.

  • FDB_HOME needs to be set (for pyfdb). Identical to FDB5_HOME. Find with spack location -i fdb.

  • FDB5_HOME needs to be set (for earthkit.data). Identical to FDB_HOME. Find with spack location -i fdb.

  • Either FDB5_CONFIG or FDB5_CONFIG_FILE needs to be set (for FDB). FDB5_CONFIG should have json version of config, whereas FDB5_CONFIG_FILE should be set to a file path where the config file (YAML) lives. eg

    export FDB5_CONFIG='{'type':'local','engine':'toc','schema':'$SETUP_FOLDER/fdb-schema','spaces':[{'handler':'Default','roots':[{'path':'$FDB_ROOT'}]}]}'
    

    The crucial information here is the schema location and the FDB root directory (in 'roots').

  • ECCODES_DEFINITION_PATH needs to be set for reading COSMO data. Use the revise_mars_model branch of eccodes_cosmo_definitions.

fdb-tools's People

Contributors

victoria-cherkas avatar cosunae avatar

Watchers

 avatar  avatar Daniele Nerini avatar Operator Weather Models MeteoSwiss avatar

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.