Interpolate (resample) on a different geometryΒΆ

[1]:
%matplotlib inline
# for figures in notebook

# import & initialize epygram
import epygram
epygram.init_env()

import os
INPUTS_DIR = os.path.join('..', 'inputs')
# [2025/01/16-17:42:45][epygram.formats][<module>:0072][INFO]: Format: HDF5SAF is deactivated at runtime (Error: No module named 'h5py'). Please deactivate from config.implemented_formats or fix error.
[2]:
lam = epygram.open(os.path.join(INPUTS_DIR, 'ICMSHAROM+0022'), 'r')
gauss = epygram.open(os.path.join(INPUTS_DIR, 'analysis.full-arpege.tl149-c24.fa'), 'r')
[3]:
fl = lam.readfield('SURFTEMPERATURE')
fg = gauss.readfield('SURFTEMPERATURE')
[4]:
fgl = fg.resample(fl.geometry, reduce_data=False)
[5]:
fgl.geometry
[5]:
<epygram.geometries.ProjectedGeometry.ProjectedGeometry at 0x7d3aadb628f0>
[6]:
fig, ax = fl.cartoplot()
../../_images/gallery_D.1-horizontal_geometry_03.resample_6_0.png
[7]:
fig, ax = fgl.cartoplot()
../../_images/gallery_D.1-horizontal_geometry_03.resample_7_0.png
[8]:
fgl = fg.resample(fl.geometry, reduce_data=False, weighting='gauss')
/home/mary/repositories/EPyGrAM/src/epygram/fields/D3Field.py:1167: UserWarning: Possible more than 8 neighbours within 1264951.7496038408 m for some data points
  distance_array) = get_neighbour_info(source_geo,
[9]:
fig, ax = fgl.cartoplot()
../../_images/gallery_D.1-horizontal_geometry_03.resample_9_0.png
[ ]: