Example IDV Script


<?xml version="1.0" encoding="ISO-8859-1"?>
<isl debug="true" offscreen="true" loop="1" sleep="0">

 

<!-- The following XML script generates two animated images each from the latest NCEP GFS forecast and the MIT model.
Improvements to the script are needed and are noted throughout the comments. To run this script, you must save it with the .isl extension

and run the script with the command: runIDV YourScript.isl   -->




<!-- Loads Theta/Speed Iso data from latest NCEP GFS Global 1 degree (make sure to set "times" correctly)
For example, 0:28:4 means to load only from frame 0 to frame 28 at intervals of 4. -->

<bundle file="http://wind.mit.edu/~rkowch/LatestGFSforMITmodel.xidv" times="0:2:1"/>




<!-- Now we create displays from GFS forecast. We cannot create a custom display (e.g. specifying isosurface value)
for the isosurface because GFS contains data for the entire Earth. There is no script that allows an
isosurface to be created strictly over the Northern Hemisphere. -->



<!-- Create GFS U-wind contour cross section (you can copy/paste this script for as many sections as you want). -->

<display type="contourxs" param="U">
    <property name="displayCategory" value="Contour Cross Section"/>
    <property name="settingsDisplayUnit" value="m/s"/>
    <property name="contourInfo" value="interval=5;min=0;max=80;base=0;width=2;dashed=false;labels=true;"/>
    <property name="legendLabelTemplate" value="%datasourcename% - %shortname%"/>
    <property name="colorTableName" value="White"/>
    <property name="useTimesInAnimation" value="true"/>
    <property name="useFastRendering" value="true"/>
    <!-- Need a <property> tag specifying location of section (lat/lon boundaries) -->
</display>


<!-- Create Theta color-filled cross section (you can copy/paste this script for as many sections as you want). -->

<display type="contourxsfilled" param="theta">
    <property name="displayCategory" value="Color-Filled Contour Cross Section"/>
    <property name="settingsDisplayUnit" value="K"/>
    <property name="contourInfo" value="interval=2;min=230;max=350;base=265;width=1;dashed=false;labels=false;"/>
    <property name="legendLabelTemplate" value="%datasourcename% - %shortname%"/>
    <property name="colorTableName" value="PressureMSL"/>
    <property name="range" value="265:350"/>
    <property name="useTimesInAnimation" value="true"/>
    <property name="useFastRendering" value="true"/>
    <!-- Need a <property> tag specifying location of section (lat/lon boundaries) -->
</display>



<!-- Set the aspect ratio and view of GFS animation -->

<viewpoint aspectx="1" aspecty="1" aspectz="0.4"/>
<viewpoint rotx="54.364" roty="-25.7875" rotz="-31.5067" scale="0.5265" transx="0.0" transy="0.0" transz="0.0"/>



<!-- Write the display to an animated gif in current directory -->

<idvproperty name="idv.capture.sleep" value="500"/>
<movie file="movieGFS.gif"/>


 




<!-- Now we load the model file as a bundle template. This allows the user to create displays and specify their own values
for isosurfaces, contouring, etc. For "times" you specify which frames (0 to 61) to use in the image loop just like what was done for the GFS above -->


<bundle file="http://wind.mit.edu/~rkowch/BundleforMITmodel.xidv" clear="true" times="0:10:1"/>
 


<!-- Create U-wind contour cross section on model (you can copy/paste this script for as many sections as you want). -->

<display type="contourxs" param="U">
    <property name="displayCategory" value="Contour Cross Section"/>
    <property name="settingsDisplayUnit" value="m/s"/>
    <property name="contourInfo" value="interval=.02;min=0;max=.1;base=0;width=2;dashed=false;labels=true;"/>
    <property name="legendLabelTemplate" value="%datasourcename% - %shortname%"/>
    <property name="colorTableName" value="White"/>
    <property name="useTimesInAnimation" value="true"/>
    <property name="useFastRendering" value="true"/>
    <!-- Need a <property> tag specifying location of section (lat/lon boundaries) -->
</display>


<!-- Create a display of Theta Isosurface (having trouble setting the iso value!)-->

<display type="isosurface" param="potential_temperature">
    <property name="displayCategory" value="3D Surface"/>
    <property name="settingsDisplayUnit" value="celsius"/>
    <property name="levelWithRawValue" value="-5"/>
    <property name="legendLabelTemplate" value="%datasourcename% - %shortname%"/>
    <property name="colorTableName" value="Cyan"/>
    <property name="useTimesInAnimation" value="true"/>
    <property name="useFastRendering" value="true"/>
</display>


<!-- Create a display of Speed Isosurface (having trouble setting the iso value!) -->

<display type="isosurface" param="speed">
    <property name="displayCategory" value="3D Surface"/>
    <property name="settingsDisplayUnit" value="m/s"/>
    <property name="levelWithRawValue" value=".025"/>
    <property name="legendLabelTemplate" value="%datasourcename% - %shortname%"/>
    <property name="colorTableName" value="Blue"/>
    <property name="useTimesInAnimation" value="true"/>
    <property name="useFastRendering" value="true"/>
</display>



<!-- Set the aspect ratio and view of the fluid model -->

<viewpoint aspectx="1" aspecty="1" aspectz="0.4"/>
<viewpoint rotx="59.196" roty="-30.5201" rotz="-31.4836" scale="0.6168" transx="0.0" transy="0.0" transz="0.0"/>

 


<!-- Write the display to an animated gif in current directory -->

<idvproperty name="idv.capture.sleep" value="500"/>
<movie file="movieMITmodel.gif"/>



<!-- END OF SCRIPT -->


</isl>