Hi Steve and all It has been a while since I have had the
chance to do some “ferreting” but I do remember coming across the error
message mentioned in this email and being puzzled. As I remember I
eventually resolved the issue by ensuring both variables are on the same grid
through regridding. Defining the axis with an OVERLAP or
SUPERSET qualifier would be a useful addition. But for me a change to the
diagnostic which points out that it may not be about sizes but about coordinate
ranges, resolutions or offsets would help a lot and presumably be easily
implemented. I know I spent some time going down the wrong path in the
past! Mark -- From: owner-ferret_users@xxxxxxxx [mailto:owner-ferret_users@xxxxxxxx]
On Behalf Of Steve Hankin
Hi all,
Is there a way to catch common sizes of region between variables ?
Here is an example and its error message.
yes? use piControl2_18000101_23391231_1M_tops.nc yes? use piControl2_18000101_20491231_1M_topl.nc yes? let A=tops+topl yes? list A[i=30,j=40] **ERROR: inconsistent sizes of data regions: T axis TOPL[D=2] has 3000 points (L=0001:3000) _expression_ has 6480 points (L=0001:6480)
let A=tops+topl[gt=tops[d=1]]
and your problem should be solved. use piControl2_18000101_23391231_1M_tops.nc use piControl2_18000101_20491231_1M_topl.nc DEFINE AXIS/OVERLAP/T tnew = tops[d=1], topl[d=2] let A=tops[D=1,gt=tnew]+topl[gt=tnew] This command could only be implemented with code changes in Ferret. But I expect that you could achieve the desired goal by creating a grid-changing external function that performed the sum. The function would create the new time, overlap-region axis.
- Steve
P.S. Could also implement variations on this theme such as DEFINE AXIS/SUPERSET/T tnew = tops[d=1], topl[d=2]
How useful would these be?
I understand perfectly that the 2 components of the variable A are not conform but how to get the result of this error to process their common size of region on T axis, here L=0001:3000 and then be able to do for example yes? save/l=0001:3000 A
Note that I research the most general way to do this and so I cannot "simply" get lend from topl and tops and calculate the minimum because variable A may be the combinaison of n variables.
Let me know If I have been clear enough and if there is a workaround I have missed.
Patrick
|