python - Converting from netCDF4 to scipy.io netcdf -
i'm trying convert netcdf4 scipy.io netcdf web page program going onto doesn't have module netcdf4.
the program works in netcdf4 retrieving values file temperatures in degk giving me values such as:
[[ 258.77999878 258.77999878 258.77999878 ..., 258.77999878 258.77999878 258.77999878] [ 259.29998779 259.54998779 259.82000732 ..., 258.3500061 258.70001221 258.97000122] [ 264.1000061 264.47000122 264.82000732 ..., 262.40002441 263.04998779 263.6000061 ]]. however when using scipy.io netcdf , same file used in netcdf4. program runs should again give values of temperature in degk values come out as:
[[-25403 -25403 -25403 ..., -25403 -25403 -25403] [-25351 -25326 -25299 ..., -25446 -25411 -25384] [-24871 -24834 -24799 ..., -25041 -24976 -24921]]. i wondering if has come across problem before , how solve scipy.io netcdf program give same values.
first off, need distinguish wether reading netcdf-3 or netcdf-4 file. scipy.io.netcdf module can read netcdf-3, if it's netcdf-4 file, out of luck. not difference netcdf-4 files use hdf-5 file storage. said, looks read in something file, it's have netcdf-3 file.
if case, need "scale" , "offset" attributes on temperature variable , apply directly when using scipy.io.netcdf. netcdf-4-python module automagically looks these attributes , applies them 'behind scenes' you, why data ok when going through module.
cheers,
sean
Comments
Post a Comment