Open gaelforget opened 2 days ago
import Pkg; Pkg.add("MeshArrays") using MeshArrays
fil=demo.download_polygons("countries.geojson") pol=MeshArrays.read_polygons(fil);
[lines!(a,l1,color = :white, linewidth = 0.5) for l1 in pol] #0-360 but countries are -180-180
Then also need to transform the particle lon positions -180 so that the grid are the same.
Perhaps the particle Lon positions should -360
import Pkg; Pkg.add("MeshArrays") using MeshArrays fil=demo.download_polygons("countries.geojson") pol=MeshArrays.read_polygons(fil); [lines!(a,l1,color = :white, linewidth = 0.5) for l1 in pol] #0-360 but countries are -180-180
Nice! Couple notes :
using MeshArrays, GeoJSON, CairoMakie, DataDeps
fi=Figure(); a=Axis(fi[1,1])
try lon180(x)=Float64(x>180.0 ? x-360.0 : x)
when you feel ready, please open a pull request to add this to the repository
I added examples_SouthAtlantic1.jl in the directory of scripts, with two ways to add land background. I recommend the second way. Here are figures by both ways.
Now we have a plot with depth colormap of particles
We also have a map using heatmap function
https://github.com/ECCO-Hackweek/EH24-Drifters/blob/78bd420cf48e400c86be3c5c6598cb97071857f3/scripts/initial_simulations.jl#L41
For examples, see https://juliaclimate.github.io/MeshArrays.jl/dev/tutorials/geography.html