From 45d9734e3d7f549863f8430356ed2ef19087afdc Mon Sep 17 00:00:00 2001 From: mebruckner <48494069+mebruckner@users.noreply.github.com> Date: Wed, 6 Mar 2024 14:12:23 -0600 Subject: [PATCH] bug fix when pairing was performed for multiple model datasets scaling of mopitt observation occured each time. This carried over after pairing for each model because observation dataset was being shallow copied into the paired dataset. --- melodies_monet/util/satellite_utilities.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/melodies_monet/util/satellite_utilities.py b/melodies_monet/util/satellite_utilities.py index ccacdb7b..498ed19c 100644 --- a/melodies_monet/util/satellite_utilities.py +++ b/melodies_monet/util/satellite_utilities.py @@ -102,7 +102,7 @@ def mopitt_l3_pairing(model_data,obs_data,co_ppbv_varname): # Add variable name to smoothed model dataarray, combine with obs_data smoothed = smoothed.rename(co_ppbv_varname+'_column_model') - ds = xr.merge([smoothed,obs_data]) + ds = xr.merge([smoothed,obs_data.copy(deep=True)]) # Apply scaling to drop scientific notation (x10^{18} molec/cm2 instead of molec/cm2) ## Taylor plot doesn't work if don't do this.