Hirlam / obsmon

Tool for observation monitoring in the Harmonie-Arome NWP system
https://hirlam.github.io/obsmon/
MIT License
3 stars 8 forks source link

Mean departures (OMG & OMA) per station or satellite #8

Closed roger-randria closed 3 years ago

roger-randria commented 3 years ago

Hi,

It'd be good to have the possibility to plot an averaged values / profiles of OMG (fg_depart) and OMA (an_depart) over a certain period. See for example the file from the link below, which shows the plot for the case AMSUA radiance.

https://www.dropbox.com/s/5j6ndki3qt1ymgh/amsua_NOAA-18_stat.eps?dl=0 roger_example_plot

Please let me know if you have more questions before making the changes. Thanks in advance, Roger

roger-randria commented 3 years ago

Very good. Thanks Paulo. BTW, both scores can be included in one plot, like the ones already existing in Obsmon.

paulovcmedeiros commented 3 years ago

Hi @roger-randria ,

Could you try the code in the new/plot/avg-fg-dep branch and let me know if the plots correspond to what you expected?

To switch branches and update the code, you can do (in the obsmon directory):

git fetch
git checkout new/plot/avg-fg-dep
./install

Let me know how it goes. Thanks :)

roger-randria commented 3 years ago

Thanks. I think it doesn't work. Screenshot from 2021-07-22 10-19-05

paulovcmedeiros commented 3 years ago

lol

That's not the plot I implemented (btw, this one looks like that because there are too many levels selected).

The new plots are at the top of the plot list. They are called "Average First Guess and Analysis Bias/RMS" and "Average First Guess and Analysis Departure".

roger-randria commented 3 years ago

I'm trying other variables. Just in case it works for some of them...

paulovcmedeiros commented 3 years ago

No, but I mean test the new plots, not this one you tested right now. This timeseries plot you tested is something else, doesn't apply here.

You need to be using Obsmon v4.2.0-beta.0, and the plots are of the "Statistical" type, not timeseries.

roger-randria commented 3 years ago

Can we have short chat on Gmeet?

roger-randria commented 3 years ago

This works well :)

roger-randria commented 3 years ago

NO, one thing is missing. The selection of station. Here we have all stations involved. We would like also to monitor different stations/satellites instruments.

paulovcmedeiros commented 3 years ago

Ok, then it's another (extra) type of plot. I'll implement this as well and let you know once I'm finished. Thanks for the feedback!

roger-randria commented 3 years ago

Sounds good. Thanks in advance.

paulovcmedeiros commented 3 years ago

Can you go to your obsmon directory, run

git pull origin new/plot/avg-fg-dep --rebase

and then test the new "Station Average First Guess and Analysis Departure" plot?

Let me know how it goes.

roger-randria commented 3 years ago

git pull origin master --rebase From https://github.com/Hirlam/obsmon

But, I don't see this "Station Average First Guess and Analysis Departure"

paulovcmedeiros commented 3 years ago

You need to be in the new/plot/avg-fg-dep branch. Run

git checkout new/plot/avg-fg-dep'

and then the other commands and this should make the new plot available to you.

roger-randria commented 3 years ago

Very strange thing is happening ... obsmon_plot

paulovcmedeiros commented 3 years ago

I think I know what may be happening. Could you send me some sample input databases? If possible, these that you used to produce this plot. Just so i can reproduce the issue and fix it quicker.

roger-randria commented 3 years ago

Get it from here: https://www.dropbox.com/s/xq6yegiqtb48tec/FroPaulo.tgz?dl=0

paulovcmedeiros commented 3 years ago

Hi @roger-randria ,

After inspecting your data, I see that the the code actually behaves the way it is expected to. What you see in your figure is a consequence of the existence of many levels located close together for the observation type you selected. If you zoom in, or if you inspect the data used for the plot, you'll see that the levels are not the same.

The large number of levels is due to the fact that the query is performed from the "usage" table in the data files. Only the "usage" table has information about specific stations, and whenever one needs to select individual stations, this table needs to be used. The data in that table, on the other hand, is less processed than the one in the "obsmon" table, and a marked difference is that the reported levels are not standardised as they are in the "obsmon" table.

I would suggest you select some specific, representative levels from the dropdown menu in this case.

roger-randria commented 3 years ago

I think it's problematic. It doesn't produce bias/RMS and only fg_depar or an_depar. I think "Average Total First-guess and Analysis Bias/RMS should be used as example because this works fine.

I can get only only lowest level when asking for "standard level only". This should make it as you suggested.

paulovcmedeiros commented 3 years ago

I'm not sure it is problematic. I would perhaps say it is not what you hoped, but the plot really shows what is available in the usage table in the data files.

There is, for instance, no RMS data in the usage tables. I can of course calculate RMS for the averages that the plot produces, but the averages are performed over DTGs & levels, and I'm not sure if this is what you are looking for.

I could also group levels in windows, to emulate what is in the obsmon data tables, but this would perhaps be a bit deceptive as the plot then would no longer show what appears in the data.

I'm somewhat reluctant to do a lot of processing in the data in Obsmon, as, so far, most processing has been performed in PrepObsmon, and most people expect the plots make in Obsmon to reflect the data produced by PrepObsmon. It's really just a concern about what each code is supposed to do, in order to avoid confusion in the interpretation of the data.

paulovcmedeiros commented 3 years ago

I've added a new "Standardise Levels in the Final Plot" switch to obsmon's UI now, so that users can optionally request that the non-standard levels be standardised (i.e., cast into the nearest reference levels) in cases such as the one we're dealing with here.

@roger-randria Could you test it? Same thing as before:

git checkout new/plot/avg-fg-dep
git pull origin new/plot/avg-fg-dep --rebase
./install
paulovcmedeiros commented 3 years ago

Hi @roger-randria ,

I've added some error bars in these plots as well (when applicable). Along with the other stuff I discussed above, I think this should accomplish what you wish to see.

I have now merged these changes into devel and deleted the new/plot/avg-fg-dep branch.

I'm also closing this issue since I think this is now done. Please feel free to reopen it should you see any problem I'm missing.

roger-randria commented 3 years ago

Hi Paulo,

First of all, thanks a lot for the update. I see you closed already this task, but I think it'd be good to have bias and standard deviation instead. Is that doable?

Roger

paulovcmedeiros commented 3 years ago

Hi @roger-randria ,

The error bars already indicate the range "average +/- stdDev" whenever it is applicable. There is also already a new plot called "Average First Guess and Analysis Bias/RMS".

I could reopen this ticket if you could give me a more precise description of what you really wish to see, based on the columns you have on the sqlite data files. Mind that, if you want to be able to filter data by station, you need to use the usage table from the databases. If you don't need to filter by station, then you may use the obsmon table.

It'd be nice if you could elaborate this more precisely in this way, to remove any ambiguity regarding the type of data you'd like to see plotted and the data that is available in the databases. Just let me know.

Cheers, Paulo.

roger-randria commented 3 years ago

I understand and the error bars are indeed very informative. But, I found the attached issue, although most of the tested plots were OK like the other one. The fact that I have just few dataset made the plots a bit messy. So, Let's think about it. Maybe, an option with adding or not the error bars could make the system "more acceptable". The reason why I think can help is that error bars are meaningful with large enough dataset. What do you think?

obsmon_plot (1)

obsmon_plot

paulovcmedeiros commented 3 years ago

There is actually an option to omit the error bars. You can click at the let-hand side of the labels ending with _sd and this will make the error bars disappear. If you want them back again, then you just need to click in the same place. That should do it.

paulovcmedeiros commented 3 years ago

As for the second plot: I don't really understand why the width of the error bar endings became so large in that case, but I can indeed reproduce the issue here. I'll look into this. Perhaps I'll open another ticket for this particular problem separately, as this is not really the main point of discussion in the preset ticket.

roger-randria commented 3 years ago

Wow, this is amazing. Thanks a lot.