Re: ssmi dataset - unknown file format

From: Wei Huang <huangwei_at_nyahnyahspammersnyahnyah>
Date: Fri Sep 21 2012 - 14:06:46 MDT

Alex,

Change your code of line:
f = addfile (fname+".nc", "r")

to
f = addfile (fname, "r")

and re-try.

Your code has forced NCL to read this file as ".nc", eg. NetCDF.
But your data seems HDF.

Wei

huangwei@ucar.edu
VETS/CISL
National Center for Atmospheric Research
P.O. Box 3000 (1850 Table Mesa Dr.)
Boulder, CO 80307-3000 USA
(303) 497-8924

On Sep 21, 2012, at 1:07 PM, Alexander Semenov wrote:

> Hi ncl-talk,
>
> I don't know if there's a bug in the dataset (I'm using SSMI radiaometer satellite data) or I'm doing something wrong. NCL can handle .hdf format right?
>
> When I read in the files, and the variable in the file, it says:
>
> fatal:NetCDF: Unknown file format
> fatal:Could not open (asi-SSMIS-n6250-20120801-v5.hdf)
> fatal:Either file (f) isn't defined or variable (ASI_Ice_Concentration) is not a variable in the file
> fatal:Execute: Error occurred at or near line 13 in file seaice.ncl
>
> Here's the part of the code: (The file and variable both exist - I checked)
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> begin
>
> files = systemfunc("ls asi-SSMIS-n6250-*-v5.hdf")
> do j = 0, dimsizes(files)-1
> fname = files(j)
> f = addfile (fname+".nc", "r")
>
> ic=f->ASI_Ice_Concentration
>
>
> --
> regards
>
> *******************************************************
> Alex Semenov
>
> PhD Student - Research Assistant
> International Arctic Research Center
> Department of atmospheric sciences
> University of Alaska Fairbanks
>
> 930 Koyukuk dr, 408c3
> Fairbanks, AK, USA, 99775
> work phone +19074742672
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Sep 21 14:06:54 2012

This archive was generated by hypermail 2.1.8 : Fri Sep 21 2012 - 16:22:29 MDT