SV3 Weather Project

Robert Guirguis


The data that I received for this project was weather data and it was the output of a weather model for an area in NSW. All the data was placed in one binary file, on an irregular grid. This was data for a 50-hour period on 13 September 1997.

The data was placed in a file in the following format:
 
 

Topography
Temperature at surface
Pressure at surface
Temperature
Velocity in X-direction
Velocity in Y-direction
Mix
Sea level Pressure
Screen
Relative Humidity
Dew Point temperature

 
 

Where each of the "Blocks" was one time interval.
 
 

t=1

t=2

.

.

t=25


 



Each of these data "Blocks" was placed in the file after each other 25 times. This data was collected over 50 hours every 2 hours.

The data was paced in an Unformatted binary Fortran file.
 

Once the data had been separated into the different files, each of the different time intervals had to be extracted. This I decided to do with the use of AVS because this is the Visualisation package that I was most familiar with, I skipped the irrelevant data with the field files because I knew that the data was placed in the file one by one as can be seen below:
 
 
 
 

Relative humidity @ t=1
Relative humidity @ t=2
.
.
Relative humidity @ t=25

 
 

Because each of the files contained 25 datasets I had to create 25 different field files each one skipping the correct number of bytes to get to the next set of data. The number of bytes that I had to skip was calculated by

Number of bytes in X *Number of bytes in Y * Number of bytes in Z (if given)+8 (for Fortran unformatted binary files)* the number of data set to skip.

For example in the first field file for 3D data I skipped 0 bytes, in the second file I skipped 305028 bytes and so on. The second
field file for relative humidity is below:

# AVS field file

#

ndim=3

dim1=151

dim2=101

dim3=5

nspace=3

veclen=1

data=float

field=irregular #this is the nature of the data

#This is to skip to the correct position in the data

variable 1 file=/scratch/month/wwang/2km/relhum.dat filetype=unformatted skip=305028

#This is the coordinate information for the data

coord 1 file=/scratch/month/wwang/2km/xysigma.dat filetype=unformatted skip=0 stride=3

coord 2 file=/scratch/month/wwang/2km/xysigma.dat filetype=unformatted skip=4 stride=3

coord 3 file=/scratch/month/wwang/2km/xysigma.dat filetype=unformatted skip=8 stride=3
 
 

Rather that creating the 25 different field files manually for each of the files, I wrote a C program that made a field file. This program was called with an argument, which was the number of data sets to skip; I also wrote a shell script that called the C program 25 times with the appropriate argument. The C program and the shell script can be seen below

Here  is the C program that I wrote:

#include <stdio.h>
 

int main (int argc, char *argv[])
{

long int i;
int j;
 
 
 

 j=atoi(argv[1]);

 i=j*305028;

  printf("# AVS field file\n");
 printf("#\n");
 printf("ndim=3\n");
 printf("dim1=151\n");
 printf("dim2=101\n");
 printf("dim3=5\n");
 printf("nspace=3\n");
 printf("veclen=1\n");
 printf("data=float\n");
 printf("field=irregular\n");

 printf("variable 1 file=/scratch/month/wwang/2km/temperature.dat filetype=unformatted skip=");
 printf("%d\n",i);

 printf("coord 1 file=/scratch/month/wwang/2km/xysigma.dat filetype=unformatted skip=0 stride=3\n");
 printf("coord 2 file=/scratch/month/wwang/2km/xysigma.dat filetype=unformatted skip=4 stride=3\n");
 printf("coord 3 file=/scratch/month/wwang/2km/xysigma.dat filetype=unformatted skip=8 stride=3\n");
 

}
 

Here is the shell script that calls the C program
 

#!/bin/sh
for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
do
a.out $i relhum$i.fld
done
 
 
 

This process was performed an all on the files that I would be visualising. They contained data on

The reason that this was not performed on the topographic data was because this that did not change it was the same over all of the time intervals.

Once all the data that I had planned to visualise had be prepared I began to use AVS to visualise the data the first thing that I visualised was the topographic information the network that I created can be seen below:
 
 



 



This is a simple network that I used to visualise the 2D data it contained a threshold module because the data contained values that were undefined. If the value 9*10 -9 was in the data it was set to 0, this was a problem in all the datasets that I used. Then the data is put through a field to mesh module this is to give shape to the 2D dataset, colour is also applied to the field to mesh this was simply to give more detail to the topography, then it was put into a geometry viewer. A screen shot of the topography can be seen below:
 


Once the topography was prepared I began to work on the relative humidity data this was the first of the 3D data sets that I would be using. All of the 3D data sets had the same X and Y dimensions as the topography and had five distinct levels in Z where the first four are very close to each other but the fifth is much higher in comparison to the other four.

The way that I visualised the relative humidity data first, was with an orthogonal slicer and then passing that on to a field to mesh and putting the field to mesh into the same geometry viewer as the topography. This was confusing to look at because of the lower layers of the data and the topography were close, this can be seen below:
 


I then proceeded to change the colour map so that the topography was green but it was still confusing to look at, as can be seen below
 



This too was confusing to look at, to resolve this problem I made the topography slightly transparent but once again this was still confusing as can be seen below:
 


The only other option left was to remove all colour form the topography keeping it transparent this was what I thought was the final stage before making a movie. A sample can be seen below
 



Upon consultation with Wei Wang I was advised to use an isosurface in place of the orthogonal slices with a limit of 90%. This is because it is approximately at this level of relative humidity that clouds begin to form. With the isosurface it gave a good 3D visualisation of the topography and clouds but for this to look better I had to reapply the green colour map to the topography a sample shot can be seen below:
 



 



The AVS network that I used for this visualisation can be seen below
 
 


 


For the temperature data it was visualised in much the same way as the relative humidity data was visualised initially, it was with the topography being transparent with no colour map being applied and with the orthogonal slices at the five distinct levels, some adjustment was needed to threshold values:

Below is a sample of the temperature data at the lowest level
 



 


Below is a sample of the temperature data at level 2
 
 


 


Below is a sample of the temperature data at level 3
 



 


Below is a sample of the temperature data at level 4
 



Below is a sample of the temperature data at level 5
 
 


 




Here is the AVS network that was used to create the visualisations.
 
 


 


For the dew point temperature data it was visualised in much the same way as the temperature data was visualised initially. It was with the topography being transparent with no colour map being applied and with the orthogonal sliced at the five distinct levels, some adjustment was needed to threshold values:

Below is a sample of the dew point temperature data at the lowest level
 



 


Below is a sample of the dew point temperature data at level 2
 
 


 


Below is a sample of the dew point temperature data at level 3
 



 



Below is a sample of the dew point temperature data at level 4
 



 



Below is a sample of the dew point temperature data at level 5
 



 



Here is the AVS network hat was used to create the visualisations.
 



 



To create the movies it was a matter of collecting screen shots and then using "movieconvert" to create them into movies. The way that the necessary screen shots was captured was with AVS modules. For the relative humidity data it was a matter of using the module "animate filename" to read the field files in order and another module called "write RGB" which takes a screen shot of the Geometry viewer the network can be seen below:
 



 




Here is the movie that was created from the relative humidity data
 

To create the screen shots required for the temperature and dew point temperature another module had to be added to the network. To cycle through the slices of each of the 25 set of data the module was "animate integer" module, which cycles through all of the slices in each of the field files. The network used can be seen below:
 
 


 



Once all of the images were captured it was a matter deciding how the frames in the movie should be displayed. I decided to display each of the 25 shots of each layer in a move together, this means that all of the shots taken on the first level had to be put together and all of the shots on the second level had to be put together and so on for all of the five levels. The five moves for the temperature can be seen below

Here is the movie for the temerature at level 1
 
 

Here is the movie for the temerature at level 2
 
 

Here is the movie for the temerature at level 3
 
 

Here is the movie for the temerature at level 4
 
 

Here is the movie for the temerature at level 5
 
 
 

The five movies for the dew point temperature can be seen below

Here is the movie for the dew point temerature at level 1
 
 

Here is the movie for the dew point temerature at level 2
 
 

Here is the movie for the dew point temerature at level 3
 
 

Here is the movie for the dew point temerature at level 4
 
 

Here is the movie for the dew point temerature at level 5
 
 

I would like to thank all the following people that helped me with this project

Nicole Bordes
Daniel Mitchell
Lixin Qi
Wei Wang