The Weather Forecasting Forum

Discussions about the latest in meteorology, programs, tools, and techniques
It is currently Mon Oct 23, 2017 6:21 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Sep 14, 2006 9:42 pm 
Offline
Junior Member

Joined: Thu Sep 14, 2006 9:33 pm
Posts: 4
Hi,
I'm a new user of DA.
I'm now learnig to write scripting files.
In particular I'm trianing with the fill color option.
I'm encountering problems when I work with negative temperature values (DegC), i.e., the temperature h500 or h850...
no color is plotted
when I write for example equa=-2 or grtn=-4...ecc...
It seems that DA doesn't colour negative fields. Is it possible??

Thanks a lot
Maurizio


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 18, 2006 10:06 pm 
Offline
Member

Joined: Thu Jan 19, 2006 11:11 pm
Posts: 34
Location: UK
I posted this just the other day on another thread, but it will solve your
problems too.

DAWS cannot handle negative numbers directly.

But if you load one of the storage slots with a value close to zero you can compare data in two ways - producing either a negative or a positive result. The comments in the script below should make clear what is going on.

This script will colour fill zones from -40 deg C to + 40 deg C.

Enjoy,

Les


================================

#Temperature fill for 'H500'
#
ERASE
ANALYZE,STOR=1 TEMP H500
#Store approx. ZERO in STOR No 2 (i.e. TEMP/1000)
analyze,STOR=2 SDVC=1:1000

# The above lines place a TINY value (approx zero) into STOR No 2 and
# this is used to compare with the TEMP value (which does not need to be entered
# with each further line). By calculating both (TEMP - STOR) and (STOR - TEMP) you
# have access to the full range of both positive and negative temperatures.


# 'SDIF=2:1'lines yield Temperatures BELOW zero Celsius
# 'SDIF=1:2'lines yield Temperatures ABOVE zero Celsius

ANALYZE,OVER FILL COLOR=000:239:255 GRTN=0 SDIF=2:1
ANALYZE,OVER FILL COLOR=000:255:209 GRTN=0 SDIF=1:2

ANALYZE,OVER FILL COLOR=000:209:255 GRTN=2 SDIF=2:1
ANALYZE,OVER FILL COLOR=000:255:179 GRTN=2 SDIF=1:2

ANALYZE,OVER FILL COLOR=000:179:255 GRTN=4 SDIF=2:1
ANALYZE,OVER FILL COLOR=100:255:036 GRTN=4 SDIF=1:2

ANALYZE,OVER FILL COLOR=000:154:255 GRTN=6 SDIF=2:1
ANALYZE,OVER FILL COLOR=159:255:000 GRTN=6 SDIF=1:2

ANALYZE,OVER FILL COLOR=000:105:255 GRTN=8 SDIF=2:1
ANALYZE,OVER FILL COLOR=216:255:000 GRTN=8 SDIF=1:2

ANALYZE,OVER FILL COLOR=000:080:255 GRTN=10 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:255:000 GRTN=10 SDIF=1:2

ANALYZE,OVER FILL COLOR=000:045:255 GRTN=12 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:240:000 GRTN=12 SDIF=1:2

ANALYZE,OVER FILL COLOR=022:000:255 GRTN=14 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:220:000 GRTN=14 SDIF=1:2

ANALYZE,OVER FILL COLOR=082:000:255 GRTN=16 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:204:000 GRTN=16 SDIF=1:2

ANALYZE,OVER FILL COLOR=136:000:255 GRTN=18 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:180:000 GRTN=18 SDIF=1:2

ANALYZE,OVER FILL COLOR=179:000:255 GRTN=20 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:161:000 GRTN=20 SDIF=1:2

ANALYZE,OVER FILL COLOR=209:000:255 GRTN=22 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:148:000 GRTN=22 SDIF=1:2

ANALYZE,OVER FILL COLOR=250:000:255 GRTN=24 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:127:000 GRTN=24 SDIF=1:2

ANALYZE,OVER FILL COLOR=242:000:242 GRTN=26 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:097:000 GRTN=26 SDIF=1:2

ANALYZE,OVER FILL COLOR=224:000:224 GRTN=28 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:047:000 GRTN=28 SDIF=1:2

ANALYZE,OVER FILL COLOR=204:000:204 GRTN=30 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:014:014 GRTN=30 SDIF=1:2

ANALYZE,OVER FILL COLOR=189:000:189 GRTN=32 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:055:055 GRTN=32 SDIF=1:2

ANALYZE,OVER FILL COLOR=168:000:168 GRTN=34 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:090:090 GRTN=34 SDIF=1:2

ANALYZE,OVER FILL COLOR=153:000:153 GRTN=36 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:110:110 GRTN=36 SDIF=1:2

ANALYZE,OVER FILL COLOR=135:000:135 GRTN=38 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:135:135 GRTN=38 SDIF=1:2

ANALYZE,OVER FILL COLOR=122:000:116 GRTN=40 SDIF=2:1
ANALYZE,OVER FILL COLOR=255:153:153 GRTN=40 SDIF=1:2

basemap
ANALYZE,CONT CINT=2 COLOR=100:100:100 LINE=1
# Highlight the 0 deg C contour
ANALYZE,CONT COLOR=192:192:192 EQUA=0 LINE=2


Top
 Profile  
 
 Post subject: it works!
PostPosted: Tue Sep 19, 2006 4:22 am 
Offline
Junior Member

Joined: Thu Sep 14, 2006 9:33 pm
Posts: 4
Thanks a lot...it works. :D


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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