Objective Analysis

1 / 51

# Objective Analysis - PowerPoint PPT Presentation

Objective Analysis. ATS 315. Objective Analysis. Converting irregularly distributed data to a uniform 2-D grid. Objective Analysis. Converting irregularly distributed data to a uniform 2-D grid. Grids. Think “tables”… Arrays!. Arrays. Two-dimensional arrays have both rows and columns:.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

## PowerPoint Slideshow about 'Objective Analysis' - carlow

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### Objective Analysis

ATS 315

Objective Analysis
• Converting irregularly distributed data to a uniform 2-D grid.
Objective Analysis
• Converting irregularly distributed data to a uniform 2-D grid.
Grids
• Think “tables”…
• Arrays!
Arrays
• Two-dimensional arrays have both rows and columns:
Arrays
• How to declare:

float temp[6][6];

Arrays
• How to use:

printf (“%f\n”,temp[2][1]);

temp[0][5] = 22.1;

Arrays
• How to use:

Traditionally, the first index is the “row” and the second index is the “column”, but folks break that rule all the time.

But DON’T break that rule in this class!

Arrays
• How to use:

for(i=0;i<numrows;i++) {

for(j=0;j<numcols;j++) {

printf (“%f\n”,temp[i][j]);

}

}

13.3

19.0

3.3

5.3 …

Two Questions:

How do we know whether or not a station is inside the radius of influence?

What do you want to do with the observations inside of the radius of influence to compute the gridded value?

How do we know whether or not a station is inside the radius of influence?

We know (i.e., can figure out) the latitude and longitude of the grid point.

How do we know whether or not a station is inside the radius of influence?

We know (i.e., can look up in the sao.cty file) the latitude and longitude of any/every station.

How do we know whether or not a station is inside the radius of influence?

dist=sqrt((x)2 + (y)2);

if (dist < roi) …

Two Questions:

How do we know whether or not a station is inside the radius of influence?

What do you want to do with the observations inside of the radius of influence to compute the gridded value?

What do you want to do with the observations inside of the radius of influence to compute the gridded value?

Maybe take their average!

What do you want to do with the observations inside of the radius of influence to compute the gridded value?

Need to give more “weight” to the stations that are CLOSE to the gridpoint…

What do you want to do with the observations inside of the radius of influence to compute the gridded value?

…and less weight to the stations that are far from the gridpoint, even if they are inside the ROI.

Barnes Objective Analysis
• An algorithm that weights the observations within the Radius Of Influence and computes an appropriate value for the grid at each point.
• Pretty complicated math.
• I’m giving this to you, if you want it.
Calling the Barnes Function:

Barnes( id, temp,

idtable, lattable, lontable,

4., n,

gridlatitude, gridlongitude,

grid);

MUST #define two constants before calling this function:

NUMROWS

NUMCOLS

Calling the Barnes Function:

Barnes( id, temp,

idtable, lattable, lontable,

4., n,

gridlatitude, gridlongitude,

grid);

id must be declared like this:

char id[10000][10];

These are the station identifiers from the current_sao.wxp file!

Calling the Barnes Function:

Barnes( id, temp,

idtable, lattable, lontable,

4., n,

gridlatitude, gridlongitude,

grid);

temp must be declared like this:

float temp[10000];

These are the observations from the current_sao.wxp file!

Calling the Barnes Function:

Barnes( id, temp,

idtable, lattable, lontable,

4., n,

gridlatitude, gridlongitude,

grid);

Therefore, the first two arguments are arrays of data from the observations.

They contain 10000 elements, although nowhere near that many will actually be used.

Calling the Barnes Function:

Barnes( id, temp,

idtable, lattable, lontable,

4., n,

gridlatitude, gridlongitude,

grid);

idtable must be declared like this:

char idtable[6893][10];

These are the identifiers from the sao.cty file.

Calling the Barnes Function:

Barnes( id, temp,

idtable, lattable, lontable,

4., n,

gridlatitude, gridlongitude,

grid);

lattable and lontable must be declared like this:

float lattable[6893], lontable[6893];

These are the latitudes and longitudes from the sao.cty file.

Calling the Barnes Function:

Barnes( id, temp,

idtable, lattable, lontable,

4., n,

gridlatitude, gridlongitude,

grid);

Therefore, arguments 3, 4, and 5 are arrays of information from the sao.cty file.

Calling the Barnes Function:

Barnes( id, temp,

idtable, lattable, lontable,

4., n,

gridlatitude, gridlongitude,

grid);

The 6th argument is the “radius of influence” for the Barnes scheme.

Calling the Barnes Function:

Barnes( id, temp,

idtable, lattable, lontable,

4., n,

gridlatitude, gridlongitude,

grid);

The 7th argument is the number of observations in the current_sao.wxp file. This means that there are observations in temp from 0 to n-1.

Calling the Barnes Function:

Barnes( id, temp,

idtable, lattable, lontable,

4., n,

gridlatitude, gridlongitude,

grid);

gridlatitude and gridlongitude must be declared like this:

float gridlatitude[NUMROWS][NUMCOLS];

float gridlongitude[NUMROWS][NUMCOLS];

Calling the Barnes Function:

Barnes( id, temp,

idtable, lattable, lontable,

4., n,

gridlatitude, gridlongitude,

grid);

grid must be declared like this:

float grid [NUMROWS][NUMCOLS];

This is the output of the Barnes function!

Modified Assignment 14
• We don’t need the stuff that sorts the data.
• We don’t need to plot the stations.
Modified Assignment 14
• Open the graphics window
• Draw the map
• Read in the stations from the sao.cty file and store as arrays.
• Read in the observations from the current_sao.wxp file and store as arrays.
• NEW STUFF HERE.
Modified Assignment 14
• NEW STUFF
• Set up a 2D array that will hold the objectively analyzed data.
• Determine the latitude and longitude of every element of this array.

75%

Modified Assignment 14
• NEW STUFF
• Implement the objective analysis code that I have given you, and plot the values of the array at the appropriate locations.

90%

Modified Assignment 14
• NEW STUFF
• Write the code for the Barnes Objective Analysis yourself.

As

Appropriate