Unidata / LDM

The Unidata Local Data Manager (LDM) system includes network client and server programs designed for event-driven data distribution, and is the fundamental component of the Unidata Internet Data Distribution (IDD) system.
http://www.unidata.ucar.edu/software/ldm
Other
43 stars 27 forks source link

Support day-of-year in pqact(1) string substitution #66

Closed semmerson closed 3 years ago

semmerson commented 6 years ago

It would be very useful if 'pqact' could use the Julian day (day of year) in a manner that is analogous to the day of month to calculate the year, month, and day.

Example Product ID:

The following is an example of the Product ID for GOES-16 ABI Full Disk Channel 13 imagery in the SATELLITE (aka DIFAX) feed:

/data/cspp-geo/GRB-R/OR_ABI-L1b-RadF-M3C13_G16_s20182901645381_e20182901656159_c20182901656223.nc

The time portions of this Product ID are of the form:

CCYYJJJHHMMSSx

Meaning for first time group (starts with 's'):

CCYY - 2018 (%Y%m) JJJ - 290 (%j) HHMMSS - 164538 (%H%M%S) x - 1 -- tenths of a second

Example of desired pqact use:

SATELLITE(OR_(ABI)-L1b-RadF-M.C(..)_G(..)_s....(...).*)

FILE -close /data/ldm/pub/native/satellite/GOES/GRB\4/\2/FullDisk/Channel\3/(\5:yyyy)(\5:mm)(\5:dd)/\1
semmerson commented 3 years ago

Idiot! This can already be done using the syntax "(\x:ddd)", where "\x" is a backreference to the subexpression that matches the day-of-month. See https://www.unidata.ucar.edu/software/ldm/ldm-current/basics/pqact.conf.html#argref for more information.