schism-dev / schism

Semi-implicit Cross-scale Hydroscience Integrated System Model (SCHISM)
http://ccrm.vims.edu/schismweb/
Apache License 2.0
93 stars 88 forks source link

Format overflow in staout #119

Open brey opened 11 months ago

brey commented 11 months ago

https://github.com/schism-dev/schism/blob/c36e9498a39c0386a2048c2b45a61e6578b878f4/src/Hydro/schism_step.F90#L10278C13-L10278C72

When saving time in secs for long runs i.e. hindcasts, the time format is not appropriate. E.g. if you are saving every step (150 secs) and run for a year, after a few months the accumulated seconds number exceeds the format.

I suggest that the time reference is replaced with a timestamp in string in order to avoid such issues.

josephzhang8 commented 11 months ago

@brey I've changed the output format to e24.16, which should be good for 10s of years.