hcronk / oco_vistool Goto Github PK
View Code? Open in Web Editor NEWPlots OCO-2 lite file data on MODIS imagery
Plots OCO-2 lite file data on MODIS imagery
I noted that the variable metadata in the Lite SIF files is stored in attributes in a way that h5py fails to read it. Right now the error is caught by a try/except statement, the result is that when you plot a Lite SIF variable, the units and long_name are just not loaded. Since these are netCDF4 format, switching the reader to netCDF4 instead of h5py will allow the metadata to be read from the files.
Here's an example from ipython:
In [18]: import h5py, netCDF4
In [19]: litefile = '/data/OCO2_product/OCO2_L2_Lite_SIF.8r/2017/oco2_LtSIF_170101_B8100r_171012011053s.nc4'
In [20]: with h5py.File(litefile,'r') as h5:
...: print(h5['SIF_757nm'].attrs.get('unit'))
...:
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-20-c6d9a9a57b05> in <module>
1 with h5py.File(litefile,'r') as h5:
----> 2 print(h5['SIF_757nm'].attrs.get('unit'))
3
~/miniconda3/envs/vistools/lib/python3.6/_collections_abc.py in get(self, key, default)
658 'D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.'
659 try:
--> 660 return self[key]
661 except KeyError:
662 return default
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
~/miniconda3/envs/vistools/lib/python3.6/site-packages/h5py/_hl/attrs.py in __getitem__(self, name)
79
80 arr = numpy.ndarray(shape, dtype=dtype, order='C')
---> 81 attr.read(arr, mtype=htype)
82
83 if len(arr.shape) == 0:
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/h5a.pyx in h5py.h5a.AttrID.read()
h5py/_proxy.pyx in h5py._proxy.attr_rw()
OSError: Unable to read attribute (no appropriate function for conversion path)
In [21]: with netCDF4.Dataset(litefile, 'r') as nc:
...: print(nc['SIF_757nm'].unit)
...:
W/m2/sr/µm
In certain scenarios, there is an extension of continent, state, and river lines beyond the edge of the TIF images. Look into when and why this happens and also whether or not the latitude and longitude labels are correct.
Create configurable option to display location using lat/lon gridlines or the mini map insert
Add lines denoting the OCO-2 orbit track
Change ground location data type from a point to a list of points
Incorporate capability for custom colormaps
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.