Skip to content

Commit

Permalink
Fixed a couple of issues relating to changing from coords => coord in…
Browse files Browse the repository at this point in the history
… search (forgot to test)
  • Loading branch information
charles-turner-1 committed Sep 27, 2024
1 parent 7799c8d commit e6590c9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/access_nri_intake/source/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class _AccessNCFileInfo:
variable_standard_name: list[str]
variable_cell_methods: list[str]
variable_units: list[str]
coords: list[str]
coord: list[str]
coord_long_name: list[str]
coord_cartesian_axes: list[str]
coord_calendar_types: list[str]
Expand Down
38 changes: 19 additions & 19 deletions tests/test_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def test_parse_access_filename(builder, filename, expected):
variable_cell_methods=["time: point", "time: point"],
variable_units=["degrees_N", "degrees_E"],
coord_long_name=["tcell longitude", "tcell latitude"],
coords=["xt_ocean", "yt_ocean"],
coord=["xt_ocean", "yt_ocean"],
coord_cartesian_axes=["X", "Y"],
coord_calendar_types=["", ""],
coord_bounds=["", ""],
Expand All @@ -402,7 +402,7 @@ def test_parse_access_filename(builder, filename, expected):
variable_standard_name=["sea_water_conservative_temperature", ""],
variable_cell_methods=["time: mean", ""],
variable_units=["K", "days"],
coords=["nv", "st_ocean", "time", "xt_ocean", "yt_ocean"],
coord=["nv", "st_ocean", "time", "xt_ocean", "yt_ocean"],
coord_long_name=[
"vertex number",
"tcell zstar depth",
Expand Down Expand Up @@ -444,7 +444,7 @@ def test_parse_access_filename(builder, filename, expected):
],
variable_cell_methods=["time: mean", ""],
variable_units=["m", "days"],
coords=["nv", "time", "xt_ocean", "yt_ocean"],
coord=["nv", "time", "xt_ocean", "yt_ocean"],
coord_long_name=[
"vertex number",
"time",
Expand Down Expand Up @@ -480,7 +480,7 @@ def test_parse_access_filename(builder, filename, expected):
],
variable_cell_methods=["time: mean"],
variable_units=["m"],
coords=["time", "xt_ocean", "yt_ocean"],
coord=["time", "xt_ocean", "yt_ocean"],
coord_long_name=["time", "tcell longitude", "tcell latitude"],
coord_cartesian_axes=["T", "X", "Y"],
coord_calendar_types=["NOLEAP", "", ""],
Expand Down Expand Up @@ -520,7 +520,7 @@ def test_parse_access_filename(builder, filename, expected):
"m^2",
"days since 1900-01-01 00:00:00",
],
coords=["time"],
coord=["time"],
coord_long_name=["model time"],
coord_cartesian_axes=[""],
coord_calendar_types=[""],
Expand All @@ -544,7 +544,7 @@ def test_parse_access_filename(builder, filename, expected):
variable_standard_name=["air_temperature"],
variable_cell_methods=["time: mean"],
variable_units=["K"],
coords=[],
coord=[],
coord_long_name=[],
coord_cartesian_axes=[],
coord_calendar_types=[],
Expand Down Expand Up @@ -580,7 +580,7 @@ def test_parse_access_filename(builder, filename, expected):
"m^2",
"days since 1850-01-01 00:00:00",
],
coords=["time"],
coord=["time"],
coord_long_name=["model time"],
coord_cartesian_axes=[""],
coord_calendar_types=[""],
Expand All @@ -604,7 +604,7 @@ def test_parse_access_filename(builder, filename, expected):
variable_standard_name=["sea_surface_temperature", ""],
variable_cell_methods=["time: mean", ""],
variable_units=["K", "days"],
coords=["nv", "time", "xt_ocean", "yt_ocean"],
coord=["nv", "time", "xt_ocean", "yt_ocean"],
coord_long_name=[
"vertex number",
"time",
Expand Down Expand Up @@ -641,7 +641,7 @@ def test_parse_access_filename(builder, filename, expected):
variable_standard_name=["sea_water_potential_temperature", ""],
variable_cell_methods=["time: mean", ""],
variable_units=["deg_C", "days"],
coords=["nv", "scalar_axis", "time"],
coord=["nv", "scalar_axis", "time"],
coord_long_name=["vertex number", "none", "time"],
coord_cartesian_axes=["N", "X", "T"],
coord_calendar_types=["", "", "GREGORIAN"],
Expand All @@ -665,7 +665,7 @@ def test_parse_access_filename(builder, filename, expected):
variable_standard_name=["air_temperature"],
variable_cell_methods=["time: mean"],
variable_units=["K"],
coords=[],
coord=[],
coord_long_name=[],
coord_cartesian_axes=[],
coord_calendar_types=[],
Expand Down Expand Up @@ -701,7 +701,7 @@ def test_parse_access_filename(builder, filename, expected):
"m^2",
"days since 0001-01-01 00:00:00",
],
coords=["time"],
coord=["time"],
coord_long_name=["model time"],
coord_cartesian_axes=[""],
coord_calendar_types=[""],
Expand All @@ -728,7 +728,7 @@ def test_parse_access_filename(builder, filename, expected):
variable_standard_name=["", ""],
variable_cell_methods=["time: mean", ""],
variable_units=["mmol/m^2/s", "days"],
coords=["nv", "time", "xt_ocean", "yt_ocean"],
coord=["nv", "time", "xt_ocean", "yt_ocean"],
coord_long_name=[
"vertex number",
"time",
Expand Down Expand Up @@ -762,7 +762,7 @@ def test_parse_access_filename(builder, filename, expected):
variable_standard_name=["", ""],
variable_cell_methods=["time: mean", ""],
variable_units=["mmol/m^3", "days"],
coords=["nv", "st_ocean", "time", "xt_ocean", "yt_ocean"],
coord=["nv", "st_ocean", "time", "xt_ocean", "yt_ocean"],
coord_long_name=[
"vertex number",
"tcell zstar depth",
Expand Down Expand Up @@ -828,7 +828,7 @@ def test_parse_access_filename(builder, filename, expected):
"degC",
"days since 0001-01-01 00:00:00",
],
coords=["nv", "time", "xh", "yh", "zl"],
coord=["nv", "time", "xh", "yh", "zl"],
coord_long_name=[
"vertex number",
"time",
Expand Down Expand Up @@ -882,7 +882,7 @@ def test_parse_access_filename(builder, filename, expected):
"days since 0001-01-01 00:00:00",
"degC",
],
coords=["nv", "time", "xh", "yh"],
coord=["nv", "time", "xh", "yh"],
coord_long_name=[
"vertex number",
"time",
Expand Down Expand Up @@ -919,7 +919,7 @@ def test_parse_access_filename(builder, filename, expected):
variable_standard_name=["", ""],
variable_cell_methods=["time: point", "time: point"],
variable_units=["degrees_north", "degrees_east"],
coords=["xh", "yh"],
coord=["xh", "yh"],
coord_long_name=[
"h point nominal longitude",
"h point nominal latitude",
Expand Down Expand Up @@ -976,7 +976,7 @@ def test_parse_access_filename(builder, filename, expected):
"degC",
"days since 0001-01-01 00:00:00",
],
coords=["nv", "time", "xh", "yh", "z_l"],
coord=["nv", "time", "xh", "yh", "z_l"],
coord_long_name=[
"vertex number",
"time",
Expand Down Expand Up @@ -1024,7 +1024,7 @@ def test_parse_access_filename(builder, filename, expected):
"m^2",
"days since 0000-01-01 00:00:00",
],
coords=["time"],
coord=["time"],
coord_long_name=["time"],
coord_cartesian_axes=[""],
coord_calendar_types=[""],
Expand All @@ -1048,7 +1048,7 @@ def test_parse_access_filename(builder, filename, expected):
variable_standard_name=["", ""],
variable_cell_methods=["", ""],
variable_units=["m2 s", "unitless"],
coords=[],
coord=[],
coord_long_name=[],
coord_cartesian_axes=[],
coord_calendar_types=[],
Expand Down

0 comments on commit e6590c9

Please sign in to comment.