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.
I found an error in the script, I had neglected to source the .cshrcfile in my home directory, which is why the program wouldn't run via crontab, or through the pqact. It runs fine via crontab w/o error now. I am logged in with X running on my machine, so I don't think the DISPLAY will be too much of a problem, as is evident by it running through crontab. However, my intent is for it to run upon receipt of data as it comes in. Is this pqact entry correct to get this script to run? Also, how would I pipe the output of this section to a log file to see what's happening exactly when data comes in?
NEXRAD ^SDUS[2357]. KEAX ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N0R)(N0V) EXEC /home/dan/nexradgif.csh -d /home/dan/nexrad.logAnd one other thing, assuming I modify the nexradgif.csh to accept an argument of N0R or N0V, depending upon what's coming in, how do I include that in the pqact file? The pqact entry that filters the data to the appropriate directories looks like this..
NEXRAD ^SDUS[2357]. KEAX ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(...)(...) FILE -close /data/ldm/NIDS/\5/\4/\4_(\1:yyyy)(\1:mm)\1_\2\3so would I pass an argument like /home/dan/nexradgif.csh \4 ? The data resides in a directory called /data/ldm/NIDS/EAX/N0R...and it would appear that \4 correlates with N0R...
Dan Unidata Support wrote:
Dan, Your plotting script calls /home/dan/test.csh which you haven't included, but I'm assuming its purpose is tread the radar data from stardard inputof the script and write it out to the appropriate file. Otherwise, use EXEC instead of PIPE if the script isn't going to read the datafrom the PIPE. Since your process being invoked by the LDM probably isn't allowed to display to your X server, your DISPLAY to localhost:0 won't accept the gf driver connection unless your X server is logged in to, and have runxhost to allow connections from all users on your system.Solutions here are to use the "gif" device which does not require an X server, or createa virtual X server using Xvfb and use that as the display to draw to. Steve Chiswell Unidata User SupportFrom: Daniel Leins <address@hidden> Organization: UCAR/Unidata Keywords: 200501060700.j0670Fv2013454To whom,I would like to pipe 0.5 reflectivity data to a script to generate gif images for a webpage. The script is identical enough to the script provided on the unidata site as an example of how to generate gif images for the web. I've gotten the script to work fine when I run it manually, however when I try and use the PIPE option within my pqact.conf file, I can't seem to get any images to generate upon receipt of the data. Do I have this section of the pqact file set up correctly? `ldmadmin pqactcheck` seems to think so. I've also tried to set up a log for this section, and it doesn't want to work either. I've attached the relevant portions of the pqact file, as well as the script for perusal.Note: The tabs show up correctly within the fileNEXRAD ^SDUS[2357]. KEAX ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N0R)(...)PIPE -close /home/dan/nexradgif.csh -d /home/dan/log.logI would like this program to run upon receipt of KEAX 0.5 reflectivity data only. The script is a csh script, located in /home/dan. It's chmod'd to 777This is the script (which works fine manually) #!/bin/csh -f setenv DISPLAY localhost:0 source $NAWIPS/Gemenviron set MAPFIL = $GEMMAPS/hicnus.nws /home/dan/test.csh cd /data/ldm/NIDS/EAX/N0R set CURRENT_RAD=`ls * | tail -1` # generate gifs in /tmp cd /tmp if(-e eax.gif ) then rm -f eax.gif* endif foreach FILE ($CURRENT_RAD) gpmap << EOF mapfil = /usr/local/gempak/gempak/maps/hicnus.nws+hipowo.cia map= 2/1/1+5/1/2 TITLE = 1/-2/ DEVICE = gf|eax.gif.009|800;600 SATFIL = RADFIL = /data/ldm/NIDS/EAX/N0R/$FILE PROJ = rad GAREA = 37.29;-96.53;41.15;-91.38 CLEAR = y PANEL = 0 TEXT = 1.2/23/1/hw LATLON = 0 \$mapfil = hipowo.gsf r e EOF gpend mv /tmp/eax.gif.009 /var/www/html/wx/radar end Any insight would be greatly appreciated! Thank you, Dan Leins-- **************************************************************************** < Unidata User Support UCAR Unidata Program < (303)497-8643 P.O. Box 3000 < address@hidden Boulder, CO 80307 < ---------------------------------------------------------------------------- < Unidata WWW Service http://my.unidata.ucar.edu/content/support < ---------------------------------------------------------------------------- < 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.
From address@hidden Thu Jan 6 21:47:02 2005 Return-Path: <address@hidden> Received: from ms-smtp-03.rdc-kc.rr.com (ms-smtp-03.rdc-kc.rr.com [24.94.166.129]) by unidata.ucar.edu (UCAR/Unidata) with ESMTP id j074l2v2001716 for <address@hidden>; Thu, 6 Jan 2005 21:47:02 -0700 (MST) Organization: UCAR/Unidata Keywords: 200501070447.j074l2v2001716 Received: from [24.94.187.137] (CPE-24-94-187-137.kc.rr.com [24.94.187.137]) by ms-smtp-03.rdc-kc.rr.com (8.12.10/8.12.7) with ESMTP id j074kxWj010038 for <address@hidden>; Thu, 6 Jan 2005 22:46:59 -0600 (CST) Message-ID: <address@hidden> Date: Thu, 06 Jan 2005 22:46:59 -0600 From: Daniel Leins <address@hidden> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Unidata Support <address@hidden> Subject: Re: 20050106: [Fwd: Question about piping data to gpmap] References: <address@hidden> In-Reply-To: <address@hidden> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan EngineX-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on laraine.unidata.ucar.edu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.1
I found an error in the script, I had neglected to source the .cshrc file in my home directory, which is why the program wouldn't run via crontab, or through the pqact. It runs fine via crontab w/o error now. I am logged in with X running on my machine, so I don't think the DISPLAY will be too much of a problem, as is evident by it running through crontab. However, my intent is for it to run upon receipt of data as it comes in. Is this pqact entry correct to get this script to run? Also, how would I pipe the output of this section to a log file to see what's happening exactly when data comes in?
NEXRAD ^SDUS[2357]. KEAX ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N0R)(N0V) EXEC /home/dan/nexradgif.csh -d /home/dan/nexrad.logAnd one other thing, assuming I modify the nexradgif.csh to accept an argument of N0R or N0V, depending upon what's coming in, how do I include that in the pqact file? The pqact entry that filters the data to the appropriate directories looks like this..
NEXRAD ^SDUS[2357]. KEAX ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(...)(...) FILE -close /data/ldm/NIDS/\5/\4/\4_(\1:yyyy)(\1:mm)\1_\2\3so would I pass an argument like /home/dan/nexradgif.csh \4 ? The data resides in a directory called /data/ldm/NIDS/EAX/N0R...and it would appear that \4 correlates with N0R...
Dan Unidata Support wrote:
Dan, Your plotting script calls /home/dan/test.csh which you haven't included, but I'm assuming its purpose is tread the radar data from stardard inputof the script and write it out to the appropriate file. Otherwise, use EXEC instead of PIPE if the script isn't going to read the datafrom the PIPE. Since your process being invoked by the LDM probably isn't allowed to display to your X server, your DISPLAY to localhost:0 won't accept the gf driver connection unless your X server is logged in to, and have runxhost to allow connections from all users on your system.Solutions here are to use the "gif" device which does not require an X server, or createa virtual X server using Xvfb and use that as the display to draw to. Steve Chiswell Unidata User SupportFrom: Daniel Leins <address@hidden> Organization: UCAR/Unidata Keywords: 200501060700.j0670Fv2013454To whom,I would like to pipe 0.5 reflectivity data to a script to generate gif images for a webpage. The script is identical enough to the script provided on the unidata site as an example of how to generate gif images for the web. I've gotten the script to work fine when I run it manually, however when I try and use the PIPE option within my pqact.conf file, I can't seem to get any images to generate upon receipt of the data. Do I have this section of the pqact file set up correctly? `ldmadmin pqactcheck` seems to think so. I've also tried to set up a log for this section, and it doesn't want to work either. I've attached the relevant portions of the pqact file, as well as the script for perusal.Note: The tabs show up correctly within the fileNEXRAD ^SDUS[2357]. KEAX ([0-3][0-9])([0-2][0-9])([0-6][0-9]).*/p(N0R)(...)PIPE -close /home/dan/nexradgif.csh -d /home/dan/log.logI would like this program to run upon receipt of KEAX 0.5 reflectivity data only. The script is a csh script, located in /home/dan. It's chmod'd to 777This is the script (which works fine manually) #!/bin/csh -f setenv DISPLAY localhost:0 source $NAWIPS/Gemenviron set MAPFIL = $GEMMAPS/hicnus.nws /home/dan/test.csh cd /data/ldm/NIDS/EAX/N0R set CURRENT_RAD=`ls * | tail -1` # generate gifs in /tmp cd /tmp if(-e eax.gif ) then rm -f eax.gif* endif foreach FILE ($CURRENT_RAD) gpmap << EOF mapfil = /usr/local/gempak/gempak/maps/hicnus.nws+hipowo.cia map= 2/1/1+5/1/2 TITLE = 1/-2/ DEVICE = gf|eax.gif.009|800;600 SATFIL = RADFIL = /data/ldm/NIDS/EAX/N0R/$FILE PROJ = rad GAREA = 37.29;-96.53;41.15;-91.38 CLEAR = y PANEL = 0 TEXT = 1.2/23/1/hw LATLON = 0 \$mapfil = hipowo.gsf r e EOF gpend mv /tmp/eax.gif.009 /var/www/html/wx/radar end Any insight would be greatly appreciated! Thank you, Dan Leins-- **************************************************************************** < Unidata User Support UCAR Unidata Program < (303)497-8643 P.O. Box 3000 < address@hidden Boulder, CO 80307 < ---------------------------------------------------------------------------- < Unidata WWW Service http://my.unidata.ucar.edu/content/support < ---------------------------------------------------------------------------- < 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.