Skip to content

Commit

Permalink
Docstring clarity, return None date test
Browse files Browse the repository at this point in the history
  • Loading branch information
blimlim committed Sep 18, 2024
1 parent e039ff7 commit e9d0d79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions test/test_conversion_driver_esm1p5.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ def test_get_esm1p5_fields_file_pattern_wrong_id_length(run_id):
Path("./netCDF"),
Path("./netCDF/aiihca.pj-012001_6hr.nc")
),
(
Path("abc/aiihca.pjc0jan"),
None,
Path("./netCDF"),
Path("./netCDF/aiihca.pjc0jan.nc")
),
])
def test_get_nc_write_path_recognized_unit(ff_path, ff_date,
nc_write_dir, expected):
Expand Down
5 changes: 2 additions & 3 deletions umpost/conversion_driver_esm1p5.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
ARG_VALS = ARG_NAMES(3, 4, True, False, 0.5, False, None, None, False, False)



# Character in filenames specifying the unit key
FF_UNIT_INDEX = 8
# Output file suffix for each type of unit. Assume's
Expand Down Expand Up @@ -132,8 +131,8 @@ def get_nc_filename(fields_file_name, date=None):
Parameters
----------
fields_file_name: name of fields file to be converted.
date: tuple of form (year, month, day) associated with fields file data.
If no date supplied, ".nc" will concatenated to the original fields
date: tuple of form (year, month, day) associated with fields file data,
or None. If None, ".nc" will concatenated to the original fields
file name.
Returns
Expand Down

0 comments on commit e9d0d79

Please sign in to comment.