ClimaParams.jl icon indicating copy to clipboard operation
ClimaParams.jl copied to clipboard

Add support for multiple time resolutions

Open Julians42 opened this issue 7 months ago • 3 comments

Currently ClimaParams only includes a parameter for day (measured in seconds) and no other time resolutions, e.g.,

[day]
value = 86400
type = "float"

it would be useful to think about what other times we might want to support vs hard-code in functions. E.g., this suggests we should not be hard coding day into functions but hour (measured in seconds) or month is ok to do.

Julians42 avatar Apr 07 '25 19:04 Julians42

@Julians42 I'm not quite sure I understand what you mean here.

The convention is to define 1 day = 86400, and simply use that as shorthand for 86400 s, irrespective of the length of the solar day (e.g., on other planetary bodies).

tapios avatar Oct 20 '25 22:10 tapios

Yes - agreed that day=86400s especially since this is an ESM. My point was simply that we could also have:

[hour]
value = 3600
type = "float"

[week]
value = 604_800
type="float"

etc... as I find it weird that best practice is, e.g.,

t_end = CAP.day
and
t_end = 3600 # to run for an hour

Mostly noting the inconsistency in that we support one and not the other.

Julians42 avatar Oct 21 '25 01:10 Julians42

I think adding hour is fine, maybe also week. Month, year etc. become ambiguous because they can change, e.g., in other planetary contexts. (Arguably, that's also true for day, but we generally use the convention 1 day = 86400 s irrespective of planetary context.)

Why don't you add hour and week to make it easier to specify simulation length etc.?

tapios avatar Oct 23 '25 17:10 tapios