CIROH-UA / CIROH-UA/datastreamcli
Reference time ambiguity in troute output file
- Dominant language
- Python
- Stars
- 3
- Forks
- 6
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 4
Description
It seems like there is some ambiguity in the filename and output of the troute .nc file.
For example, looking at a file from the path:
`s3://ciroh-community-ngen-datastream/v2.2/ngen.20251123/short_range/00/VPU_16/ngen-run/outputs/troute/troute_output_202511230100.nc`
I would interpret the `reference_time` / `model_initialization_time` to be at the `00` hour as noted in the directory path.
The filename contains the first value time (which for short_range is 1 hour ahead) which is also provided as the `file_reference_time` attribute in the .nc file (the `01` hour)
Then, looking at the `time` coordinate in the file, the first value is at the `02` hour. It's a little confusing IMHO to know what to use as the reference_time.
One approach would be to mimic the NWM convention where the reference_time is included in the filename as `txxz` for example:
```python
gcs_filepath = "gs://national-water-model/nwm.20250101/medium_range_blend/nwm.t00z.medium_range_blend.channel_rt.f001.conus.nc"
ds = xr.open_dataset(
gcs_filepath,
engine="h5netcdf",
backend_kwargs={"storage_options": {'anon': True}}
)
```
where reference_time (also model_initialization_time) is at the 00 hour or `2025-01-01_00:00:00`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.