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

Function _slp

src/wrf/extension.py:222–252  ·  view source on GitHub ↗

Wrapper for dcomputeseaprs. Located in wrf_user.f90.

(z, t, p, q, outview=None)

Source from the content-addressed store, hash-verified

220@cast_type(arg_idxs=(0, 1, 2, 3))
221@extract_and_transpose()
222def _slp(z, t, p, q, outview=None):
223 """Wrapper for dcomputeseaprs.
224
225 Located in wrf_user.f90.
226
227 """
228 t_surf = np.zeros(z.shape[0:2], np.float64, order="F")
229 t_sea_level = np.zeros(z.shape[0:2], np.float64, order="F")
230 level = np.zeros(z.shape[0:2], np.int32, order="F")
231
232 if outview is None:
233 outview = np.empty(z.shape[0:2], np.float64, order="F")
234
235 errstat = np.array(0)
236 errmsg = np.zeros(Constants.ERRLEN, "c")
237
238 result = dcomputeseaprs(z,
239 t,
240 p,
241 q,
242 outview,
243 t_sea_level,
244 t_surf,
245 level,
246 errstat=errstat,
247 errmsg=errmsg)
248
249 if int(errstat) != 0:
250 raise DiagnosticError("".join(npbytes_to_str(errmsg)).strip())
251
252 return result
253
254
255@check_args(0, 3, (3, 3))

Callers 2

get_slpFunction · 0.85
slpFunction · 0.85

Calls 2

DiagnosticErrorClass · 0.85
npbytes_to_strFunction · 0.85

Tested by

no test coverage detected