@@ -93,8 +93,8 @@ def fetch_atmospheric_data_from_windy(lat, lon, model):
9393
9494
9595def fetch_gfs_file_return_dataset (max_attempts = 10 , base_delay = 2 ):
96- """Fetches the latest GFS (Global Forecast System) dataset from the NOAA's
97- GrADS data server using the OpenDAP protocol.
96+ """Fetches the latest GFS (Global Forecast System) dataset from the UCAR
97+ THREDDS data server using the OPeNDAP protocol.
9898
9999 Parameters
100100 ----------
@@ -128,8 +128,8 @@ def fetch_gfs_file_return_dataset(max_attempts=10, base_delay=2):
128128
129129
130130def fetch_nam_file_return_dataset (max_attempts = 10 , base_delay = 2 ):
131- """Fetches the latest NAM (North American Mesoscale) dataset from the NOAA's
132- GrADS data server using the OpenDAP protocol.
131+ """Fetches the latest NAM (North American Mesoscale) dataset from the UCAR
132+ THREDDS data server using the OPeNDAP protocol.
133133
134134 Parameters
135135 ----------
@@ -161,8 +161,8 @@ def fetch_nam_file_return_dataset(max_attempts=10, base_delay=2):
161161
162162
163163def fetch_rap_file_return_dataset (max_attempts = 10 , base_delay = 2 ):
164- """Fetches the latest RAP (Rapid Refresh) dataset from the NOAA's GrADS data
165- server using the OpenDAP protocol.
164+ """Fetches the latest RAP (Rapid Refresh) dataset from the UCAR THREDDS
165+ data server using the OPeNDAP protocol.
166166
167167 Parameters
168168 ----------
@@ -193,78 +193,6 @@ def fetch_rap_file_return_dataset(max_attempts=10, base_delay=2):
193193 raise RuntimeError ("Unable to load latest weather data for RAP through " + file_url )
194194
195195
196- def fetch_hrrr_file_return_dataset (max_attempts = 10 , base_delay = 2 ):
197- """Fetches the latest HRRR (High-Resolution Rapid Refresh) dataset from
198- the NOAA's GrADS data server using the OpenDAP protocol.
199-
200- Parameters
201- ----------
202- max_attempts : int, optional
203- The maximum number of attempts to fetch the dataset. Default is 10.
204- base_delay : int, optional
205- The base delay in seconds between attempts. Default is 2.
206-
207- Returns
208- -------
209- netCDF4.Dataset
210- The HRRR dataset.
211-
212- Raises
213- ------
214- RuntimeError
215- If unable to load the latest weather data for HRRR.
216- """
217- file_url = "https://thredds.ucar.edu/thredds/dodsC/grib/NCEP/HRRR/CONUS_2p5km/Best"
218- attempt_count = 0
219- while attempt_count < max_attempts :
220- try :
221- return netCDF4 .Dataset (file_url )
222- except OSError :
223- attempt_count += 1
224- time .sleep (base_delay ** attempt_count )
225-
226- raise RuntimeError (
227- "Unable to load latest weather data for HRRR through " + file_url
228- )
229-
230-
231- def fetch_aigfs_file_return_dataset (max_attempts = 10 , base_delay = 2 ):
232- """Fetches the latest AIGFS (Artificial Intelligence GFS) dataset from
233- the NOAA's GrADS data server using the OpenDAP protocol.
234-
235- Parameters
236- ----------
237- max_attempts : int, optional
238- The maximum number of attempts to fetch the dataset. Default is 10.
239- base_delay : int, optional
240- The base delay in seconds between attempts. Default is 2.
241-
242- Returns
243- -------
244- netCDF4.Dataset
245- The AIGFS dataset.
246-
247- Raises
248- ------
249- RuntimeError
250- If unable to load the latest weather data for AIGFS.
251- """
252- file_url = (
253- "https://thredds.ucar.edu/thredds/dodsC/grib/NCEP/AIGFS/Global_0p25deg/Best"
254- )
255- attempt_count = 0
256- while attempt_count < max_attempts :
257- try :
258- return netCDF4 .Dataset (file_url )
259- except OSError :
260- attempt_count += 1
261- time .sleep (base_delay ** attempt_count )
262-
263- raise RuntimeError (
264- "Unable to load latest weather data for AIGFS through " + file_url
265- )
266-
267-
268196def fetch_hiresw_file_return_dataset (max_attempts = 10 , base_delay = 2 ):
269197 """Fetches the latest HiResW (High-Resolution Window) dataset from the NOAA's
270198 GrADS data server using the OpenDAP protocol.
0 commit comments