climate-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From good...@apache.org
Subject svn commit: r1516188 - in /incubator/climate/trunk/examples: ./ AFRICA_KNMI-RACMO2.2b_CTL_ERAINT_MM_50km_1989-2008_tasmax.nc AFRICA_UC-WRF311_CTL_ERAINT_MM_50km-rg_1989-2008_tasmax.nc simple-model-to-model-bias.py
Date Wed, 21 Aug 2013 15:30:40 GMT
Author: goodale
Date: Wed Aug 21 15:30:27 2013
New Revision: 1516188

URL: http://svn.apache.org/r1516188
Log:
CLIMATE-268:  In progress.  Adding the examples directory with the first example of an end-to-end
use of the new OCW API.
This includes two NetCDF Files that are used by the code, and will provide input into how
the new OCW data_source/local.py
should work with CORDEX data.

Added:
    incubator/climate/trunk/examples/
    incubator/climate/trunk/examples/AFRICA_KNMI-RACMO2.2b_CTL_ERAINT_MM_50km_1989-2008_tasmax.nc
  (with props)
    incubator/climate/trunk/examples/AFRICA_UC-WRF311_CTL_ERAINT_MM_50km-rg_1989-2008_tasmax.nc
  (with props)
    incubator/climate/trunk/examples/simple-model-to-model-bias.py

Added: incubator/climate/trunk/examples/AFRICA_KNMI-RACMO2.2b_CTL_ERAINT_MM_50km_1989-2008_tasmax.nc
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/examples/AFRICA_KNMI-RACMO2.2b_CTL_ERAINT_MM_50km_1989-2008_tasmax.nc?rev=1516188&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/climate/trunk/examples/AFRICA_KNMI-RACMO2.2b_CTL_ERAINT_MM_50km_1989-2008_tasmax.nc
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/climate/trunk/examples/AFRICA_KNMI-RACMO2.2b_CTL_ERAINT_MM_50km_1989-2008_tasmax.nc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/climate/trunk/examples/AFRICA_UC-WRF311_CTL_ERAINT_MM_50km-rg_1989-2008_tasmax.nc
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/examples/AFRICA_UC-WRF311_CTL_ERAINT_MM_50km-rg_1989-2008_tasmax.nc?rev=1516188&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/climate/trunk/examples/AFRICA_UC-WRF311_CTL_ERAINT_MM_50km-rg_1989-2008_tasmax.nc
------------------------------------------------------------------------------
    svn:executable = *

Propchange: incubator/climate/trunk/examples/AFRICA_UC-WRF311_CTL_ERAINT_MM_50km-rg_1989-2008_tasmax.nc
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/climate/trunk/examples/simple-model-to-model-bias.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/examples/simple-model-to-model-bias.py?rev=1516188&view=auto
==============================================================================
--- incubator/climate/trunk/examples/simple-model-to-model-bias.py (added)
+++ incubator/climate/trunk/examples/simple-model-to-model-bias.py Wed Aug 21 15:30:27 2013
@@ -0,0 +1,19 @@
+import datetime
+
+import ocw.data_source.local as local
+import ocw.dataset_processor as dsp
+
+# Two Local Model Files 
+FILE_1 = "AFRICA_KNMI-RACMO2.2b_CTL_ERAINT_MM_50km_1989-2008_tasmax.nc"
+FILE_2 = "AFRICA_UC-WRF311_CTL_ERAINT_MM_50km-rg_1989-2008_tasmax.nc"
+
+# Load the Files into OCW Objects Using the local from ocw.data_source
+dataset_1 = local.load_file(FILE_1, "tasmax")
+dataset_2 = local.load_file(FILE_2, "tasmax")
+
+print dataset_1.values.shape
+print dataset_2.values.shape
+
+# Do Temporal Rebinning to an Annual Time Step using dataset_processor
+dataset_1 = dsp.temporal_rebin(dataset_1, datetime.timedelta(days=365))
+dataset_2 = dsp.temporal_rebin(dataset_2, datetime.timedelta(days=365))



Mime
View raw message