ACCESS-Community-Hub / ACCESS-MOPPeR

A tool to post-process ACCESS Model output using CMOR, based on APP4, work in progress!
https://access-mopper.readthedocs.io/en/latest/
Apache License 2.0
0 stars 0 forks source link

multiple time axis files can have confusing timestamp #25

Closed paolap closed 1 year ago

paolap commented 1 year ago

With model level data from the AUS2200 files have two time axis, for example

each file at 1200 hours have variable defined at 1200 hours but also variable defined at 1300 hour. This causes issue when only timestamp is used to work out time range. So adding check in get_timedim to returned if multiple times are in axis and then using check_in_range instead of check_timestamp if multiple_times is True. This seems to work but we also have to now adapt the set(time) after calculation to make sure we're not cutting off day after at 00 hour where this occurs. So in cli.py dsin = dsin.sel({time_dim: slice(ctx.obj['tstart'], ctx.obj['tend'])}) and later on out_var = out_var.sel({time_dim: slice(ctx.obj['tstart'], ctx.obj['tend'])})

paolap commented 1 year ago

fixed in 189ad2a3743464a77c1c45103d3b89172d2a5f27