Skip to content

Collocated External Data.  #24

@acapet

Description

@acapet

Hi !

I'm trying to load external data (SST) using the same data structure for collocation (eg. assess mean SST anomalies within contours).

I think I'm almost there, just miss the interpolation step.

datest = '20160721'
SLAfilename = "../l4_"+set1+"/dt_blacksea_allsat_phy_l4_"+datest+"_"+dat1+".nc"
SSTfilename = "../SST/"+datest+"000000-GOS-L4_GHRSST-SSTfnd-OISST_HR_REP-BLK-v02.0-fv01.0.nc4" 

g = RegularGridDataset(SLAfilename, x_name= 'longitude',y_name= 'latitude') 
t = RegularGridDataset(filename=SSTfilename, x_name="lon", y_name="lat") 
t.grid('analysed_sst')

So far, so good. Then I'd like to use :

g.add_grid('sst',ti)

with

ti=t.interp('analysed_sst',g.grid(lon_name),g.grid(lat_name))

but something is wrong.

Among what I noticed :

  • As above, ti is an array, not a masked array. Could that make an issue for add_grid ?
  • ti does not have the good shape ti.shape=(120,), instead of g.grid('sla').shape=(120,56). Should I use a meshgrid of g.grid(lon_name),g.grid(lat_name) before calling interp ?
  • Anyway, I wonder if I'm using the right tool to interpolate, or if there is another one, more specific for interpolating from one regular grid to another.

Thanks for insights !!

Art

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions