Skip to main content

Software to convert idiosyncratic ASCII formats to netCDF formats

Project description

![Shark](http://grele.ess.uci.edu/jaws/img/shark.png)


# Justified Automated Weather Station (JAWS) Software

[![Build Status](https://travis-ci.org/jaws/jaws.svg?branch=master)](https://travis-ci.org/jaws/jaws)
[![Build status](https://ci.appveyor.com/api/projects/status/gt0r8jlo5iarqv55?svg=true)](https://ci.appveyor.com/project/ajcse1/jaws)

[![Anaconda-Server Badge](https://anaconda.org/conda-forge/jaws/badges/installer/conda.svg)](https://conda.anaconda.org/conda-forge)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/jaws/badges/version.svg)](https://anaconda.org/conda-forge/jaws)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/jaws/badges/latest_release_date.svg)](https://anaconda.org/conda-forge/jaws)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/jaws/badges/platforms.svg)](https://anaconda.org/conda-forge/jaws)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/jaws/badges/license.svg)](https://anaconda.org/conda-forge/jaws)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/jaws/badges/downloads.svg)](https://anaconda.org/conda-forge/jaws)

___
## News

2018/04/18: Version 0.3 released: Conda installable

2018/01/22: Version 0.2 released: Conversion of GCNet, PROMICE and AAWS networks complete

2017/10/23: Version 0.1 released: Original scripts from Wenshan

## About

JAWS is a scientific software workflow to ingest Level 2 (L2) data in the multiple formats now distributed, harmonize it into a common format, and deliver value-added Level 3 (L3) output suitable for distribution by the network operator, analysis by the researcher, and curation by the data center. NASA has funded JAWS (project [summary](http://dust.ess.uci.edu/prp/prp_aist/prp_aist_smr.pdf)) from 20171001–20190930.

Automated Weather Station (AWS) and AWS-like networks are the primary source of surface-level meteorological data in remote polar regions. These networks have developed organically and independently, and deliver data to researchers in idiosyncratic ASCII formats that hinder automated processing and intercomparison among networks. Moreover, station tilt causes significant biases in polar AWS measurements of radiation and wind direction. Researchers, network operators, and data centers would benefit from AWS-like data in a common format, amenable to automated analysis, and adjusted for known biases.

The immediate target recipient elements are polar AWS network managers, users, and data distributors. L2 borehole data suffers from similar interoperability issues, as does non-polar AWS data. Hence our L3 format will be extensible to global AWS and permafrost networks. JAWS will increase *in situ* data accessibility and utility, and enable new derived products.

## Overview

### JAWS consists of:

#### 1) Standardization

Convert L2 data (usually ASCII tables) into a netCDF-based L3 format compliant with metadata conventions (Climate-Forecast and ACDD) that promote automated discovery and analysis.

#### 2) Adjustment

Include value-added L3 features like the Retrospective, Iterative, Geometry-Based (RIGB) tilt angle and direction corrections, solar zenith angle, standardized quality flags, GPS-derived ice velocity, and turbulent fluxes.

#### 3) API

Provide a scriptable API to extend the initial L2-to-L3 conversion to newer AWS-like networks and instruments.

___
## Installation
### Linux/unix/win
#### Requirements:
* writable directory
* [Anaconda](https://conda.io/docs/user-guide/install/index.html) or [Miniconda](https://conda.io/miniconda.html)
* installed unzip package

From within a writable directory, run the following command:
``` html
$ conda install -c conda-forge jaws
```

Users should periodically update JAWS to the latest version using:
```html
$ conda update -c conda-forge jaws
```

<!--
___
## Obtaining JAWS

First-time users can execute this to copy JAWS to their local machines:

``` html
$ git clone https://github.com/jaws/jaws.git
```

Those with GitHub accounts who wish to contribute to JAWS should clone via SSH instead:

``` html
$ git clone git@github.com:/jaws/jaws.git
```

Users should periodically update their local repositories to the current version:

``` html
$ git pull
```

### Pre-requisites

JAWS works with any Python distribution, and especially well with Anaconda and [Miniconda](https://conda.io/miniconda.html)
* matplotlib: Install with `conda install matplotlib` or as instructed [here](http://matplotlib.org)
* netCDF4: Install with `conda install netcdf4` or as instructed [here](http://unidata.github.io/netcdf4-python)
* pandas: Install with `conda install pandas` or as instructed [here](http://pandas.pydata.org)
* xarray: Install with `conda install xarray` or as instructed [here](http://xarray.pydata.org)
-->

### Example

The current version can translate L2 ASCII data from the following networks to netCDF format:
* Antarctic Automatic Weather Stations (AAWS): Sample raw file can be downloaded from [here](http://grele.ess.uci.edu/jaws/sample_data/AAWS_AGO-4_20161130.txt). Right click on the link and select "Save link as".
* Greenland Climate Network (GCNet): Sample raw file can be downloaded from [here](http://grele.ess.uci.edu/jaws/sample_data/GCNet_Summit_20140601.txt)
* Institute for Marine and Atmospheric Research (IMAU): Sample raw file for Antarctic stations can be downloaded from [here](http://grele.ess.uci.edu/jaws/sample_data/ant_aws17IMAU_20150101.txt) and for Greenland stations can be downloaded from [here](http://grele.ess.uci.edu/jaws/sample_data/grl_aws05IMAU_19930901.txt)
* Programme for Monitoring of the Greenland Ice Sheet (PROMICE): Sample raw file can be downloaded from [here](http://grele.ess.uci.edu/jaws/sample_data/PROMICE_EGP_20160501.txt)

The user provides the input file path. By default, the output file will be stored within the current directory with same name as of input file (e.g. PROMICE_EGP_20160501.nc). The user can optionally give their own output path/name. Execute this to get output file in current directory:

``` html
$ jaws ~/Downloads/PROMICE_EGP_20160501.txt
```

or by specifying longer paths, and with options:

``` html
$ jaws -4 -o ~/Desktop/PROMICE_EGP_20160501.nc ~/Downloads/PROMICE_EGP_20160501.txt
$ jaws -4 -o ~/Desktop/GCNet_Summit_20140601.nc ~/Downloads/GCNet_Summit_20140601.txt
$ jaws -4 -o ~/Desktop/AAWS_AGO-4_20161130.nc ~/Downloads/AAWS_AGO-4_20161130.txt
```

where the argument to the optional `-o` is the user-defined output filename

#### Analysis Example

To perform analysis, the raw data should be converted to netCDF format using '-d/--drv_tm/--derive_times' flag. e.g.:

``` html
$ jaws -d ~/Downloads/GCNet_Summit.txt
```

JAWS can be used to analyse the data in multiple ways such as:

i. Plotting monthly diurnal cycle to see hourly changes for any variable throughout the month.

The user provides input file path, variable name (on which analysis needs to be done) and analysis type (i.e. diurnal, monthly, annual or seasonal). Year and month are optional arguments. If the input file contains data for only single year, then the user doesn't need to provide the '-y' argument. Similar is the case for '-m' argument.

```
$ jaws -a diurnal -v temperature_tc_1 -y 2002 -m 5 gcnet_summit.nc
```

![diurnal](http://grele.ess.uci.edu/jaws/img/diurnal.png)

ii. Avg, max and min values for each day of a month for any variable

```
$ jaws --anl=monthly --var=temperature_cs500_1 --anl_yr=2013 --anl_mth=2 gcnet_summit.nc
```

![monthly](http://grele.ess.uci.edu/jaws/img/monthly.png)

iii. Annual cycle with daily mean, max and min

Since it is annual plot, user shouldn't provide the '-m' argument

```
$ jaws --analysis=annual --variable=temperature_tc_1 --analysis_year=2016 gcnet_summit.nc
```

![annual](http://grele.ess.uci.edu/jaws/img/annual.png)

iv. Climatological seasonal cycle showing variation for each month through multiple years

Since it is seasonal plot, user shouldn't provide both '-y', '-m' argument.

```
$ jaws -a seasonal -v temperature_tc_1 gcnet_summit.nc
```

![seasonal](http://grele.ess.uci.edu/jaws/img/seasonal.png)


<!--
Storing AWS-like data using DSG convention:
``` html
$ jaws --L2=gcnet --featureType L2.ascii L3.nc
```
Unit-test to verify data:
``` html
$ jaws --L2=gcnet --kelvin sample_L2.ascii sample_L3.nc
```
Annotate L2b netCDF with CF and ACDD variable and global metadata:
``` html
$ jaws --L2=imau --creator_email=’janedoe@summit.com’ --L2.ascii L3.nc
```
Derive value-added data and metadata:
``` html
$ jaws --L2=gcnet --solar_zenith_angles L2.ascii L3.nc
```
-->

___
## Credit

This software is being developed by the University of California Irvine under NASA Advanced Information Systems Technology (AIST) Proposal and Project 80NSSC17K0540.

## Resources

* [Release Notes](https://github.com/jaws/jaws/releases)
* [Gallery](https://github.com/jaws/jaws/wiki/Gallery)
<!--
* [API Reference](https://github.com/jaws/jaws/blob/master/API.md)
* [Examples](https://)
-->


## Full Documentation

See the [Wiki](https://github.com/jaws/jaws/wiki/) for full documentation, examples, operational details and other information.

## Bugs and Feedback

For bugs, questions and discussions please use the [GitHub Issues](https://github.com/jaws/jaws/issues).

## Copyright and License

Copyright (C) 2017--2018 Regents of the University of California.
You may redistribute and/or modify JAWS under the terms of the Apache License, Version 2.0.


Project details


Release history Release notifications

This version
History Node

0.3.4

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
jaws-0.3.4-py2.py3-none-any.whl (45.7 kB) Copy SHA256 hash SHA256 Wheel py2.py3 May 2, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page