From 1b5e39e0f888035b336e58d8893eb87e6203364d Mon Sep 17 00:00:00 2001 From: bearecinos <recinos@uni-bremen.de> Date: Thu, 10 Dec 2020 10:34:46 +0000 Subject: [PATCH] update README --- README.md | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 0aa41dd..683d7a7 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,27 @@ +# Mdf_reader -1. Run a test: +The `mdf_reader` is a [python3](https://www.python.org/) tool designed to read data files compliant with a user specified [data +model](https://cds.climate.copernicus.eu/toolbox/doc/how-to/15_how_to_understand_the_common_data_model/15_how_to_understand_the_common_data_model.html). It was developed to read the [IMMA](https://icoads.noaa.gov/e-doc/imma/R3.0-imma1.pdf) (International Maritime Meteorological Archive) data format, but it has been enhanced to account for meteorological data formats in the case of: + +- Data that is stored in a human-readable manner: “ASCII†format. +- Data that is organized in single line reports +- Reports that have a coherent internal structure and can be modelised. +- Reports that have a fixed width or field delimited types +- Reports that can be organized in sections, in which case each section can be of different types (fixed width of delimited) -import mdf_reader +1. Run a test: +``` +import sys +sys.path.append('/path_to_dir_containing_the_mdf_reader_folder/') +import mdf_reader import matplotlib.pyplot as plt data = mdf_reader.tests.read_imma1_buoys_nosupp() - -data = mdf_reader.tests.read_imma1_buoys_supp() - -ax = data[section_name][field_name].plot(label='x') - -data[section_name][field_name].plot(ax = ax ,label='y') - -plt.show() - +``` 2. Read imma data - +``` imma_data = mdf_reader.read(filepath, data_model = 'imma1',sections = ['core','c1','c98']) +``` +For more details on how to use the `mdf_reader` tool see the following jupyter notebooks. -- GitLab