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

Erik J. Schaffernicht eschaffe at uni-koeln.de
Wed Jun 24 16:07:18 MDT 2015


___ 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'






  


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5001 bytes
Desc: S/MIME Cryptographic Signature
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150625/0673d13c/attachment.bin 


More information about the ncl-talk mailing list