Module: NumRu::NetCDF_Convention_CF

Extended by:
NetCDF_Convention_Users_Guide
Defined in:
lib/numru/gphys/netcdf_convention.rb

Defined Under Namespace

Modules: Attribute_Mixin, VArray_Mixin

Class Method Summary collapse

Methods included from NetCDF_Convention_Users_Guide

aux_var_names, cell_bounds?, cell_center?, coord_var_names, to_s

Class Method Details

.assoc_coord_names(data) ⇒ Object

original part starts here #################



326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/numru/gphys/netcdf_convention.rb', line 326

def assoc_coord_names(data)
  if s = data.get_att("coordinates")
    nms = s.split(/ +/)
    case data.file
    when NArray
      fl = data.file[0]
    else
      fl = data.file
    end
    nms.delete_if{|nm| !fl.var(nm)}
    nms.delete_if{|nm| fl.dim_names.include?(nm)}
    nms
  else
    nil
  end
end