[Thread Prev][Thread Next][Index]

Re: [ferret_users] Strange error with time-axis - help!



Hi Rebecca,

A couple of things.  SHOW GRID doesn't take into account regions that have been set or operations that are defined in expressions. It just lists the info for the set of axes that are assigned as the grid of the variable, with their full ranges.

You've regridded dissic_ann to the new time axis you've defined, tvmo, and then you're combining it with volume_transport in the _expression_ for carbon_transport.  Is the time axis tvmo that you're defining exactly the same as the time axis of volume_transport?  If not then either regrid volume_transport to your new axis as well, or regrid dissic_ann in the time direction to the grid of volume-transport.  Then they'll have the same time axis for sure.

   let dissic_ann_taxis = dissic_ann[gt=volume_transport@NRST]
   let carbon_transport = volume_transport*dissic_ann_taxis ...


The NOTES and ERRORS you're seeing are telling you about the subsets that the expressions are asking Ferret to load.  I think these messages are coming up because PyFerret/Ferret is really careful about grid boxes - where do the edges of the grid cells lie. You ask for a subset L=1:20 but as the average operation is deciding how to load in data, it's finding some inconsistency. It's reconciling the regions that correspond to L=1:20 on one of the axes, and then needing a portion of a further grid cell on the other axis and so using 21 points on the other axis. So L=1:20 is ambiguous.  Something along those lines anyway.

Ansley

On 8/26/2019 11:17 AM, Rebecca Lynn Beadling wrote:
Hi all,

I am getting strange behavior regarding a time axis that I can’t seem to figure out:

I am using Pyferret v7.5 on a Mac OS X El Capitan.

I am computing carbon transports and carbon and volume transport are on slightly different time-axes:
volume_transport_time is 17-Jul-1986:17-Jul-2100
carbon is on 2-Jul-1986:2-Jul-2100

So the first thing I did was assign the carbon data to the desired time-axis using @NRST


!!! Put dissic_ann onto same time axis as vmo
DEFINE AXIS/CALENDAR=NOLEAP/T="17-JUL-1986":"17-JUL-2100":1/UNITS=years tvmo
let dissic_ann_taxis = dissic_ann[gt=tvmo@NRST]

Then later in my script I compute carbon transport like so:

let carbon_transport = volume_transport*dissic_ann_taxis*12.0107*10^-15*31536000

yes? show grid carbon_transport
    GRID GKK1
 name       axis              # pts   start                end                 subset
 RLON      LONGITUDE          360mr   80.5E(-279.5)        79.5E               full
 RLAT      LATITUDE           200 i   81S                  90N                 full
 LEV       DEPTH (m)           50 i-  5                    5316.4              full
 TYEAR     TIME               115 r   17-JUL-1986 12:00    17-JUL-2100 12:00   full



The issue arises when I go to compute the total transport:

let  lv_carbon  = carbon_transport
set region/y=30S/x=55W:20E

let lvi_ATL_hist_carbon   =   lv_carbon[x=@SUM,z=@SUM,l=1:20@ave]
           *** NOTE: Ambiguous coordinates on T axis: VOLUME_TRANSPORT*DISSIC_ANN_TAXIS*12.0107*10^-15*31536000
 **ERROR: inconsistent sizes of data regions: T axis
          DISSIC_ANN_TAXIS has 21 points (L=01:21)
          _expression_ has 20 points (L=01:20)

This error makes no sense to me, how does DISSIC_ANN_TAXIS have 21 points? This is grid of DISSIC_ANN_TAXIS:


yes? show grid DISSIC_ANN_TAXIS

    GRID (G007)

 name       axis              # pts   start                end                 subset

 RLON      LONGITUDE          360mr   80.5E(-279.5)        79.5E               full

 RLAT      LATITUDE           200 i   81S                  90N                 full

 LEV       DEPTH (m)           50 i-  5                    5316.4              full

 TVMO      TIME               115 r   17-JUL-1986 00:00    17-JUL-2100 00:00   full


If I list lv_carbon[x=@SUM,z=@SUM]
I get the correct 20 values:

 JUL-1986 /  1: -0.6929

 JUL-1987 /  2: -0.6835

 JUL-1988 /  3: -0.6320

 JUL-1989 /  4: -0.6169

 JUL-1990 /  5: -0.7557

 JUL-1991 /  6: -0.5893

 JUL-1992 /  7: -0.5602

 JUL-1993 /  8: -0.6603

 JUL-1994 /  9: -0.5901

 JUL-1995 / 10: -0.7569

 JUL-1996 / 11: -0.6533

 JUL-1997 / 12: -0.6598

 JUL-1998 / 13: -0.6744

 JUL-1999 / 14: -0.7347

 JUL-2000 / 15: -0.5964

 JUL-2001 / 16: -0.5854

 JUL-2002 / 17: -0.5836

 JUL-2003 / 18: -0.6827

 JUL-2004 / 19: -0.5843

 JUL-2005 / 20: -0.6224


and then all of a sudden the average function works without the error:

yes? list lv_carbon[x=@SUM,z=@SUM,l=1:20@ave]

             VARIABLE : CARBON_TRANSPORT

             LONGITUDE: 55W to 20E(380) (XZ summed)

             LATITUDE : 30S

             DEPTH (m): 0 to 5500 (XZ summed)

             TIME     : 16-JAN-1986 00:00 to 16-JAN-2006 00:00 (averaged) NOLEAP

         -0.6457

yes? let lvi_ATL_hist_carbon = lv_carbon[x=@SUM,z=@SUM,l=1:20@ave]

yes? list lvi_ATL_hist_carbon

             VARIABLE : LV_CARBON[X=@SUM,Z=@SUM,L=1:20@AVE]

             LONGITUDE: 55W to 20E(380)

             LATITUDE : 30S

             DEPTH (m): 0 to 5500

             TIME     : 16-JAN-1986 00:00 to 16-JAN-2006 00:00 NOLEAP

         -0.6457


Any insight into this strange behavior would be great as it is preventing me from running my script !

Thank you,

Becki
--
Ansley Manke
NOAA/PMEL Science Data Integration Group
7600 Sand Point Way NE
206-526-6246

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement