tfv-get-tools 0.2.2__tar.gz → 0.2.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. {tfv_get_tools-0.2.2/src/tfv_get_tools.egg-info → tfv_get_tools-0.2.4}/PKG-INFO +1 -1
  2. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/pyproject.toml +1 -1
  3. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/cli/_cli_base.py +6 -2
  4. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/cli/atmos_cli.py +2 -2
  5. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/ocean/hycom.py +11 -5
  6. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/era5.py +1 -1
  7. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4/src/tfv_get_tools.egg-info}/PKG-INFO +1 -1
  8. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/LICENSE +0 -0
  9. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/README.md +0 -0
  10. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/setup.cfg +0 -0
  11. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/__init__.py +0 -0
  12. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/_standard_attrs.py +0 -0
  13. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/atmos.py +0 -0
  14. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/cli/ocean_cli.py +0 -0
  15. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/cli/tide_cli.py +0 -0
  16. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/cli/wave_cli.py +0 -0
  17. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/fvc/__init__.py +0 -0
  18. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/fvc/_atmos.py +0 -0
  19. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/fvc/_fvc.py +0 -0
  20. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/fvc/_ocean.py +0 -0
  21. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/fvc/_tide.py +0 -0
  22. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/ocean.py +0 -0
  23. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/__init__.py +0 -0
  24. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/_custom_conversions.py +0 -0
  25. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/_downloader.py +0 -0
  26. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/_merger.py +0 -0
  27. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/_utilities.py +0 -0
  28. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/atmos/barra2.py +0 -0
  29. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/atmos/cfgs/barra2_c2.yaml +0 -0
  30. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/atmos/cfgs/barra2_r2.yaml +0 -0
  31. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/atmos/cfgs/barra2_re2.yaml +0 -0
  32. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/atmos/cfgs/cfsr.yaml +0 -0
  33. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/atmos/cfgs/era5.yaml +0 -0
  34. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/atmos/cfgs/era5_gcp.yaml +0 -0
  35. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/atmos/cfsr.py +0 -0
  36. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/atmos/era5.py +0 -0
  37. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/atmos/era5_gcp.py +0 -0
  38. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/ocean/cfgs/copernicus_blk.yaml +0 -0
  39. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/ocean/cfgs/copernicus_glo.yaml +0 -0
  40. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/ocean/cfgs/copernicus_nws.yaml +0 -0
  41. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/ocean/cfgs/hycom.yaml +0 -0
  42. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/ocean/copernicus_ocean.py +0 -0
  43. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/cawcr.py +0 -0
  44. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/cfgs/cawcr_aus_10m.yaml +0 -0
  45. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/cfgs/cawcr_aus_4m.yaml +0 -0
  46. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/cfgs/cawcr_glob_24m.yaml +0 -0
  47. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/cfgs/cawcr_pac_10m.yaml +0 -0
  48. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/cfgs/cawcr_pac_4m.yaml +0 -0
  49. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/cfgs/copernicus_glo.yaml +0 -0
  50. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/cfgs/copernicus_nws.yaml +0 -0
  51. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/cfgs/era5.yaml +0 -0
  52. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/cfgs/era5_gcp.yaml +0 -0
  53. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/copernicus_wave.py +0 -0
  54. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/providers/wave/era5_gcp.py +0 -0
  55. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/tide/__init__.py +0 -0
  56. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/tide/_nodestring.py +0 -0
  57. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/tide/_tidal_base.py +0 -0
  58. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/utilities/_tfv_bc.py +0 -0
  59. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/utilities/horizontal_padding.py +0 -0
  60. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/utilities/land_masking.py +0 -0
  61. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/utilities/parsers.py +0 -0
  62. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/utilities/warnings.py +0 -0
  63. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools/wave.py +0 -0
  64. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools.egg-info/SOURCES.txt +0 -0
  65. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools.egg-info/dependency_links.txt +0 -0
  66. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools.egg-info/entry_points.txt +0 -0
  67. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools.egg-info/requires.txt +0 -0
  68. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/src/tfv_get_tools.egg-info/top_level.txt +0 -0
  69. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/tests/test_all_downloaders.py +0 -0
  70. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/tests/test_cli_get_atmos.py +0 -0
  71. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/tests/test_downloader.py +0 -0
  72. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/tests/test_era5_merger.py +0 -0
  73. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/tests/test_frontend_python_api.py +0 -0
  74. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/tests/test_mergers.py +0 -0
  75. {tfv_get_tools-0.2.2 → tfv_get_tools-0.2.4}/tests/test_tide_extraction.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tfv_get_tools
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: Tool for downloading and processing data for TUFLOW FV modelling
5
5
  Author-email: Alex Waterhouse <alex.waterhouse@apac.bmt.org>, Mitchell Smith <mitchell.smith@apac.bmt.org>, TUFLOW Support <support@tuflow.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "tfv_get_tools"
3
- version = "0.2.2"
3
+ version = "0.2.4"
4
4
  description = "Tool for downloading and processing data for TUFLOW FV modelling"
5
5
  authors = [
6
6
  { name = "Alex Waterhouse", email = "alex.waterhouse@apac.bmt.org" },
@@ -137,15 +137,19 @@ class CLIBase(ABC):
137
137
 
138
138
  def check_bbox(args):
139
139
  """
140
- Unfortunate edge case hackfix for programmer style floats like "-28." isntead of "-28.0".
140
+ Unfortunate edge case hackfix for programmer style floats like "-28." instead of "-28.0".
141
141
  Fixes negative numbers with trailing dots in the final 4 arguments (bbox).
142
142
  Only modifies if all 4 final args are numeric-like!!
143
143
  Otherwise spits fire
144
- """
144
+ """
145
145
  # Early exit if only 1 or 2 args are provided - or --help / -h
146
146
  if len(args) == 1 or len(args) == 2 or (len(args) >= 2 and (('-h' in args) or ('--help' in args))):
147
147
  return args
148
148
 
149
+ # Skip argument manipulation if we're on the Merger or the INFO
150
+ if args[1] in ['B', 'info']:
151
+ return args
152
+
149
153
  if (len(args) < 4):
150
154
  raise ValueError("Must supply at minimum 6 arguments - time_start time_end xmin xmax ymin ymax")
151
155
 
@@ -53,10 +53,10 @@ def print_atmos_info():
53
53
  Merge ERA5 Reanalysis Data - all defaults, merge all data in the raw folder
54
54
  `GetAtmos B`
55
55
 
56
- Download BARRA2 C2 Dataset
56
+ Download BARRA2 R2 Dataset
57
57
  `GetAtmos A -s BARRA2 -m R2 2011-01-01 2012-01-01 150 153 -30 -25`
58
58
 
59
- Merge BARRA2 C2 Dataset with reprojection and local time
59
+ Merge BARRA2 R2 Dataset with reprojection and local time
60
60
  `GetAtmos B -s BARRA2 -m R2 -tz 10 -ltz AEST -rp 7856`
61
61
 
62
62
  For more specific help, please use:
@@ -516,7 +516,7 @@ class MergeHYCOM(BaseMerger):
516
516
 
517
517
  if time_vars:
518
518
  # Create single rolling object and apply to all variables
519
- rolling_ds = ds[time_vars].rolling(time=25, center=True).reduce(np.nanmean)
519
+ rolling_ds = ds[time_vars].rolling(time=25, center=True, min_periods=1).reduce(np.nanmean)
520
520
 
521
521
  for var_name in time_vars:
522
522
  # Only replace post-cutoff values
@@ -572,10 +572,10 @@ class MergeHYCOM(BaseMerger):
572
572
  if all_datasets and self._check_sub_daily_data(all_datasets[0]):
573
573
  apply_tidal_filtering = True
574
574
 
575
- if self.verbose:
576
- print("Concatenating and interpolating xarray dataset")
577
- if has_post_cutoff_data and apply_tidal_filtering:
578
- print('... Dataset contains sub-daily data post-2024-08-10 (HYCOM ESPC-D-V02), applying tidal filtering.')
575
+ print("Concatenating and interpolating xarray dataset")
576
+ if has_post_cutoff_data and apply_tidal_filtering:
577
+ print('... Dataset contains sub-daily data post-2024-08-10 (HYCOM ESPC-D-V02), applying tidal filtering using a simple 25h rolling mean.')
578
+ print('... Warning: Your dataset should be padded at least 1 full day either side before using in TUFLOW FV.')
579
579
 
580
580
  # Merge variables for each start date group
581
581
  merged_by_date = []
@@ -600,7 +600,13 @@ class MergeHYCOM(BaseMerger):
600
600
 
601
601
  # Apply tidal filtering to the merged dataset if needed
602
602
  if apply_tidal_filtering:
603
+ # Copy the original surface elevation data to a raw variable for later
604
+ raw_surf_el = merged['surf_el'].copy()
603
605
  merged = self._apply_tidal_filtering(merged)
606
+
607
+ # Copy original surface elevation
608
+ merged['raw_surf_el'] = raw_surf_el
609
+ merged['raw_surf_el'].attrs['note'] = 'Original HYCOM water-level containing tides after 2024-08-10'
604
610
 
605
611
  # Final cleanup
606
612
  merged = merged.rename({'lon': 'longitude', 'lat': 'latitude'})
@@ -147,7 +147,7 @@ class DownloadERA5Wave(BaseDownloader):
147
147
  raise ValueError("No NetCDF files found in zip archive")
148
148
 
149
149
  # Combine all datasets
150
- ds = xr.merge(datasets)
150
+ ds = xr.merge(datasets, compat='override')
151
151
  ds.to_netcdf(file_path_out)
152
152
 
153
153
  # Delete the zip file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tfv_get_tools
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: Tool for downloading and processing data for TUFLOW FV modelling
5
5
  Author-email: Alex Waterhouse <alex.waterhouse@apac.bmt.org>, Mitchell Smith <mitchell.smith@apac.bmt.org>, TUFLOW Support <support@tuflow.com>
6
6
  License: MIT
File without changes
File without changes
File without changes