Skip to content

Commit

Permalink
Work in progress.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonpf committed Aug 27, 2024
1 parent 6cf7d87 commit 7da357e
Show file tree
Hide file tree
Showing 14 changed files with 1,317 additions and 55 deletions.
4 changes: 4 additions & 0 deletions scripts/extract_wegener_net_collocations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#1/bin/bash

echo "Extracting data for year $1 and month $2."
speed extract_data gmi wegener_net /xdata/simon/raw/gmi/wegener_net/ $1 $2
8 changes: 5 additions & 3 deletions speed/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import click

import speed.logging
from speed.data import cpcir, goes
from speed.data import cpcir, goes, ancillary

LOGGER = logging.getLogger(__file__)

Expand Down Expand Up @@ -62,6 +62,7 @@ def extract_data(
import speed.data.gpm_gv
import speed.data.combined
import speed.data.noaa
import speed.data.wegener_net

input_dataset = get_input_dataset(input_data)
if input_dataset is None:
Expand Down Expand Up @@ -395,13 +396,13 @@ def extract_evaluation_data(

times_on_swath = {}
for f_on_swath in files_on_swath:
time_str = f_on_swath.name.split("_")[2][:-3]
time_str = f_on_swath.name.split("_")[-1][:-3]
median_time = datetime.strptime(time_str, "%Y%m%d%H%M%S")
times_on_swath[median_time] = f_on_swath

times_gridded = {}
for f_gridded in files_gridded:
time_str = f_gridded.name.split("_")[2][:-3]
time_str = f_gridded.name.split("_")[-1][:-3]
median_time = datetime.strptime(time_str, "%Y%m%d%H%M%S")
times_gridded[median_time] = f_gridded

Expand Down Expand Up @@ -433,3 +434,4 @@ def extract_evaluation_data(
cli.add_command(extract_evaluation_data, name="extract_evaluation_data")
cli.add_command(cpcir.cli, name="extract_cpcir_obs")
cli.add_command(goes.cli, name="extract_goes_obs")
cli.add_command(ancillary.cli, name="add_ancillary_data")
Loading

0 comments on commit 7da357e

Please sign in to comment.