MCPcopy Create free account
hub / github.com/NCAR/wrf-python / func

Function func

test/comp_utest.py:544–562  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

542
543def make_func(varname, wrfnc, timeidx, method, squeeze, meta):
544 def func(self):
545
546 try:
547 args = get_args(varname, wrfnc, timeidx, method, squeeze)
548 except ProjectionError: # Don't fail for this
549 return
550
551 routine = ROUTINE_MAP[varname]
552
553 kwargs = {"meta": meta}
554 result = routine(*args, **kwargs)
555
556 ref = getvar(wrfnc, varname, timeidx, method, squeeze, cache=None,
557 meta=meta)
558
559 nt.assert_allclose(to_np(result), to_np(ref))
560
561 if meta:
562 self.assertEqual(result.dims, ref.dims)
563
564 return func
565

Callers

nothing calls this directly

Calls 8

get_argsFunction · 0.85
getvarFunction · 0.85
to_npFunction · 0.85
extract_varsFunction · 0.85
tkFunction · 0.85
destaggerFunction · 0.85
cape_3dFunction · 0.85
cape_2dFunction · 0.85

Tested by

no test coverage detected