See the map at https://voto-ocean-knowledge.github.io/SkaMixMap
This repo hosts code for near real time visualisation of diverse surface and subsurface platform locations, as well as earth observation data, for field co-ordination during the SkaMix project.
Check out the startup TODO list for action items
To run the maps locally
- Clone or download this repo
- Double-click on index.html to see it in your browser
- ... that's it!
To make edits to the map:
- Install the requirements
pip install -r requirements.txt
- Run the update script
python src/update_map.py
- Refresh index.html to see the updated page
Note that if you want drifter locations you'll need to set up a gmail address, see instructions further down in this README file
User controlled settings are in src/user_variables.py
these can be used to control aspects of the map. Including:
colorbar_limits
manually set colorbar limits for variables like SST, to get a more useful range for the specific region of interest. Defaults to the global range of the layersatellite_product_date
set the date of the L3 and L4 satellite products. If the date you set is outside the allowed range, it will be ignoredforecast_product_date
set the date of the forecast layers (modelled SST and SSS). If the date you set is outside the allowed range, it will be ignoredplatform_time_filter
set a date range for the tracks of the various platforms that show on the map.
After updating any of these settings, run src/update_map.py
again
You can download the satellite data and make more tailored static plots using the Copernicus Marine Toolbox via the jupyter notebook in the notebooks
directory. See the README in that directory for more details.
- Demo leaflet map with CMEMS satellite layers (Dates of these layers are set at the last update to main)
- Demo location data pulled from a glider
- Demo location from old drifter unit read from email
- Location data from R/V Heincke
- nrt locations from drifters, autonomous platforms and vessels are emailed to votodatain@gmail.com in a variety of formats
- Every hour, a python script running as a cronjob checks the inbox for new emails
- The python script reads the email and converts the locations to geojson
- geojson locations and tracks are displayed on a leaflet map
- The leaflet map uses wmts web tiles to display multiple layers: bathy, SST, SSH etc.
- Additional static plots are made with more detailed and scaled SST raster data from satellite/reanalysis products
- SST from platforms is overlain on these plots where available
Using WMTS system for nrt web tiled data. we are using two Baltic specific products from SST TAC:
- L3 https://data.marine.copernicus.eu/product/SST_BAL_SST_L3S_NRT_OBSERVATIONS_010_032/description
- L4 https://data.marine.copernicus.eu/product/SST_BAL_SST_L4_NRT_OBSERVATIONS_010_007_b/services
We get SSH from the SL TAC
- L4 Sea Surface Height and Dynamic Topography https://data.marine.copernicus.eu/product/SEALEVEL_EUR_PHY_L4_NRT_008_060/description
See the app for full list and attributions
This requires a bit of setting up. Here's the prep work:
- Create a gmail account that all incoming data will be sent to
- Go to google account >> 2-step verification >> turn on 2-step verification
- setup whatever 2FA you prefer
- create an app password https://myaccount.google.com/u/7/apppasswords explained at https://support.google.com/accounts/answer/185833?hl=en
- Copy that password into the secrets file
email_secrets.json
here in the root directory. It should look like
{
"email_username": "<account_name>@gmail.com",
"email_password": "<16 char app password with no spaces>"
}
Now you're set up to read email from python with the src/fetch_drifter_data.py
script