[Thread Prev][Thread Next][Index]

Re: [ferret_users] Preserving var attributes from opendap server



Hi Paulo,
Thank you for the report. It turns out that Ferret wasn't writing the add_offset attribute to the dataset, because of some issues with the particular combination of data types for the variable and the types of its attributes. I have fixed this for the next release of Ferret.

A second problem comes up, though. The most-recent OPeNDAP library (used in Ferret v6.4), and also the Netcdf-4 libraries (to be used in future versions of Ferret beginning with v6.6) are not able to write the variable confidence_flag as a variable of type byte. They are telling me that the variable "confidence_flag", which in the dataset is listed as having type "byte", cannot be written out in the "byte" data type. I'm getting an error on attempting to write it, "NetCDF: Numeric conversion not representable". Apparently the byte data type is being treated as signed 1-byte value, which has a range of only -128 to 127. An un-signed byte type does exist in NetCDF-4 but currently it's not clear if the Fortran API for NetCDF allows for that.

I can ask about that for the Netcdf-4 libraries, but with the next Ferret release we will need to use the command

  SET VAR/OUTTYPE=short  confidence_flag

Ansley

Paulo B. Oliveira wrote:
I'm willing to locally save a subset of sea surface temperature data
from an opendap server, preserving the original 2 byte representation,
but apparently the scaling of the local dataset is not correct.
Any hints would be appreciated.

Regards,

Paulo ! NOAA/PMEL TMAP ! FERRET v6.07 ! Linux(g77) 2.4.21-32 - 08/29/07 ! 19-Jun-08 12:09
def sym bdir $1"http://www.ifremer.fr/cgi-bin/nph-dods/data/satellite/medspiration/l2p/eurdac/seviri_sst/2010/095";
def sym dset $2"20100405-SEVIRI_SST-EUR-L2P-sst3mlml_20100405_1000-v01"

use "($bdir)/($dset).nc.bz2"

set reg/x=-14.0:-5.0/y=34:44

set win/asp=1.5
set viewp upper
 shade sea_surface_temperature; go land_detail

SET ATT/OUTPUT=all sea_surface_temperature
SET VAR/OUTTYPE=input  sea_surface_temperature
save/clob/file=($dset).cdf sea_surface_temperature

SET ATT/OUTPUT=all confidence_flag
SET VAR/OUTTYPE=input  confidence_flag
save/app/file=($dset).cdf confidence_flag

canc reg/all; canc data/all; canc mem/all

use ($dset)

set viewp lower
 shade sea_surface_temperature; go land_detail

quit


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement