Module: NumRu::GAnalysis::QG_sphere_common

Included in:
QG_sphere, QG_sphere_div
Defined in:
lib/numru/ganalysis/qg.rb

Overview

Collection of common methods for QG_sphere and QG_sphere_div

Instance Method Summary collapse

Instance Method Details

#f(gphys) ⇒ Object

Coriolis parameter f



225
226
227
228
229
230
231
# File 'lib/numru/ganalysis/qg.rb', line 225

def f(gphys)
  lam, phi, = Planet::get_lambda_phi(gphys)
  f = phi.sin * (2*Planet::omega)
  f.name = "f"
  f.long_name = "Coriolis parameter"
  f
end

#f_mask0(gphys) ⇒ Object

mask where f=0



234
235
236
237
238
239
240
# File 'lib/numru/ganalysis/qg.rb', line 234

def f_mask0(gphys)
  f = f(gphys)
  v = f.val
  vm = NArrayMiss.to_nam(v, v.ne(0))
  f.replace_val(vm)
  f
end