-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
851 fix test prevent dtype int testcase (#856)
* avoid local data usage * fixed and added testcases
- Loading branch information
1 parent
4f59b92
commit fb2c4fc
Showing
3 changed files
with
60 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Created on Thu May 16 15:51:44 2024 | ||
@author: veenstra | ||
""" | ||
import pytest | ||
import dfm_tools as dfmt | ||
import os | ||
|
||
|
||
@pytest.mark.requiressecrets | ||
@pytest.fixture | ||
def file_nc_era5_pattern(tmp_path): | ||
date_min = '2010-01-31' | ||
date_max = '2010-02-01' | ||
longitude_min, longitude_max, latitude_min, latitude_max = 2, 3, 51, 52 #test domain | ||
variables_era5 = ['msl']#'v10n'] # check variables_dict in dfmt.download_ERA5() for valid names | ||
for varkey in variables_era5: | ||
dfmt.download_ERA5(varkey, | ||
longitude_min=longitude_min, longitude_max=longitude_max, latitude_min=latitude_min, latitude_max=latitude_max, | ||
date_min=date_min, date_max=date_max, | ||
dir_output=tmp_path, overwrite=True) | ||
|
||
# assert downloaded files | ||
file_nc_era5_pattern = os.path.join(tmp_path, "*.nc") | ||
return file_nc_era5_pattern |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters