[ncl-talk] Different numbers of fill value

Dennis Shea shea at ucar.edu
Tue May 5 11:03:52 MDT 2020


A general rule is that NCL will use the 1st encountered _FillValue for an
expression.
Essentially, all other _FillValue are 'silentlly' converted to the initial
value.


A = (/1.0, 2.0, -999.0, 4.0/)
A at _FillValue = -999.0

B = (/100.0, 1e10, 1e10, 400./)
B at _FillValue = 1e10

C = A + B
print(C)
==========
Variable: C
Type: float
Total Size: 16 bytes
            4 values
Number of Dimensions: 1
Dimensions and sizes: [4]
Coordinates:
Number Of Attributes: 1
  *_FillValue : -999*
(0) 101
(1) *-999*
(2) *-999*
(3) 404
=========================

That said:

It is highly recommended the 0.0 [0] not be used as an _FillValue.
Upon input of the "model data"

   f = addfile("model.nc","r")
   x = f->data                     ; data at _FillValue=0.0   and   x@
_FillValue=0.0
   x at _FillValue = 1e10     ; change to non-zero by convention




On Tue, May 5, 2020 at 7:43 AM Dhirendra Kumar via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hello everyone
>
> I am trying to compute taylor_stats using different datasets (having
> similar dimensions, lat x lon). However, I found that these have different
> numbers of fill values.
>
> The model data has zero fill values while the observation has large fill
> values (38266).
>
> How can I make them equal, or how can I use them to compute the
> taylor_stats.
>
> Thanks in anticipation for your help.
>
> Dhirendra
>
> --
> ========================================
> Dhirendra Kumar
> PhD Student
> School of Environmental Sciences, JNU
> New Delhi (India)
> Contact: +91 9910778043
> Alternate email: dhirendra.cub at outlook.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/20200505/9629cfa1/attachment.html>


More information about the ncl-talk mailing list