Grib1 To Grib2 Converter Temperature
Dec 29, 2014 - Python module for reading and writing GRIB (editions 1 and 2) files. A grib message object displays summary info 3:Maximum temperature:K.
Python module for reading and writing GRIB (editions 1 and 2) files. GRIB is the World Meterological Organization standard for distributing gridded data. The module is a python interface to the GRIB API C library from the European Centre for Medium-Range Weather Forecasts (ECMWF).
- Python 2.4 or higher.
- numpy N-dimensional array object for python. Version 1.2.1 or higher (version 1.5.1 required for Python 3).
- pyproj Python interface to PROJ.4 library for cartographic transformations ormatplotlib and the basemap toolkit. Pyproj 1.8.9 is required for Python 3.
- GRIB API C library for encoding and decoding GRIB messages (edition 1 and edition 2). Version 1.8.0 or higher required. To be fully functional, the GRIB API library requires Jasper or OpenJPEG for JPEG200 encoding, and PNG for PNG encoding.
These dependencies are available via the package management system of most Linux distributions, and on MacOS X using macports. If you build grib_api yourself as a static library on a 64-bit system you may need to set CFLAGS
to '-O2 -fPIC'
before running the configure
script. To use pygrib on Windows, you must use the Cygwin environment, since the grib_api library requires a posix environment. Cygwin installation instructions are available here.
- Download the source code.
- pygrib installation options can either be set with environment variables, or specified in a text file (setup.cfg). To use environment variables, set
$GRIBAPI_DIR
, $JASPER_DIR
, $OPENJPEG_DIR
, $PNG_DIR
and $ZLIB_DIR
so that the include files and libraries for GRIB API, Jasper, OpenJPEG, PNG and zlib will be found. For example, the include files for jasper should be found in $JASPER_DIR/include
or $JASPER_DIR/include/jasper
, and the jasper library should be found in $JASPER_DIR/lib
or $JASPER_DIR/lib64
. If any of those environment variables are not set, then it is assumed that GRIB API was not built with support for that library. If the libraries and include files are installed in separate locations, the environment variables $GRIBAPI_INCDIR
and $GRIBAPI_LIBDIR
can be used to define the locations separately (same goes for JASPER
, OPENJPEG
, PNG
and ZLIB
). Note that if both $GRIBAPI_DIR
and $GRIBAPI_INCDIR
/$GRIBAPI_LIBDIR
are specified, $GRIBAPI_DIR
takes precedence. To use setup.cfg, copy setup.cfg.template to setup.cfg, open setup.cfg in a text editor and follow the instructions in the comments for editing. - Run 'python setup.py build' and then 'python setup.py install', as root if necessary. Note that if you are using environment variables to specify the build options, you cannot build and install in one step with 'sudo python setup.py install', since sudo does not pass environment variables. Instead, run 'python setup.py build' first as a regular user, then run 'sudo python setup.py install' if the install directory requires admin or root privileges.
- Run 'python test.py' to test your installation.
- Look at examples in
test
directory (most require matplotlib and basemap). - If you're on MacOS X, see README.macosx for special instruction on how to install pygrib and all it's dependencies using macports.
- from the python interpreter prompt, import the package:
- open a GRIB file, create a grib message iterator:
- pygrib open instances behave like regular python file objects, with
seek
, tell
, read
, readline
and close
methods, except that offsets are measured in grib messages instead of bytes: - print an inventory of the file:
- find the first grib message with a matching name:
- extract the data values using the 'values' key (grb.keys() will return a list of the available keys):
- get the latitudes and longitudes of the grid:
- get the second grib message:
- extract data and get lat/lon values for a subset over North America:
- modify the values associated with existing keys (either via attribute or dictionary access):
- get the binary string associated with the coded message:
- write the modified message to a new GRIB file:
- see below for the full python API documentation.
Author: Jeffrey Whitaker.
Contact:Jeff Whitaker
Version: 2.0.0
Copyright: copyright 2010 by Jeffrey Whitaker.
License: Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Classes |
gribmessage Grib message object. |
index index(filename, *args) |
open open(filename) |
Functions |
datetime_to_julian(date) convert python datetime instance to Julian day number. |
|
fromstring(string) Create a gribmessage instance from a python bytes object representing a binary grib message (the reverse of gribmessage.tostring). |
|
gaulats(nlats) Returns nlats gaussian latitudes, in degrees, oriented from north to south. |
|
julian_to_datetime(julday) convert Julian day number to python datetime instance. |
|
multi_support_off(..) turn off support for multi-field grib messages |
|
multi_support_on(..) turn on support for multi-field grib messages (default) |
|
reload(grb) Recreate gribmessage object, updating all the keys to be consistent with each other. |
|
setdates(grb) set fcstimeunits, analDate and validDate attributes using julianDay, forecastTime and indicatorOfUnitOfTimeRange. |
|
tolerate_badgrib_off(..) raise an exception when a missing or malformed key is encountered (default behavior). |
|
tolerate_badgrib_on(..) don't raise an exception when a missing or malformed key is encountered. |
|
Variables |
__package__ = None |
__version__ = ' 2.0.0 '
|
default_encoding = ' ascii '
|
grib_api_version = ' 1.12.3 '
|
missingvalue_float = -1e+100 |
missingvalue_int = -1 |
tolerate_badgrib = False |
Returns nlats gaussian latitudes, in degrees, oriented from north to south. nlats must be even. Just now working on tire set up and radio / esc settings. I have only been racing Clods for 3 yrs now and much of the first couple was just learning how to race these trucks. How to patch zrp in ns2.35. They all run TTR MIP CVD’s and aluminum TXT Hubs. |
julian_to_datetime(julday) |
convert Julian day number to python datetime instance. Used to create validDate and analDate attributes from julianDay and forecastTime keys. |
Recreate gribmessage object, updating all the keys to be consistent with each other. For example, if the forecastTime key is changed, recreating the gribmessage object with this function will cause the analDate and verifDate keys to be updated accordingly. Pro Evolution Soccer 2010 Free Download Full PC Game. Pro Evolution Soccer 2010 Free Download Full Version RG Mechanics Repack PC Game In Direct Download Links. This Game Is Cracked And Highly Compressed Game. Specifications Of PES 2010 PC Game. Download Pes 2010 Full Crack Free PC Game – PES 2010 focuses on enhancing the excitement of matches between players, making for a truly challenging experience that constantly tests the player. Intuitive zonal defending covers spaces and players need to look constantly for new ways to attack. Download Pro Evolution Soccer 2010 Free. Pro Evolution Soccer 2010 or the more popular name PES 2010 is a football game which can be downloaded from the link given at the end of this page.
Equivalent to fromstring(grb.tostring()) |
set fcstimeunits, analDate and validDate attributes using julianDay, forecastTime and indicatorOfUnitOfTimeRange. Called automatically when gribmessage instance created, but can be called manually to update keys if one of them is modified after instance creation. |
Generated by Epydoc 3.0.1 on Mon Dec 29 14:23:16 2014 | http://epydoc.sourceforge.net |