This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Goal: Clickable interactive state (WA) map that uses GEMPAK to produce > meteograms from MM5 model output. Clicks do NOT necesarily land on > predetermined stations. > > Question: I have been messing with SFGRAM to produce a meteogram without > using STATION but rather lat/lon coordinates. Is there a easy/recommended way > to do this? > > Ideas: We already produce the MM5.gem files so could I trick GEMPAK by > creating a new station (using SFSTNS to change station info locally as not to > disrupt the department wide GEMPAK) with the user click as the lat/lon, name > the station TEST, then plot the data from the MM5.gem file using SFGRAM > STATION=test. This seems a little 'clunky'... do you have any other > suggestions? > > I have searched through the logs/e-mail threads with no luck and wonder if > you can give advice. > > Thanks, > > Phil > Phil, The SFGRAM program requires the surface observations to be at a station location, so you either have to: 1) interpolate your data to the user clicked location or 2) determine the "nearest" station for which you have data with respect to the clicked location If you are going to do the first option above, you can interpolate the grid data to a surface locations using GDGSFC, where you would create the surface file with your "TEST" id or some predetermined STNM. This could all be done though a script and existing GEMPAK programs since you can obtain the "CURSOR GPOINT" selected lat;lon value from the GEMPAK display program, generate the surface file and plot with SFGRAM in a short time. The down side here is if you have a lot of user clicks, that may be inefficient depending on the number of user clicks you would have. The second option would follow the closest predetermined location (this is like the clickable NWX map, or the nearest station readout in NMAP2). My assumption here would be that it may be advantageous to create a bogus grid of station locations (eg an ID every .01 degree in lat and lon within a model domain as an example) and then use the closest station if that would be sufficient for your use. I put together a short program (calling sequence for $CGEMLIB/clo routines is clo_init, clo_tclosest, clo_tgid) that will return the "closest" station ID for a supplied lat;lon (eg "cursor gpoint") if you would like to see that. The advantage here would be if you had a lot of clicks as the interpolation would only be done once in GDGSFC. Steve Chiswell Unidata User Support Ticket Details =================== Ticket ID: VPZ-489654 Department: Support GEMPAK Priority: High Status: Closed