GEUS-Glaciology-and-Climate / pypromice

Process AWS data from L0 (raw logger) through Lx (end user)
https://pypromice.readthedocs.io
GNU General Public License v2.0
12 stars 4 forks source link

Fixing #63 #110

Closed BaptisteVandecrux closed 1 year ago

BaptisteVandecrux commented 1 year ago

Steam point temperature was wrongly defined as t_l +100 or t_i +100. Now it is defined as T_0 + 100. Affects rh_l_cor and rh_i_cor.

PennyHow commented 1 year ago

Ah, we have our process check failing in L1toL2 on the following line:

ds['rh_l_cor'] = correctHumidity(ds['rh_l'], ds['t_l'], T_l,           # Correct relative humidity

With the following message:

NameError: name 'T_l' is not defined

Because we are using T_0 now, T_l and T_i are not defined. So a suggested correction is:

ds['rh_l_cor'] = correctHumidity(ds['rh_l'], ds['t_l'], T_0,           # Correct relative humidity

And this will also be needed for correcting humidity from the instantaneous measurements also.

Do you want to put this in @BaptisteVandecrux?

BaptisteVandecrux commented 1 year ago

And a very quick turnaround.

Maybe a bit too quick! Anyway now I fixed the issues and removed the deep copies of T_u, T_l, T_i. Can you re-make your comparison from issue #109? It will also make sure that the fix produces good values.

Great testing procedure!

PennyHow commented 1 year ago

I'm very thankful for these testing procedures now! I'll plot it up and see whether it resolves issue #109

Thank you!

PennyHow commented 1 year ago

I just checked the rh_u from NUK_K with this new fix. It doesn't seem to change anything from our side, but I can't see the same Edition 4 output as what Asiaq showed in #109.

So I think for our processing, this PR is fine now and running well. I'll get Asiaq to pull the latest data and see if that clears things up for them.

Our current processing of Edition 4 rh_u_cor vs. Edition 3 RelativeHumidity(%) nuk_k_edition3_edition4_pre-fix

This new developmental processing (ran with Fixing-RH-correction) rh_u_cor vs. Edition 3 RelativeHumidity(%) nuk_k_edition3_edition4_post-fix

PennyHow commented 1 year ago

Approved. Feel free to merge @BaptisteVandecrux