The database with the negative longitude angles is storing longitude as eastings and westings, whereas the other database is storing everything as eastings.
It appears you prefer your data as eastings and westings. Your methodology for changing eastings greater than 180 degrees to westings is correct: where the longitude angle is greater than 180 subtract ...
Here is a link to a colored inversion operator design code written and provided by Peter Zahuczki.
This code requires that you provide a P-impedance log amplitude spectrum; he uses the open-source interpretation software OpendTect to compute this spectrum.
Peter has a easy to follow tutorial on how to use his code with OpendTect. Good luck!
There are two stages to what you want here.
1. Converting point data to gridded data
First off, since you want to plot regular cells rather than the actual data that you have, you need to covert your point data to cells in some way. The best way to do this may depend on the data itself, but one way would be to interpolate, perhaps using something along the ...
What kind of plot do you want?
Lat = [25.5 26.5 33.5 34.5 35.5 36.5 41.5 42.5];
Lon = [89.5 91.5 78.5 79.5 83.5 84.5 75.5 76.5];
Rain = [110 120 122 135 114 116 145 120 110 110];
will give you a scatter plot with Lat being the x, Lon being the y, and rain being the z.
Also note that because your ...
The latitude and longitude of each pixel is not stored in the HDF file. But using
You can get the info to generate those latitudes and longitudes. In metadata.Attibutes you will find this among other things:
You aren't supposed to do link only answers, but that is really all this questions deserves. Did you look on Google? I did.
Here is an example using contourf. The trick is in sampling the 3D arrays appropriately:
dat2dx=7*sin(X2d)+5*cos(y(5))+T2dx/max(T2dx(:))+rand(size(X2d)); % ...
In Matlab if you have the mapping toolbox you can simply do:
And your approach is totally right, but if you have to do it more often or with other dataset with diferent conventions you can set up functions analogous to those in the maping toolbox. Such as:
function lon = wrapTo180(lon)
q = (lon < -180) | (180 < lon);
I have been using the routines in nctoolbox (also check here) that do all the slicing (vertical, horizontal, following a track).
The repository is in GitHub.
The one you should looking at is vsliceg.m.
You can follow the logic there or develop your own.
Compute (U,V) transport on the model's C grid. This is easy if the model returns a batotropic velocity.
Define a set of points S along the transect. The points should have spacing comparable to the model's horizontal resolution.
Interpolate (U,V) transport to S.
Find the component of (U,V) perpendicular to your transect.
Iterate over model outputs....
Do you get much different results if you do both ways?
I think if you want the kinetic energy spectrum, use your second method. Some separately compute velocity and KE spectra, e.g., figure 2 of http://journals.ametsoc.org/doi/pdf/10.1175/2009JPO4330.1 (DP Wang et al, JPO, Apr 2010). Comparing velocity and KE spectra, the KE spectra looks similar to the ...
So, I know this question was asked a long time ago. But in the spirit of Stack Exchange, I will post my answer for future users perhaps.
The Greens functions (i.e., analytical solutions)
The first thing to be aware of are the various solutions to the wave equations change for the (1) source type and (2) the dimension.
The source type
Assuming acoustic ...
Did you try inpainting methods? Inpainting methods try to replace missing data using the existent data. I suggest you check the inpaint_nans.m function in fileexchange.
[x,y] = meshgrid(0:.01:1);
z0 = exp(x+y);
znan = z0;
znan(20:50,40:70) = NaN;
znan(30:90,5:10) = NaN;
znan(70:75,40:90) = NaN;
z = inpaint_nans(znan);
Try something like this:
[x_grid,y_grid] = meshgrid(1:100,1:100);
You can change the method of interpolation if you prefer something else.