Update: Argo Canada Surfacing Times

An update on “randomizing” surfacing times ahead of the Argo Steering Team meeting.

Christopher Gordon https://github.com/cgrdn
2024-03-11

This post is a simplified update of a previous post, Diversifying Argo Surfacing Times ahead of the AST. We will use the latest Argo index file to check on local surfacing times of Argo Canada floats, broken down by float type. Python code can be expanded to show each step.

Show code
import pandas as pd

import matplotlib.pyplot as plt
import seaborn as sns
sns.set(style="ticks", palette="colorblind")

# load the global index
global_index = pd.read_csv(
  "ftp://ftp.ifremer.fr/ifremer/argo/ar_index_global_prof.txt.gz", 
  compression="gzip", header=8
)
# subset to only the MEDS DAC, profiles with valid dates
meds = global_index.loc[global_index.file.str.contains('meds')]
meds = meds.loc[meds.date.notna()]

# convert date to pandas timestamps, take only profiles from the last 3 years
meds["date"] = meds.date.astype(str)\
  .apply(lambda x: x.replace(".0", ""))\
  .apply(pd.Timestamp, tz="utc")
meds = meds.loc[meds.date > pd.Timestamp("01-2022", tz="utc")]

For each float type, different methods can be used depending on the float mission parameter set to vary the surfacing time of day. Argo Canada currently operates 4 kinds of floats: MetOcean NOVA, NKE ARVOR (SBE and RBR), NKE PROVOR (CTS4 and CTS5 - different operating systems), and NKE deep ARVOR.

Show code
import timezonefinder
tf = timezonefinder.TimezoneFinder()
import pytz

profiler_type = {
    "865":"NOVA",
    "843":"POPS",
    "844":"ARVOR_SBE",
    "846":"APEX",
    "878":"ARVOR_RBR",
    "838":"ARVOR_DEEP",
    "836":"PROVOR_CTS4",
    "834":"PROVOR_CTS5",
}

# exclude invalid locations
meds = meds.loc[(meds.latitude.notna()) & (meds.longitude.notna())]

# get timezone, local time, and hour at surface for each profile
meds["timezone"] = [
  pytz.timezone(tf.certain_timezone_at(lat=lat, lng=lon))\
  for lat, lon in zip(meds.latitude, meds.longitude)
]
meds["local_time"] = [utc_time.tz_convert(tz) for utc_time, tz in zip(meds.date, meds.timezone)]
meds["surface_hour"] = [local_time.hour + 0.5 for local_time in meds.local_time]

# add a column for WMO number as well as platform name
meds["WMO"] = [int(s.split("/")[1]) for s in meds.file]
meds["cycle"] = [int(s.split("_")[1].split('.')[0].replace('D','')) for s in meds.file]
meds["platform"] = [profiler_type[f"{p}"] for p in meds.profiler_type]
# create column for profile year
meds["year"] = [d.year for d in meds.local_time]
sub = meds.loc[meds.year > 2022]

The plot below shows a histogram of Argo Canada profiles in 2023 and 2024.

Show code
# create a FacetGrid that will plot by year, 2022, 2023
g = sns.displot(
  sub, x="surface_hour", col="year", hue="platform", 
  kind="hist", bins=list(range(24)), multiple="stack", 
  facet_kws=dict(despine=False, sharey=False)
)
g.fig.set_dpi(300)
g.fig.set_constrained_layout(True)
plt.show()

Finally, we use the code below to check if any floats, excluding NOVA floats, have a low standard deviation of surfacing times.

Show code
meds = meds.loc[meds.platform != "NOVA"]
for wmo in meds["WMO"].unique():
  if meds.loc[meds.WMO == wmo].surface_hour.std() < 4:
    print(
        meds.loc[meds.WMO == wmo].platform.iloc[0],
        wmo, 
        f"{meds.loc[meds.WMO == wmo].cycle.iloc[-1]:d}\t",
        f"{meds.loc[meds.WMO == wmo].surface_hour.std():.1f}",
        meds.loc[meds.WMO == wmo].date.iloc[-1],
        meds.loc[meds.WMO == wmo].timezone.iloc[0]
    )
ARVOR_SBE 4902581 1  1.4 2022-05-19 08:50:00+00:00 Etc/GMT+4
ARVOR_SBE 4902610 2  2.9 2023-10-01 01:27:00+00:00 Etc/GMT+9
ARVOR_DEEP 4902631 5     2.4 2024-06-16 14:30:00+00:00 Etc/GMT+10
ARVOR_DEEP 4902633 41    2.3 2024-06-12 14:26:00+00:00 Etc/GMT+10
ARVOR_DEEP 4902638 14    1.7 2024-06-13 13:52:00+00:00 Etc/GMT+4
ARVOR_DEEP 4902639 14    1.2 2024-06-13 10:36:00+00:00 Etc/GMT+4
PROVOR_CTS5 4902686 32   0.2 2024-06-14 15:44:00+00:00 Etc/GMT+3
PROVOR_CTS5 4902687 28   0.0 2024-06-14 15:36:00+00:00 Etc/GMT+3
PROVOR_CTS5 4902688 23   0.0 2024-06-14 15:40:00+00:00 Etc/GMT+3

The only floats that show up are two ARVOR floats that failed after 1-2 profiles and the deep floats that define cycle time as an integer number of days.

Citation

For attribution, please cite this work as

Gordon (2024, March 11). Argo Canada Development Blog: Update: Argo Canada Surfacing Times. Retrieved from https://argocanada.github.io/blog/posts/2024-03-11-update-argo-canada-surfacing-times/

BibTeX citation

@misc{gordon2024update:,
  author = {Gordon, Christopher},
  title = {Argo Canada Development Blog: Update: Argo Canada Surfacing Times},
  url = {https://argocanada.github.io/blog/posts/2024-03-11-update-argo-canada-surfacing-times/},
  year = {2024}
}