Wrapper for wrf_monotonic. Located in wrf_vinterp.f90.
(var, lvprs, coriolis, idir, delta, icorsw, outview=None)
| 866 | @cast_type(arg_idxs=(0, 1, 2)) |
| 867 | @extract_and_transpose() |
| 868 | def _monotonic(var, lvprs, coriolis, idir, delta, icorsw, outview=None): |
| 869 | """Wrapper for wrf_monotonic. |
| 870 | |
| 871 | Located in wrf_vinterp.f90. |
| 872 | |
| 873 | """ |
| 874 | # If icorsw is not 0, then the input variable might get modified by the |
| 875 | # fortran routine. We don't want this, so make a copy and pass that on. |
| 876 | var = var.copy(order="A") if icorsw != 0 else var |
| 877 | |
| 878 | if outview is None: |
| 879 | outview = np.empty_like(var) |
| 880 | |
| 881 | result = wrf_monotonic(outview, |
| 882 | var, |
| 883 | lvprs, |
| 884 | coriolis, |
| 885 | idir, |
| 886 | delta, |
| 887 | icorsw) |
| 888 | |
| 889 | return result |
| 890 | |
| 891 | |
| 892 | # Output shape is interp_levels.shape + field.shape[-2:] |