[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ldadmesonet



Hi Justin,

I'm adding the address@hidden so that this email can go to our list-serv for archive and future reference purposes. If you could use that for future support questions that will ensure everyone on the AWIPS Team will be notified as well.

That being said, unfortunately at Unidata we don't have LDAD set up/running, so at this point I cannot even test it. If the mesonet files aren't stored in the same format as the METAR obs that may be why it's not pulling the correct information? You might do a "h5dump" on the processed file on hdf5 to see what parameters are stored? 

Did you ever get anything with GFE working with python-awips?

Thanks,
~Tiffany




On Mon, Sep 14, 2020 at 9:42 PM Justin Balbierer <address@hidden> wrote:
Hi Tiffany,

Have you by chance tried to plot ldadmesonet data with the python DAF?

I used the regional surface plot from Unidata as a template and changed the data type to "ldadmesonet" which appears to be available. The issue comes in when running getMetarObs within the script. I know this was made for metar specifically, but when I use the ldadmesonet data, it comes back with an object. The issue "appears" to be finding the actual data within.

This is the block of coding I am having an issue with. If you have the opportunity to try it out yourself at a future date, please let me know.

# Create envelope geometry
envelope = Polygon([(bbox[0],bbox[2]),(bbox[0],bbox[3]),
                    (bbox[1], bbox[3]),(bbox[1],bbox[2]),
                    (bbox[0],bbox[2])])

# New obs request
DataAccessLayer.changeEDEXHost(edexServer)
request = DataAccessLayer.newDataRequest("ldadmesonet", envelope=envelope)
availableProducts = DataAccessLayer.getAvailableParameters(request)
single_value_params = ["timeObs", "StationId", "longitude", "latitude",
                       "temperature", "dewpoint", "windDir",
                       "windSpeed", "seaLevelPress"]
multi_value_params = ["presWeather", "skyCover", "skyLayerBase"]
params = single_value_params + multi_value_params
request.setParameters(*(params))

# Time range
lastHourDateTime = datetime.utcnow() - timedelta(minutes = 20)
start = lastHourDateTime.strftime('%Y-%m-%d %H:%M:%S')
end = datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S')

beginRange = datetime.strptime( start , "%Y-%m-%d %H:%M:%S")
endRange = datetime.strptime( end , "%Y-%m-%d %H:%M:%S")
timerange = TimeRange(beginRange, endRange)
# Get response
response = DataAccessLayer.getGeometryData(request,timerange)
# function getMetarObs was added in python-awips 18.1.4
obs = DataAccessLayer.getMetarObs(response)
print("Found " + str(len(response)) + " records")
print("Using " + str(len(obs['temperature'])) + " temperature records")
for ob in obs:
    print ob

Found 144 records
Using 0 temperature records
windDir
temperature
dewpoint
longitude
skyCover
windSpeed
timeObs
stationName
latitude
presWeather
skyLayerBase
seaLevelPress


--

Tiffany Meyer
AWIPS Lead Software Engineer IV
UCAR - Unidata