MET-OM / metocean-api

Extract time series of metocean data from global/regional/coastal hindcasts/reanalysis
GNU Lesser General Public License v2.1
11 stars 8 forks source link

Dowloading ECHOWAVE dataset in NetCDF format using Meocean-api using a Loop gives "AttributeError: NetCDF: String match to name in use" #49

Closed cnm417 closed 2 days ago

cnm417 commented 2 weeks ago

I am trying to download the ECHOWAVE dataset for the month of January of the year 2000 using a loop and the metocean-api; however, it keeps failing due to the error "AttributeError: NetCDF: String match to name in use". I have tried many things and don't know what else to do. This only happens when trying to download a NetCDF format and not a csv format. The code is attached in a .pdf file. Please help me find the source of the problem.

ECHOWAVE_download_code.pdf

lassebje commented 1 week ago

@cnm417 It seems to be working for me for a couple of coordinates at least before i terminate manually. Which version of metocean_api are you using? This is an error i recognize from an earlier version, so it might work if you upgrade. A small tip though, it will be beneficial if you use the use_cache option (df_ts.import_data(save_csv=False, save_nc=True,use_cache=True)) when downloading this many files. Then if something happens you will be able to resume where you last dropped of.