Created
December 17, 2015 01:43
-
-
Save lbesnard/3444799f58e7d75d18a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash ! | |
# script to highlight an waht seems to be a bug in the netcdf library | |
# The script uses the ncdump program to hightlight this, however | |
# similar behaviour is seen with the netCDF4 python package | |
# author: laurent besnard,eMII/IMOS laurent.besnard@utas.edu.au 17/12/2015 | |
main() { | |
local netcdf_path=imos-srs-prep/sst-test/modified-20121101032000-ABOM-L3S_GHRSST-SSTskin-AVHRR_D-1d_day-v02.0-fv02.0.nc | |
local opendap_url=http://rs-data1-mel.csiro.au/thredds/dodsC/$netcdf_path | |
local filserv_url=http://rs-data1-mel.csiro.au/thredds/fileServer/$netcdf_path | |
local filserv_dl=`mktemp` | |
curl -l $filserv_url -o $filserv_dl | |
local opendap_dump=`mktemp` | |
local filserv_dump=`mktemp` | |
ncdump -h $opendap_url > $opendap_dump | |
ncdump -h $filserv_dl > $filserv_dump | |
# compare the two ncdump files. Many difference, the most | |
# important ones are the data types being changed for byte to short | |
if hash vimdiff 2>/dev/null; then | |
vimdiff $opendap_dump $filserv_dump | |
else | |
diff $opendap_dump $filserv_dump | |
fi | |
} | |
main "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment