Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion data/config/UGridConfig_mpas
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ ugrid_metadata_map = [
{ key = "lat_face"; val = "latCell"; },
{ key = "lon_face"; val = "lonCell"; },
{ key = "vert_face"; val = "zCell"; }, // optional
{ key = "time"; val = "xtime"; }
{ key = "time"; val = "xtime"; },
{ key = "init_time"; val = "initial_time"; } // optional
];

//
Expand Down
3 changes: 3 additions & 0 deletions docs/Users_Guide/appendixH.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ To correctly parse the UGRID topology, MET needs the following information that
* - time
- Coordinate variable for time
Comment thread
hsoh-u marked this conversation as resolved.
Outdated
- Required
* - init_time
- Coordinate variable for initial time (for the lead time)
Comment thread
hsoh-u marked this conversation as resolved.
Outdated
- Optional
* - dim_vert
- Dimension name for the vertical coordinate, if present
- Optional
Expand Down
6 changes: 5 additions & 1 deletion internal/test_unit/python/unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def unit(test_xml, file_log=None, cmd_only=False, noexit=False, memchk=False, ca
ret_ok = (cmd_return.returncode == test['retval'])
if ret_ok:
out_ok = True
result = None

for filepath in test['out_pnc']:
result = subprocess.run([mpnc, '-v', filepath],
Expand Down Expand Up @@ -173,7 +174,10 @@ def unit(test_xml, file_log=None, cmd_only=False, noexit=False, memchk=False, ca
break
except FileNotFoundError:
cmd_outs += (f"\nERROR: stat file missing {filepath}\n")
logger.debug(result.stdout)
if result:
logger.debug(result.stdout)
else:
logger.debug(f"No result object, stat file missing {filepath}")
out_ok = False
break
# check stat file has non-header lines
Expand Down
14 changes: 7 additions & 7 deletions internal/test_unit/xml/unit_ugrid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
-outdir &OUTPUT_DIR;/grid_stat_ugrid -v 1
</param>
<output>
<stat>&OUTPUT_DIR;/grid_stat_ugrid/grid_stat_UGRID_MPAS_OUT_TO_GRID_000000L_20120409_120000V.stat</stat>
<exist>&OUTPUT_DIR;/grid_stat_ugrid/grid_stat_UGRID_MPAS_OUT_TO_GRID_000000L_20120409_120000V_pairs.nc</exist>
<stat>&OUTPUT_DIR;/grid_stat_ugrid/grid_stat_UGRID_MPAS_OUT_TO_GRID_120000L_20120409_120000V.stat</stat>
<exist>&OUTPUT_DIR;/grid_stat_ugrid/grid_stat_UGRID_MPAS_OUT_TO_GRID_120000L_20120409_120000V_pairs.nc</exist>
</output>
</test>

Expand All @@ -53,8 +53,8 @@
-outdir &OUTPUT_DIR;/grid_stat_ugrid -v 1
</param>
<output>
<stat>&OUTPUT_DIR;/grid_stat_ugrid/grid_stat_UGRID_MPAS_DIAG_000000L_20120409_120000V.stat</stat>
<exist>&OUTPUT_DIR;/grid_stat_ugrid/grid_stat_UGRID_MPAS_DIAG_000000L_20120409_120000V_pairs.nc</exist>
<stat>&OUTPUT_DIR;/grid_stat_ugrid/grid_stat_UGRID_MPAS_DIAG_120000L_20120409_120000V.stat</stat>
<exist>&OUTPUT_DIR;/grid_stat_ugrid/grid_stat_UGRID_MPAS_DIAG_120000L_20120409_120000V_pairs.nc</exist>
</output>
</test>

Expand All @@ -79,7 +79,7 @@
-outdir &OUTPUT_DIR;/point_stat_ugrid -v 1
</param>
<output>
<stat>&OUTPUT_DIR;/point_stat_ugrid/point_stat_UGRID_MPAS_DIAG_TEMP_000000L_20120409_120000V.stat</stat>
<stat>&OUTPUT_DIR;/point_stat_ugrid/point_stat_UGRID_MPAS_DIAG_TEMP_120000L_20120409_120000V.stat</stat>
</output>
</test>

Expand All @@ -98,7 +98,7 @@
-outdir &OUTPUT_DIR;/point_stat_ugrid -v 1
</param>
<output>
<stat>&OUTPUT_DIR;/point_stat_ugrid/point_stat_UGRID_MPAS_OUT_TEMP_000000L_20120409_120000V.stat</stat>
<stat>&OUTPUT_DIR;/point_stat_ugrid/point_stat_UGRID_MPAS_OUT_TEMP_120000L_20120409_120000V.stat</stat>
</output>
</test>

Expand All @@ -118,7 +118,7 @@
-outdir &OUTPUT_DIR;/point_stat_ugrid -v 1
</param>
<output>
<stat>&OUTPUT_DIR;/point_stat_ugrid/point_stat_UGRID_MPAS_CFG_OUT_TEMP_000000L_20120409_120000V.stat</stat>
<stat>&OUTPUT_DIR;/point_stat_ugrid/point_stat_UGRID_MPAS_CFG_OUT_TEMP_120000L_20120409_120000V.stat</stat>
</output>
</test>

Expand Down
Loading
Loading