grids.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:oocgcm 作者: lesommer 项目源码 文件源码
def change_grid_location_u_to_v(self,scalararray,conserving='area'):
        """Return a xarray corresponding to scalararray averaged at a new
        grid location.

        Parameters
        ----------
        scalararray : xarray.DataArray
            original array to be relocated
        conserving : str
            any of 'area', 'x_flux' or 'y_flux'.
             - 'area' : conserves the area
             - 'x_flux' : conserves the flux in x-direction (eastward)
             - 'y_flux' : conserves the flux in y-direction (northward)
        """
        # first move to t-point
        newarr = self.change_grid_location_u_to_t(scalararray,
                                                  conserving=conserving)
        # then move t v-point
        out = self.change_grid_location_t_to_v(newarr,
                                                  conserving=conserving)
        return out

#---------------------------- Vector Operators ---------------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号