>From: "C. Vandersip" <address@hidden> >Organization: FSU >Keywords: 200007031756.e63HugT00060 ldm-mcidas Chris, I know you intended this for Chiz, but I felt like I had to put my two cents worth :-) >I just reconfigured pqact.conf to decode the new CIMSS products using >the pnga2area decoder and it's working fine. Now here's my problem: > >When I opened the Garp_defaults file to see if modifications were >necessary, I realized that the satT file name template string is >configured for 2-digit year -- > > satT : $(SATDIR)/%(platform)/%(resolution)/%(product)/*_@(YYMMDD)_@(HHNN) > >which is what the areaInfo program produces in the "nids_links" script. >The new pnga2area decoder, however, produce 4-digit year file names, Here is where I had to jump in. pnga2area can use any format supported by the C routine strftime. This includes four and two digit years. Here is a snippit from the man page for strftime from one of the supported operating systems (RedHat 6.x Linux): %y The year as a decimal number without a century (range 00 to 99). %Y The year as a decimal number including the century. So, if you want your file names to have two digit years, you would simply use the '%y' (lower case 'Y') conversion specifier. For the full list of specifiers that are supported, please review your systems man page for strftime (3). More on this further down in this email. >at >least as it's configured in my pqact.conf (see below). I'd like to >convert the nids_links filenames to 4-digit year if it's simple enough >(but couldn't find source code to areaInfo). Another editorial comment: when we switch to PNG compression of all images in the Unidata-Wisconsin datastream, you will be able to completely stop using areaInfo since pnga2area provides all of its (and more ) functionality. You will also be able to stop using things like nids_link since you will be able to write the files exactly where you want with the desired file name you want. >If that's not possible, I'd >like to produce 2-digit-year filenames for the CIMSS products. Our >pqact.conf setup for these new files looks like this: > >MCIDAS ^pnga2area Q. CD .... (.*) (.*) (.*) (........) (....) > PIPE -close > pnga2area -xl /usr/local/ldm/logs/CIMSS_LI.log > -a /usr/local/ldm-mcidas/etc/SATANNOT > -b /usr/local/ldm-mcidas/etc/SATBAND > data/garpdata/images/sat/SOUNDER/\3/LI/LI_\4_\5 > >Can I make an easy change to the regex-formatted filename here to do this? >I wanted to pass this by you before trying. I wrote the PNG compression, area2png, and uncompression, pnga2area, routines to use the strftime conversion characters using the date and time information contained in the AREA file header. Given this, You could, for instance, replace your pqact.conf entry with the following to get the two-digit year form that your GARP defaults file wants/is setup for: MCIDAS ^pnga2area Q. CD .... (.*) (.*) (.*) (........) (....) PIPE -close pnga2area -xl /usr/local/ldm/logs/CIMSS_LI.log -a /usr/local/ldm-mcidas/etc/SATANNOT -b /usr/local/ldm-mcidas/etc/SATBAND data/garpdata/images/sat/SOUNDER/\3/LI/LI_%y%m%d_\5 The year (two digit), month, and day values from the AREA file header will be used to fill out the name. By further review of the man page for pnga2area or its online help (run the program with no command line flags or with '-h') you will see that you could modify your pqact.conf entry to be: MCIDAS ^pnga2area Q. CD .... (.*) (.*) (.*) (........) (....) PIPE -close pnga2area -xl /usr/local/ldm/logs/CIMSS_LI.log -a /usr/local/ldm-mcidas/etc/SATANNOT -b /usr/local/ldm-mcidas/etc/SATBAND data/garpdata/images/sat/SOUNDER/\\RES/LI/LI_%y%m%d_%H%M Notice how you can completely ignore the header pieces in your file naming. pnga2area was designed to make these sorts of things easy for users, especially GEMPAK/GARP/NMAP users. >Regards, I will leave this message in the support inbox so that Chiz can address the conversion of nids_link to 4-digit years. >Chris > ############################################################### > # Chris Vandersip # > # Computer Research Specialist/Dept. Sysadmin # > # Rm. 024, Dept. of Meteorology, Florida State University # > # address@hidden (850)644-2522 # > ############################################################### Tom
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.