[ncl-talk] when creating a nc file, and assign _FillValue in it, error generated!

Dennis Shea shea at ucar.edu
Fri Jan 29 09:14:44 MST 2016


By netCDF rule, the type of _FillValue must match the the type of the
variable with which it is associated.

You have:
   FSDSatt           =    True                  <==type logical
   FSDSatt at _FillValue=9.999E20      <== type float

Hence, 'type mismatch'.

The solution, use

    FSDSatt  = 1.0   <== type float


On Thu, Jan 28, 2016 at 10:43 PM, dyjbean at 163.com <dyjbean at 163.com> wrote:

>
> hi,
>   when i create a nc file with ncl , and assign _FillValue in it, part of
> code shows the following:
> +++++++++++++++++++++++++++++++++++++++++++++
>   filevardef(fout01,"FSDS","float",(/"time","lat","lon"/))
>       FSDSatt           =    True
>       FSDSatt at mode      =    "time-dependent"
>       FSDSatt at units     =    "W/m2"
>       FSDSatt at long_name =    "incident solar (FSDS)"
>       FSDSatt at _FillValue=9.999E20
>       filevarattdef(fout01,"FSDS",FSDSatt)
>    ++++++++++++++++++++++++++++++++++++++++++++
>
> but the error information from the operation shows the below:
>
> ncendef: ncid 131072: NetCDF: Not a valid data type or _FillValue type mismatch
>
> i want to know how to assign _FillValue in nc file in ncl script?
>
> thanks
>
> ------------------------------
> dyjbean at 163.com
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160129/40492472/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bg.jpg
Type: image/jpeg
Size: 20365 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160129/40492472/attachment.jpg 


More information about the ncl-talk mailing list