Open SorooshMani-NOAA opened 17 hours ago
It's a potential trap for users for sure and I've been thinking about removing the 'hour' in base_date, because it's actually not read in; see:
https://schism-dev.github.io/schism/master/input-output/sflux.html
Instead the hour offset is specified in param.nml (utc_start).
While working on setting up
sflux
ensemble based on HAFS and GEFS I realized that if thesflux
"input" files (e.g. what I generate from HAFS or GEFS) thenpyschism
incorrectly shifts the time vector:https://github.com/schism-dev/pyschism/blob/00b1137d2a87366d41fc7aa93ddc3af31776c03b/pyschism/forcing/nws/nws2/sflux.py#L331-L338
This is because the schism sflux time hour
00
based, but the vector differences forsflux_*.nc
file are calculated based on the actual input.nc
file's base time. So for example if I have the following time vector in my custom inputnc
file:then I get the following time in the final sflux file
sflux_air_1.0001.nc
written by pyschism:I know that I'm using custom input
.nc
file asSfluxDataset
, but still I'm not sure if this is intentional (i.e. I need to make sure my input.nc
file dates are00
based) or a bug!Note that I call this function to read the custom
.nc
file I generate from HAFS or GEFS: https://github.com/schism-dev/pyschism/blob/00b1137d2a87366d41fc7aa93ddc3af31776c03b/pyschism/forcing/nws/nws2/nws2.py#L35-L41Is this not meant to be used on a generic
.nc
file? My.nc
file has all the required variables, it just doesn't have hour00
based time.