# Tag Info

### 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/...
• 3,376
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....
• 17.7k

### 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 ...
• 17.7k

### How to plot a Hovmoller diagram in MATLAB?

Here is an example using contourf. The trick is in sampling the 3D arrays appropriately: ...
• 15.5k

### 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....
• 15.5k
Accepted

### Understanding Graphs for Velocity and Temperature Solutions for Parallel Sided Slab on Slope Problem

In Matlab, trigonometry functions work with angles in radians, see for example the description of the sin function: Input angle in radians, specified as a scalar, ...
• 8,016
1 vote

### Catching a matlab ncread error?

First, you could check if a variable with the given name is present. This could be done via ncinfo. I would consider it as good practice to check for the existence ...
• 2,681
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 ...
• 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:...
• 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 ...
• 2,009
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 ...
• 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 ...
• 947

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