Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optimization: wrong dimensionality of string arrays #49

Open
pacesm opened this issue May 11, 2021 · 0 comments
Open

optimization: wrong dimensionality of string arrays #49

pacesm opened this issue May 11, 2021 · 0 comments

Comments

@pacesm
Copy link
Contributor

pacesm commented May 11, 2021

The dimension of the string arrays saved in the optimized netCDF is not the same as read from the original product. This is likely caused by treating the strings as nested arrays (both dtype object).

E.g., the AE_OPER_AUX_ZWC_1B_20191125T225435_20191126T002435_000 /DATA/ZWC_result_type from the original product is read as (shape (106,)):

[
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Rayleigh', 'ZWC_Mie', 'ZWC_Mie', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Rayleigh', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Mie',
    'ZWC_Both', 'ZWC_Rayleigh', 'ZWC_Both', 'ZWC_Mie', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Mie', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both',
    'ZWC_Both', 'ZWC_Both', 'ZWC_Both', 'ZWC_Both'
]

... but the netCDF stores the same variable as (shape (106, 1))

[
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Rayleigh'], ['ZWC_Mie'], ['ZWC_Mie'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Rayleigh'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Mie'], ['ZWC_Both'],
    ['ZWC_Rayleigh'], ['ZWC_Both'], ['ZWC_Mie'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Mie'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'], ['ZWC_Both'],
    ['ZWC_Both']
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant