Re: writing and reading character arrays to netCDF

From: Jonathan Vigh <vigh_at_nyahnyahspammersnyahnyah>
Date: Thu, 05 Mar 2009 20:16:57 +0000

Hi Dave,
  Okay, thanks for letting me know. By the way, do logical values
automatically get transmorgified into 1's and 0's when NCL writes them
out to netCDF? I noticed that as well and was a bit mystified as to the
best way to write out logical arrays to netCDF files.

Jonathan

David Brown wrote:
>
> Hi Jonathan,
>
> I have reproduced your problem of have the _FillValue show up as lower
> case 'l'
> when reading the file into NCL, while ncdump shows it as a null
> character.
>
> This is a bug somewhere, probably in NCL. I will investigate.
> -dave
>
>
> On Mar 5, 2009, at 12:39 PM, Jonathan Vigh wrote:
>
>>
>> Greetings,
>> I'm using NCL to write out a character array to a netCDF flie and
>> then read it back in for processing using a different NCL script. Some
>> of the time my arrays are all just _FillValue, which I have set to the
>> null character. However, if I dump the resulting netCDF file after it is
>> written, these show up as lower case Ls (e.g. "l"). When I read the
>> netCDF file back in using my other script, the _FillValue attribute is
>> "l". This causes a warning message because I am trying to assign the
>> read data to a multidimensional array which already has a _FillValue
>> set to the null character. So I get the warning:
>>
>> fatal:Attribute assignment type mismatch
>>
>> Does anyone know about why this is happening? Does netCDF represent the
>> null character as an "l"?
>>
>> Thanks,
>> Jonathan
>>
>> _______________________________________________
>> 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 Mar 05 2009 - 13:16:57 MST

This archive was generated by hypermail 2.2.0 : Thu Mar 05 2009 - 15:48:48 MST