def returnRainfall(dd):
    """Returns rainfall data in units kg/m2/s"""
    rho_fresh = 1000 # freshwater density
    rain = []
    if  'LIQUID_PRECIPITATION_VOLUME' in dd:
        period = dd['LIQUID_PRECIPITATION_DURATION'] # hours
        volume = dd['LIQUID_PRECIPITATION_VOLUME'] # mm
        rain = volume/(1000*period*3600)*rho_fresh
    elif 'PRECIP_VOLUME' in dd:
        period = dd['PRECIP_PERIOD'] # minutes
        volume = dd['PRECIP_VOLUME'] # mm
        rain = volume/(1000*period*60)*rho_fresh
    return rain