# import the data server interface from ReanalysisDataServer import DataServer # create data server objects to access precip data from ERA40 # NOTE: there are 2 types of precip: # - convective precip (precc) # - large-scale precip (precl) # you need to access these two separately and then add them up to # compare with station data dc = DataServer(Field='precc',Source='ERA40',LevType='surface') dl = DataServer(Field='precl',Source='ERA40',LevType='surface') # get a list of all the dates corresponding to the 1992 DJF season # this is understood as the season Dec 1991 - Feb 1992 dates = dc.getDateList(Year=1992,Season='DJF') print dates # compute the TOTAL precip for the first snapshot (1 Dec 1991) precip = dc.snapshot(*dates[0]) + dl.snapshot(*dates[0])