From 71555ac4f991b020de95260850cf1c2b54a74cd3 Mon Sep 17 00:00:00 2001 From: Ralf Mueller Date: Wed, 19 Nov 2025 14:16:12 +0100 Subject: [PATCH 1/2] first attempt to add python-cdo for myphys output comparison --- .../tests/muphys/integration_tests/run_graupel_only.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/model/atmosphere/subgrid_scale_physics/muphys/tests/muphys/integration_tests/run_graupel_only.py b/model/atmosphere/subgrid_scale_physics/muphys/tests/muphys/integration_tests/run_graupel_only.py index 1bda067112..8a0cfd4366 100755 --- a/model/atmosphere/subgrid_scale_physics/muphys/tests/muphys/integration_tests/run_graupel_only.py +++ b/model/atmosphere/subgrid_scale_physics/muphys/tests/muphys/integration_tests/run_graupel_only.py @@ -477,3 +477,11 @@ def write_fields( pflx=np.transpose(pflx_out.asnumpy()), pre_gsp=data.pre_gsp, ) + +from cdo import Cdo + +cdo = Cdo() + +for varname in ['ta','hus','clw','cli','qr','qs','qg']: + cdo.diffn(input=f' -selname,{varname} junk.nc -selname,{varname}', + output='../../MUPHYS/muphys/build_apple/new_fields.nc') From 11ef35da0c58bd9e99abf60254592f2cea3ad679 Mon Sep 17 00:00:00 2001 From: Ralf Mueller Date: Wed, 19 Nov 2025 20:29:00 +0100 Subject: [PATCH 2/2] add abslim parameter --- .../muphys/tests/muphys/integration_tests/run_graupel_only.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/atmosphere/subgrid_scale_physics/muphys/tests/muphys/integration_tests/run_graupel_only.py b/model/atmosphere/subgrid_scale_physics/muphys/tests/muphys/integration_tests/run_graupel_only.py index 8a0cfd4366..be6d97a9dd 100755 --- a/model/atmosphere/subgrid_scale_physics/muphys/tests/muphys/integration_tests/run_graupel_only.py +++ b/model/atmosphere/subgrid_scale_physics/muphys/tests/muphys/integration_tests/run_graupel_only.py @@ -483,5 +483,6 @@ def write_fields( cdo = Cdo() for varname in ['ta','hus','clw','cli','qr','qs','qg']: - cdo.diffn(input=f' -selname,{varname} junk.nc -selname,{varname}', + cdo.diffn('abslim=3e-13', + input=f' -selname,{varname} junk.nc -selname,{varname}', output='../../MUPHYS/muphys/build_apple/new_fields.nc')