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

Not printing empty variable to files #198

Open BaptisteVandecrux opened 8 months ago

BaptisteVandecrux commented 8 months ago

At KAN_B for example, there is no GPS, no ice temperature, no pressure transducer

We had already removed the variables cc, dlhf, dshf from the tundra sites: https://github.com/GEUS-Glaciology-and-Climate/pypromice/issues/155

Should we also do the same with t_i and z_pt? Some tundra sites might have active GPS ?

Same thing for KAN_U that never had a pressure transducer.

BaptisteVandecrux commented 6 months ago

This could be fixed by adding:


        # removing empty variables
        for var in self.L3.data_vars:
            if self.L3[var].isnull().all():
                logger.info(f'removing {var} because empty')
                col_names.remove(var)

right after colname is being defined: https://github.com/GEUS-Glaciology-and-Climate/pypromice/blob/a7997ef0b7f347ed7649cdd37edad1f6f7eade2c/src/pypromice/process/aws.py#L149-L168

But we need to decide: