Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Feat) add anmn hourly timeseries handler #7

Merged
merged 1 commit into from
May 8, 2024
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
24 changes: 24 additions & 0 deletions aodn_cloud_optimised/bin/anmn_hourly_timeseries.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env python3
import importlib.resources

from aodn_cloud_optimised.lib.CommonHandler import cloud_optimised_creation_loop
from aodn_cloud_optimised.lib.config import load_variable_from_config, load_dataset_config
from aodn_cloud_optimised.lib.s3Tools import s3_ls
from aodn_cloud_optimised.lib.AnmnHourlyTsHandler import AnmnHourlyTsHandler

if __name__ == "__main__":

BUCKET_RAW_DEFAULT = load_variable_from_config('BUCKET_RAW_DEFAULT')

nc_obj_ls = s3_ls(BUCKET_RAW_DEFAULT, 'IMOS/ANMN/NSW') + \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lbesnard Missing 'IMOS/ANMN/NRS' prefix here! (The National Referece Stations -- quite important IMOS data)

s3_ls(BUCKET_RAW_DEFAULT, 'IMOS/ANMN/PA') + \
s3_ls(BUCKET_RAW_DEFAULT, 'IMOS/ANMN/QLD') + \
s3_ls(BUCKET_RAW_DEFAULT, 'IMOS/ANMN/SA') + \
s3_ls(BUCKET_RAW_DEFAULT, 'IMOS/ANMN/WA')

nc_obj_ls = [s for s in nc_obj_ls if ('_hourly-timeseries_' in s) and ('FV02' in s)]
dataset_config = load_dataset_config(str(importlib.resources.path("aodn_cloud_optimised.config.dataset", "anmn_hourly_timeseries.json")))

cloud_optimised_creation_loop(nc_obj_ls,
dataset_config=dataset_config,
handler_class=AnmnHourlyTsHandler)
Loading
Loading