HydrologicEngineeringCenter / Vortex

data processing utilities
MIT License
25 stars 7 forks source link

Some of the libraries that Vortex depends on may not work so well when the computer setting is in a non-english locale. #109

Closed XX-00-00 closed 2 months ago

XX-00-00 commented 2 months ago

hello! I'm using the latest version(0.11.12) of vortex to convert netcdf file to dss. The importer worked to convert and clip the nc to dss, but failed to read the time steps of each variables. In the new dss file every variables's end time equal their start time, while each record should have a time step of 3h.. Then I tried image-exporter and time-shifter to regenerate or switch timestep but never succeeded. It seems that in the 0.11.12 version vortex tools only the importer can work, when the image-exporter and the time-shifter show finished no new dss file is produced, and when choose destination derictory the tools both fail to creat or choose any subfolder. I tried some later versions(0.11.11&0.10.31), tried some other computers, all failed.

Thank you for your help.

tombrauer commented 2 months ago

It sounds like you are trying to import a non-CF compliant NetCDF file. If the NetCDF file doesn't include a time_bnds variable, which defines the interval over which the data applies, vortex doesn't make any guesses about what that might be. You can use the importer to import the data to HEC-DSS, then use the time-shifter to shift the start time or end time of the HEC-DSS grids by 3 hrs. I would contact the originator of the data and ask them to include a time_bnds variable to be more explicit about the data interval.

XX-00-00 commented 2 months ago

The NetCDF file data is from the Institute of Tibetan Plateau Research, Chinese Academy of Sciences. The data has a time variable and the interval between adjoin variables is 3. And in the DSS file converted from the NetCDF the times are shown in the pic below while the correct start time should be 3hrs earlier than the end time according to the data's user's manual. 1

I thought this could be easily solved, cause time-shifter can shift the start or end time. But when I use time-shifter, no new DSS file can be generated. It complete too soon, just like immediately... I tried to contact you via email by an address I found in the sourcecode, but I don't know whether you received it. May I have your email address, so I can send my DSS and NC files to you? Or maybe you can contact me via the email: XuXiao_3472@outlook.com

tombrauer commented 2 months ago

It's worth reviewing this issue: https://github.com/HydrologicEngineeringCenter/Vortex/issues/29

Some of the libraries that Vortex depends on don't work so well with dates when the computer setting is in a non-english locale.

tombrauer commented 2 months ago

@XX-00-00 I created a new release that should better handle DSS dates when the user locale is not English. Please try this release: https://github.com/HydrologicEngineeringCenter/Vortex/releases/tag/v0.11.13

XX-00-00 commented 2 months ago

Great! Thanks sir! I've tried the solutions you offered, both can fix the problem. So when vortex don't work properly, non-English users may switch the language setting of computer system into English or download the new 0.11.13 version.