Exemple #1
0
except:
    if str.upper(model_str) == 'HRRR' and hour % 12 == 0:
        runlength = 36
    elif str.upper(model_str) == 'HRRR' and hour % 12 != 0:
        runlength = 18
    elif str.upper(model_str) == 'RAP' and hour % 12 == 9:
        runlength = 39
    elif str.upper(model_str) == 'RAP' and hour % 12 != 9:
        runlength = 21
    print('RUN_LENGTH not defined in environment. Setting RUN_LENGTH to ' +
          str(runlength))

# Forecast init and valid date/time
itime = cycle
fhrs = np.arange(0, runlength + 1, 1)
vtime_list = [ncepy.ndate(itime, x) for x in fhrs]

###################################################
# Read in all variables and calculate differences #
###################################################
t1a = time.clock()

snod_list_1 = []
snod_list_2 = []
snod_dif_list = []
snod_list_3 = []

snow_list_1 = []
snow_list_2 = []
snow_dif_list = []
snow_list_3 = []
Exemple #2
0
# Shifted lat/lon arrays for pcolormesh
lat_shift = lats_shift[0]
lon_shift = lons_shift[0]
lat2_shift = lats_shift[1]
lon2_shift = lons_shift[1]

Lat0 = data1[1]['LaDInDegrees']
Lon0 = data1[1]['LoVInDegrees']
#Lon0 = 262.5
print(Lat0)
print(Lon0)

# Forecast valid date/time
itime = ymdh
vtime = ncepy.ndate(itime, int(fhr))

# Specify plotting domains
#domains = ['conus','BN','CE','CO','LA','MA','NC','NE','NW','OV','SC','SE','SF','SP','SW','UM']
domains = ['conus']

###################################################
# Read in all variables and calculate differences #
###################################################
t1a = time.clock()

# Total precipitation
refc_1 = data1.select(name='Maximum/Composite radar reflectivity')[0].values
refc_2 = data2.select(name='Maximum/Composite radar reflectivity')[0].values

t2a = time.clock()