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.
Heather, > So, this is my first time adding a new entry to my pqact.conf file. I > have been looking over this documentation: > > https://www.unidata.ucar.edu/software/ldm/ldm-current/basics/pqact.conf.html#argref > > and have been looking through other listings in my current pqact.conf > file. And I am lost! I really wish there were some actual examples > taking output from notifyme and constructing an entry that way. > > So here is where I am. I would like to decode all the NDFD data. This > is what I am seeing in my notifyme for NDFD: > > Oct 14 03:37:57 notifyme[23548] INFO: 1314250 20141014033757.050 NGRID > 48497675 LCUH18 KWBN 140000 !grib2/ncep/NDFD/#255/201410140000F192/SPED/10 m > HGHT > Oct 14 03:37:58 notifyme[23548] INFO: 1029078 20141014033758.081 NGRID > 48497693 LBUH18 KWBN 140000 !grib2/ncep/NDFD/#255/201410140000F192/DRCT/10 m > HGHT > Oct 14 04:52:34 notifyme[23548] INFO: 875506 20141014045234.035 NGRID > 48569146 LDUE06 KWBN 140000 !grib2/ncep/NDFD/#255/201410140000F108/POP/0 - > NONE > Oct 14 04:52:39 notifyme[23548] INFO: 968514 20141014045239.908 NGRID > 48569175 LDUE18 KWBN 140000 !grib2/ncep/NDFD/#255/201410140000F120/POP/0 - > NONE > Oct 14 04:52:53 notifyme[23548] INFO: 871805 20141014045253.980 NGRID > 48569187 LDUF06 KWBN 140000 !grib2/ncep/NDFD/#255/201410140000F132/POP/0 - > NONE > > So, I am using our SREF entry as an example to grab my NDFD data. > > Here is the entry: > > NGRID ^[LM]..... KWBL ([0-3][0-9])([0-2][0-9][0-6][0-9]) > FILE -close > /data/pub/native/grid/NCEP/SREF/(\1:yyyy)(\1:mm)\1\2_sref.grib2 > > And here is what I found for SREF in my notifyme output: > > Oct 14 01:05:14 notifyme[23548] INFO: 5340 20141014010426.867 NGRID > 48440423 LVXE50 KWBL 132100 > !grib2/ncep/SREF_113/#255/201410132100F024/VREL/500 hPa PRES > Oct 14 01:05:14 notifyme[23548] INFO: 219 20141014010426.867 NGRID > 48440424 LMXG98 KWBL 132100 > !grib2/ncep/SREF_113/#255/201410132100F036/WXTZ/0 - NONE > Oct 14 01:05:14 notifyme[23548] INFO: 5415 20141014010426.867 NGRID > 48440425 LHXD30 KWBL 132100 > !grib2/ncep/SREF_113/#255/201410132100F018/HGHT/300 hPa PRES > Oct 14 01:05:14 notifyme[23548] INFO: 5796 20141014010426.868 NGRID > 48440426 MUXB30 KWBL 132100 > !grib2/ncep/SREF_113/#255/201410132100F003/UREL/300 hPa PRES > > I think I understand the first half of the first line: > > NGRID is my feedtype. I get the first part of the prodIdPat, I am only > getting the data product that start with LM and end with the KWBL. Actually, matching product-identifiers will start with *either* "L" or "M" (the pattern "[LM]" means either an "L" or an "M"). A cheat-sheet for extended regular expressions can be found at <http://www.unidata.ucar.edu/software/ldm/ldm-current/basics/ERE.html>. Also, the match of the product-identifier doesn't end with "KWBL"; it ends after the third pair of numerals that follow the "KWBL". > However > I am lost at the second part: ([0-3][0-9])([0-2][0-9][0-6][0-9]). What > does this mean??? That extended regular expression will match a two-digit day-of-the-month, followed by a two-digit hour-of-the-day, followed by a two-digit minute-of-the-hour. > I get the majority of the second line. It is being written to file > and then closed. My end file looks like this: 201410140900_sref.grib2 It shouldn't. The template for the file name is "(\1:yyyy)(\1:mm)\1\2_sref.grib2", with "\1" referencing the day-of-the-month field in the matching product-identifier. Thus, the file name will be "YYYYMMDDhh_sref.grib2" -- with "YYYY" being the year, "MM" the month, "DD" the day-of-the-month, and "hh" being the hour. The string "00" shouldn't appear. > As for the file naming, I think I understand most of it: > > \1 is the year,mon,day. No. "\1" references the substring in the product-identifier corresponding to the first pair of parentheses in the extended regular expression, which is the day-of-the-month field in a WMO header (from which the product-identifier is created). > But it looks like I am only formatting year > and mon, but the day is also formatted in my end file. how is this > without this: > > (\1:yyyy)(\1:mm)(\1:dd)?? The reference "(\1:yyyy)" tells pqact(1) to replace it with a four-digit year given that the substring in the product-identifier corresponding to the first set of parentheses specifies the day-of-the-month (WMO headers don't explicitly specify the year, so it has to be computed). > And the \2 is the hourmin. No. "\2" refers to the second set of parentheses and corresponds to the hour-of-the-day in a WMO header. > So far I have this for my NDFD data: > > ###NDFD > NGRID ^[L]...... KWBN ([0-3][0-9])([0-2][0-9][0-6][0-9]) > FILE -close > /data/pub/native/grid/NCEP/NDFD/(\1:yyyy)(\1:mm)\1\2_ndfd.grib2 Your extended regular expression starts with 7 characters, then a space, then "KWBN". WMO headers have 6 characters, then a space, then the station ID. Information on WMO headers can be found at <http://www.nws.noaa.gov/tg/headef.php>. > I am just unsure what to do with the second half of my first line! > > I would appreciated any guidance! Hopefully, the above will help. > I have attached my pqact.conf file, and output from my notifyme with my > SREF and NDFD entries pulled out. > > > Thanks, > > Heather Kiley Regards, Steve Emmerson Ticket Details =================== Ticket ID: WPB-862056 Department: Support LDM Priority: Normal Status: Closed