Hello, I have a dataset that is provided with 0.5degree latitude information, but 1,2, or 10 degree longitude. I have used the matplotlib.mlab.griddata function with natgrid installed to resample the dataset to a uniform 0.5x0.5 degree grid.
The dataset locations can be seen below, note the regular lat spacing but shifting lon spacing. Now, the second plot below shows the raw data plotted. And the next the regridded data. Note the artifacts. I have two requirements now for a data mask. First, I need to mask any data over (under?) land, and secondly I need to create a mask to get rid of the artifact data. Does anyone have a good solution for this? Do I have to use something like the mlab.inside_poly function? If so, how would I create the 'vertices' of the polygon? I'm not looking for the landsea mask just for plotting, but I actually have to mask the raw data array for writing out. Could I use my original data to create the mask somehow? The problem is that all the points between data locations would not be included.... Suggestions? Direct examples? It seems it must be a fairly common problem. Raw data locations: http://www.nabble.com/file/p24920704/datalocations_flat.png Raw data points plotted: http://www.nabble.com/file/p24920704/rawdata.png Regridded data: http://www.nabble.com/file/p24920704/regriddata.png -- View this message in context: http://www.nabble.com/regrid-non-regular-data%2C-then-mask-for-continents---artifacts-tp24920704p24920704.html Sent from the matplotlib - users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users