diff --git a/parm/data_locations.yml b/parm/data_locations.yml index 3b57850925..4cbe8afc29 100644 --- a/parm/data_locations.yml +++ b/parm/data_locations.yml @@ -275,6 +275,17 @@ NAM: fcst: - nam.t{hh}z.awphys{fcst_hr:02d}.tm00.grib2 +UFS-CASE-STUDY: + aws: + protocol: download + url: "https://ufs-case-studies.s3.amazonaws.com/" + file_names: &ufs_file_names + nemsio: + anl: + - "{yyyymmddhh}.gfs.nemsio.tar.gz" + fcst: + - "{yyyymmddhh}_bc.atmf{fcst_hr:03d}.nemsio.tar.gz" + ########################## ########################## ### Observation Data ### diff --git a/ush/retrieve_data.py b/ush/retrieve_data.py index d0ba405017..cd94989df4 100755 --- a/ush/retrieve_data.py +++ b/ush/retrieve_data.py @@ -950,6 +950,7 @@ def parse_args(argv): "RAP_obs", "HRRRx", "GSI-FIX", + "UFS-CASE-STUDY" ), help="External model label. This input is case-sensitive", required=True, diff --git a/ush/test_retrieve_data.py b/ush/test_retrieve_data.py index 85e9b2860d..8899270d09 100644 --- a/ush/test_retrieve_data.py +++ b/ush/test_retrieve_data.py @@ -344,3 +344,61 @@ def test_rap_lbcs_from_aws(self): path = os.path.join(tmp_dir, "*") files_on_disk = glob.glob(path) self.assertEqual(len(files_on_disk), 5) + + def test_ufs_ics_from_aws(self): + + """Get UFS-CASE-STUDY ICS from aws""" + + with tempfile.TemporaryDirectory(dir=".") as tmp_dir: + + # fmt: off + args = [ + '--file_set', 'anl', + '--config', self.config, + '--cycle_date', '2020072300', + '--data_stores', 'aws', + '--external_model', 'UFS-CASE-STUDY', + '--fcst_hrs', '0', + '--output_path', tmp_dir, + '--ics_or_lbcs', 'ICS', + '--debug', + '--file_type', 'nemsio', + ] + # fmt: on + + retrieve_data.main(args) + + # Verify files exist in temp dir + + path = os.path.join(tmp_dir, "*") + files_on_disk = glob.glob(path) + self.assertEqual(len(files_on_disk), 1) + + def test_ufs_lbcs_from_aws(self): + + """Get UFS-CASE-STUDY LBCS from aws for 3 hour boundary conditions""" + + with tempfile.TemporaryDirectory(dir=".") as tmp_dir: + + # fmt: off + args = [ + '--file_set', 'fcst', + '--config', self.config, + '--cycle_date', '2020072300', + '--data_stores', 'aws', + '--external_model', 'UFS-CASE-STUDY', + '--fcst_hrs', '3', '6', '3', + '--output_path', tmp_dir, + '--ics_or_lbcs', 'LBCS', + '--debug', + '--file_type', 'nemsio', + ] + # fmt: on + + retrieve_data.main(args) + + # Verify files exist in temp dir + + path = os.path.join(tmp_dir, "*") + files_on_disk = glob.glob(path) + self.assertEqual(len(files_on_disk), 2)