[ecco-support] ECCO question

Maike Sonnewald maikejulie at gmail.com
Fri Jan 25 18:03:29 EST 2019


Hei Olivia,

Just for plotting, try something like:

   lon=[-179.9:0.5:179.9]; lat=[-89.9:0.5:89.9]; % Random regular grid.
Change as appropriate
   [lat,lon] = meshgrid(lat,lon);
   interp=gcmfaces_interp_coeffs(lon(:),lat(:));
%Assume fld is your field of interest
    tmpVec=convert2vector(fld);
    tmp0=1*~isnan(tmpVec);
    tmp1(isnan(tmpVec))=0;
%
    tmp0=interp.SPM*tmp0;
    tmpVec=interp.SPM*tmpVec;
% Interpolated field you can save:
    fldRegular=reshape(tmpVec./tmp0,size(lon));

Hope this is useful for you. NB: For doing anything other than plotting I
would be a bit careful.

Gael Forget is developing some Julia tools, and there are some nice python
tutorials online here: https://ecco-v4-python-tutorial.readthedocs.io/
(Including plotting! I would go here to avoid interpolation... ;))

Happy weekend!

Maike


*____________*
*Maike Sonnewald*
Postdoctoral Associate

*Earth, Atmospheric and Planetary Sciences*
Massachusetts Institute of Technology
Visitor Harvard University

msonnewald.com



On Fri, Jan 25, 2019 at 5:51 PM ogozdz <ogozdz at masonlive.gmu.edu> wrote:

> Hi All,
>
>
> I am a Ph.D. student and I am currently trying to plot a gcmfaces object
> in python. I did a statistical calculation in MatLab and am trying to write
> my variable to a netCDF file to plot in python. I was wondering if there is
> a way to interpolate/convert the grid in MatLab so I can write a netCDF
> file where the variable is consistent with (mygrid.LATS [-90 to 90],
> mygrid.LONS [0 to 360]). Please let me know if you have any advice on how
> to proceed with this issue. I have read the documentation on ECCO in
> python, but nothing addresses this question in that documentation. Looking
> forward to hearing from you.
>
>
> Thank you,
>
> Olivia Gozdz
> _______________________________________________
> ecco-support mailing list
> ecco-support at mit.edu
> http://mailman.mit.edu/mailman/listinfo/ecco-support
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/ecco-support/attachments/20190125/499b51f5/attachment-0001.html


More information about the ecco-support mailing list