You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@climate.apache.org by go...@apache.org on 2013/04/28 19:39:03 UTC

svn commit: r1476806 - in /incubator/climate/trunk: CHANGES.txt rcmet/src/main/python/rcmes/cli/rcmet20_cordexAF.py rcmet/src/main/python/rcmes/cli/rcmet_ui.py rcmet/src/main/python/rcmes/toolkit/do_data_prep.py rcmet/src/main/python/rcmes/utils/misc.py

Author: goodale
Date: Sun Apr 28 17:39:03 2013
New Revision: 1476806

URL: http://svn.apache.org/r1476806
Log:
CLIMATE-1:  Updated all instances of longName to longname to match the RCMED parameter webservice response JSON.

Modified:
    incubator/climate/trunk/CHANGES.txt
    incubator/climate/trunk/rcmet/src/main/python/rcmes/cli/rcmet20_cordexAF.py
    incubator/climate/trunk/rcmet/src/main/python/rcmes/cli/rcmet_ui.py
    incubator/climate/trunk/rcmet/src/main/python/rcmes/toolkit/do_data_prep.py
    incubator/climate/trunk/rcmet/src/main/python/rcmes/utils/misc.py

Modified: incubator/climate/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/CHANGES.txt?rev=1476806&r1=1476805&r2=1476806&view=diff
==============================================================================
--- incubator/climate/trunk/CHANGES.txt (original)
+++ incubator/climate/trunk/CHANGES.txt Sun Apr 28 17:39:03 2013
@@ -1,3 +1,13 @@
+Apache Open Climate Workbench Change Log
+============================================
+
+Incubating 0.1 - Current Development
+--------------------------------------------
+
+* CLIMATE-1 Rename parameters dict key 'longName' to 'longname' (goodale)
+
+
+
 Regional Climate Model Evaluation System
 JIRA located here: https://oodt.jpl.nasa.gov/jira/browse/RCMES
 

Modified: incubator/climate/trunk/rcmet/src/main/python/rcmes/cli/rcmet20_cordexAF.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/python/rcmes/cli/rcmet20_cordexAF.py?rev=1476806&r1=1476805&r2=1476806&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/python/rcmes/cli/rcmet20_cordexAF.py (original)
+++ incubator/climate/trunk/rcmet/src/main/python/rcmes/cli/rcmet20_cordexAF.py Sun Apr 28 17:39:03 2013
@@ -144,7 +144,7 @@ def rcmet_cordexAF():
     except Exception:
         sys.exit()
     
-    datasets = [parameter['longName'] for parameter in parameters]
+    datasets = [parameter['longname'] for parameter in parameters]
     
     #   NOTE: the list must be updated whenever a new dataset is added to RCMED (current as of 11/22/2011)
     db_datasets = ['TRMM', 'ERA-Interim', 'AIRS', 'MODIS', 'URD', 'CRU3.0', 'CRU3.1']
@@ -679,7 +679,7 @@ def rcmet_cordexAF():
     Parameter to Object Mapping
     cachedir = settings.cacheDir
     workdir = settings.cacheDir
-    obsList = obsDatasetList.each['longName']
+    obsList = obsDatasetList.each['longname']
     """
 
     numOBS, numMDL, nT, ngrdY, ngrdX, Times, obsData, mdlData, obsRgn, mdlRgn, obsList, mdlList = toolkit.do_data_prep(\

Modified: incubator/climate/trunk/rcmet/src/main/python/rcmes/cli/rcmet_ui.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/python/rcmes/cli/rcmet_ui.py?rev=1476806&r1=1476805&r2=1476806&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/python/rcmes/cli/rcmet_ui.py (original)
+++ incubator/climate/trunk/rcmet/src/main/python/rcmes/cli/rcmet_ui.py Sun Apr 28 17:39:03 2013
@@ -150,7 +150,7 @@ def rcmetUI():
   
     # dbDatasets = ['TRMM','ERA-Interim','AIRS','MODIS','URD','CRU']
     # replace with list comprehension
-    # dbDatasets = [parameter['longName'] for parameter in parameters]
+    # dbDatasets = [parameter['longname'] for parameter in parameters]
   
   
     # datasetIds = [3,1,2,5,4,6]
@@ -182,7 +182,7 @@ def rcmetUI():
 
     for parameter in parameters:
         """( 38 ) - CRU3.1 Daily-Mean Temperature : monthly"""
-        print "({:^2}) - {:<35} :: {:<10}".format(parameter['parameter_id'], parameter['longName'], parameter['timestep'])
+        print "({:^2}) - {:<35} :: {:<10}".format(parameter['parameter_id'], parameter['longname'], parameter['timestep'])
 
     try:
         datasetChoice = int(raw_input('Please select which observational dataset you wish to compare against:\n> ')) 

Modified: incubator/climate/trunk/rcmet/src/main/python/rcmes/toolkit/do_data_prep.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/python/rcmes/toolkit/do_data_prep.py?rev=1476806&r1=1476805&r2=1476806&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/python/rcmes/toolkit/do_data_prep.py (original)
+++ incubator/climate/trunk/rcmet/src/main/python/rcmes/toolkit/do_data_prep.py Sun Apr 28 17:39:03 2013
@@ -38,8 +38,8 @@ def prep_data(settings, obsDatasetList, 
 
     # Use list comprehensions to deconstruct obsDatasetList
     #  ['TRMM_pr_mon', 'CRU3.1_pr']    Basically a list of Dataset NAME +'_' + parameter name - THE 'CRU*' one triggers unit conversion issues later
-    # the plan here is to use the obsDatasetList which contains a longName key we can use.
-    obsList = [str(x['longName']) for x in obsDatasetList]
+    # the plan here is to use the obsDatasetList which contains a longname key we can use.
+    obsList = [str(x['longname']) for x in obsDatasetList]
     # Also using the obsDatasetList with a key of ['dataset_id']
     obsDatasetId = [str(x['dataset_id']) for x in obsDatasetList]
     # obsDatasetList ['paramter_id'] list

Modified: incubator/climate/trunk/rcmet/src/main/python/rcmes/utils/misc.py
URL: http://svn.apache.org/viewvc/incubator/climate/trunk/rcmet/src/main/python/rcmes/utils/misc.py?rev=1476806&r1=1476805&r2=1476806&view=diff
==============================================================================
--- incubator/climate/trunk/rcmet/src/main/python/rcmes/utils/misc.py (original)
+++ incubator/climate/trunk/rcmet/src/main/python/rcmes/utils/misc.py Sun Apr 28 17:39:03 2013
@@ -984,7 +984,7 @@ def userDefinedStartEndTimes(obsList, mo
     for observation in obsList:
         startTimes.append(datetime.datetime.strptime(observation['start_date'],'%Y-%m-%d'))
         endTimes.append(datetime.datetime.strptime(observation['end_date'],'%Y-%m-%d'))
-        print template.format(observation['longName'], observation['start_date'], observation['end_date'])
+        print template.format(observation['longname'], observation['start_date'], observation['end_date'])
     print '-'*94
     for model in modelList:
         startTimes.append(model.minTime)