[ncl-talk] ncl where() and keep MetaData?

Walter Kolczynski walter.kolczynski at noaa.gov
Wed Jun 24 16:30:04 MDT 2015


Do you get the warnings if you don't have the where statement at all?

Also, check the plots. They may be correct even though you are getting 
this warning.

- Walter

On 24-Jun-15 18:07, Erik J. Schaffernicht wrote:
> ___ Using NCL 6.3.0 (2015-Mar) ____
>
> Here is the printVarSummary()output.  First the one before where(w2) 
> is executed, second one after where(w2).
> I checked the printVarSummary-output before writing to ncl-talk and as 
> they look to me quite identical I did not post them, sorry for that.  
> Now, here you can check them (see in the following). However, the 
> warnings occur even though the printVarSummary()-output looks identical.
>
>
>
> Variable: w2
> Type: double
> Total Size: 518400 bytes
>             64800 values
> Number of Dimensions: 2
> Dimensions and sizes:    [lat | 180] x [lon | 360]
> Coordinates:
>             lat: [-89.5..89.5]
>             lon: [-180.. 179]
> Number Of Attributes: 8
>   missing_value :    1e+20
>   standard_name :    sediProbab
>   long_name :    Orography (m)
>   units :
>   years_ago :    21k, Last Glacial Max
>   _FillValue_original :    1e+20
>   missing_value_original :    1e+20
>   _FillValue :    1e+20
>
> Variable: w2
> Type: double
> Total Size: 518400 bytes
>             64800 values
> Number of Dimensions: 2
> Dimensions and sizes:    [lat | 180] x [lon | 360]
> Coordinates:
>             lat: [-89.5..89.5]
>             lon: [-180.. 179]
> Number Of Attributes: 8
>   missing_value :    1e+20
>   standard_name :    sediProbab
>   long_name :    Orography (m)
>   units :
>   years_ago :    21k, Last Glacial Max
>   _FillValue_original :    1e+20
>   missing_value_original :    1e+20
>   _FillValue :    1e+20
>
>
>
>
>
>
> --- robust but long method ----
> w2=sediProbab
> w2=where(landAreaFrV .lt. 0.5, w2 at _FillValue, w2)
> copy_VarMeta(sediProbab,w2)
> sediProbab=w2
>
> to
>
>
>     --- possibly shorter way, more convenient approach but warnings 
> occur ---
> sediProbab=where(landAreaFrV .lt. 0.5, sediProbab at _FillValue, sediProbab)
>
>
>
>
>
>
> The Warnings:
>
> (0)    check_for_y_lat_coord: Warning: Data either does not contain a
> valid latitude coordinate array or doesn't contain one at all.
> (0)    A valid latitude coordinate array should have a 'units' attribute
> equal to one of the following values:
> (0)        'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
> 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
Walter Kolczynski, Jr.
Global Ensemble Team
NOAA/NWS/NCEP/EMC (via I.M. Systems Group)
(301) 683-3781

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150624/d067d7e2/attachment.html 


More information about the ncl-talk mailing list