Это видео недоступно.
Сожалеем об этом.
How to Plot netCDF data onto a Map using Python (with Matplotlib Basemap toolkit) (Part 4)
HTML-код
- Опубликовано: 13 авг 2024
- This is the Part 4 of the tutorial series on Handling netCDF files using Python. In this tutorial, you will learn how to plot netCDF data on to a map, using Matplotlib Basemap toolkit
[Part 3] - • Extracting time series...
[Part 5] - • How to create an anima...
Download the exercise files - drive.google.c...
Download the Basemap package .whl file - www.lfd.uci.ed...
Matplotlib color schemes - matplotlib.org...
⭐NOTE:
‘Kite’ is an excellent tool that can help you boost your productivity when it comes to programming with its free Artificial Intelligence (AI) powered coding assistant. Kite is a plugin which provides smart completions and documentation as you’re typing-in your code, and its compatible with most of the well-known IDEs such as PyCharm, Spyder and VS Code. I absolutely love it, and recommend you guys to try it out as well.
www.kite.com/g...
Thank you, I recently got a job that's related to climate plotting, you literally save my life!!
Glad it helped!
Excellent Tutorial. Thank you!! It is something which I was looking for many days. Thank you again.
You are welcome! :)
You're a good teacher
Why am i getting this error?
Dimensions of C (240, 242) are incompatible with X (240) and/or Y (110); see help(pcolor)
God bless you for this amzing high quality content.
Hi, new to python and following your tutorial. this line - c_scheme = mp.pcolor(x,y,np.squeeze(tp[0,:,:]), cmap='jet') is giving the following and the map is blank
c_scheme = mp.pcolor(x,y,np.squeeze(tp[0,:,:]), cmap='jet')
:1: MatplotlibDeprecationWarning: shading='flat' when X and Y have the same dimensions as C is deprecated since 3.3. Either specify the corners of the quadrilaterals with X and Y, or pass shading='auto', 'nearest' or 'gouraud', or set rcParams['pcolor.shading']. This will become an error two minor releases later.
c_scheme = mp.pcolor(x,y,np.squeeze(tp[0,:,:]), cmap='jet')
Any help with this?
Ohhh thanks a lot Sir, tired of it before. Basemap successfully installed in my device.
Glad to hear that 😊
Hey I am unable to do the pip install for basemap package, it gives me the "not supported wheel" error
Great job. Looking forward for move videos with Python interaction with maps, ArcGIS :)
Thanks for this. I will have to look for a conversion to Cartopy instead of BaseMap and follow most of your instructions.
👍
Thank you! You saved my academic life!
Great to hear!
Thank you very much for explaining so simply and nicely....I have just started to learn Python and your videos are very helpful.
Thank you very much for making this tutorial video. I appreciate it a great deal.
Greetings from Berlin!
The best explanation! Thanks much.
Thank you for this tutorial. You teach so well.
EXCELLENT tutorials! THANKS!!!
Big thanks, you saved my day
Very relevant and brilliant explanation. "Kite" recommendation was a life saver. Wondering if I could reach out for some advice .Thank you so much.
Excellent, thank you :)
Crystal clear! Nice tutorial, and thanks!
wow...! your voice is so attracting....
It will be very helpful if you provide the coding text separately in a file. As downloading speed is very low in some regions. Thanks
how do I solve this error "MemoryError: Unable to allocate 1.99 TiB for an array with shape (523600, 523600) and data type float64"
Your videos are really helpful
Thanks
Well done, bro, thanks for your sharing
Hello there I am working with NECTDF data the problem I have is my Lat and Lon are all 3 Dimensional, SO when I try to do a map it gives me an error, how can I resolve this?
It works properly and perfectly for me. Thanks ~~
Great!
When I am running the line for c_scheme map is being displayed but when I am running the last line for colorbar then I am getting blank box. Kindly help
Sorry, but when I try to download basemap in your link it downloads a Python Wheel format and not a .whl document. What can I do?
Thank very much 😍. I never thought I'll find this tutorial in RUclips. Thanks again👍. I'm a research fellow in Oceanography-climate change field and using FERRET and R for analysis and visualisation. Just started to pickup python.
Can you make tutorials on publish-quality spatial plots in python including multi-viewport , different colour palettes, colourbars etc?
This tutorials seems great for a beginner like me. Do you have any ideas regarding merging multiple netCDF files into one for a given time scale (daily, monthly, yearly, etc.) using Python ? Thanks.
Hi, what if your data in netCDF doesn't have a tave? how do we plot it then
If you have dust data, and you wanna see if there is dust in a country a specific day, how can you see that without making a map?
Hi when I try the base map it throws an error like "CRSError: Invalid projection: +proj=merc +R=6370997.0 +units=m +lat_ts=0.0 +lon_0=0.0 +x_0=-0.0 +y_0=-inf +type=crs: (Internal Proj Error: proj_create: invalid value for y_0)".
My code is
mp=Basemap(projection='merc',
llcrnrlon=-180,
llcrnrlat=-90,
urcrnrlon=180,
urcrnrlat=90,
resolution='i')
What do you think is the reason? Thank you very much!
Reading data from multiple files, and for multiple coordinates is explained in the next tutorial of the series (Part 4), still waiting for the answer ???
Hi, it was supposed to be Part 6. Sorry about the mix up. Tutorial covering this will be out by Wednesday :)
@@geodeltalabs :) thank you, lets wait for it. hope it will come as soon as possible.
Hi, kindly send your specific query on the above topic to deltaengineeringlabs@gmail.com. we will help you out with your problem because the video release on this topic will be delayed by a few more days.
@@geodeltalabs I sent the problem and I am waiting for your help. thanks
Hello, great job you are doing.
So, I got this error after running the script just like you showed us:
ValueError: too many values to unpack (expected 2)
Again, how can I modify the script so that I can plot the mean of the t-avg from a file containing data of like 20 years?
I got the same error ???!
How to do it ?
Really nice!!! It helps me a lot!!!!
hello
cannot import name 'dedent' from 'matplotlib.cbook' (C:\Users\hp\anaconda3\lib\site-packages\matplotlib\cbook\__init__.py)
m getting this error plese help
You are awesome. thank you so much.
Sir, i downloaded min temp data of india from 1960 to 2019 of every day and every hour in one netcdf file. Now i want to extract min temp from 24 hours with its date and store it in variable. How to do it..please help
Thanks a lot... I learned a lot
sir , how we plot netcdf file using shapefile with python . when we have a sape file
Hi,
basemap installed successfully but stuck in a place where it shows that
RuntimeError: NetCDF: HDF error . how to solve this ?
I am not able to install this in the geo_env. Please let me know if there is any way.
how to used a different shapefile for example shapefile of catchment area
Hello,
I am wondering where you got the data files. I want to do different places, how can I do it, instead of replacing the longitude and latitude values?
Can I get a link to the place where you got your data from?
Thanks
9:43 I get the error "module 'numpy.core' has no attribute 'arrayprint'" but I can execute it without the "[:]". Any ideas?
Ok, never mind restarting the kernel fixed it somehow
Hello, what if I want to plot two variables on the same map. For instance, both temperature and pressure on one figure
Hello! I encountered a problem saying
ModuleNotFoundError: No module named 'netCDF4.'
How to solve this?
Hi, this means somehow the module installation has not gone well. I'd check the installation steps again to make sure the module is installed properly
when i run the code i have " No module named 'netCDF4" at the beginning , what should i do? can someone help please
Hello! Have you solved the problem you encountered?
import climate indices
File "", line 1
import climate indices
^
SyntaxError: invalid syntax
Hi, you may try:
import climate_indices
@@geodeltalabs can you make a tutorial how to downscale these netcdf to station base data?
I successfully installed the .whl file
but wile running the script, it showed an error
from mpl_toolkits.basemap import Basemap
mportError: cannot import name 'dedent' from 'matplotlib.cbook' (C:\Users\Jaafar\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\matplotlib\cbook\__init__.py)
Any idea about this problem
Thanks for your efforts, it's heplped a lot
Hey very interested and useful one.
What is the upper and lower latitude & longitude for worldwide.
What is the best way to plot geospatial data using python in your opinion? Geopandas or using basemap toolkit like you did it in the video?
Depends on your purpose. My preference is direct plotting using GeoPandas but that's not to say that there arent any instances where I would use the basemap toolkit too.
Dear sir, Kindly make a video to extract data from multiple points shapefile. This will help to generate data for a particular watershed against known location points.
Hello, I would like to ask how to draw cumulative variables instead of an average of one per day in the film?
How to see the complete fig... In the plot section I can see only a small rectangular portion after executing the code... What should I do now to view the complete figure as your... Thanks and regards.
I have a similar problem. Found a solution?
can u please do one video for java??
Can you please suggest me how to install basemap in ubuntu 16. It is giving various errors in ubuntu for installation. @GeoDelta Labs
nice video
can do a tutorial on regridding so that data is converted to 1 degree resolution
Thank you. When I run the code, I have 3 error:
1. No name 'Dataset' in module 'netCDF4'
2. Unable to import 'mpl.toolkits.basemap'
3. Module 'netCDF4' has no 'Dataset' member
My code is:
from netCDF4 import Dataset
import numpy as np
import matplotlib.pyplot as plt
from mpl.toolkits.basemap import Basemap
Could you help me?
Hello! Have you solved the errors?
Thanks Sir, very useful. Would you please produce a video on how to plot trajectories e.g. tropical cyclone track on a map using python?
Great video! Do you know how to create a colored map from a formula that calculates a value from latitude and longitude?
Bro, make this same video but with cartopy
How can we add magnetic equator to world map?
I had a problem when drawing the map, half of the map (nort,south america) wasnt drawn, this is the solution i found:
lons[lons>180]-=360
hello good night, I am carolina serna, a topographical engineering student at the Universidad del Valle, and I have an air quality project for my city, in python. In one of their videos I saw that they make a raster and cut it to the size of the world map, and I don't know how they do it, if you are so kind to explain it to me please
Hi, did you mean clip a raster using a polygon?
Great video! I am using macOS and am having trouble installing the Basemap add-on. There doesn’t seem to be any Mac files to download on the website you link, and I can’t find any online either. Is there another way for me to install? Thanks
Hi, I personally haven't used macOS so I wouldn't be able to give you an immediate solution for this. However, have you tired installing it via Anaconda Distribution?
@@geodeltalabs Great, that worked! Thanks for your help
@@geodeltalabs I followed through the video and it makes perfect sense! I'm quite new to python so this really helped me learn.
I'm now trying to change the map so it produces an annual average, rather than choosing only one day, is there any way I'm able to change the function to allow me to do this? Many thanks
thats it, thanks a lot
I have this problem "No module named 'netCDF4'" can someone help me
Hello! Have you solved the problem you encountered?
I have watching your tutorials and that was so great... I have a question I also can't installing base map on python and condado, but there is same I still can't install basemap by following your video (the error was projected lib etc) what you are suggesting to this?
Hi, can you post the exact error message?
@@geodeltalabs runfile('C:/Users/Muzam/.spyder-py3/temp.py', wdir='C:/Users/Muzam/.spyder-py3')
Traceback (most recent call last):
File "C:\Users\Muzam\.spyder-py3\temp.py", line 4, in
from mpl_toolkits.basemap import Basemap
ModuleNotFoundError: No module named 'mpl_toolkits.basemap
My plot shows no color scheme even though I included one. Am I missing something?
I also have the same problem. Could you solve it?
How can I install basemap in linuxmint?
any experience with nco in windows ?
do you have a version for Mac who file
Hi, i'm not so sure about that as I have only used Windows and Linux systems
I can't install the basemap packages
In between some 2 to 3 minutes was missing(between 16 and 17 minutes). who edited the video.....please see it completely and please add complete one
Hi, thanks for notifying us. Indeed there is a bit of an early cut. However, what's been done there is just changing the coordinates from degrees, minutes, seconds to decimal degrees via tools-> options. After that, the coordinates of the 4 corners are added back to the script, in decimal degrees. Hope this helps!
ERROR: Invalid requirement: 'C:\\Basemap\\basemap-1.2.1-cp37-cp37m-win_amd64'
Hint: It looks like a path. File 'C:\Basemap\basemap-1.2.1-cp37-cp37m-win_amd64' does not exist.
got an error like this what is this sir path is all okay but..
Hi, did you specify the extention .whl at the end of your path? Without that it will not run
@@geodeltalabs thanks you sir, i solve it
@@geodeltalabs sir, i have 17 years data and combined it as one nc file, now i would like to take a time series of it as csv file could you help?
@@hindokush3728 how did you combine it into one nc file ?
I have this error "No module named 'netCDF4'" can someone help me? please
14:34