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

suppress chunking warning again #947

Closed
veenstrajelmer opened this issue Aug 13, 2024 · 0 comments · Fixed by #952
Closed

suppress chunking warning again #947

veenstrajelmer opened this issue Aug 13, 2024 · 0 comments · Fixed by #952

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Aug 13, 2024

chunking warning was suppressed in #679, then suppression was reverted in #888.

However, the below code still raises the performancewarning:

import dfm_tools as dfmt
file_nc = r'p:\11208983-epd-support-tools\toolbox\EPD_Support_Tool\simulations\HK-DFM_scenario\DFM_OUTPUT_HK-FMWAQ\HK-FMWAQ_0000_map.nc'
uds = dfmt.open_partitioned_dataset(file_nc)

Prints:

>> xu.open_dataset() with 1 partition(s): 1 C:\Users\veenstra\Anaconda3\envs\dfm_tools_env\Lib\site-packages\xarray\core\dataset.py:274: UserWarning: The specified chunks separate the stored chunks along dimension "time" starting at index 1. This could degrade performance. Instead, consider rechunking after loading.
  warnings.warn(
: 0.36 sec

Apparently it still needs suppression for some files, so has to be suppressed again. Consider doing it in dfmt.open_partitioned_dataset() with a with-statement and maybe make it optional with a keyword.

@veenstrajelmer veenstrajelmer changed the title solve chunking warning again suppress chunking warning again Aug 13, 2024
@veenstrajelmer veenstrajelmer linked a pull request Aug 13, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant