Comments (10)
And another version: (add some post-process using Google Earth Studio and Adobe After Effect)
https://www.youtube.com/watch?v=muk0FL4E-Aw&t=15s
from oceanmesh2d.
This is just a demo version, I will keep working to make it better.
And, Animation64nc Animation6364nc, Animation6374nc is on the road.
When I complete them, I am happy to push them to OceanMesh2D.
If you have some ideas or great suggestions, please let me know.
from oceanmesh2d.
Hi @Jiangchao3 this looks great! Thanks! we'd love to incorporate this and the additional functionality to the main branch.
from oceanmesh2d.
Hi @krober10nd, it is my great pleasure to contribute the OM community.
I am making the animation to show water level and wind stress simultaneously,
use m_quiver to plot the wind in u and v direction.
m_quiver(x,y,current_windx,current_windy,1.5,'color','k','linewidth',0.1);
one problem is that the wind stress values are corresponding to mesh nodes, that will show a very dense vector when it is in nearshore area because there is more high resolution node.
Do you have some suggestions about how to deal with the wind stress values, for example using a resample or other method to generate a uniform wind field, let the visualization looks better?
Thanks
from oceanmesh2d.
I have one idea to solve the above wind issues, let me have a try
from oceanmesh2d.
It could be useful to interpolate the data to a structured grid for the quivers. The unstructured grid's variable resolution can make it challenging to see the quivers at times.
from oceanmesh2d.
agree with you
from oceanmesh2d.
Update: add wind vector into the water level animation:
video.mp4
function [x_grid_reshape,y_grid_reshape,wind_intp_reshape] = interpolant_nc74(x,y,wind,n_grid)
% function to interpete the original unstrural wind into structural grid
% Author: Jiangchao Qiu, (MIT/ESSG; email:[email protected])
% Created: May 14 2023
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[x_grid,y_grid] = meshgrid(linspace(min(x),max(x),n_grid),linspace(min(y),max(y),n_grid));
wind_interp = griddata(x,y,wind,x_grid,y_grid);
x_grid_reshape = reshape(x_grid,[],1);
y_grid_reshape = reshape(y_grid,[],1);
wind_intp_reshape = reshape(wind_interp,[],1);
end
but there is some edge error exist after doing the interpolation, should drop them
from oceanmesh2d.
Drop the wind interpolation out of the mesh domain:
function [x_grid_indom,y_grid_indom,wind_grid_indom] = interpolant_nc74(x,y,wind,n_grid)
% function to interpete the original unstrural wind into structural grid
%
% Author: Jiangchao Qiu, (MIT/ESSG; email:[email protected])
% Created: May 14 2023
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
[x_grid,y_grid] = meshgrid(linspace(min(x),max(x),n_grid),linspace(min(y),max(y),n_grid));
wind_interp = griddata(x,y,wind,x_grid,y_grid);
x_grid_reshape = reshape(x_grid,[],1);
y_grid_reshape = reshape(y_grid,[],1);
wind_intp_reshape = reshape(wind_interp,[],1);
%% drop values that are not in the mesh area
% ref: https://www.mathworks.com/help/matlab/ref/inpolygon.html
% ref: https://www.mathworks.com/help/matlab/ref/boundary.html
k = boundary(x,y);
x_boundary = x(k);
y_boundary = y(k);
in = inpolygon(x_grid_reshape,y_grid_reshape,x_boundary,y_boundary);
x_grid_indom = x_grid_reshape(in);
y_grid_indom = y_grid_reshape(in);
wind_grid_indom = wind_intp_reshape(in);
end
from oceanmesh2d.
Create a PR here: 5f27b31, please review.
the final version used this function is as following:
video.mp4
from oceanmesh2d.
Related Issues (20)
- Infinite loop when cleanup the mesh HOT 6
- Issue with using dynamic water level correction HOT 11
- Need for rapid changes in grid resolution HOT 4
- Issues with refining mesh in channels HOT 9
- Problem making fort.15 file for ADCIRC model in OceanMesh2D HOT 2
- Problem creating fort.13 file for ADCIRC model in OceanMesh2D HOT 3
- startup.sh HOT 2
- Issue regarding input files of ADCIRC model HOT 2
- How to specify the wind control and wind timestep parameters in Make_f15 function of OceanMesh2D? HOT 1
- How to make the fort.22 file for ADCIRC model? HOT 2
- Re-meshing patches function
- How to make a fort.15 file for NWS = 30 Blended GAHM & Background Gridded Wind and Pressure?
- Number of nodes and element change HOT 2
- Mesh dense changes significantly HOT 3
- A technique to improve quality of elements on the boundary HOT 2
- improve the elements quality HOT 2
- Plotting bathymetry for Example_8_AK HOT 8
- Unrecognized function or variable 'annmex'. HOT 2
- How to set up parameters of hybrid bottom friction in OM HOT 3
- Spatially offset fine resolution HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oceanmesh2d.