The Weather Forecasting Forum

Discussions about the latest in meteorology, programs, tools, and techniques
It is currently Fri Oct 20, 2017 5:19 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Jul 07, 2004 2:11 pm 
Offline
Member

Joined: Sun Jun 20, 2004 3:33 am
Posts: 21
Location: Aruba DWI
hi,
I am trying to automate my ftp dwnlds but Ncep changes the dates of the files everyday. I was wondering if someone knows how to automate this file. I am using a scheduler to dwnld the files but because the dates change everday, I have to manually change the date the day before. Any help will be appreciated.

shorthend version of dos batch file: (ftp site: ftp weather.noaa.gov)

bin
get us008_gf096_04070706_HxLBx
quit

The 0707 has to be changed ... since wildcards dont work and ncep changes it everyday

Any help will be useful thanks
marck :wink:


Top
 Profile  
 
PostPosted: Fri Jul 09, 2004 8:26 pm 
Offline
Member

Joined: Sun Jun 20, 2004 3:33 am
Posts: 21
Location: Aruba DWI
Alright after trying a couple of stuf, I have figured out how to manipulate the batch processing to auto update the dates ... afterwards one can use any scheduler to let the program run automatically here are the codes:
@echo off
ECHO THIS WORKS ONLY FOR WINXP !!!!
FOR /F "tokens=1-4 delims=/ " %%I IN ('DATE /t') DO SET mydate=%%J%%K%%L

ECHO Today is "%mydate%"

Set M=%DATE:~7,2%
Set O=%DATE:~4,2%
::
::
::
:: Begin download process
echo Please wait... this will take a few moments... depending on your isp access .. viola..
cd d:\pcgridds32\grib\nws
del *eta*
echo Downloading 06z data...while you're waiting did you know that NGM=NoGoodModel.. ;-)

url2file [url]ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/eta/prod/eta.2004%O%%M%/eta.t06z.grbgrd00.tm00[/url] d:\pcgridds32\grib\nws\eta1.dat
url2file [url]ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/eta/prod/eta.2004%O%%M%/eta.t06z.grbgrd06.tm00[/url] d:\pcgridds32\grib\nws\eta2.dat
url2file [url]ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/eta/prod/eta.2004%O%%M%/eta.t06z.grbgrd12.tm00[/url] d:\pcgridds32\grib\nws\eta3.dat
url2file [url]ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/eta/prod/eta.2004%O%%M%/eta.t06z.grbgrd18.tm00[/url] d:\pcgridds32\grib\nws\eta4.dat
url2file [url]ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/eta/prod/eta.2004%O%%M%/eta.t06z.grbgrd24.tm00[/url] d:\pcgridds32\grib\nws\eta5.dat
url2file [url]ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/eta/prod/eta.2004%O%%M%/eta.t06z.grbgrd30.tm00[/url] d:\pcgridds32\grib\nws\eta6.dat
url2file [url]ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/eta/prod/eta.2004%O%%M%/eta.t06z.grbgrd36.tm00[/url] d:\pcgridds32\grib\nws\eta7.dat
url2file [url]ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/eta/prod/eta.2004%O%%M%/eta.t06z.grbgrd42.tm00[/url] d:\pcgridds32\grib\nws\eta8.dat
url2file [url]ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/eta/prod/eta.2004%O%%M%/eta.t06z.grbgrd48.tm00[/url] d:\pcgridds32\grib\nws\eta9.dat
url2file [url]ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/eta/prod/eta.2004%O%%M%/eta.t06z.grbgrd60.tm00[/url] d:\pcgridds32\grib\nws\eta10.dat
url2file [url]ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/eta/prod/eta.2004%O%%M%/eta.t06z.grbgrd72.tm00[/url] d:\pcgridds32\grib\nws\eta11.dat

echo Done Downloading
cd d:\pcgridds32\grib\temp
::
::
::
echo.
echo Downloading and processing complete. You can now run PCGRIDDS32.
echo Pcgridds batch processing with automatic date updater.
echo Sorry I noticed that WINXP is the only O/S that can handle this feature. :-(
echo Tim's url2file program is actually real good .... makes life easier...
echo These Eta files covers the Caribbean too..
::End


Enjoy !!!! this is an example for auto dwnlding eta files that include the Caribbean (~8mb each file)
marck :wink:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 10, 2004 6:28 pm 
Offline
Junior Member

Joined: Sat Nov 29, 2003 7:46 pm
Posts: 1
I have a few questions about this ftp script.

I had to change all references about cd d:\pcgridds32\... to cd c:\pcgridds32\...

Why do you have cd d:\pcgridds32\grib\temp after you are finished downloading? I do not even have the temp directory.

Why in Tim's script does he build a GRIBNAMES.DAT file?

How does NGRB2PCG32 run to convert the data to PCGRIDDS32 format or is that not required for ETA data?

Steve


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 11, 2004 11:34 pm 
Offline
Member

Joined: Sun Jun 20, 2004 3:33 am
Posts: 21
Location: Aruba DWI
hum ... depends how you installed pcgridds32 .... i always partition my hdisk and have windows o/s sitting alone on the c partition ...(system runs faster)... now if you have pcgridds32 on your c partion, then you have to change the scirpt to reference c: ... about the temp subdir... I am running the script from the temp dir ... thats why i have it ending there ... you dont need to do this ... just remove the line ...

cheers marck


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 11, 2004 11:42 pm 
Offline
Member

Joined: Sun Jun 20, 2004 3:33 am
Posts: 21
Location: Aruba DWI
oh on the gridnames.dat .... this has to do with the old pcgridds ... you dont need it anymore


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group