Ignore:
Timestamp:
25/06/10 08:54:43 (11 years ago)
Author:
astephen
Message:

getting status monitoring working properly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows_wps/trunk/process_modules/extract_uk_station_data.py

    r7071 r7082  
    6565        # Now check limit on number of station IDs 
    6666        nStations = len(stationList) 
     67        STATION_LIMIT = 100 
     68        nYears = int(a["EndDateTime"][:4]) - int(a["StartDateTime"][:4]) 
    6769 
    68         STATION_LIMIT = 10000 
    69         if nStations > STATION_LIMIT  and a["OutputTimeChunk"] == "decadal": 
     70        if nStations > STATION_LIMIT and a["OutputTimeChunk"] == "decadal": 
     71            a["OutputTimeChunk"] = "year" 
    7072            raise Exception("The number of selected station IDs has been calculated to be greater than %d. Please select a chunk size other than 'decadal' for such as large volume of data." % STATION_LIMIT) 
    71  
    72         nYears = int(a["EndDateTime"][:4]) - int(a["StartDateTime"][:4]) 
    7373 
    7474        if nYears > 1 and nStations > STATION_LIMIT: 
     
    9393            outputPaths = exuk_utils.extractStationDataByTimeChunk([a["ObsTableName"]], a["StartDateTime"],  
    9494                       a["EndDateTime"], stationList, a["OutputTimeChunk"], dataFileBase, a["Delimiter"], 
    95                        ext, procTmpDir) 
     95                       ext, procTmpDir, context) 
    9696        
    9797            for outputPath in outputPaths:  
Note: See TracChangeset for help on using the changeset viewer.