The Weather Forecasting Forum

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

All times are UTC




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: SCRIPT: K Index
PostPosted: Mon Feb 07, 2005 6:30 am 
Quick script to generate K Index for stability monitoring.

Someone check my math...

(T850 - T500)+Td850-(T700-Td700)

Here's the script:

CONT GRTN=10 CINT=1 DASH COLOR=200:100:100 SDIF=7:8 STOR=8 SDIF=6:3 STOR=7 SDIF=4:5 STOR=6 SDIF=1:2 STOR=5 DEGC DWPT H700 STOR=4 TEMP H700 STOR=3 DEGC DWPT H850 STOR=2 TEMP H500 STOR=1 TEMP H850

Writing scripts backwards is *weird*...


Top
  
 
 Post subject: SCRIPT: K Index
PostPosted: Mon Feb 07, 2005 4:48 pm 
*sigh*

That's what happens when you write quick scripts..

Corrected version here, substituted SDIF for SSUM in STOR=8.

Still not sure about the precedence.. maybe there's a way of marking up meteo equations, sort of like Mathematica does? Would make it a lot easier to create stability indexes..

If anyone has any ideas for ways to script a CAPE calculation, post them here...

CONT GRTN=0 CINT=1 DASH COLOR=200:100:100 SDIF=7:8 STOR=8 SSUM=6:3 STOR=7 SDIF=4:5 STOR=6 SDIF=1:2 STOR=5 DEGC DWPT H700 STOR=4 TEMP H700 STOR=3 DEGC DWPT H850 STOR=2 TEMP H500 STOR=1 TEMP H850


Top
  
 
 Post subject:
PostPosted: Mon Feb 07, 2005 11:30 pm 
Did DaWS run this script OK on your system?


Top
  
 
 Post subject: SCRIPT: K Index
PostPosted: Wed Feb 09, 2005 6:58 am 
Well, it displays... until the thunderstorm season rolls around, I can't tell if it works... I also managed to generate fills at 25%, 35% and 45%, so it's definitely calculating a value for each point reporting upper air data.

Having problems running it, or having problems with the data it produces?


Top
  
 
 Post subject: SCRIPT: K Index
PostPosted: Wed Feb 09, 2005 7:25 am 
I should also point out that it's written for a menu entry, which assumes an
ANALYZE at the start... for a script you'll need to add that.

K_Script.dsf
---start here---
ERASE
ANALYZE,CONT GRTN=0 CINT=1 DASH COLOR=200:100:100 SDIF=7:8 STOR=8 SSUM=6:3 STOR=7 SDIF=4:5 STOR=6 SDIF=1:2 STOR=5 DEGC DWPT H700 STOR=4 TEMP H700 STOR=3 DEGC DWPT H850 STOR=2 TEMP H500 STOR=1 TEMP H850
STAMP
EXPORT,C:\WX\DIGATM\TEMP_WIND\@FFZ@MMZ@DDZ@HHZ@NNZ_KIndex.jpg
---end here---

K_Fills_Script.dsf
---start here---
ERASE
ANALYZE,OVER FILL COLOR=255:0:0 FILS=0 GRTN=45 SDIF=7:8 OVER FILL COLOR=255:255:0 FILS=0 GRTN=35 SDIF=7:8 OVER FILL COLOR=0:255:0 FILS=0 GRTN=25 SDIF=7:8 STOR=8 SSUM=6:3 STOR=7 SDIF=4:5 STOR=6 SDIF=1:2 STOR=5 DEGC DWPT H700 STOR=4 TEMP H700 STOR=3 DEGC DWPT H850 STOR=2 TEMP H500 STOR=1 TEMP H850
STAMP
EXPORT,C:\WX\DIGATM\TEMP_WIND\@FFZ@MMZ@DDZ@HHZ@NNZ_KIFills.jpg
---end here---


Top
  
 
 Post subject:
PostPosted: Wed Feb 09, 2005 6:44 pm 
Offline
Senior Member

Joined: Tue Nov 25, 2003 4:22 pm
Posts: 198
Location: Suoi Tien, Vietnam
As a beginner in meteorology a question about the formula.
Weather map handbook page 146: T850-T500+Td850-D700
Weather forecasting handb. p.138: T850-T500+Td850-D850.

Who is right?

Greetings

Fred

PS. The script gives a nice output. I changed some colors to match the ranges in the map handbook. As a beginner I don't know if the result of the script is correct.


Top
 Profile  
 
 Post subject: SCRIPT: K Index
PostPosted: Wed Feb 09, 2005 8:01 pm 
That's very strange...

http://amsglossary.allenpress.com/glossary/browse?s=k&p=7

Hmmm.


Top
  
 
 Post subject:
PostPosted: Wed Feb 09, 2005 8:28 pm 
Offline
Senior Member

Joined: Tue Nov 25, 2003 4:22 pm
Posts: 198
Location: Suoi Tien, Vietnam
It's clear (I think). The weather forecast handbook is wrong.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 09, 2005 10:00 pm 
I'm sure it's just a typo in the forecasting handbook.


this site covers most any meteorological formula you can think of:
http://www.aprweather.com/pages/calc.htm


Top
  
 
 Post subject:
PostPosted: Thu Feb 10, 2005 12:36 pm 
Offline
Senior Member

Joined: Tue Nov 25, 2003 4:22 pm
Posts: 198
Location: Suoi Tien, Vietnam
I also think it's a typo. Thanks for the sites, I added them to my favourites.

Looking to the CAPE formule my first impression is that it's much to complex to calculate with the present set of commands. In my opinion it's the best that CAPE will become a predefined command like TEMP etc..

Greetings

Fred


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

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