series_analysis in a complex use case #3066
|
I have been working on a complex use case which involves processing the stats for 10 variables using EnsembleStat and GenEnsProd. So far so good. I then wanted to add series_analysis to verify the ensemble means from GenEnsProd, and this is where things break down. If I am honest, I have never really understood the RUNTIME_FREQ options, especially the appearance of the "all" in the output file names, which seem outside any user control. Here's what I've concluded. It would be good to get some feedback on this and ideas going forward.
To summarise, I think I am clear that one can't run SeriesAnalysis as part of the complex use case with conventional looping. RUNTIME_FREQ options don't appear to offer what I need though, with ambiguous naming conventions. I was expecting to be able to keep lead times separate (which is something that seems quite normal to do) but I couldn't get that to give me a sensible filename. That may just be me not quite finding the right combo but I have tried! Downstream software can't differentiate between "all" and "all". I can't think of a situation where we would want multiple lead times processed together into one output stat. I would rather not have to have a script with separate loops for each lead time and variable creating config files before running them. It's a solution, but not a pretty one, and doesn't solve the file naming convention without doing some renaming. Having netcdf files which have output filename structure more like other tools, and possibly something that incorporates the aggregation start and end date as defined by the date sequence may be handy. Others may have known this but SeriesAnalysis can't write stats for multiple variables in one pass/file (without overwriting). The source variable can only be found in the global attributes and that isn't ideal for downstream plotting applications/tools. It may be handy to update the series_analysis documentation to clarify some of these points. I have poured over the RUNTIME_FREQ examples and whilst they illustrate the behaviour, they do not provide the link with how this translates to the output file name generation (which is shared with GridDiag). It might be good to make it clear that you can only process one variable at a time, until this can be resolved. Adding the source variable name in the output filename (if opting for one file per variable) and also in the output variable names would be good for downstream processing and parsing. |
Replies: 1 comment
|
Hi Marion, And thank you for your insights on this subject. I wanted to clarify a couple of points, since Series-Analysis is a tool that actually can do quite a bit, but it often causes a little frustration to get it to work the way you intend. First, it's important to learn how Series-Analysis determines what the series will be created over. As seen in the MET documentation, the tool will check the following list, in order, to determine which entry is the first with a greater than 1 value:
Note how "number of fields" are the first two checks. This means if you provide multiple forecast or observation variables, those variable fields will constitute the series, rather than a time series. This addresses your second finding,
It was designed to handle multiple variables, but will process them together as a series. If your intent is to have multiple variable fields processed across time, you will have to use separate SeriesAnalysis tool instances, which are described here. Second, the behavior of Series-Analysis in METplus wrappers is a bit complex, as you have experienced and noted. It sounds like you've already reviewed the Runtime Frequency section of the documentation, but may have left with more questions than answers. Given that you are trying to create a series over 1 lead time, Let's take a look at the example in the documentation to understand this better. Assume that your timing information is the following: LOOP_BY = INIT LEAD_SEQ = 3H, 6H There will be three days of interest, each with 2 lead times (valid 2020-10-17 at 15Z and 18Z , 2020-10-18 at 15Z and 18Z, and 2020-10-19 at 15Z and 18Z). Setting
And for the 6H lead, we would have the following initialization times/files:
When you see "all" in the file/variable names, essentially you're seeing the '*' character where the tool was attempting to grab all files in the series. As a note to the overwriting behavior, make sure that your output template naming scheme uses the appropriate key to distinguish one series from another. For example, if you are creating a series over the lead, you may use an output template like: Which creates a 3 digit lead, in hours. If you are running multiple variables via multiple tool instances, you should be able to use the instance to create a specific name so that the sequence for one lead does not overwrite another. For example, a tool instance evaluating temperature, SeriesAnalysis(temp), could have While the instance evaluating accumulated precipitation, SeriesAnalysis(precip), could look like I understand your frustration of the file naming convention; beyond the prefix that a user can control, there is no way to control the timing information section of the file. However, I think there is a way to partially override the variable name created by MET: using And the resulting output field in the netCDF was a mouthful: but after adding If you want to get the file's variable field name to exactly match your string (i.e. just "TEST"), then you will need to run the file through a follow-up tool like Regrid-Data-Plane to override the default name: I am more than happy to get into more details on this topic with you in a future meeting once funding has cleared, as well as take any suggestions you might have for clearing up the ambiguity that still surrounds this tool's operation. |
Hi Marion,
And thank you for your insights on this subject. I wanted to clarify a couple of points, since Series-Analysis is a tool that actually can do quite a bit, but it often causes a little frustration to get it to work the way you intend.
First, it's important to learn how Series-Analysis determines what the series will be created over. As seen in the MET documentation, the tool will check the following list, in order, to determine which entry is the first with a greater than 1 value:
Note how "n…