Skip to content

Commit

Permalink
Merge pull request #95 from CIAT-DAPA/develop
Browse files Browse the repository at this point in the history
string error
  • Loading branch information
santiago123x authored Oct 8, 2024
2 parents db146a1 + 06ea92a commit bb473fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/aclimate_resampling/complete_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,15 @@ def download_era5_data(self,variables=["t_max","t_min","sol_rad"], test = False)
self.manager.mkdir(save_path_era5_data_tmp)

if self.force or os.path.exists(save_path_era5) == False:
formatted_month = [f"{int(month):02d}" if isinstance(month, str) else f"{month:02d}"]
c = cdsapi.Client(timeout=600)
c.retrieve('sis-agrometeorological-indicators',
{
'format': 'zip',
'variable': enum_variables[v]["name"],
'statistic': enum_variables[v]["statistics"],
'year': year,
'month': [f"{month:02d}"],
'month': formatted_month,
'day': days,
'version': self.cdsapi_version,
},
Expand Down

0 comments on commit bb473fa

Please sign in to comment.