Skip to content

Commit

Permalink
Merge pull request #23 from rsignell-usgs/display
Browse files Browse the repository at this point in the history
added display attribute
  • Loading branch information
rsignell-usgs committed Dec 18, 2015
2 parents fe9da26 + 5df8b91 commit 1e14f66
Show file tree
Hide file tree
Showing 10 changed files with 398 additions and 110 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pyc
*.pyo
141 changes: 141 additions & 0 deletions yaml2ncml.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
Metadata-Version: 1.1
Name: yaml2ncml
Version: 0.1.0
Summary: ncML aggregation from YAML specifications
Home-page: https://github.com/rsignell-usgs/yaml2ncml
Author: Rich Signell
Author-email: rsignell@usgs.gov
License: The MIT License (MIT)

Copyright (c) 2015 Richard Signell

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Description: yaml2ncml
=========

NcML aggregation from YAML specifications.

``yaml2ncml`` is a command line tool to facilitate the creation of
`NcML
aggregation <https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/ncml/Aggregation.html>`__
file for THREDDS servers.

Install it using pip or conda.

.. code:: bash

pip install yaml2ncml
# or
conda install -c https://conda.binstar.org/ioos yaml2ncml

The user must create a YAML config file (see the example below) and run:

.. code:: bash

yaml2ncml roms.yaml

# or save the output

yaml2ncml roms.yaml --output roms_aggregation.ncml

roms.yaml
---------

.. code:: yaml

dataset:
id: "USGS_COAWST_MVCO_CBLAST_Ripples_SWAN_40m"

title: "USGS-CMG-COAWST Model: CBLAST2007 Ripples with SWAN-40m res"

summary: "Simulation of hydrodynamics and bottom stress south of Marthas Vineyard, MA using the COAWST modeling system. These results are from the 40m inner nest of a four-level nested simulation."

project:
- CMG_Portal
- Sandy_Portal

creator:
email: nganju@usgs.gov
name: Neil Ganju
url: http://water.usgs.gov/fluxes

publisher:
email: tkalra@usgs.gov
name: Tarandeep Kalra
url: http://www.usgs.gov

contributor:
role: advisor
email: rsignell@usgs.gov
name: Rich Signell
url: http://profile.usgs.gov/rsignell


license: "The data may be used and redistributed for free but is not intended for legal use, since it may contain inaccuracies. Neither the data Contributor, nor the United States Government, nor any of their employees or contractors, makes any warranty, express or implied, including warranties of merchantability and fitness for a particular purpose, or assumes any legal liability for the accuracy, completeness, or usefulness, of this information."

references:
- http://www.whoi.edu/science/AOPE/dept/CBLASTmain.html
- http://water.usgs.gov/fluxes/mvco.html
- doi:10.1029/2011JC007035

acknowledgements:
- USGS-CMGP
- NSF

variables:
include:
- temp
- salt

exclude:
- ubar
- vbar

aggregation:
time_var: ocean_time
dir: Output
sample_file: test_nc4_0001.nc
pattern: .*test_nc4_[0-9]{4}\.nc$


Notes on the YAML file:

1. The aggregation `dir:` is the directory where the data (e.g. NetCDF files) are located, relative to the directory where the NcML will be. In the above example, the NetCDF files are located in a subdirectory called "Output". If the NetCDF files will be in the same directory as the NcML file, specify `dir: '.'`.

2. Specify that all variables should appear in the aggregation (none excluded) like this:

.. code:: yaml

variables:
include:
- All

exclude:
- None

* First version

Keywords: YAML,ncml
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: License :: OSI Approved :: MIT License
14 changes: 14 additions & 0 deletions yaml2ncml.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
CHANGES.txt
LICENSE.txt
MANIFEST.in
README.rst
requirements.txt
yaml2ncml/__init__.py
yaml2ncml/yaml2ncml.py
yaml2ncml.egg-info/PKG-INFO
yaml2ncml.egg-info/SOURCES.txt
yaml2ncml.egg-info/dependency_links.txt
yaml2ncml.egg-info/entry_points.txt
yaml2ncml.egg-info/not-zip-safe
yaml2ncml.egg-info/requires.txt
yaml2ncml.egg-info/top_level.txt
1 change: 1 addition & 0 deletions yaml2ncml.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 3 additions & 0 deletions yaml2ncml.egg-info/entry_points.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[console_scripts]
yaml2ncml = yaml2ncml.yaml2ncml:main

1 change: 1 addition & 0 deletions yaml2ncml.egg-info/not-zip-safe
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 3 additions & 0 deletions yaml2ncml.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PyYAML
docopt
netCDF4
1 change: 1 addition & 0 deletions yaml2ncml.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yaml2ncml
Loading

0 comments on commit 1e14f66

Please sign in to comment.