[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20010522: McIDAS - Lower Atmospheric Severity Index



>From: Arlene Laing <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200105221941.f4MJflp17253

Arlene,

>I am trying to find a way of creating grids of the 
>Lower Atmospheric Severity Index (also called "Haines Index").
>
>Formula
>TERM A = Temp700 - Temp500 (DegC)
>
><18 assigned value   1
>18-22 assigned value 2
>>22 assigned value   3
>
>TERM B = Temp 700 - Dewpt 700 (DegC)
>
><15 assigned value    1
>15-20 assigned value  2
>> 20 assigned value   3
>
>LASI = Term A  + Term B
>       (1,2,3) + (1,2,3)
>
>
>Here's where I started:
>
>PTCON MYDATA/FLMAND PARAM=TERMA OUT=SCON MYDATA/GRIDS.2 MAP=FL SEL='TIME
>0; DAY 98170' 
>'TERMA=P1-P2' P1=T[C] 'P 700' P2=T[C] 'P 500'  DGRID=21 CINT=1
>
>PTCON MYDATA/FLMAND PARAM=TERMB OUT=SCON MYDATA/GRIDS.3 MAP=FL SEL='TIME
>0; DAY 98170' 
>'TERMB=P1-P2' P1=T[C] 'P 700' P2=TD[C] 'P 700'  DGRID=22 CINT=1
>
>I am not sure how to set up the conditional statements that will reassign
>values of 1,2,3 to TERMA and TERMB.
>
>Hope you can help me.  Thanks in advance,

Here is the procedure rolled into a McIDAS BATCH file (HAINES.BAT):

--------------------- HAINES.BAT -------------------------------------------

REM 
REM Put the following definitions (minus the beginning 'REM ' in the file
REM RAOBCON.USER in your McIDAS working directory (e.g., ~/mcidas/data)
REM

REM TDIF57 UNIT=C \
REM      FORMAT=F5.1 \
REM      MATH='P1-P2' \
REM      IRAB='P1=T {P 700}' 'P2=T {P 500}' \
REM      RAOB='P1=T {P 700}' 'P2=T {P 500}'

REM TDDIF7 UNIT=C \
REM      FORMAT=F5.1 \
REM      MATH='P1-P2' \
REM      IRAB='P1=T {P 700}' 'P2=TD {P 700}' \
REM      RAOB='P1=T {P 700}' 'P2=TD {P 700}'

REM
REM First make sure that the GRID files do not exist.  Will be using 
REM GRID0001 and GRID0002
REM

IGU DEL 1 2

REM
REM Create the MYDATA/GRIDS dataset
REM

DSSERVE ADD MYDATA/GRIDS GRID 1 9999 TYPE=GRID "All GRID files

REM
REM First grid (and plot) the 700 - -500 mb temperatures
REM

SF 1
EG
RAOBCON TDIF57 700 USA 0 OUT=SCON MYDATA/GRIDS.1

REM
REM Next grid (and plot) the 700 mb Dew Point depression
REM

RAOBCON TDDIF7 700 USA 0 OUT=SCON MYDATA/GRIDS.1
 
REM
REM Replace values by indicies for the first term
REM

GRDINFO MYDATA/GRIDS.1 EDIT MYDATA/GRIDS.2 GRID=1 RANGE=0 17.9999    VAL=1
GRDINFO MYDATA/GRIDS.2 EDIT MYDATA/GRIDS.2 GRID=1 RANGE=18 22        VAL=2
GRDINFO MYDATA/GRIDS.2 EDIT MYDATA/GRIDS.2 GRID=2 RANGE=22.0001 9999 VAL=3
 
REM
REM List out the resultant grids
REM

GRDLIST MYDATA/GRIDS.2 NUM=ALL

REM The output should look like:
REM
REM Dataset position 2      Directory Title=
REM PAR    LEVEL       DAY        TIME    SRC FHOUR     FDAY       FTIME  GRID  
PRO
REM ---- --------- ------------ -------- ---- ----- ------------ -------- ----- 
----
REM TDIF           25 MAY 01145 00:00:00  MDX     0 25 MAY 01145 00:00:00     1 
MERC
REM TDIF           25 MAY 01145 00:00:00  MDX     0 25 MAY 01145 00:00:00     2 
MERC
REM TDIF           25 MAY 01145 00:00:00  MDX     0 25 MAY 01145 00:00:00     3 
MERC
REM Number of grids listed = 3
REM GRDLIST - done
 
REM
REM Plot out the first term values
REM

SF 2
EG
GRDDISP MYDATA/GRIDS.2 GRID=3 OUT=PLO MAP=USA PINT=2 2
 
REM
REM Replace values by indicies for the second term
REM

GRDINFO MYDATA/GRIDS.1 EDIT MYDATA/GRIDS.2 GRID=2 RANGE=-9999 14.9999 VAL=1
GRDINFO MYDATA/GRIDS.2 EDIT MYDATA/GRIDS.2 GRID=4 RANGE=15 20         VAL=2
GRDINFO MYDATA/GRIDS.2 EDIT MYDATA/GRIDS.2 GRID=5 RANGE=20.0001 9999  VAL=3
 
REM
REM List out the resultant grids
REM

GRDLIST MYDATA/GRIDS.2 NUM=ALL

REM The output should look like:
REM
REM Dataset position 2      Directory Title=
REM PAR    LEVEL       DAY        TIME    SRC FHOUR     FDAY       FTIME  GRID  
PRO
REM ---- --------- ------------ -------- ---- ----- ------------ -------- ----- 
----
REM TDIF           25 MAY 01145 00:00:00  MDX     0 25 MAY 01145 00:00:00     1 
MERC
REM TDIF           25 MAY 01145 00:00:00  MDX     0 25 MAY 01145 00:00:00     2 
MERC
REM TDIF           25 MAY 01145 00:00:00  MDX     0 25 MAY 01145 00:00:00     3 
MERC
REM TDDI           25 MAY 01145 00:00:00  MDX     0 25 MAY 01145 00:00:00     4 
MERC
REM TDDI           25 MAY 01145 00:00:00  MDX     0 25 MAY 01145 00:00:00     5 
MERC
REM TDDI           25 MAY 01145 00:00:00  MDX     0 25 MAY 01145 00:00:00     6 
MERC
REM Number of grids listed = 6
REM GRDLIST - done

REM
REM Plot the second term values
REM

SF 3
EG
GRDDISP MYDATA/GRIDS.2 GRID=6 OUT=PLO MAP=USA PINT=2 2
 
REM
REM Display the results as plots and contours
REM

SF 4
EG
GRDDISP MYDATA/GRIDS.2 MATH='G1+G2' G1='GRID 3' G2='GRID 6' MAP=USA OUT=PLO
GRDDISP MYDATA/GRIDS.2 MATH='G1+G2' G1='GRID 3' G2='GRID 6' NAV=C
--------------------- HAINES.BAT -------------------------------------------

Tom

>From address@hidden Thu May 31 22:18:29 2001
>Subject: Re: 20010522: McIDAS - Lower Atmospheric Severity Index 

Tom:

Thanks for your help with setting up the grids for the LASI.  As always,
your dedication and patience are deeply appreciated.  Since Florida
continues to be in imminent fire danger, plots of this index are useful.

Arlene