walllesno.blogg.se

Dims software for pc
Dims software for pc












dims software for pc

sqrt ( area_weights ( cube, normalize = True )) except ( ValueError, CoordinateMultiDimError ): raise ValueError ( 'cannot generate area weights' ) elif scheme in ( 'coslat' ,): # Handle square-root of cosine of latitude weighting. simplefilter ( 'ignore', UserWarning ) weights = np. lower () if scheme in ( 'area' ,): # Handle area weighting. **Examples:** Area weights for a `~` on 2D grid: weights = weights_array(cube, scheme='area') Square-root of cosine of latitude weights for a `~` with a latitude dimension: weights = weights_array(cube, scheme='coslat') """ # Always use lower-case for the scheme, allowing the user to use # upper-case in their calling code without an error. **Returns:** *weights* An array contanining the weights (not a `~`). * *'area'* : Square-root of grid cell area normalized by total grid area. The following values are accepted: * *'coslat'* : Square-root of cosine of latitude. **Arguments:** *cube* An `~` instance to generate weights for. Returned weights are a `numpy.ndarray` broadcastable to the shape of the input cube. def weights_array ( cube, scheme ): """Weights for a data set on a grid. from _future_ import ( absolute_import, division, print_function ) # noqa from copy import copy from functools import reduce import warnings import numpy as np from iris.cube import Cube from import area_weights from import cosine_latitude_weights from iris.exceptions import CoordinateMultiDimError, CoordinateNotFoundError from. # You should have received a copy of the GNU General Public License # along with eofs. See the GNU General Public License # for more details. # eofs is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. # eofs is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. """Supplementary tools for the `iris` EOF analysis interface.""" # (c) Copyright 2013-2016 Andrew Dawson.














Dims software for pc