Return the cross section parameters. This function returns the xy horizontal cross section line coordinates, the xy x z vertical values interpolated along the xy cross section line, and the fixed vertical levels to be used by the cross section algorithm (at ~1% increments for the mi
(z, pivot_point=None, angle=None,
start_point=None, end_point=None,
levels=None, autolevels=100)
| 176 | |
| 177 | |
| 178 | def get_xy_z_params(z, pivot_point=None, angle=None, |
| 179 | start_point=None, end_point=None, |
| 180 | levels=None, autolevels=100): |
| 181 | """Return the cross section parameters. |
| 182 | |
| 183 | This function returns the xy horizontal cross section line coordinates, |
| 184 | the xy x z vertical values interpolated along the xy cross section |
| 185 | line, and the fixed vertical levels to be used by the cross section |
| 186 | algorithm (at ~1% increments for the minimum to maximum vertical |
| 187 | span). |
| 188 | |
| 189 | Args: |
| 190 | |
| 191 | z (:class:`numpy.ndarray`): The vertical coordinate, whose rightmost |
| 192 | dimensions are bottom_top x south_north x west_east. |
| 193 | |
| 194 | pivot_point (:obj:`tuple` or :obj:`list`, optional): A |
| 195 | :obj:`tuple` or :obj:`list` with two entries, |
| 196 | in the form of [x, y] (or [west_east, south_north]), which |
| 197 | indicates the x,y location through which the plane will pass. |
| 198 | Must also specify `angle`. |
| 199 | |
| 200 | angle (:obj:`float`, optional): Only valid for cross sections where |
| 201 | a plane will be plotted through |
| 202 | a given point on the model domain. 0.0 represents a S-N cross |
| 203 | section. 90.0 is a W-E cross section. |
| 204 | |
| 205 | start_point (:obj:`tuple` or :obj:`list`, optional): A |
| 206 | :obj:`tuple` or :obj:`list` with two entries, in the form of |
| 207 | [x, y] (or [west_east, south_north]), which indicates the start |
| 208 | x,y location through which the plane will pass. |
| 209 | |
| 210 | end_point (:obj:`tuple` or :obj:`list`, optional): A |
| 211 | :obj:`tuple` or :obj:`list` with two entries, in the form of |
| 212 | [x, y] (or [west_east, south_north]), which indicates the end x,y |
| 213 | location through which the plane will pass. |
| 214 | |
| 215 | levels (sequence): A sequence of :obj:`float` for the desired |
| 216 | vertical levels in the output array. If None, a fixed set of |
| 217 | vertical levels is provided. Default is None. |
| 218 | |
| 219 | autolevels(:obj:`int`, optional): The number of evenly spaced |
| 220 | automatically chosen vertical levels to use when *levels* |
| 221 | is None. Default is 100. |
| 222 | |
| 223 | Returns: |
| 224 | |
| 225 | :obj:`tuple`: A tuple containing the xy horizontal cross section |
| 226 | coordinates, the vertical values interpolated along the xy cross |
| 227 | section line, and the fixed vertical levels used by the |
| 228 | cross section algorithm at ~1% increments of minimum to maximum |
| 229 | vertical span. |
| 230 | |
| 231 | """ |
| 232 | |
| 233 | xy = get_xy(z, pivot_point, angle, start_point, end_point) |
| 234 | |
| 235 | # Interp z |
no test coverage detected