The Weather Forecasting Forum
http://www.weathergraphics.com/forum/

SCRIPT - Celcius Temp Colour Plot
http://www.weathergraphics.com/forum/viewtopic.php?f=9&t=1730
Page 1 of 1

Author:  212adws [ Mon Jan 09, 2012 2:54 pm ]
Post subject:  SCRIPT - Celcius Temp Colour Plot

First, let me thank all contributors here over the years for all their hard work in getting to grips with this Scripting language, and publishing the fruits of those efforts here for newcomers like me to digest.

Second, as a newcomer (of just a week) having gleaned lots of useful info, I feel that it is only right to contribute something myself! And to that end I want to publish a script possibly of use to others here in Europe.....it's my first and here goes.....(a rehash of work done before by others for the Fahrenheit scale.)

CELCIUS TEMP COLOUR PLOT

Output:
Attachment:
My_Celsius_Colour_plot.png
My_Celsius_Colour_plot.png [ 37.6 KiB | Viewed 6647 times ]


The Code:

DOWNLOAD,http://weather.cod.edu/digatmos/syn/@Y@M@D@I.syn,F:\dadata\mySynop.wmo
DOWNLOAD,http://www.atmos.albany.edu/weather/data1/surface/sao/@Y@M@D@H_sao.wmo,F:\dadata\myMetar.wmo
DOWNLOAD,http://www.atmos.albany.edu/weather/data1/surface/boy/@Y@M@D@S_boy.wmo,F:\dadata\myBouy.wmo

#Get FLEETCODE for European Fronts (see bottom of script)
#DOWNLOAD,http://ftp.hb-yacht.ch/ASXX21.@D@S00,F:\dadata\myFleetCode.wmo
#End FLEETCODE download (un-comment line above to "switch-on")

INGEST,F:\dadata\*.wmo
ERASE
#analyze Celsius Temperatures#
ANALYZE,OVER FILL COLOR=192:192:192 GRTN=0 SADC=1:16 STOR=1 TEMP
ANALYZE,OVER FILL COLOR=219:219:219 GRTN=0 SADC=1:14 STOR=1 TEMP
ANALYZE,OVER FILL COLOR=221:230:255 GRTN=0 SADC=1:12 STOR=1 TEMP
ANALYZE,OVER FILL COLOR=163:195:255 GRTN=0 SADC=1:10 STOR=1 TEMP
analyze,OVER FILL COLOR=135:173:255 GRTN=0 SADC=1:8 STOR=1 TEMP
analyze,OVER FILL COLOR=35:141:255 GRTN=0 SADC=1:6 STOR=1 TEMP
analyze,OVER FILL COLOR=53:191:255 GRTN=0 SADC=1:4 STOR=1 TEMP
analyze,OVER FILL COLOR=48:255:237 GRTN=0 SADC=1:2 STOR=1 TEMP
analyze,OVER FILL COLOR=38:255:179 GRTN=0 TEMP
ANALYZE,OVER FILL COLOR=40:230:0 GRTN=2 TEMP
ANALYZE,OVER FILL COLOR=92:215:10 GRTN=4 TEMP
ANALYZE,OVER FILL COLOR=113:208:15 GRTN=6 TEMP
ANALYZE,OVER FILL COLOR=133:225:20 GRTN=8 TEMP
ANALYZE,OVER FILL COLOR=174:235:30 GRTN=10 TEMP
ANALYZE,OVER FILL COLOR=215:245:40 GRTN=12 TEMP
ANALYZE,OVER FILL COLOR=230:212:38 GRTN=14 TEMP
ANALYZE,OVER FILL COLOR=210:175:31 GRTN=16 TEMP
ANALYZE,OVER FILL COLOR=200:144:24 GRTN=18 TEMP
ANALYZE,OVER FILL COLOR=195:110:17 GRTN=20 TEMP
ANALYZE,OVER FILL COLOR=190:82:10 GRTN=22 TEMP
ANALYZE,OVER FILL COLOR=185:50:2 GRTN=24 TEMP
ANALYZE,OVER FILL COLOR=160:50:2 GRTN=26 TEMP
ANALYZE,OVER FILL COLOR=194:20:0 GRTN=28 TEMP
ANALYZE,OVER FILL COLOR=255:90:20 GRTN=30 TEMP
ANALYZE,OVER FILL COLOR=255:165:20 GRTN=32 TEMP
ANALYZE,OVER FILL COLOR=255:200:73 GRTN=34 TEMP
ANALYZE,CONT CINT=2 COLOR=150:100:100 LINE=1 TEMP

#If downloading FLEETCODE data......
#To Plot FLEETCODE European fronts (un-comment line below)
#FLEETF

Notes:
This script has been written to cover the expected temperature range in Western Europe (in particular, the UK) and minimum and maximum are -16C and 34C (the current high end may need additions as higher values are achieved as the year progresses.) Adding the extra values is easy, setting the colours is the fiddly bit, best done "live" when you see white areas.

As usual it will be necessary to adjust data paths to your own needs, ie F:\dadata........ will need changing in each download/ingest line.

For frontal data here in Europe we use FLEETCODE bulletins and the commands for that (if wanted) are commented inline. But bear in mind that the data is issued each Synoptic cycle (6 hourly) and can be 2hours or more late in availability.

Hope this will be of use to somebody in the future and, in closing, it really is a shame that the forum is so quiet these days.

Derek

Author:  Budgie [ Mon Jan 09, 2012 5:29 pm ]
Post subject:  Re: SCRIPT - Celcius Temp Colour Plot

Congrats on your first script, looks good. :mrgreen:
I think you may have to play with temps lower than -16°C though and maybe take the highs up to about 40°C to cover the summer period. ;-)
The minus figures for °C have been a problem to plot in the past but looks like you've done it OK on this one.

Author:  212adws [ Mon Jan 09, 2012 7:11 pm ]
Post subject:  Re: SCRIPT - Celcius Temp Colour Plot

Thanks!
Yes the range will have to increase but, for me, much easier to cope with when they occur. I'm playing a waiting game and hoping for a very hot summer and a very cold winter.

Regards

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/