Skip to content

voto-ocean-knowledge/SkaMixMap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SkaMixMap

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

Installation

To run the maps locally

  1. Clone or download this repo
  2. Double-click on index.html to see it in your browser
  3. ... that's it!

To make edits to the map:

  1. Install the requirements pip install -r requirements.txt
  2. Run the update script python src/update_map.py
  3. 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

Customisation

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 layer
  • satellite_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 ignored
  • forecast_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 ignored
  • platform_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

Static plots

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.

Current status

  • 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

Envisaged dataflow

  1. nrt locations from drifters, autonomous platforms and vessels are emailed to votodatain@gmail.com in a variety of formats
  2. Every hour, a python script running as a cronjob checks the inbox for new emails
  3. The python script reads the email and converts the locations to geojson
  4. geojson locations and tracks are displayed on a leaflet map
  5. The leaflet map uses wmts web tiles to display multiple layers: bathy, SST, SSH etc.
  6. Additional static plots are made with more detailed and scaled SST raster data from satellite/reanalysis products
  7. SST from platforms is overlain on these plots where available

Data sources

Satellite data

Using WMTS system for nrt web tiled data. we are using two Baltic specific products from SST TAC:

We get SSH from the SL TAC

See the app for full list and attributions

Automation

Getting data from emails

This requires a bit of setting up. Here's the prep work:

  1. Create a gmail account that all incoming data will be sent to
  2. Go to google account >> 2-step verification >> turn on 2-step verification
  3. setup whatever 2FA you prefer
  4. create an app password https://myaccount.google.com/u/7/apppasswords explained at https://support.google.com/accounts/answer/185833?hl=en
  5. 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

About

Near real time maps and sea surface visualisations for TurboMix

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published