
- NetCDF-tools-01rc1-released
- 01-25-2010
If you were Registered and logged in, you could reply and use other advanced thread options
I've just released the NetCDF tools package, which comprises of
a few tools to manipulate NetCDF and, by utilizing the
compatibility API, HDF4 files, and intended to be usable, in
particular, from the Shell scripts.
The present version is a release candidate and contains some
known bugs and misfeatures, but it's proved to be quite usable.
* Examples
In particular, this package could be used to visualize MODIS L3
(HDF-EOS ``Grid'' structure) data from the Shell (thanks to the
NetPBM and ImageMagick packages), like (Bash):
$ rgb3toppm <(ncget-hdf --raw
MCD43B4.A2009153.h22v03.005.2009181051526.hdf
Nadir_Reflectance_Band
| rawtopgm -bpp 2 -littleendian
-maxval 15999 1200 1200)
| convert -gamma 1.6 ppm:- ppm:-
| display ppm:-
In this example, the Nadir_Reflectance_Band1, ...4 and ...3
``variables'' (i. e., arrays) of the HDF4 file were fetched and
then converted to the PGM image format. Then, the gamma
correction was applied and the resulting image is shown on an X
display.
(To achieve better image contrast and brightness one may
consider using the piecewise-linear transformation suggested in
[1], which could be done using the `rawxform' tool from the yet
to be released Rawtools package.)
The data is the atmosphere-, cloud- and angle-effects free
spectral reflectances for the MODIS bands 1 (red), 4 (green) and
3 (blue) in a sinusoidal projection on a grid at 1 km (roughly)
resolution. The spatial region covers West Siberia (the
Novosibirsk_Reservoir may be seen at the right side of the
resulting image.) The time window is as follows:
$ cat common-hdfeos.sh
hdfeos_metadata_get () {
local file="$1" name="$2"
local n
## .
for n in Struct Core Archive ; do
ncget-hdf -T "$file" ":$Metadata.0"
done
| sed -e "/\sOBJECT\s*=\s*$$/,/END_OBJECT/!d"
-e '/^["[:blank:]]*VALUEs*=s*"(.*)"$/!d'
-e 's//1/'
}
$ . common-hdfeos.sh
$ hdfeos_metadata_get MCD43B4.A2009153.h22v03.005.2009181051526.hdf
RANGEBEGINNINGDATE
2009-06-02
$ hdfeos_metadata_get MCD43B4.A2009153.h22v03.005.2009181051526.hdf
RANGEENDINGDATE
2009-06-17
$
* Download
http://theory.asu.ru/~ivan/src/netcdf-tools-0.1-rc1.tar.gz
http://waterlily.siamics.net/~ivan/src/netcdf-tools-0.1-rc1.tar.gz
http://waterlily.siamics.net/~ivan/archives/git/nctools.git/
http://waterlily.siamics.net/~ivan/archives/git/gitweb.cgi?p=nctools.git
The file used in the example above is available from NASA:
ftp://e4ftl01u.ecs.nasa.gov/MODIS_Composites/MOTA/MCD43B4.005/2009.06.02/MCD43B4.A2009153.h22v03.005.2009181051526.hdf
* References
[1] Creating Reprojected True Color MODIS Images: A Tutorial
http://xweb.geos.ed.ac.uk/~s0785690/methodology/process.pdf
--
FSF associate member #7257
- a light-weight MODIS L2 to GRASS transformer: a preliminary version
- Geographic Information Systems (GIS)
- 2010-01-26
- RTKLIB 2.4.0 released
- Global Positioning System
- 2010-08-08
- 1 year of POI excellence and low clearance avoidance. One year ago after seeing a horrible bridge collision I decided to investigate low clearance avoidance tools.
- Global Positioning System
- 2010-05-27
- 2011.10 map update released
- Garmin GPS
- 2010-04-20
