[Thread Prev][Thread Next][Index]

Re: [ferret_users] Re: memory strategies for handling large computational requests



Hi Patrick,

What I would do in your case (if you just want to use Ferret), is to first record in a new file the output of your spatial average and vertical integration. As it may be to large to write at once, you can loop through the time index, something like:

use CM6012.1-pi-ttop-02_23200101_30091231_1M_transpir.nc
let vardata=TRANSPIR[k=@sum, x=@ave, y=@ave]
repeat/range=1:1200/name=idloop (save/append/file=TMPfile.nc vardata[l='idloop'] )

Then you cancel your first data, or at least the definition of "var"
cancel data/all
cancel var/all

You load your TMPfile.nc, and plot the data (as it's just a time series, now you can apply the @sbx:120 easily)

It may not be the most optimal way, but at least it's working ;)

Cheers,
Nico



2017-11-22 17:08 GMT+00:00 Patrick Brockmann <patrick.brockmann@xxxxxxxxxxxx>:
Hi Jörg,

Thank you for your answer.
You are right, nco commands are sometimes a good choice to perform calculations.
But the example I have detailled is a very simple case of more complicated calculs where all the
nested variable definitions offered by ferret and its grammar is very well adapted.
It means opening multiple files, combining variables with different conditionnal definitions, producing
a plot with a same concise code.

I think it would be quite a big job to translate those ferret scripts with nco commands,
even with the ncap2 command that it is powerfull. So I would like to stay with ferret processing
in my case and get a solution to handle processings for "large" time series.

Best regards
Patrick

--
Data Analysis and Visualization Engineer
LSCE/IPSL, CEA-CNRS-UVSQ laboratory
LSCE - Climate and Environment Sciences Laboratory
IPSL - Institut Pierre Simon Laplace
--




--
----------------------------------------------------
Nicolas Freychet
PDRA, School of Geosciences
University of Edinburgh
----------------------------------------------------

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

Privacy Policy | Disclaimer | Accessibility Statement