Skip to content

Commit

Permalink
Debug GGG2014 profiles downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
dostuffthatmatters committed Feb 29, 2024
1 parent 9f80286 commit 5dd7d67
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
8 changes: 6 additions & 2 deletions src/profiles/download_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def download_data(
tarballs_on_server = ftp.nlst("upload/modfiles/tar/maps"
) + ftp.nlst("upload/modfiles/tar/mods")

# GGG2014: /upload/modfiles/tar/mods/mods_48N011E_20231211_20231217.tar
# GGG2020: /ginput-jobs/job_000034641_tu_48.00N_12.00E_20221001-20221008.tgz

fulfilled_queries: list[types.DownloadQuery] = []
Expand All @@ -30,12 +31,15 @@ def download_data(
for query in progress.track(queries, description=f"Downloading ..."):
progress.print(f"Downloading {query}")

cs = utils.text.get_coordinates_slug(
cs_verbose = utils.text.get_coordinates_slug(
query.lat, query.lon, verbose=True
)
cs_nonverbose = utils.text.get_coordinates_slug(
query.lat, query.lon, verbose=False
)
ds = query.from_date.strftime("%Y%m%d")
tarballs_to_download = [
t for t in tarballs_on_server if f"{cs}_{ds}" in t
t for t in tarballs_on_server if ((f"{cs_verbose}_{ds}" in t) or (f"{cs_nonverbose}_{ds}" in t))
]
if atmospheric_profile_model == "GGG2020":
if len(tarballs_to_download) >= 1:
Expand Down
14 changes: 8 additions & 6 deletions src/profiles/generate_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,15 @@ def generate_download_queries(
requested_data=requested_data,
downloaded_data=downloaded_data,
)
data_to_request = remove_std_site_data(
config=config,
missing_data=remove_already_requested_data(
missing_data=missing_data,
atmospheric_profile_model=atmospheric_profile_model,
data_to_request = missing_data
if atmospheric_profile_model == "GGG2020":
data_to_request = remove_std_site_data(
config=config,
missing_data=remove_already_requested_data(
missing_data=missing_data,
atmospheric_profile_model=atmospheric_profile_model,
)
)
)
download_queries: list[types.DownloadQuery] = []
for l, dates in data_to_request.items():
download_queries.extend([
Expand Down

0 comments on commit 5dd7d67

Please sign in to comment.