initFromNetCDFFile
initialize the flow from a NetCDF file
Declaration
initFromNetCDFFile(ncfile,options)
Parameters
ncfilea NetCDF file objectoptions.iTimetime index to initialize from; default1options.shouldDisplayInitdisplay the restored representation; defaultfalse
Discussion
Clears variables Ap,Am,A0 and then sets them the values found in the file at the requested time.
This is intended to be used in conjunction with
waveVortexTransformFromFile
e.g.,
[wvt,ncfile] = WVTransform.waveVortexTransformFromFile('cyprus-eddy.nc');
t = ncfile.readVariables('t');
for iTime=1:length(t)
wvt.initFromNetCDFFile(ncfile,iTime=iTime)
// some analysis
end
Note that this method only lightly checks that you are reading from a file that is compatible with this transform! So be careful.
See also the users guide for reading and writing to file.