Hot answers tagged

8 votes
Accepted

How do I convert between different east longitude coordinates?

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 ...
user avatar
  • 21.8k
6 votes
Accepted

How to read a NetCDF4 file in Matlab?

These days I use: ncgeodataset. The routine allows for the extraction of a subset of data without having to load the entire file or even an array into Matlab. It is great for large datasets.
user avatar
  • 14.7k
5 votes

Available Matlab code to design Seismic Colored Inversion Operator?

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 ...
user avatar
  • 155
4 votes

How to plot lat-lon-rainfall in MATLAB?

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 ...
user avatar
4 votes

How to plot lat-lon-rainfall in MATLAB?

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]; ...
user avatar
  • 6,376
4 votes

Where can I find a shallow-water solver in MATLAB?

You aren't supposed to do link only answers, but that is really all this questions deserves. Did you look on Google? I did. https://people.sc.fsu.edu/~jburkardt/m_src/shallow_water_1d/...
user avatar
  • 3,314
3 votes

How do I convert between different east longitude coordinates?

In Matlab if you have the mapping toolbox you can simply do: lon2=wrapTo180(lon2); And your approach is totally right, but if you have to do it more often or with ...
user avatar
  • 17.1k
3 votes
Accepted

How to extract lat-lon from MOD10C2 hdf data in matlab?

The latitude and longitude of each pixel is not stored in the HDF file. But using metadata=hdfinfo('file_name.hdf'); You can get the info to generate those latitudes and longitudes. In metadata....
user avatar
  • 17.1k
2 votes

How to plot a Hovmoller diagram in MATLAB?

Here is an example using contourf. The trick is in sampling the 3D arrays appropriately: ...
user avatar
  • 14.7k
2 votes

correct way to calculate transport through a section in an ocean numerical model

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....
user avatar
  • 14.7k
1 vote

correct way to calculate transport through a section in an ocean numerical model

I would: 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 ...
user avatar
  • 21
1 vote

How to calculate the kinetic energy spectra from ocean current timeseries?

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:...
user avatar
  • 21
1 vote
Accepted

Analytical solution for seismic wavefield in MATLAB

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 ...
user avatar
  • 1,959
1 vote

How to perform regridding (1.0d to 0.5d) using bilinear interpolation for an irregular area?

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. For example ...
user avatar
  • 161
1 vote

How to perform regridding (1.0d to 0.5d) using bilinear interpolation for an irregular area?

Try something like this: [x_grid,y_grid] = meshgrid(1:100,1:100); z_grid=griddata(x_data,y_data,z_data,x_grid(:),y_grid(:),'v4'); You can change the method of ...
user avatar
  • 947

Only top scored, non community-wiki answers of a minimum length are eligible