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
typedef float float_t; | |
typedef double double_t; | |
extern int __math_errhandling(void); | |
extern int __fpclassifyf(float); | |
extern int __fpclassifyd(double); | |
extern int __fpclassifyl(long double); | |
extern __inline __attribute__((__gnu_inline__)) __attribute__ ((__always_inline__)) int __inline_isfinitef(float); | |
extern __inline __attribute__((__gnu_inline__)) __attribute__ ((__always_inline__)) int __inline_isfinited(double); | |
extern __inline __attribute__((__gnu_inline__)) __attribute__ ((__always_inline__)) int __inline_isfinitel(long double); |
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 | |
from collections import namedtuple, OrderedDict | |
class Forcing(object): | |
def __init__(self, *args, version='4'): | |
# initialize variables | |
self.name = None | |
self.path = None | |
self.types = [] |
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
from acf.raster import grid_info | |
#----------------------------------------------# | |
fnames = os.listdir(force_dir) | |
lons = np.empty(len(fnames)) | |
lats = np.empty(len(fnames)) | |
for i, fname in enumerate(fnames): | |
pre, lat, lon = fname.split('_') |
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
############################################################################## | |
# @section DESCRIPTION | |
# | |
# VIC Image Driver Makefile | |
# | |
# @section LICENSE | |
# | |
# The Variable Infiltration Capacity (VIC) macroscale hydrological model | |
# Copyright (C) 2014 The Land Surface Hydrology Group, Department of Civil | |
# and Environmental Engineering, University of Washington. |
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
PE 0: MPICH processor detected: | |
PE 0: GenuineIntel (6:62:4) (family:model:stepping) | |
MPI VERSION : CRAY MPICH version 6.3.1 (ANL base 3.0.3) | |
BUILD INFO : Built Mon Apr 7 21:04:59 2014 (svn rev 10100) RT-G CPR-R | |
PE 0: MPICH environment settings: | |
PE 0: MPICH_ENV_DISPLAY = 1 | |
PE 0: MPICH_VERSION_DISPLAY = 1 | |
PE 0: MPICH_ABORT_ON_ERROR = 1 | |
PE 0: MPICH_CPUMASK_DISPLAY = 0 | |
PE 0: MPICH_RANK_REORDER_METHOD = 1 |
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
def add_random_effect(ds, ds_rand, pop_thresh=None, t_root=1., p_root=3.): | |
'''Add random effects to dataset `ds` | |
Parameters | |
---------- | |
ds : xarray.Dataset | |
Input dataset with variables `tas` and/or `pr` | |
ds_rand : xarray.Dataset | |
Input dataset with random fields with variable names `t_rand` and `p_rand` | |
pop_thresh : float |
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
--------------------------------------------------------------------------- | |
TypeError Traceback (most recent call last) | |
<ipython-input-17-2776a0e3d860> in <module>() | |
----> 1 test_quantile_mapping_dask() | |
<ipython-input-16-09fe8c5dfb29> in test_quantile_mapping_dask() | |
21 | |
22 new = quantile_mapping(input_data, data_to_match) | |
---> 23 new.compute() | |
24 new.data.visualize() |
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 | |
from scipy import stats | |
import dask.array as da | |
import xarray as xr | |
def test_quantile_mapping_dask(): | |
# input datasets -- dims (time, y, x) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.