Skip to content
Snippets Groups Projects
Commit 6462ad81 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Add Remap_healpix.py.test.in

parent edcc823a
No related branches found
No related tags found
No related merge requests found
Pipeline #29967 failed
Showing
with 63 additions and 1 deletion
......@@ -250,6 +250,7 @@ AC_CONFIG_FILES([test/pytest/cdoTest.py
test/pytest/Remap_noweights.py.test
test/pytest/Remap2.py.test
test/pytest/Remap_global_5_grid.py.test
test/pytest/Remap_healpix.py.test
test/pytest/Remap_small.py.test
test/pytest/Remap_extra.py.test
test/pytest/Remap_extra_file.py.test
......
......@@ -49,6 +49,10 @@ SPECTRAL = sp2gp_ref sp2gpl_ref gp2sp_ref gp2spl_ref
WIND = dv2ps_ref dv2uv_ref dv2uvl_ref uv2dv_ref uv2dvl_ref
INTTIME = inttime_ref intyear1992_ref
VERTINT = intlevel_ref intlevel_1_ref intlevel_2_ref intlevel3d_1_ref intlevel3d_2_ref ml2plx_ref ap2pl_ref gh2hl_ref gh2hlx_ref vert3D_c1.srv vert3D_c2.srv
REMAPHEALPIX = temp_remapcon_global_2_to_hp16_nest_ref temp_remapcon_hp16_nest_to_hp16_nest_ref temp_remapcon_hp32_nest_to_global_5_ref \
temp_remapdis_global_2_to_hp16_nest_ref temp_remapdis_hp16_nest_to_hp16_nest_ref temp_remapdis_hp32_nest_to_global_5_ref \
temp_remaplaf_global_2_to_hp16_nest_ref temp_remaplaf_hp16_nest_to_hp16_nest_ref temp_remaplaf_hp32_nest_to_global_5_ref \
temp_remapnn_global_2_to_hp16_nest_ref temp_remapnn_hp16_nest_to_hp16_nest_ref temp_remapnn_hp32_nest_to_global_5_ref
REMAPGRID = temp_remapbic_global_2_to_global_5_ref temp_remapcon2_global_2_to_global_5_ref temp_remapdis_global_2_to_global_5_ref temp_remapnn_global_2_to_global_5_ref \
temp_remapbil_global_2_to_global_5_ref temp_remapscon_global_2_to_global_5_ref temp_remaplaf_global_2_to_global_5_ref temp_remapcon_global_2_to_global_5_ref \
temp_remapbic_global_5_to_global_2_ref temp_remapcon2_global_5_to_global_2_ref temp_remapdis_global_5_to_global_2_ref temp_remapnn_global_5_to_global_2_ref \
......@@ -171,5 +175,5 @@ EXTRA_DIST = $(INPUTDATA) $(FILE) $(GRIB) $(NETCDF) $(ADISIT) $(EOF) $(COMP) $(Y
$(ISOSURFACE) $(ECA) $(ETCCDI) $(MATH) \
$(MASKREGION) $(MASKLONLATBOX) $(MASKINDEXBOX) $(SELREGION) $(SELLONLATBOX) $(SELINDEXBOX) \
$(TIMSTAT) $(YEARSTAT) $(MONSTAT) $(DAYSTAT) $(TIMSTATM) $(YEARSTATM) $(MONSTATM) $(DAYSTATM) \
$(MERSTAT) $(ZONSTAT) $(ENSSTAT) $(ENSSTATM) $(ENSPCTL) $(SPECTRAL) $(WIND) $(INTTIME) $(VERTINT) $(REMAPGRID) $(REMAPSTAT) $(REMAP) $(REMAP2) $(REMAP3) $(REMAP4) $(SELECT) $(DETREND) \
$(MERSTAT) $(ZONSTAT) $(ENSSTAT) $(ENSSTATM) $(ENSPCTL) $(SPECTRAL) $(WIND) $(INTTIME) $(VERTINT) $(REMAPHEALPIX) $(REMAPGRID) $(REMAPSTAT) $(REMAP) $(REMAP2) $(REMAP3) $(REMAP4) $(SELECT) $(DETREND) \
$(THREAD) $(EXPR) $(GRADSDES) $(ARITH) $(DAYARITH) $(MONARITH) $(YEARARITH) $(YDAYARITH) $(YMONARITH) $(MAPREDUCE) $(MERGETIME) $(REMAPETA) $(SMOOTH) $(SETMISS) $(FILTER) $(PERCENTILE)
......@@ -7,6 +7,31 @@ FORMAT="-f srv -b F32"
#
########################################################################
#
# Remapstat
#
OPERATORS="remapnn remapdis remapcon remaplaf"
#
SRCGRID=hp32_nest
TGTGRID=global_5
for OPERATOR in $OPERATORS; do
$CDO $FORMAT ${OPERATOR},${TGTGRID} -temp,${SRCGRID} temp_${OPERATOR}_${SRCGRID}_to_${TGTGRID}_ref
done
#
SRCGRID=global_2
TGTGRID=hp16_nest
for OPERATOR in $OPERATORS; do
$CDO $FORMAT ${OPERATOR},${TGTGRID} -temp,${SRCGRID} temp_${OPERATOR}_${SRCGRID}_to_${TGTGRID}_ref
done
#
SRCGRID=hp16_nest
TGTGRID=hp16_nest
for OPERATOR in $OPERATORS; do
$CDO $FORMAT ${OPERATOR},${TGTGRID} -temp,${SRCGRID} temp_${OPERATOR}_${SRCGRID}_to_${TGTGRID}_ref
done
#
exit
########################################################################
#
# Percentile methods
#
FORMAT="-f ext -b F32"
......
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
......@@ -62,6 +62,7 @@ TESTS =\
Remap_noweights.py.test\
Remap2.py.test\
Remap_global_5_grid.py.test\
Remap_healpix.py.test\
Remap_small.py.test\
Remap_extra.py.test\
Remap_extra_file.py.test\
......
#! @PYTHON@
from cdoTest import *
from collections import defaultdict
HAS_THREADS=cdo_check_req("has-threads")
FORMAT="-f srv -b 32"
OPERATORS=["remapcon","remapdis","remapnn","remaplaf"]
ABSLIM=defaultdict(lambda : 0.002, {"remaplaf" : 30})
test_module=TestModule()
SRCGRIDS=["hp32_nest", "global_2", "hp16_nest"]
TGTGRIDS=["global_5", "hp16_nest", "hp16_nest"]
for SRCGRID,TGTGRID in zip(SRCGRIDS,TGTGRIDS):
for OPERATOR in OPERATORS:
if (not HAS_THREADS):
test_module.add_skip("POSIX threads not enabled")
continue
OFILE=f'temp_{OPERATOR}_{SRCGRID}_to_{TGTGRID}_res'
RFILE=f'{DATAPATH}/temp_{OPERATOR}_{SRCGRID}_to_{TGTGRID}_ref'
t=TAPTest(f'{OPERATOR} {SRCGRID} to {TGTGRID}')
t.add(f'{CDO} {FORMAT} {OPERATOR},{TGTGRID} -temp,{SRCGRID} {OFILE}')
t.add(f'{CDO} diff,abslim={ABSLIM[OPERATOR]} {OFILE} {RFILE}')
t.clean(OFILE)
test_module.add(t)
test_module.run()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment