3252 value check field names in gocean - #3385
Conversation
…d transformation.
…_data_node to use the dsl_name.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3385 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 399 399
Lines 56094 56112 +18
=========================================
+ Hits 56094 56112 +18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ield_names_in_gocean
…ield_names_in_gocean
…eld_names_in_gocean
…eld_names_in_gocean
|
I have no idea why I never marked this one as ready, as far as I can tell it fixes the gocean issue of having to use Note that I have split the value_range tests into two files (one for the transformation, one for the node). IT triggered. |
|
@hiker I have to admit that I don't see why we need to have the "data" compoment implied, we are chaning from: What happens if we have a region that modifies the "tile" component of field. Could we still refer to it? And wouldn't Maybe the lfric proxies make a more convincing example of why we need this? |
…eld_names_in_gocean
I think we discussed this in #3252: imho, a user should not need to be aware of the details of the infrastructure library. Esp. for value_check, which is a more 'user level' functionality: a natural scientist wanting to ensure that a certain field has the expected values range. It's (imho) a useful debugging feature. I would envision that over time LFRic could collect a set of variable ranges, meaning that potential errors are flagged much earlier, before they can cause a crash elsewhere. Note that the idea of this feature was motivated by a ~2-3 weeks debugging session of the UM, which was ultimately caused by the 'ice fraction' of a cell not being in [0,1] (it was something in the millions, causing huge temperature changes, then high winds, which made the UM unstable). From that point of view, I don't think a user should need to know about On the other hand, a more advanced developer might want to also check other fields for validity. Ideally, we would be able to support both notations (but that doesn't work atm, I would need to check how much effort it would be to support that.). The infrastructure supports that fine, i.e. if I pass in both: then both names (
From a (natural science) user's point of view, they should not need to know about
I think that's actually more an example of why we don't need this :) PSyclone create a pointer called |
|
I feel a bit bad that I haven't got to this @hiker but I thought I wouldn't start a review just as I'm about to go on leave. I've added @LonelyCat124 as a potential reviewer as it might aid him in learning more about the DSL side of things :-) |
Sorry for the confusion, but by "why we need this" I meant the use of psy_layer field names as you are proposing. And indeed the lfric example with renaming that you explain in your comment is more compelling. Another question then is if it would make more sense to apply the transformation to the algorithm layer then? Since this is what the scientist has as their point of reference. |
Esp. value range check is something you would want to apply for each kernel (to identify which kernel causes invalid values). As far as I can see, on the algorithm layer we can only instrument invokes, i.e. potentially large sequences of kernels calls. |
|
The basic implementation is quite simple but I am wondering whether putting 'DSL' information into a generic PSyIR class (or two) is the right way to go? This is the same kind of issue that Rupert was trying to solve in capturing the semantics of arguments passed into Kernels. I was wondering whether the PSy-layer routine should have some sort of map to capture this information as that's where it belongs. However, that might then finding the necessary information difficult in the various places where it's used. |
This implements our discussed solution: a reference stores the 'dsl name' , which is then used during variable access handling / call tree analysis to provide this name to psy_data. This works for gocean so far.