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.
>From: weather <address@hidden> >Organization: . >Keywords: 200002010249.TAA23575 >I have written a script that will automatically ftp some >files from the NCEP FTP server. I would like to automatically >decode them as well. I could have sworn that in the past >I just had a c-shell script that just had the path set and >one line: > >cat gribfile | dcgrib PACK YYYYMMDDHH_test.gem > >and when executed that script would decode the file. > >Trying to repeat that I can't get it to work I run the script >but it immediately exits without any error or message at all. >What would I need to do to write a script to do this in >a cron job? > >Thanks, >Robert Mullenax > Robert, Make sure your script sources Gemenviron, since dcgrib will need the $GEMTBL directory defined to find the grid tables - otherwise you need to use the -g flag because your cron environment will not have those environmental variables set. You can add the -d logfile logging if you need to find out why the output file isn't being created. Steve Chiswell