Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
  • Loading branch information
agoodm committed Oct 1, 2016
2 parents 5d1bc5c + 18fe8a3 commit a65438c964433b3d9bba0a91aecef07051b7921d
Show file tree
Hide file tree
Showing 78 changed files with 2,279 additions and 1,361 deletions.
@@ -16,7 +16,7 @@
# under the License.

python-targets:
- 2
- 3
test-warnings: no
strictness: medium
max-line-length: 80
23 .noserc
@@ -0,0 +1,23 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License")# you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

[nosetests]
where=ocw/tests/
verbosity=3
with-coverage=1
cover-package=ocw
nocapture=1
@@ -16,15 +16,20 @@
# under the License.
language: python
python:
- "2.7"
- "3.5"
notifications:
email: false
email: false
install:
- sudo apt-get update
- source easy-ocw/install-ubuntu.sh
- pip install python-coveralls
# Workaround to get travis build working with matplotlib
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
script:
- chmod a+x test.sh
- ./test.sh
after_script:
- chmod a+x test.sh
- ./test.sh
after_success:
- coveralls
@@ -643,11 +643,11 @@ def run_screen(model_datasets, models_info, observations_info,

for member, each_target_dataset in enumerate(new_model_datasets):
new_model_datasets[member] = dsp.temporal_rebin(new_model_datasets[member], temp_grid_setting.lower())
if each_target_dataset.lats.ndim !=2 and each_target_dataset.lons.ndim !=2:
new_model_datasets[member] = dsp.subset(EVAL_BOUNDS, new_model_datasets[member])
else:
new_model_datasets[member] = dsp.temporal_slice(
each_target_dataset, EVAL_BOUNDS.start, EVAL_BOUNDS.end)
new_model_datasets[member] = dsp.normalize_dataset_datetimes(new_model_datasets[member], temp_grid_setting.lower())
start_index = np.where(new_model_datasets[member].times >= overlap_start_time)[0][0]
end_index = np.where(new_model_datasets[member].times <= overlap_end_time)[0][-1]
new_model_datasets[member].values=each_target_dataset.values[start_index:end_index+1,:]
new_model_datasets[member].times=each_target_dataset.times[start_index:end_index+1]
screen.addstr(5, 4, "--> Temporally regridded.")
screen.refresh()

@@ -0,0 +1,43 @@
workdir: ./CMIP5_examples/Central_America
output_netcdf_filename: CMIP5_prec.nc

# (RCMES will temporally subset data between month_start and month_end.
# If average_each_year is True (False), seasonal mean in each year is (not) calculated and used for metrics calculation.)
time:
maximum_overlap_period: False
start_time: 1998-01-01
end_time: 1999-12-31
temporal_resolution: monthly
month_start: 1
month_end: 12
average_each_year: Yes

space:
boundary_type: CORDEX Central America

regrid:
regrid_on_reference: False
regrid_dlat: 0.44
regrid_dlon: 0.44

datasets:
reference:
- loader_name: rcmed
name: TRMM
dataset_id: 3
parameter_id: 36

targets:
- loader_name: local
file_path: ./data/CMIP5/prec/CMIP5_*prec.nc
variable_name: prec

number_of_metrics_and_plots: 1

metrics1: Map_plot_bias_of_multiyear_climatology

plots1:
file_name: CMIP5_precipitation_evaluation_using_TRMM
subplots_array: !!python/tuple [3,4]

use_subregions: False
@@ -42,7 +42,7 @@ regrid:
datasets:
reference:
- loader_name: local
name: SRB
dataset_name: SRB
file_path: ./data/CORDEX-Arctic_data/srb_rel3.0_shortwave_from_1983_to_2007.nc
variable_name: cld_frac
multiplying_factor: 100.0
@@ -42,7 +42,7 @@ regrid:
datasets:
reference:
- loader_name: local
name: SRB
dataset_name: SRB
file_path: ./data/CORDEX-Arctic_data/srb_rel3.0_longwave_from_1983_to_2007.nc
variable_name: lw_sfc_dn
multiplying_factor: 1
@@ -42,7 +42,7 @@ regrid:
datasets:
reference:
- loader_name: local
name: SRB
dataset_name: SRB
file_path: ./data/CORDEX-Arctic_data/srb_rel3.0_longwave_from_1983_to_2007.nc
variable_name: lw_sfc_up
multiplying_factor: 1
@@ -42,7 +42,7 @@ regrid:
datasets:
reference:
- loader_name: local
name: SRB
dataset_name: SRB
file_path: ./data/CORDEX-Arctic_data/srb_rel3.0_shortwave_from_1983_to_2007.nc
variable_name: sw_sfc_dn
multiplying_factor: 1
@@ -40,12 +40,13 @@ regrid:
datasets:
reference:
- loader_name: local
name: AVISO
dataset_name: AVISO
file_path: ./data/ESGF_data/zos_AVISO_L4_199210-201012.nc
variable_name: zos

targets:
- loader_name: local
dataset_name: MPI-ESM-LR
file_path: ./data/ESGF_data/zos_Omon_MPI-ESM-LR_decadal1994_r1i1p1_199501-200412.nc
variable_name: zos
GCM_data: True
@@ -25,7 +25,7 @@ regrid:
datasets:
reference:
- loader_name: local
name: SRB
dataset_name: SRB
file_path: ./data/NARCCAP_data/srb_rel3.0_shortwave_from_1983_to_2007.nc
variable_name: sw_sfc_dn

@@ -25,7 +25,7 @@ regrid:
datasets:
reference:
- loader_name: local
name: SRB
dataset_name: SRB
file_path: ./data/NARCCAP_data/srb_rel3.0_shortwave_from_1983_to_2007.nc
variable_name: sw_sfc_dn

@@ -25,7 +25,7 @@ regrid:
datasets:
reference:
- loader_name: local
name: SRB
dataset_name: SRB
file_path: ./data/NARCCAP_data/srb_rel3.0_shortwave_from_1983_to_2007.nc
variable_name: sw_sfc_dn

@@ -25,7 +25,7 @@ regrid:
datasets:
reference:
- loader_name: local
name: NLDAS
dataset_name: NLDAS
file_path: ./data/dscale/obs/prmo_lds-lds_1999-2010.nc
variable_name: pr

0 comments on commit a65438c

Please sign in to comment.