Esempio n. 1
0
def get_HRRR_value(getthisDATE):
    """
    Getting HRRR data, just return the value (not the latitude and longitude)
    """
    print getthisDATE
    U = get_hrrr_variable(getthisDATE, variable, fxx=fxx, model='hrrr', field='sfc', value_only=True, verbose=False)
    V = get_hrrr_variable(getthisDATE, variable, fxx=fxx, model='hrrr', field='sfc', value_only=True, verbose=False)
    return H{'value':np.sqrt(U['value']**2 + V['value']**2)}
Esempio n. 2
0
def get_HRRR(getthisDATE):
    """
    Getting HRRR data
    """
    U = get_hrrr_variable(getthisDATE, variable, fxx=fxx, model='hrrr', field='sfc')
    V = get_hrrr_variable(getthisDATE, variable, fxx=fxx, model='hrrr', field='sfc')
    return H{'lat':U['lat'],
             'lon':V['lon'],
             'value':np.sqrt(U['value']**2+V['value']**2)}
Esempio n. 3
0
def get_HRRR(getthisDATE):
    """
    Getting HRRR data
    """
    H = get_hrrr_variable(getthisDATE,
                          variable,
                          fxx=fxx,
                          model='hrrr',
                          field='sfc')
    return H
Esempio n. 4
0
def get_HRRR_value(getthisDATE):
    """
    Getting HRRR data, just return the value (not the latitude and longitude)
    """
    if variable[:2] == 'UV':
        # Then we want to calculate the wind speed from U and V components.
        wind_var = variable.split(':')[-1]  # This is the level of interest
        Hu = get_hrrr_variable(getthisDATE,
                               'UGRD:' + wind_var,
                               fxx=fxx,
                               model='hrrr',
                               field='sfc',
                               value_only=True,
                               verbose=False)
        Hv = get_hrrr_variable(getthisDATE,
                               'VGRD:' + wind_var,
                               fxx=fxx,
                               model='hrrr',
                               field='sfc',
                               value_only=True,
                               verbose=False)

        if Hu['value'] is None or Hv['value'] is None:
            print "!! WARNING !! COULD NOT GET", getthisDATE
            return None

        spd = wind_uv_to_spd(Hu['value'], Hv['value'])
        return spd

    else:
        H = get_hrrr_variable(getthisDATE,
                              variable,
                              fxx=fxx,
                              model='hrrr',
                              field='sfc',
                              value_only=True,
                              verbose=False)

    if H['value'] is None:
        print "!! WARNING !! COULD NOT GET", getthisDATE

    return H['value']
def get_HRRR_value(getthisDATE):
    """
    Getting HRRR data, just return the value (not the latitude and longitude)
    """
    print getthisDATE
    H = get_hrrr_variable(getthisDATE,
                          variable,
                          fxx=fxx,
                          model='hrrr',
                          field='sfc',
                          value_only=True,
                          verbose=False)
    if H['value'] is None:
        print "!! WARNING !! COULD NOT GET", getthisDATE
    return H['value']