Re: (no subject)

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 18 2010 - 16:00:52 MST

Hi Tong Qi,
NCL's HDFEOS2 reader should be replacing all non-alphanumeric
characters (anything other than 0 through 9, A through Z, a through z,
and the underscore '_') in a group name or a variable name with an
underscore. It gives the actual HDFEOS name of the variable (without
the group) in the attribute 'hdfeos_name'. Therefore even if the group
name has a hyphen in it the NCL variable name should have an
underscore in its place. Therefore you should be able to access the
variable as:

eos_file->radiances_L2_Standard_cloud_cleared_radiance_product

Have you tried using ncl_filedump on the file to see what NCL thinks
the name is?
If, according to NCL's print out, any actual variable name has
anything other than alphanumeric characters, then we would like to see
this file. It would indicate a bug.
  -dave

On Feb 18, 2010, at 3:34 PM, Tong Qi wrote:

> Hi,
>
> For some reason when I tried this, it didn't work. It's now saying
> radiances_L2_Standard_cloud-cleared_radiance_product is not a
> variable in the file. I double checked for typos, and ensured that
> radiances is a data field under the L2_Standard_cloud-cleared-
> radiance_product group.
>
>
> On Thu, Feb 18, 2010 at 4:10 PM, Dennis Shea <shea@ucar.edu> wrote:
> Enclose the name in parenthesis and quotes
>
> rad=eos_file->$"radiances_L2_Standard_cloud-cleared_radiance_product"$
>
> or
>
> var = "radiances_L2_Standard_cloud-cleared_radiance_product"
> rad = eos_file->$var$
>
> Good luck
>
>
> Tong Qi wrote:
> Hello,
>
> I am trying to read a data field from an HDFEOS2 swath file, but the
> group name contains a special character '-' (hyphen) that seems to
> be giving NCL trouble. NCL apparently treats the hyphen as the end
> of an argument and therefore cannot properly read the full group name.
>
> To illustrate my point, the group name is called /L2_Standard_cloud-
> cleared_radiance_product/, and I am trying to read a data field
> called "radiances" like this:
>
> rad=eos_file->radiances_L2_Standard_cloud-cleared_radiance_product
>
> But when I try to run the file I get "fatal:Either file (eos_file)
> isn't defined or variable (radiances_L2_Standard_cloud) is not a
> variable in the file." I made sure eos_file is defined so I'm
> guessing the issue lies with the hyphen character.
>
> Is there any way around this?
>
> Thanks,
> Tong Qi
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 18 16:00:57 2010

This archive was generated by hypermail 2.1.8 : Tue Feb 23 2010 - 08:26:41 MST