Skip to content

Commit

Permalink
env and local proc
Browse files Browse the repository at this point in the history
  • Loading branch information
callumrollo committed May 10, 2024
1 parent 42021b0 commit 4f7c6e2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
6 changes: 6 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@ dependencies:
- pandas
- tqdm
- geopy
- pyaml
- ioos_qc
- polars
- scikit-learn
- plotly
- pyarrow
7 changes: 6 additions & 1 deletion glidertools_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def public_plots(nc, plots_dir):
end = pd.to_datetime(ds.time.max().values)
ds = ds.sel(time=slice(end - datetime.timedelta(days=60), end))
# Apply flags from ioos
ds = apply_flags(ds, var_max_flags={"oxygen_concentration": 4, "cdom": 3})
ds = apply_flags(ds, var_max_flags={"oxygen_concentration": 4, "cdom": 4})
# Prepare a variable of averaged time per profile. This is used in plotting later
profile_time = ds.time.values.copy()
profile_index = ds.profile_index
Expand Down Expand Up @@ -73,3 +73,8 @@ def public_plots(nc, plots_dir):
plt.tight_layout()
filename = plots_dir / f'SEA{ds.glider_serial}_M{ds.deployment_id}_gt.png'
plt.savefig(filename, format='png', transparent=True)


if __name__ == '__main__':
from pathlib import Path
public_plots(Path("/data/data_l0_pyglider/nrt/SEA76/M25/timeseries/mission_timeseries.nc"), Path("/home/callum/Downloads"))
5 changes: 5 additions & 0 deletions gridded_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,8 @@ def make_map(nc, filename):
_log.info(f"writing map to {filename_map}")
fig.savefig(filename_map, format='png', transparent=True)
return filename_map



if __name__ == '__main__':
create_plots(Path("/data/data_l0_pyglider/nrt/SEA76/M25/gridfiles/mission_grid.nc"), Path("/home/callum/Downloads"), True)
2 changes: 1 addition & 1 deletion pilot_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ def battery_plots(combined_nav_file, out_dir):

if __name__ == '__main__':
from pathlib import Path
battery_plots(Path('/data/data_l0_pyglider/nrt/SEA76/M25/rawnc/Fibbla-rawgli.parquet'), '.')
battery_plots(Path('/data/data_l0_pyglider/nrt/SEA63/M73/rawnc/Fibbla-rawgli.parquet'), '.')
13 changes: 0 additions & 13 deletions requirements.txt

This file was deleted.

0 comments on commit 4f7c6e2

Please sign in to comment.