[Thread Prev][Thread Next][Index]

Re: [ferret_users] Selecting groups of data



Hi Alexander,

No, this kind of striding isn't available in Ferret/PyFerret.

Do you want to compute a seasonal climatology?  Or an average to an axis with 4 points per year?  If so then a regridding operation can do it for you without your having to specify strides yourself

For climatologies, here are some details -- see the note at the bottom about the "clim_axes" datasets which define a variety of seasonal calendar axes for both the Gregorian calendar and other calendar definitions

https://ferret.pmel.noaa.gov/Ferret/faq/how-do-i-calculate-climatologies-and-climatological-anomalies

To regrid to a seasonal calendar, you would define your calendar axis and use a regridding operation.

If the grid is still too large to work with for one of the above operations, or if you're doing some other kind of analysis you can work on the grid in pieces, appending to a netCDF file in some dimension other than time.   You need to first set up the file with the full range, and then append into it, filling the grid piece by piece.

https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/converting-to-netcdf/SIMPLE-CONVERSIONS-USING-FERRET#_VPINDEXENTRY_1071

-Ansley

On 1/3/2020 7:23 AM, Alexander Audet wrote:
Ferret User Community
                                       I am trying to work with a very large grided dataset and trying to get as high a resolution as possible. I am trying to correlate 1 season of data across a number of years to a time series. Thus, it appears that I need to average 498355200 points of data into four seasons then perform a stride so that only the winter season is selected (right now defined as JFM, later I will need to compare to DJF).

                                         The problem is that there are too many data points for my ferret to average the data into 4 seasons as it gives me a memory error when I try to work with the resulting variable. If I first trim down the data (stride over several degrees Lat and Long) into a variable, the correlation does work. I think that if I could first isolate JFM monthly data from the rest of the year, then average those, I will be able to perform @AVE over a larger part of the dataset of interest to me and create a higher resolution correlation.

                                         Is there a way to select chunks of data? Say if I had 24 months over 2 years, so that L=1:24, somehow select 1:3, then 13:15? I could imagine using a command like 1:24:3:12, (select 3 points at every 12th value). My browsing through the documentation makes it seem impossible, but it seems like such a simple request, I have a hard time believing that.

Alexander Audet

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

Privacy Policy | Disclaimer | Accessibility Statement