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')
[2]:
lam = epygram.formats.resource(os.path.join(INPUTS_DIR, 'ICMSHAROM+0022'), 'r')
gauss = epygram.formats.resource(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)
# [2024/09/27-14:29:11][numexpr.utils][_init_num_threads:0147][INFO]: Note: NumExpr detected 16 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
[5]:
fgl.geometry
[5]:
<epygram.geometries.ProjectedGeometry.ProjectedGeometry at 0x77f614dab820>
[6]:
fig, ax = fl.cartoplot()
[7]:
fig, ax = fgl.cartoplot()
[8]:
fgl = fg.resample(fl.geometry, reduce_data=False, weighting='gauss')
/home/mary/repositories/EPyGrAM/src/epygram/fields/D3Field.py:1170: 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()
[ ]: