Help with script

Strictly for sharing scripts used in Digital Atmosphere and getting assistance from other users.
Post Reply
dmoran
Junior Member
Posts: 9
Joined: Thu Nov 21, 2013 5:58 pm

Help with script

Post by dmoran »

I am trying to edit a script so that it deletes the old data before plotting new data. The script seems to work except for deleting the old data. Any ideas?

Here's my script.

ERASE
IMPORT,C:\Program Files (x86)\DigitalAtmosphere\usmap.dmf
DOWNLOAD,http://www.atmos.albany.edu/weather/dat ... C:\Program Files (x86)\DigitalAtmosphere\@Y@M@D@H_sao.wmo
DOWNLOAD,http://www.hpc.ncep.noaa.gov/discussion ... C:\Program Files (x86)\DigitalAtmosphere\fronts.wmo
INGEST,C:\Program Files (x86)\DigitalAtmosphere\@Y@M@D@H_sao.wmo
PRODUCT,plf,0, Surface plot
INGEST,C:\Program Files (x86)\DigitalAtmosphere\fronts.wmo
PRODUCT,wxp,0,fronts
FLEETF
FLEETHL
EXPORT,C:\Program Files (x86)\DigitalAtmosphere\currentmap.gif
IMPORT,C:\Program Files (x86)\DigitalAtmosphere\currentmap.gif
STAMP

Thanks!

Budgie
Moderator
Posts: 60
Joined: Wed Jan 06, 2010 1:17 pm
Location: Lochaber, Scotland
Contact:

Re: Help with script

Post by Budgie »

On my own scripts I always have:

REMOVE
ERASE
LOAD,C:\Users\weather\AppData\DigitalAtmosphere\ne_atlantic.dmf

See my script HERE for the full thing.

You can use a wildcard to ingest all the .wmo files in one go if you like, rather than having to put a separate line in for each file:
ingest,C:\Users\weather\AppData\DigitalAtmosphere\data\*.wmo

I hope that helps. :mrgreen:

dmoran
Junior Member
Posts: 9
Joined: Thu Nov 21, 2013 5:58 pm

Re: Help with script

Post by dmoran »

I'll try that when I'm in the office today, but I thought I already tried that.

Thanks, Budgie!

dmoran
Junior Member
Posts: 9
Joined: Thu Nov 21, 2013 5:58 pm

Re: Help with script

Post by dmoran »

Budgie wrote:On my own scripts I always have:

REMOVE
ERASE
LOAD,C:\Users\weather\AppData\DigitalAtmosphere\ne_atlantic.dmf

See my script HERE for the full thing.

You can use a wildcard to ingest all the .wmo files in one go if you like, rather than having to put a separate line in for each file:
ingest,C:\Users\weather\AppData\DigitalAtmosphere\data\*.wmo

I hope that helps. :mrgreen:
Hi again, Budgie,

Still doesn't seem to remove the old data before plotting the new data. Here's my revised script. Any thoughts?

REMOVE
ERASE
LOAD,C:\Users\David\AppData\Local\usbasemap.dmf
DOWNLOAD,http://www.atmos.albany.edu/weather/dat ... C:\Program Files (x86)\DigitalAtmosphere\@Y@M@D@H_sao.wmo
DOWNLOAD,http://www.hpc.ncep.noaa.gov/discussion ... C:\Program Files (x86)\DigitalAtmosphere\fronts.wmo
INGEST,C:\Program Files (x86)\DigitalAtmosphere\@Y@M@D@H_sao.wmo
PRODUCT,plf,0, Surface plot
INGEST,C:\Program Files (x86)\DigitalAtmosphere\fronts.wmo
PRODUCT,wxp,0,fronts
FLEETF
FLEETHL
EXPORT,C:\Program Files (x86)\DigitalAtmosphere\currentmap.gif
IMPORT,C:\Program Files (x86)\DigitalAtmosphere\currentmap.gif
STAMP

Thanks!

Budgie
Moderator
Posts: 60
Joined: Wed Jan 06, 2010 1:17 pm
Location: Lochaber, Scotland
Contact:

Re: Help with script

Post by Budgie »

I have run a test of your script here and it works fine.
The only things I changed was the locations of where the files were saved.

All my data files are saved at: C:\Users\weather\AppData\DigitalAtmosphere\data\
The "weather" part is the name of the PC so I think yours would be something like: C:\Users\David\AppData\DigitalAtmosphere\data\

Have a look and see if there's a DA folder at that location on your PC, as I seem to remember that's where DA auomatically saved the data when I first started using it, so I stuck with that location.

I don't know if it'll make any difference but it's worth a try.

Post Reply