albertotb / get-gfs Goto Github PK
View Code? Open in Web Editor NEWDownloading meteorological information from GFS
License: MIT License
Downloading meteorological information from GFS
License: MIT License
First of all, Thank you for useful repo :D. But I have got "<class 'pydap.model.StructureType'>' object has no attribute 'shape'" while running this command line : get_gfs_hist.py -t 0 10 -x -10 10 -y -10 10 -c example_conf_hist.json 20200505 00
How can I fix this ?
ps. I created conda environment from your YML file.
Hi, hope you're doing well.
I've trying to download data from the historical server from the following coordinates (-32.77946054543407, -70.9403806772067), so i've been running the next line:
python get_gfs_hist.py -t 0 10 -x -71 -69 -y -33 -31 -c example_conf_hist.json 20200101 00
but i've got the following error:
Downloading 20200101 00... [20200101 00] AttributeError: 'str' object has no attribute 'data'
Traceback (most recent call last):
File "get_gfs_hist.py", line 347, in main
verbose=args.verbose,
File "get_gfs_hist.py", line 234, in save_dataset
for time in time_list
File "get_gfs_hist.py", line 234, in
for time in time_list
File "get_gfs_hist.py", line 79, in get_sequential
for var in dataset
File "get_gfs_hist.py", line 79, in
for var in dataset
AttributeError: 'str' object has no attribute 'data'
So... i was wondering if i can get any help here with this download.
Thanks in advance.
Hi @albertotb ,
Could you please advice what I should do to combat the error message below?
Thanks
(py2) C:\get-gfs-master>conda env create -f environment.yml
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:
Dear Alberto,
I have used your notebook to extract wind and pressure data from:
gfs = f"https://nomads.ncep.noaa.gov/dods/gfs_0p25_1hr"
I have produced a netcdf file with u10m, v10m and prmsl (pressure at sea surface level) using:
with xr.open_dataset(url) as ds:
(
ds[var1]
.isel(time=slice(*time))
.sel(lat=slice(*lat), lon=lon)
.to_netcdf(f"{date}_{run:02d}_uv10prmsl.nc")
)
I woiuld like to add the description of the variables contained in the netcdf file par example:
u10m: x-component of the wind at 10m
u10m: y-componet of the wind at 10m
prmsl: atmospheric pressure at sea surface level.
How to proceed please?
Thank you.
Hi Alberto
Not sure if you are still supporting this, but if you are, there seems to have been a change to the ftp location.
Hi Alberto,
Would it possible to download GRIB files instead of CSV's using a similar methodology?
Thanks,
Diego
Dear Alberto,
Could you please help with the following? When testing the real time server script (get_gfs.py) the data is downloaded without any problems.
However, when testing the script for the historical data (get_gfs_hist.py), with the following instruction:
(get-gfs) D:\VLAB\GFS\get-gfs-master>python get_gfs_hist.py -t 0 10 -x -10 10 -y -10 10 -c example_conf_hist.json 20191005 00 -v
I'm getting the following error, related to the 'shape' attribute. Have you ever seen this error? I tried to update the pydap library, but I'm getting the same error.
Thanks in advance!
Regards,
Diego Souza
[20191005 00] AttributeError: '<class 'pydap.model.StructureType'>' object has no attribute 'shape'
Traceback (most recent call last):
File "D:\Users\dsouza\miniconda3\envs\get-gfs\lib\site-packages\pydap\model.py", line 382, in __getattr__
return self[attr]
File "D:\Users\dsouza\miniconda3\envs\get-gfs\lib\site-packages\pydap\model.py", line 425, in __getitem__
return self._getitem_string(key)
File "D:\Users\dsouza\miniconda3\envs\get-gfs\lib\site-packages\pydap\model.py", line 404, in _getitem_string
return self._dict[quote(key)]
KeyError: 'shape'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Users\dsouza\miniconda3\envs\get-gfs\lib\site-packages\pydap\model.py", line 235, in __getattr__
return self.attributes[attr]
KeyError: 'shape'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\VLAB\GFS\get-gfs-master\get_gfs_hist.py", line 233, in main
save_dataset(hour, date, var_config, args.time, args.lat, args.lon, fname, verbose=args.verbose)
File "D:\VLAB\GFS\get-gfs-master\get_gfs_hist.py", line 170, in save_dataset
data_list = [get_general(file, time, var_config, lat_idx,
File "D:\VLAB\GFS\get-gfs-master\get_gfs_hist.py", line 170, in <listcomp>
data_list = [get_general(file, time, var_config, lat_idx,
File "D:\VLAB\GFS\get-gfs-master\get_gfs_hist.py", line 105, in get_general
var_data = [ pd.DataFrame((np.concatenate((var_w.data, var_e.data),
File "D:\VLAB\GFS\get-gfs-master\get_gfs_hist.py", line 106, in <listcomp>
axis=len(var_w.shape)-1)
File "D:\Users\dsouza\miniconda3\envs\get-gfs\lib\site-packages\pydap\model.py", line 384, in __getattr__
return DapType.__getattr__(self, attr)
File "D:\Users\dsouza\miniconda3\envs\get-gfs\lib\site-packages\pydap\model.py", line 237, in __getattr__
raise AttributeError(
AttributeError: '<class 'pydap.model.StructureType'>' object has no attribute 'shape'
Hi, I've been trying to install and run this but haven't had any luck.
But after that I'm lost.
Any chance for a more detailed how to guide for beginners? would be much appreciated
Hi, I am trying to create an algorithm that will check every day if the 00 o'clock weather has already come out, select the parameters, trim to a certain spatial range and download it. For this I would like to use this source: https://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25_1hr.pl
Could I hope for some simple example
Dear @albertotb , Dear All
I have installed the get-gfs and I lauched the commande line:
/get_gfs.py -s 1 -r 0.25 -t 0 48 -x 9 11 -y 35 37 -p 0 2 -c example_conf.json 20240530 00
I got a file "20240530_00"
What is the format of this file?
How we can obtain a netcdf or grib format file?
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.