1 / 51

Objective Analysis

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

carlow
Download Presentation

Objective Analysis

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Objective Analysis ATS 315

  2. Objective Analysis • Converting irregularly distributed data to a uniform 2-D grid.

  3. Objective Analysis • Converting irregularly distributed data to a uniform 2-D grid.

  4. Grids • Think “tables”… • Arrays!

  5. Arrays • Two-dimensional arrays have both rows and columns:

  6. Arrays • How to declare: float temp[6][6];

  7. Arrays • How to use: printf (“%f\n”,temp[2][1]); temp[0][5] = 22.1;

  8. 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!

  9. 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 …

  10. RADIUS OF INFLUENCE

  11. RADIUS OF INFLUENCE

  12. RADIUS OF INFLUENCE

  13. 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?

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

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

  16. 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) …

  17. 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?

  18. 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!

  19. 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…

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

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

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

  23. 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!

  24. 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!

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

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

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

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

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

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

  31. 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];

  32. 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!

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

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

  35. 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%

  36. 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%

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

More Related