Using python and github actions to automatically reprogram PROVOR surfacing times.
This post is analogous to a presentation made at the 24th Argo Data Management Team meeting which can be found here.
Argo floats have operated on, and been well served by, a 10-day cycle since its inception in the late 1990’s. Recently, however, it has been recommended that Argo floats begin to operate on near but not exact 10-day cycles in order to reduce biases. Reducing these biases is important to calculations of ocean heat content (Gille (2012), von Schuckmann et al. 2020) as well as primary productivity via biogeochemcial variables (Johnson & Bif 2021, Stoer & Fennel 2022).
Argo Canada has made a significant effort to ensure good time-of-day coverage from its floats in the last 2 years (read more: Diversifying Argo Surfacing Times). As part of that effort, a protocol using python and github actions was developed to update the surfacing time of NKE PROVOR floats after each cycle.
Unlike many other floats, PROVOR floats use a time of day parameter along with cycle time to determine their surfacing time. With other floats, setting the cycle time to say, 10 days plus 5 hours, would result in a different surfacing time with each cycle. With PROVOR floats however, because the time of day parameter controls the surfacing time, it must be updated after each cycle in order to achieve good time of day coverage throughout the lifetime of the float. This parameter can be reprogrammed remotely, but doing so manually quickly becomes impossible to manage for even a few different PROVOR floats.
Fortunately the method for reprogramming a PROVOR float is to upload a text file to the remote command directory of that float’s RUDICS FTP server, where the float’s data also arrives. This means the problem is well suited to be solved programatically.
The following pseudocode outlines a script that runs once per day via github actions:
1Log in credentials are stored using github secrets, which allow you to securely call the stored variables within a github action without worry of data leaks
2The method of deciding the next target time may be defined by the user, but by default is a simple delta (ex. most recent time minus 5 hours). See next section for details
3Logged information uses the float’s IMEI number, which is how the directories are defined by default. The command files are also archived. Example log: [2023-10-18] Updated 300125061656740 surfacing time from 4 to 23
So far, Argo Canada has been operating its PROVOR floats by making the surface time 5 hours earlier than the previous one. This effectively results in a 235 hour cycle. This choice of cycle time was made as (1) it provides good time of day coverage, (2) it was suggested by the manufacturer that slightly reducing cycle time rather than slightly increasing it may better maximize the float’s battery life in terms of number of completed cycles, and (3) Argo Canada is not currently operating any floats that are equipped with radiometry sensors.
For floats that have radiometry sensors, it is best to sample at local noon. To both comply with varying time of day and operate the float to more frequently profile at local noon time, the user can define for example a list of times for the float to cycle through that includes extra noon time profiles.
To demonstrate the results of this code, the figures below show the distribution of PROVOR surfacing times for the last 3 years, and an example of the surfacing times of one float deployed in 2022.
I believe for PROVOR CTS5 floats, this will still be necessary (though I don’t know for sure). Argo Canada (Dalhousie University) will be deploying this type of float in the near furure, so the next priority will be to implement commands in the style/language of the new firmware.
Additionally, although this routine was built to automate PROVOR surfacing time of day, there could be many uses to automatically updating mission parameters of any type of float. Off the top of my head - though so of these may be possible within a float’s existing firmware. Of course I would not encourage anything outside the Argo mission :).
For attribution, please cite this work as
Gordon (2023, Oct. 18). Argo Canada Development Blog: Automated Updates for NKE PROVOR Surfacing Times. Retrieved from https://argocanada.github.io/blog/posts/2023-10-18-automated-updates-for-nke-provor-surfacing-times/
BibTeX citation
@misc{gordon2023automated, author = {Gordon, Christopher}, title = {Argo Canada Development Blog: Automated Updates for NKE PROVOR Surfacing Times}, url = {https://argocanada.github.io/blog/posts/2023-10-18-automated-updates-for-nke-provor-surfacing-times/}, year = {2023} }