Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THE FOLLOWING SCRIPT IS TO BE PLACED AND RUN IN THE DOWNLOADED | |
# IRIS SOURCE DIRECTORY - https://github.com/SciTools/iris | |
# | |
# The script is for simply installing iris. For iris development | |
# see: https://gist.github.com/cpelley/35020289a28253116a82 | |
# | |
# Assumes user is working with conda, if not please change | |
# 'ENVIRONMENT_PATH' to point to the directory of your choosen | |
# python interpreter. | |
set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THE FOLLOWING SCRIPT IS TO BE PLACED AND RUN IN THE CLONE OF | |
# THE IRIS REPOSITORY - https://github.com/SciTools/iris | |
# | |
# The script is for installing iris to make developments in iris. | |
# To install iris as simply a user of iris see: | |
# https://gist.github.com/cpelley/5a89f44cf9288308be3f | |
# | |
# Assumes user is working with conda, if not please change | |
# 'ENVIRONMENT_PATH' to point to the directory of your choosen | |
# python interpreter. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import iris | |
import iris.unit | |
import cf_units | |
tunit = iris.unit.Unit('hours since 1970-01-01 00:00:00', calendar='360_day') | |
tcoord = iris.coords.DimCoord(1, standard_name='time', units=tunit) | |
print 'iris.unit.Unit: {}'.format(repr(tcoord)) | |
tunit = cf_units.Unit('hours since 1970-01-01 00:00:00', calendar='360_day') |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import numpy as np | |
>>> arr = np.ma.array([1, 2, 3, 4], mask=[False, True, False, True]) | |
>>> arr2 = arr.reshape((2, 2)) | |
>>> arr2 | |
masked_array(data = | |
[[1 --] | |
[3 --]], | |
mask = | |
[[False True] | |
[False True]], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
import subprocess | |
import sys | |
DEBUG = False | |
SVN_EXEC = '/usr/bin/svn' | |
class SVNError(Exception): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import iris | |
import numpy as np | |
from shapely.geometry import Polygon | |
def horizontal_grid(cube): | |
return cube.coord(axis='x'), cube.coord(axis='y') | |
def transform_bbox(points, src_crs, tgt_crs): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import warnings | |
import iris | |
import biggus | |
from iris.analysis._area_weighted import AreaWeightedRegridder \ | |
as _AreaWeightedRegridder | |
from iris.experimental.regrid import regrid_weighted_curvilinear_to_rectilinear | |
import iris.experimental.regrid as eregrid | |
from iris.analysis._regrid import RectilinearRegridder | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:9e9b8e73d2e084ca27d4015fe246597f8a1595a35b0bee658170be3636d8c30a" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |