Skip to content

Reconcile time and elapsed_time variables #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jcurtis2 opened this issue Sep 18, 2024 · 0 comments
Open

Reconcile time and elapsed_time variables #202

jcurtis2 opened this issue Sep 18, 2024 · 0 comments
Assignees

Comments

@jcurtis2
Copy link
Collaborator

jcurtis2 commented Sep 18, 2024

In the output, we have two variables that describe time:

    double time ;
            time:unit = "s" ;
            time:description = "time elapsed since simulation start" ;
    double elapsed_time ;
            elapsed_time:unit = "s" ;
            elapsed_time:description = "elapsed time since simulation start" ;

And while these are the same in an initial simulation, they are actually different in a restart simulation where elapsed_time would be the correct time and time is reset to 0 as it appears to be used for a counter for when to do output. Therefore time isn't actually time elapsed since simulation start (and probably shouldn't be used for anything or necessarily output).

Example from urban_plume_0001_00000001.nc when restarted from out_init/urban_plume_0001_00000022.nc

 time = 0 ;
 elapsed_time = 75600 ;

where in out_init/urban_plume_0001_00000022.nc:

 time = 75600 ;
 elapsed_time = 75600 ;

Relevant code:

time = 0d0

t_start = env_state%elapsed_time

call scenario_update_env_state(scenario, env_state, time + t_start)

@jcurtis2 jcurtis2 self-assigned this Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant