<html><body>
<DIV>Hi Arlindo,</DIV>
<DIV>Very helpful suggestion concerning 'appending' the path using the ;%PATH% command versus just&nbsp;setting it fully.&nbsp; Learn something new every day.&nbsp;And I want to thank you for taking so much&nbsp;time on this issue.&nbsp; This version of Grads is true astounding&nbsp;- so much functionality packed into one easy to use app.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&gt;I am still puzzled that you can run g2ctl.pl from the DOS command line.&nbsp; Is<BR>&gt;the g2gdf.exe not working for you? When I type "g2gdf.pl" on my cmd.exe it<BR>&gt;pops the perl script right into notepad. If you are not using the .exe<BR>&gt;version of the perl scripts, which perl distribution of perl are you using?<BR>&gt;This is important info for my FAQ. Probably I don't have my .pl extension<BR>&gt;being handled by ActivateState perl.</DIV>
<DIV>&nbsp;</DIV>
<DIV>On the machine that is locked down (no access to Control Panel to change the path): On the comand line I set path (correctly this time)&nbsp;and then try to run g2gdf.pl,&nbsp;g2ctl.pl, g2gdf.exe and g2ctl.exe (with no arguments) with results listed below.&nbsp; Note that the 'exe' version of the apps just return directly to a command prompt where the perl version appear to actually navigate to the apps and returns useage info.&nbsp; Finally I try to run g2gdf.pl with arguments and receive&nbsp;errors :</DIV>
<DIV>&nbsp;</DIV>
<DIV>Perl is installed on the locked-down machine: Active Perl&nbsp;5.8.8 Build 817<BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>P:\&gt;set PATH=c:/Program Files/PCGrADS19/win32;%PATH%</DIV>
<DIV>&nbsp;</DIV>
<DIV>P:\&gt;path<BR>PATH=c:/Program Files/PCGrADS19/win32;C:\Perl\bin\;C:\orant\Ora81\bin\;C:\WINNT\<BR>system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Attachmate\E!E2K\;C:\P<BR>rogram Files\PCGrADS\win32e\;C:\Program Files\GMT\bin;C:\Program Files\wgrib2\</DIV>
<DIV>&nbsp;</DIV>
<DIV>P:\&gt;g2gdf.pl<BR>Usage:<BR>&nbsp;&nbsp;&nbsp;&nbsp; g2gdf.pl [-h] [-0|-verf] [-o gdf_fname] [-I inv_fname]&nbsp; grib2_filename&nbsp;&nbsp; #<BR>-h for a full man page</DIV>
<DIV><BR>P:\&gt;g2ctl.pl<BR>C:\Program Files\PCGrADS19\win32\g2ctl.pl 0.0.3d&nbsp; wesley ebisuzaki<BR>&nbsp;makes a Grads control file for grib files<BR>&nbsp;usage: C:\Program Files\PCGrADS19\win32\g2ctl.pl [options] [grib_file] [optiona<BR>l index file] [optional pdef file] &gt;[ctl file]<BR>&nbsp;-verf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .. use forecast verification times<BR>&nbsp;-0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .. use analysis times<BR>&nbsp;-365&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .. 365 day calendar<BR>&nbsp;-ts[timestep]&nbsp;&nbsp; .. set timestep for individual time files (e.g. -ts6hr)<BR>&nbsp;-lc&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .. set lowercase option for parameter names<BR>&nbsp;-iso_profile&nbsp;&nbsp;&nbsp; .. set z coordinate to ocean isotherms<BR>&nbsp;-prs_profile&nbsp;&nbsp;&nbsp; .. set z coordinate to pressure (mb)
 <BR>&n
bsp;-m_profile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .. set z coordinate to meters above ground/msl<BR>&nbsp;-no_profile&nbsp;&nbsp;&nbsp;&nbsp; .. no z coordinates<BR>&nbsp;-raw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .. raw grid<BR>&nbsp;-iso_profile&nbsp;&nbsp;&nbsp; .. make profile using subsurface isoterms</DIV>
<DIV>Note 1: the index file will be generated by the gribmap program, default: grib_f<BR>ile.idx<BR>Note 2: the pdef file is only generated for thinned lat-lon grids, default: grib<BR>_file.pdef</DIV>
<DIV>&nbsp;</DIV>
<DIV>P:\&gt;g2ctl.exe</DIV>
<DIV>&nbsp;</DIV>
<DIV>P:\&gt;g2gdf.exe -o c:\grib\input_new\multi_1.gdf&nbsp; -I c:\grib\input_new\multi_1.inv<BR>&nbsp;c:\grib\input_new\multi_1.wc_4m.t12z.grib2</DIV>
<DIV>&nbsp;</DIV>
<DIV>P:\&gt;g2gdf.pl -o c:\grib\input_new\multi_1.gdf&nbsp; -I c:\grib\input_new\multi_1.inv<BR>c:\grib\input_new\multi_1.wc_4m.t12z.grib2</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; g2gdf - control file/inventory for "g2" extension</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Descriptor: c:\grib\input_new\multi_1.gdf<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Inventory: c:\grib\input_new\multi_1.inv<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Data Dir: c:\grib\input_new\<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Grib files: multi_1.wc_4m.t12z.grib2</DIV>
<DIV>&nbsp;</DIV>
<DIV>Access is denied.<BR>Big problem:<BR>&nbsp; either c:\grib\input_new\multi_1.wc_4m.t12z.grib2 is missing or not a grib file<BR>&nbsp; or wgrib2 is not on your path or wgrib2 is too old.<BR>cannot create c:\grib\input_new\multi_1.gdf --- is g2ctl.pl on path? at C:\Program Files\PCGrADS19\win32\g2gdf.pl line 52.</DIV>
<DIV>&nbsp;</DIV>
<DIV>P:\&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>The other thing that maybe is occuring is on the locked-down machine is maybe it is locked so tight it just doesn't allow a command prompt to be called from another program????</DIV>
<DIV>&nbsp;</DIV>
<DIV>--<BR>Thanks, <BR>Mark</DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">-------------- Original message -------------- <BR>From: Arlindo da Silva &lt;dasilva@ALUM.MIT.EDU&gt; <BR>On Thu, Apr 10, 2008 at 12:25 AM, Mark Sponsler &lt;<A href="mailto:msponsler@comcast.net">msponsler@comcast.net</A>&gt; wrote:<BR>
<DIV class=gmail_quote>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV>Hi Arlindo,</DIV>
<DIV>Sorry - I was not clear.</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm using your latest build of GrADS19 with the new cygintl-3.dll installed</DIV>
<DIV>&nbsp;</DIV>
<DIV>I built a&nbsp;windows batch file that contains the following 2 statements:</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV class=Ih2E3d>set PATH=c:/Program Files/PCGrADS19/win32/</DIV></DIV></DIV></BLOCKQUOTE>
<DIV><BR><SPAN style="FONT-FAMILY: courier new,monospace">You should never reset the PATH entirely but rather append to it:</SPAN><BR style="FONT-FAMILY: courier new,monospace"><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">set PATH=c:/Program Files/PCGGrADS19/win32;%PATH%</SPAN><BR style="FONT-FAMILY: courier new,monospace"><BR style="FONT-FAMILY: courier new,monospace"><SPAN style="FONT-FAMILY: courier new,monospace">then type path to make sure the windows system dirs are still there. This way all your other system programs can be found.</SPAN><BR>&nbsp;</DIV>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV>
<DIV class=Ih2E3d><BR></DIV>g2gdf.pl -o C:/grib/input_new/wc4m.gdf -I C:/grib/input_new/wc4m.inv C:/grib/input_new/multi_1.wc_4m.t00z.grib2</DIV>
<DIV>&nbsp;</DIV></DIV></BLOCKQUOTE>
<DIV><BR><SPAN style="FONT-FAMILY: courier new,monospace">I am still puzzled that you can run g2ctl.pl from the DOS command line.&nbsp; Is the g2gdf.exe not working for you? When I type "g2gdf.pl" on my cmd.exe it pops the perl script right into notepad. If you are not using the .exe version of the perl scripts, which perl distribution of perl are you using? This is important info for my FAQ. Probably I don't have my .pl extension being handled by ActivateState perl.</SPAN><BR>&nbsp;</DIV>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>I did not have the ability to set the environmnet variable via Control Panel&gt;System&gt;Advanced&gt;Envionment Variables&gt;etc... because I did not had admin rights on the machine.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Then I double click the bat file. And receive the error message indicated in the previous email. </DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>I've been using this trick of setting the path to Grads19 in the batch file (like above) on all sorts of scripts where&nbsp;GrADS19 is installed on either a flash drive or just placed somewhere on the hard drive and where I have no admin rights and no ability to set path via Control Panel, and everything has been going quite smoothly.&nbsp; A totally portable application, even if I have no admin rights to the machine.&nbsp; So I figured running g2gdf.pl&nbsp;would be no different.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Intersting, but on a different machine which I do have admin rights, I set the path in Control Panel to PCGrads19/win32/ as normal</DIV>
<DIV>then run the following command in a batch file (same as first time but with the set PATH command commented out)&nbsp;and everything works fine!</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>REM set PATH=c:/Program Files/PCGrADS19/win32/<BR>g2gdf.pl -o C:/grib/input_new/wc4m.gdf -I C:/grib/input_new/wc4m.inv C:/grib/input_new/multi_1.wc_4m.t00z.grib2</DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>So this leads me to beleive that there is something in&nbsp;the perl or gdf script that is not virtualized to read the Path command in the batch file.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Likewise if I try and run g2ctl,pl with the path set in Control Panel everything works fine.&nbsp; But if&nbsp;I&nbsp;try to set the Path&nbsp;in the bat file (and do not have it set in Control Panel) it errors out:</DIV>
<DIV><BR>set PATH=c:/Program Files/PCGrADS19/win32/</DIV>
<DIV>g2ctl.pl C:/grib/input_new/multi_1.wc_4m.t00z.grib2<BR>Can't spawn "cmd.exe": No such file or directory at C:\Program </DIV></DIV></BLOCKQUOTE>
<DIV><BR><SPAN style="FONT-FAMILY: courier new,monospace">You see, perl cannot find the windows system files, like cmd.exe the command interpreter it uses for issuing a system() call.</SPAN><BR>&nbsp;</DIV>
<BLOCKQUOTE class=gmail_quote style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV>
<DIV>Files\PCGrADS19\win32\g2ctl.pl line 238.<BR>Big problem:<BR>&nbsp; either C:/grib/input_new/multi_1.wc_4m.t00z.grib2 is missing or not a grib file<BR>&nbsp; or wgrib2 is not on your path or wgrib2 is too old.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Hope this is useful.&nbsp; Just hoping all the functionality can be totally portable, but maybe I'm being unrealistic. </DIV>
<DIV>&nbsp;</DIV></DIV></BLOCKQUOTE>
<DIV><BR><SPAN style="FONT-FAMILY: courier new,monospace">It should be just as portable as the rest, I can't think of a reason why not.</SPAN><BR><BR></DIV></DIV>&nbsp; Arlindo<BR><BR>-- <BR>Arlindo da Silva<BR><A href="mailto:dasilva@alum.mit.edu">dasilva@alum.mit.edu</A> </BLOCKQUOTE></body></html>