Testing update #2893 in Pointstat (finally!!) #2875
Replies: 3 comments 4 replies
-
@robdarvell, just saw your discussion come in. Thanks for the testing feedback! I'm working on the first development release for the next cycle (MET-12.1.0-beta1) today. Wondering if you could share or point me to the sample data with which you're testing? I'd like to replicate this discrepancy and try to track it down. If it's "small" you could tar/zip it up and attach it to this discussion. If it's "large" you can use our Google Form Data Submission option. |
Beta Was this translation helpful? Give feedback.
-
Surface_20250120T0000Z.nc.gz Attached a couple of files. Data is valid for 00Z on the 20th Jan, so a 24hr forecast. FCST_VAR1_NAME = air_pressure_at_sea_level And the following group mapping: Hopefully all the info you need is there (as you will have jobs set up to run these sorts of things) As I said above, I think it maybe down to the duplicate key test not including the obtype part (which I can see why not), or when checking which ob to use (eg: when picking the nearest) the obtype isn't being transferred from the particular ob it selects, it is just using what it found when initially setting up the key structure. |
Beta Was this translation helpful? Give feedback.
-
Thanks John for the investigative work. I have downloaded the pair_base code you attached above and will have a play when I have chance. In respect of what I am looking for (from within one of your comments above): As you noted there are 4 obs for station 01023, so using that as the example: I set a time window around which obs we wish to include (in what we operate with in this case it is 2.5hrs before the VT and 30min afterwards. So for the 4 obs we just pick up the 22Z, 23Z and 00Z as the 21Z fails this test. We don't want to run the ob types as 2 separate setups as then as you have shown you would pick up the 23Z ob for 10102 and the 00Z for 10101. We only want the 00Z ob. We only wish to use the station Id once in what we store. As the code already has the ability to find the observation which is NEAREST to a time I don't feel as though we need to do this extra processing outside of the code base. It does all I need, just without that last little bit. The correct ob is picked up by the code as it is, it is just not containing the correct obtype part of the observation required which is what I would like reporting. There is then a follow-on query, along the same lines (but not to be tackled in this discussion) which is along the same sort of lines. And again this maybe different to anything which you have covered previously. |
Beta Was this translation helpful? Give feedback.
-
I’ve finally had a chance to look at update #2893 which was requested by me to allow the insertion of the Group Map value into the mpr (and orank) files rather than simply the key within the OBTYPE column of the output files.
I can confirm that setting the newly introduced variable name into the apps works as expected, ie it is using the ‘val’ rather than the ‘key’ in the output.
However, it is not putting in the correct value into the OBTYPE column in some instances.
I’ve been trawling through things like the pair_base and pair_data_point code trying to work out what is going on. The case which I have been looking at gave me the following output in my point_stat job: Please note that I have added the ‘typ:’ element to the code seen in the output below in trying to work out what is happening.
DEBUG 4: Computed NEAREST of 3 observations = 0 for [lat:lon:level:elevation] = [69.059:18.540:-9999.00:-9999.00]
DEBUG 4: [sid: 01023 typ: 10102 vld: 20250119_220000 obs: 102320]
DEBUG 4: [sid: 01023 typ: 10102 vld: 20250119_230000 obs: 102360]
DEBUG 4: [sid: 01023 typ: 10102 vld: 20250120_000000 obs: 102440]
Then the nearest ob to 00Z on the 20th is of course the bottom one in the list, and that is the one which appears in the output file, and the value in the OBTYPE column is 10102.
So that all looks good. Unfortunately, the ob at 12Z is of a different obs type to the other two (10101 rather than 10102).
Further up in the point_stat output (when I have changed the verbosity so I didn’t have to run too high) you can see this: (from around line 630 in pair_data_point.cc)
DEBUG 4: For air_pressure_at_sea_level(,) versus PMSL/Z0, skipping observation since it is a duplicate:
DEBUG 4: 10101 01023 20250120_000000 69.05900 -18.54000 76.00000 PMSL -9999.00000 -9999.00000 00016448 102440.00000
The way the code tests this, even though the header value is different, 10101 rather than 10102, the key it is being tested on is showing that it is the same as something previously (lat/lon/lvl/elev)??.
I think then the first occurrence of the key is then set within the station_values_t framework and then when things are set up to write out to the files then the value in the svt is used. (pair_base.cc approx. line 750), with the subsequent ob values for the relevant ob to be used.
I am wondering whether or not from this part of the code whether the typ_sa.add value needs to be taken from the ob.?? style structure, but that wouldn’t work at present as the type isn’t found within that (assuming it was ob_val_t). But then what other changes may be required I haven’t worked through. And then what that may or may not break elsewhere …
Of course I may be looking in totally the wrong places within the code !!
Beta Was this translation helpful? Give feedback.
All reactions