Это видео недоступно.
Сожалеем об этом.

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...

Комментарии • 116

  • @appliedstatistics2043
    @appliedstatistics2043 3 года назад +4

    Thank you, I recently got a job that's related to climate plotting, you literally save my life!!

  • @ShahzaibKhan-tg1ps
    @ShahzaibKhan-tg1ps 3 года назад +2

    Excellent Tutorial. Thank you!! It is something which I was looking for many days. Thank you again.

  • @gambu4810
    @gambu4810 2 года назад +1

    You're a good teacher

  • @local9692
    @local9692 3 года назад +2

    Why am i getting this error?
    Dimensions of C (240, 242) are incompatible with X (240) and/or Y (110); see help(pcolor)

  • @mohamedsmouni3051
    @mohamedsmouni3051 4 месяца назад

    God bless you for this amzing high quality content.

  • @DianaHydra
    @DianaHydra 3 года назад +1

    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?

  • @kassahunaweke3058
    @kassahunaweke3058 2 года назад

    Ohhh thanks a lot Sir, tired of it before. Basemap successfully installed in my device.

  • @oshopriya788
    @oshopriya788 3 года назад +2

    Hey I am unable to do the pip install for basemap package, it gives me the "not supported wheel" error

  • @dainiusfr
    @dainiusfr 4 года назад +2

    Great job. Looking forward for move videos with Python interaction with maps, ArcGIS :)

  • @Mauaka
    @Mauaka 2 года назад

    Thanks for this. I will have to look for a conversion to Cartopy instead of BaseMap and follow most of your instructions.

  • @gabrielalima159
    @gabrielalima159 3 года назад

    Thank you! You saved my academic life!

  • @nayantalmale9270
    @nayantalmale9270 3 года назад

    Thank you very much for explaining so simply and nicely....I have just started to learn Python and your videos are very helpful.

  • @miskaknapek
    @miskaknapek 3 года назад

    Thank you very much for making this tutorial video. I appreciate it a great deal.
    Greetings from Berlin!

  • @sandeepbhatti3124
    @sandeepbhatti3124 Год назад

    The best explanation! Thanks much.

  • @biancameotti3663
    @biancameotti3663 3 года назад

    Thank you for this tutorial. You teach so well.

  • @YujiaZhao-nu6es
    @YujiaZhao-nu6es Год назад

    EXCELLENT tutorials! THANKS!!!

  • @wasifeelahi1341
    @wasifeelahi1341 4 года назад +2

    Big thanks, you saved my day

  • @rizwankazi4555
    @rizwankazi4555 3 года назад

    Very relevant and brilliant explanation. "Kite" recommendation was a life saver. Wondering if I could reach out for some advice .Thank you so much.

  • @blueradium4260
    @blueradium4260 Год назад

    Excellent, thank you :)

  • @dec13666
    @dec13666 4 года назад

    Crystal clear! Nice tutorial, and thanks!

  • @RAKESHGHOSH-zl6gn
    @RAKESHGHOSH-zl6gn 2 года назад

    wow...! your voice is so attracting....

  • @MuhammadHussain-wr7hv
    @MuhammadHussain-wr7hv 4 года назад +1

    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

  • @koyenabhattacharjee2566
    @koyenabhattacharjee2566 Год назад

    how do I solve this error "MemoryError: Unable to allocate 1.99 TiB for an array with shape (523600, 523600) and data type float64"

  • @briskminded9020
    @briskminded9020 4 года назад

    Your videos are really helpful
    Thanks

  • @tobesmarter9142
    @tobesmarter9142 3 года назад

    Well done, bro, thanks for your sharing

  • @frankservant5754
    @frankservant5754 2 года назад

    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?

  • @TriAtmaja1000
    @TriAtmaja1000 3 года назад

    It works properly and perfectly for me. Thanks ~~

  • @researchgoals9766
    @researchgoals9766 2 года назад

    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

  • @ignaciogarciamartin5109
    @ignaciogarciamartin5109 2 года назад

    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?

  • @lonewolf_0948
    @lonewolf_0948 4 года назад

    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?

  • @shailendrarana4073
    @shailendrarana4073 Год назад

    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.

  • @khyateeatolia
    @khyateeatolia 2 месяца назад

    Hi, what if your data in netCDF doesn't have a tave? how do we plot it then

  • @abzanmaster
    @abzanmaster 2 года назад

    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?

  • @clifford_prince
    @clifford_prince 4 года назад

    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!

  • @hamedhafizi5448
    @hamedhafizi5448 4 года назад +1

    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 ???

    • @geodeltalabs
      @geodeltalabs  4 года назад

      Hi, it was supposed to be Part 6. Sorry about the mix up. Tutorial covering this will be out by Wednesday :)

    • @hamedhafizi5448
      @hamedhafizi5448 4 года назад

      @@geodeltalabs :) thank you, lets wait for it. hope it will come as soon as possible.

    • @geodeltalabs
      @geodeltalabs  4 года назад

      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.

    • @hamedhafizi5448
      @hamedhafizi5448 4 года назад +1

      @@geodeltalabs I sent the problem and I am waiting for your help. thanks

  • @olorunfemiomonigbehin389
    @olorunfemiomonigbehin389 3 года назад +1

    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?

  • @jhosenysantos5736
    @jhosenysantos5736 3 года назад

    Really nice!!! It helps me a lot!!!!

  • @himanshishukla2629
    @himanshishukla2629 3 года назад

    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

  • @engr.abdullahazzamsafi4515
    @engr.abdullahazzamsafi4515 3 года назад

    You are awesome. thank you so much.

  • @nishankshah3555
    @nishankshah3555 3 года назад

    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

  • @chamilaniroshinie4750
    @chamilaniroshinie4750 4 года назад

    Thanks a lot... I learned a lot

  • @YogeshKumar-pt1ii
    @YogeshKumar-pt1ii Год назад

    sir , how we plot netcdf file using shapefile with python . when we have a sape file

  • @adibkhondokerratul975
    @adibkhondokerratul975 4 года назад

    Hi,
    basemap installed successfully but stuck in a place where it shows that
    RuntimeError: NetCDF: HDF error . how to solve this ?

  • @bishwaskumar2453
    @bishwaskumar2453 2 года назад

    I am not able to install this in the geo_env. Please let me know if there is any way.

  • @thasweerah
    @thasweerah 3 года назад

    how to used a different shapefile for example shapefile of catchment area

  • @tonyv1524
    @tonyv1524 4 года назад

    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

  • @janos5555
    @janos5555 2 года назад

    9:43 I get the error "module 'numpy.core' has no attribute 'arrayprint'" but I can execute it without the "[:]". Any ideas?

    • @janos5555
      @janos5555 2 года назад

      Ok, never mind restarting the kernel fixed it somehow

  • @damilarealuko
    @damilarealuko 4 года назад

    Hello, what if I want to plot two variables on the same map. For instance, both temperature and pressure on one figure

  • @cyrahinocente4572
    @cyrahinocente4572 Год назад

    Hello! I encountered a problem saying
    ModuleNotFoundError: No module named 'netCDF4.'
    How to solve this?

    • @geodeltalabs
      @geodeltalabs  Год назад

      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

  • @toufik_8840
    @toufik_8840 3 года назад +1

    when i run the code i have " No module named 'netCDF4" at the beginning , what should i do? can someone help please

  • @nashmoud2242
    @nashmoud2242 4 года назад +2

    import climate indices
    File "", line 1
    import climate indices
    ^
    SyntaxError: invalid syntax

    • @geodeltalabs
      @geodeltalabs  4 года назад +1

      Hi, you may try:
      import climate_indices

    • @hindokush3728
      @hindokush3728 4 года назад

      @@geodeltalabs can you make a tutorial how to downscale these netcdf to station base data?

  • @jaafarjuneidi9612
    @jaafarjuneidi9612 4 года назад

    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

  • @jos6708
    @jos6708 2 года назад

    Hey very interested and useful one.
    What is the upper and lower latitude & longitude for worldwide.

  • @bibek_thapa
    @bibek_thapa 3 года назад

    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?

    • @geodeltalabs
      @geodeltalabs  3 года назад

      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.

  • @BrijeshKumar-dm9bw
    @BrijeshKumar-dm9bw 4 года назад

    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.

  • @user-ju7ng9im5h
    @user-ju7ng9im5h 2 года назад

    Hello, I would like to ask how to draw cumulative variables instead of an average of one per day in the film?

  • @tapasranjandas7228
    @tapasranjandas7228 4 года назад

    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.

  • @haritham1060
    @haritham1060 4 месяца назад

    can u please do one video for java??

  • @zainabali3930
    @zainabali3930 4 года назад

    Can you please suggest me how to install basemap in ubuntu 16. It is giving various errors in ubuntu for installation. @GeoDelta Labs

  • @Anurag-sq4yc
    @Anurag-sq4yc 3 года назад

    nice video
    can do a tutorial on regridding so that data is converted to 1 degree resolution

  • @almadeliaortizbanuelos6172
    @almadeliaortizbanuelos6172 3 года назад

    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?

  • @Rainstorm121
    @Rainstorm121 4 года назад

    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?

  • @hans6458
    @hans6458 3 года назад

    Great video! Do you know how to create a colored map from a formula that calculates a value from latitude and longitude?

  • @manuelalejandrosalazargome1047
    @manuelalejandrosalazargome1047 3 года назад

    Bro, make this same video but with cartopy

  • @roshankumarmishra5270
    @roshankumarmishra5270 4 года назад

    How can we add magnetic equator to world map?

  • @dany6612
    @dany6612 3 года назад

    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

  • @lomejordemividaerestu4470
    @lomejordemividaerestu4470 4 года назад

    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

    • @geodeltalabs
      @geodeltalabs  4 года назад

      Hi, did you mean clip a raster using a polygon?

  • @jaywilliams2852
    @jaywilliams2852 2 года назад

    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

    • @geodeltalabs
      @geodeltalabs  2 года назад +1

      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?

    • @jaywilliams2852
      @jaywilliams2852 2 года назад

      @@geodeltalabs Great, that worked! Thanks for your help

    • @jaywilliams2852
      @jaywilliams2852 2 года назад

      @@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

  •  3 года назад

    thats it, thanks a lot

  • @erickmorera154
    @erickmorera154 3 года назад

    I have this problem "No module named 'netCDF4'" can someone help me

  • @lalamo8722
    @lalamo8722 4 года назад

    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?

    • @geodeltalabs
      @geodeltalabs  4 года назад

      Hi, can you post the exact error message?

    • @muzamilkhan437
      @muzamilkhan437 2 года назад

      @@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

  • @nazimurrashidchowdhury2843
    @nazimurrashidchowdhury2843 3 года назад

    My plot shows no color scheme even though I included one. Am I missing something?

    • @luciag.s.1180
      @luciag.s.1180 3 года назад

      I also have the same problem. Could you solve it?

  • @nishantsaxena5585
    @nishantsaxena5585 3 года назад

    How can I install basemap in linuxmint?

  • @cva456123
    @cva456123 4 года назад

    any experience with nco in windows ?

  • @cumarporn
    @cumarporn 2 года назад

    do you have a version for Mac who file

    • @geodeltalabs
      @geodeltalabs  2 года назад

      Hi, i'm not so sure about that as I have only used Windows and Linux systems

  • @piyaphatc5794
    @piyaphatc5794 3 года назад

    I can't install the basemap packages

  • @subramanyamraju9738
    @subramanyamraju9738 4 года назад

    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

    • @geodeltalabs
      @geodeltalabs  4 года назад

      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!

  • @hindokush3728
    @hindokush3728 4 года назад

    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..

    • @geodeltalabs
      @geodeltalabs  4 года назад

      Hi, did you specify the extention .whl at the end of your path? Without that it will not run

    • @hindokush3728
      @hindokush3728 4 года назад

      @@geodeltalabs thanks you sir, i solve it

    • @hindokush3728
      @hindokush3728 4 года назад

      @@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?

    • @basemel-shafei6452
      @basemel-shafei6452 3 года назад

      @@hindokush3728 how did you combine it into one nc file ?

    • @erickmorera154
      @erickmorera154 3 года назад

      I have this error "No module named 'netCDF4'" can someone help me? please

  • @oliverclaessens7053
    @oliverclaessens7053 2 года назад

    14:34