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
-
#f(gphys) ⇒ Object
Coriolis parameter f.
-
#f_mask0(gphys) ⇒ Object
mask where f=0.
Instance Method Details
#f(gphys) ⇒ Object
Coriolis parameter f
435 436 437 438 439 440 441 |
# File 'lib/numru/ganalysis/qg.rb', line 435 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
444 445 446 447 448 449 450 |
# File 'lib/numru/ganalysis/qg.rb', line 444 def f_mask0(gphys) f = f(gphys) v = f.val vm = NArrayMiss.to_nam(v, v.ne(0)) f.replace_val(vm) f end |