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

Function _vertcross

src/wrf/extension.py:169–188  ·  view source on GitHub ↗

Return the vertical cross section. This routine was originally written in scripted NCL code and doesn't directly wrap a Fortran routine. Located in WRFUserARW.ncl.

(field3d, xy, var2dz, z_var2d, missingval, outview=None)

Source from the content-addressed store, hash-verified

167@cast_type(arg_idxs=(0, ))
168@extract_and_transpose(do_transpose=False)
169def _vertcross(field3d, xy, var2dz, z_var2d, missingval, outview=None):
170 """Return the vertical cross section.
171
172 This routine was originally written in scripted NCL code and doesn't
173 directly wrap a Fortran routine.
174
175 Located in WRFUserARW.ncl.
176
177 """
178 # Note: This is using C-ordering
179 if outview is None:
180 outview = np.empty((z_var2d.shape[0], xy.shape[0]), dtype=var2dz.dtype)
181
182 var2dtmp = _interp2dxy(field3d, xy)
183
184 for i in py3range(xy.shape[0]):
185 outview[:, i] = _interp1d(var2dtmp[:, i], var2dz[:, i], z_var2d,
186 missingval)
187
188 return outview
189
190
191@left_iteration(2, combine_dims([(1, 0)]), ref_var_idx=0, ignore_args=(1, ))

Callers 1

vertcrossFunction · 0.85

Calls 3

_interp2dxyFunction · 0.85
py3rangeFunction · 0.85
_interp1dFunction · 0.85

Tested by

no test coverage detected