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
14 stars 4 forks source link

Not printing empty variable to files #198

Closed BaptisteVandecrux closed 2 months ago

BaptisteVandecrux commented 1 year 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 10 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:

BaptisteVandecrux commented 2 months ago

in #294 level 3 files do not have variables containing only NaNs: https://github.com/GEUS-Glaciology-and-Climate/pypromice/blob/3813c77eec8220ac174dae52699b62e00221fa04/src/pypromice/process/write.py#L80-L85