Skip to content
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

Time information doubled #200

Closed
Chilipp opened this issue Feb 7, 2020 · 1 comment · Fixed by #204
Closed

Time information doubled #200

Chilipp opened this issue Feb 7, 2020 · 1 comment · Fixed by #204

Comments

@Chilipp
Copy link
Contributor

Chilipp commented Feb 7, 2020

This issue is part of the JOSS review in openjournals/joss-reviews#2042

When running ms examples/example_nc.conf, the time information in the data is doubled (i.e. time-steps appear twice) and the output has more than 24 time steps per day.

Here is the code to reproduce the issue:

conda create -n metsim metsim cdo -c conda-forge && conda activate metsim
git clone https://github.com/UW-Hydro/MetSim.git && cd MetSim
ms examples/example_nc.conf --verbose
cdo tinfo forcing_19500101-19500131.nc | head -n 20
This is the output of the last CDO command

   Time axis :  1488 steps
     RefTime =  2000-01-01 00:00:00  Units = hours  Calendar = standard

         Verification Time              
Timestep YYYY-MM-DD hh:mm:ss   Increment
     1   1950-01-01 00:00:00   --------
     2   1950-01-01 01:00:00   1 hour  
     3   1950-01-01 01:00:00   0 seconds
     4   1950-01-01 02:00:00   1 hour  
     5   1950-01-01 02:00:00   0 seconds
     6   1950-01-01 03:00:00   1 hour  
     7   1950-01-01 03:00:00   0 seconds
     8   1950-01-01 04:00:00   1 hour  
     9   1950-01-01 04:00:00   0 seconds
    10   1950-01-01 05:00:00   1 hour  
    11   1950-01-01 05:00:00   0 seconds
    12   1950-01-01 06:00:00   1 hour  
    13   1950-01-01 06:00:00   0 seconds
    14   1950-01-01 07:00:00   1 hour  

Is this a feature or a bug?

@arbennett
Copy link
Member

Ah, this is definitely a bug! The example_nc.conf file should generate output at 30 minute timesteps, but because the units are encoded as hours since .... the half hour gets rounded off.

arbennett added a commit to arbennett/MetSim that referenced this issue Feb 7, 2020
@arbennett arbennett mentioned this issue Feb 7, 2020
3 tasks
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

Successfully merging a pull request may close this issue.

2 participants