Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/tutorials/ADCP_data_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
" {\"long_name\": \"distance to coast\", \"units\": \"m\", \"positive\": \"shoreward\"}\n",
")\n",
"peru = peru.set_coords(\"s\").sortby(\"s\")\n",
"print(f\"max distance from coast: {abs(peru.s.min()).data/1000:.2f} km\")"
"print(f\"max distance from coast: {abs(peru.s.min()).data / 1000:.2f} km\")"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/CTD_data_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,12 @@
"source": [
"# Fill the dataset with values from the csv files.\n",
"for ob in range(5): # loop through files\n",
" header = pd.read_csv(f\"Japan/CTD_Japan_station_{ob+1}.csv\", nrows=7, header=None)\n",
" header = pd.read_csv(f\"Japan/CTD_Japan_station_{ob + 1}.csv\", nrows=7, header=None)\n",
" ctd.lon[ob] = header.iloc[0, 1]\n",
" ctd.lat[ob] = header.iloc[1, 1]\n",
" ctd.start_time[ob] = header.iloc[2, 1]\n",
" ctd.end_time[ob] = header.iloc[3, 1]\n",
" data = pd.read_csv(f\"Japan/CTD_Japan_station_{ob+1}.csv\", skiprows=4)\n",
" data = pd.read_csv(f\"Japan/CTD_Japan_station_{ob + 1}.csv\", skiprows=4)\n",
" ctd.P[:, ob] = data[\"pressure [hPa]\"]\n",
" ctd.T[:, ob] = data[\"temperature [degC]\"]\n",
" ctd.S[:, ob] = data[\"salinity [g kg-1]\"]"
Expand Down
133 changes: 133 additions & 0 deletions docs/user-guide/tutorials/Argo_data_tutorial.ipynb

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/virtualship/instruments/argo_float.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ def simulate_argo_floats(
)

# define output file for the simulation
out_file = argo_float_particleset.ParticleFile(name=out_path, outputdt=outputdt)
out_file = argo_float_particleset.ParticleFile(
name=out_path, outputdt=outputdt, chunks=[len(argo_float_particleset), 100]
)

# get earliest between fieldset end time and provide end time
fieldset_endtime = fieldset.time_origin.fulltime(fieldset.U.grid.time_full[-1])
Expand Down