objective analysis n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Objective Analysis PowerPoint Presentation
Download Presentation
Objective Analysis

Loading in 2 Seconds...

play fullscreen
1 / 51

Objective Analysis - PowerPoint PPT Presentation


  • 113 Views
  • Uploaded on

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:.

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

PowerPoint Slideshow about 'Objective Analysis' - carlow


An Image/Link below is provided (as is) to download presentation

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 analysis1
Objective Analysis
  • Converting irregularly distributed data to a uniform 2-D grid.
objective analysis2
Objective Analysis
  • Converting irregularly distributed data to a uniform 2-D grid.
grids
Grids
  • Think “tables”…
  • Arrays!
arrays
Arrays
  • Two-dimensional arrays have both rows and columns:
arrays1
Arrays
  • How to declare:

float temp[6][6];

arrays2
Arrays
  • How to use:

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

temp[0][5] = 22.1;

arrays3
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!

arrays4
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 …

slide26

RADIUS OF INFLUENCE

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?

slide27

RADIUS OF INFLUENCE

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.

slide28

RADIUS OF INFLUENCE

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.

slide29

RADIUS OF INFLUENCE

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

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

if (dist < roi) …

slide30

RADIUS OF INFLUENCE

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?

slide31

RADIUS OF INFLUENCE

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

Maybe take their average!

slide32

RADIUS OF INFLUENCE

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…

slide33

RADIUS OF INFLUENCE

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
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
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 function1
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 function2
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 function3
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 function4
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 function5
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 function6
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 function7
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.

You can adjust this.

calling the barnes function8
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 function9
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 function10
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
Modified Assignment 14
  • Start with the code from Assignment 13.
    • We don’t need the stuff that sorts the data.
    • We don’t need to plot the stations.
modified assignment 141
Modified Assignment 14
  • Start with the code from Assignment 13.
    • 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 142
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 143
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 144
Modified Assignment 14
  • NEW STUFF
    • Write the code for the Barnes Objective Analysis yourself.

As

Appropriate