metno / emep-ctm

Open Source EMEP/MSC-W model
GNU General Public License v3.0
30 stars 20 forks source link

Emissions timestamp mismatch #73

Closed JanScheff closed 4 years ago

JanScheff commented 4 years ago

Hi,

I have added a new variable to EMEP and am using Emis_sourceFiles to assign daily emissions to the respective variable. As periodicity I set “time” since this should read to time info from the netCDF-File. The timing of the emissions and the respective variable in the model output don’t fit, though. When the first non-zero value from emissions is on 2015-06-16 00:00:00, the first non-zero value of the variable in the *hour.nc-file is on 2015-06-15 00:30:00, i.e. a day too early.

I tested a few things: I had the time variable declared as integer and double in the emissions netCDF-File, no differences there. I tested “days since 1900-01-01 00:00:00”, “days since 1900-01-01 00:00:01” and “days since 1900-00-00 23:59:59” – still not the correct day. With “days since 1900-00-00 23:59:59” the output variable showed the first non-zero values on “2015-06-15 23:30:30”, so still the wrong day. I tested having the emissions with time units of “days since…” and “hours since…” both with Emis_sourceFiles(i)%periodicity = ‘time’ and ‘hourly’.

Here is the config-file for hourly emissions input: config_EMEP_4.33_EU_to_UK_POLLEN.txt.txt

ncdump -v time of the input files for "days since" and "hours since" ncdump_time_days.txt ncdump_time_hours.txt

Thank you Janice

gitpeterwind commented 4 years ago

Hi Janice, This is not an error, but a feature. at https://emep-ctm.readthedocs.io/en/latest/Subrun.html#new-emission-format it is written "The timestamp must correspond to the end of the time period of validity". I can agree that this is not the most intuitive, but it is much simpler from a coding perspective; the model reads a records and it contains the date when it should fetch new data. Otherwise it would have to look for the next record, possibly located into another file etc.

Is it difficult to modify the timestamps? I could try to devise some workaround.

Best wishes, Peter

JanScheff commented 4 years ago

Hi Peter,

I see. So, if I wanted EMEP to read in emissions on 2016-06-16, the corresponding timestamp of the emissions file would need to be "2016-06-17 00:00:00" rather than "2016-06-16 23:59:59", right?

It is no problem to modify the timestamps, I created the input files myself.

Takk skal du ha!

Janice

gitpeterwind commented 4 years ago

Yes, that is correct!

avaldebe commented 4 years ago

Hi @JanScheff

looks like @gitpeterwind answered your question. If the case, can you close this issue? If something is still not clear, please let us know.

Cheers, Álvaro.

JanScheff commented 4 years ago

Hi @avaldebe,

yes, that's all resolved.

Thanks, Janice