Questions tagged [matlab]
Questions regarding the MATLAB programming language.
19 questions
1 vote
1 answer
53 views
Catching a matlab ncread error?
If an expected variable is not present in the .nc file, is there a way to catch the Matlab error without it crashing the script?
3 votes
0 answers
138 views
What's wrong with my Penman-Monteith model?
UPDATE: I believe I have found the mistake. I had missed that the project instructions stated that conductance of sensible heat flux should be equal to aerodynamic conductance. The model behaves as ...
2 votes
1 answer
64 views
Understanding Graphs for Velocity and Temperature Solutions for Parallel Sided Slab on Slope Problem
I'm trying to recreate the graphs in Figure 6.2 from this source (page 88). They get these plots by using the following solutions for velocity and temperature (both obtained from solving the basic ...
2 votes
0 answers
83 views
Trying to run a monte carlo of hydrus 1D
I'm trying to run hydus 1D so that I can do a sensitivity analysis of the solute transport parameters. I've scripted a matlab code to generate the files for each MC run. I can't get hydrus to run ...
2 votes
0 answers
1k views
MATLAB - How to plot multiple timeseries (paleoclimate) with a common x axis and multiple stacked y axes?
I'm trying to create figures in MatLab and am a reasonably new user, I'm wondering if there is a good way to make plots that use a common x-axis and then vertically stacked and alternating y-axes as ...
1 vote
1 answer
694 views
How to extract lat-lon from MOD10C2 hdf data in matlab?
We can import and read all given bands/parameters of MOD10C2, lat and lon is not given as separate band rather embedded with other bands. How we can extract from MOD10C2 hdf data in matlab. Similar ...
6 votes
0 answers
122 views
Generating netCDF file composed of zeros?
I need to generate an all-zeros file as an input file for an Earth Systems model (DGVM) I'm using. I have a file with the same dimensions as the zero file. I have R and MATLAB and use a Fedora machine....
5 votes
2 answers
657 views
correct way to calculate transport through a section in an ocean numerical model
Suppose that I want to calculate the transport across a certain transect (green line) from the outputs of an ocean numerical model. The model has the $u$ values at the center of the grids (crosses) ...
4 votes
1 answer
1k views
How to calculate the kinetic energy spectra from ocean current timeseries?
How does one practically compute the kinetic energy spectra from a timeseries of u- and v- Cartesian components of ocean current velocity ($m s^{-1}$) obtained from an Acoustic Doppler Current ...
3 votes
0 answers
86 views
Unable to read modis sst netcdf file in matlab [duplicate]
I'm using Matlab to read MODIS Aqua sea surface temperature data. Unfortunately I am not able to do it. It will be great if any of you can help me with that. ...
7 votes
1 answer
1k views
Analytical solution for seismic wavefield in MATLAB
I have been trying to evaluate the analytical solution for a wave travelling in a homogeneous, infinite media. For a given source $S(t)$, the wave-field can be calculated at a distance $r$, for a ...
2 votes
1 answer
518 views
Velocity from time and depth seismic images
I have a seismic dataset that contains a depth-migrated seismic (amplitude) volume in depth and then the exact same volume converted to time using the migration velocities. Unfortunately, I do not ...
-2 votes
1 answer
332 views
Where can I find a shallow-water solver in MATLAB?
I do not know how to solve the shallow water equations in the matrix form in MATLAB. I didn't find anything useful on the internet. I have the specific mathematical equations to solve (please see the ...
4 votes
2 answers
4k views
How to plot a Hovmoller diagram in MATLAB?
Im trying to create a Hovmoller diagram in MATLAB but I'm very new to programming and have no clue what to do. Im trying to do it for vorticity. Below is the code that I have currently. Any input or ...
4 votes
3 answers
5k views
How do I convert between different east longitude coordinates?
I have two datasets that represent longitude in different ways. The first represents longitude as degrees from east to 180, but then as negative east so that I have a series which looks like: ...