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

sub-daily freq for dfmt.download_CMEMS results in empty files #720

Closed
veenstrajelmer opened this issue Dec 21, 2023 · 0 comments · Fixed by #733
Closed

sub-daily freq for dfmt.download_CMEMS results in empty files #720

veenstrajelmer opened this issue Dec 21, 2023 · 0 comments · Fixed by #733

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Dec 21, 2023

This makes sense, since date_str is the same and subsets to 0 hours. Add test to freq that raises error if freq<D. 24h also causes this issue, while 1D works perfectly fine. 1.5D also causes this issue. It happens with all date_str containing more than just y/m/d. We would also get unexpected behaviour with 2M, since only every other month would be downloaded. Maybe it is wise to only accept D/1D/M/1M.

MWE:

import dfm_tools as dfmt
dfmt.download_CMEMS(varkey='uo',
                    longitude_min=142,
                    longitude_max=144,
                    latitude_min=-45,
                    latitude_max=-43,
                    date_min='2023-12-20',
                    date_max='2023-12-21',
                    freq='6h',
                    dir_output='.',
                    file_prefix='CMEMS_',
                    overwrite=True)
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