How to Open a NetCDF File and Map the Data in R

Поділитися
Вставка
  • Опубліковано 29 гру 2024

КОМЕНТАРІ • 100

  • @jshullglobal
    @jshullglobal 5 років тому +4

    I knew next to nothing about R last week, now I'm opening NetCDF files with it. Thank you!

  • @Thinkingboutfrogggs
    @Thinkingboutfrogggs 4 роки тому +2

    Thank you SO much for uploading this video. I can't tell you how incredibly helpful it has been!!

  • @juliocgfreitas
    @juliocgfreitas 3 роки тому +1

    Great tutorial. Do you know if it's possible to plot how many grid points I'm using in my data? Thank you.

  • @shunrei1974
    @shunrei1974 2 роки тому +2

    Thank you very much for your video. When I want to plot the slice, I get "error in image.default(lon, lat, spei.slice) :
    increasing 'x' and 'y' values expected". Do you know why?

  • @annadasankarroy1590
    @annadasankarroy1590 5 років тому +1

    Nice and very helpful video. Can you tell me how to take average of those time slices and get a long term average map of temperature for a particular region?

  • @hammao
    @hammao 5 років тому

    A Big Thank You to you !!! ... You explained everything in the clearest way possible i must say.

    • @hammao
      @hammao 5 років тому

      it will be nice if you can explain "dname" part of your code and how to export the data to CSV. do i just cbind the various variable ?

    • @empowerdat2879
      @empowerdat2879  5 років тому

      thanks!

  • @GiorgioSiegfriedParis
    @GiorgioSiegfriedParis 28 днів тому

    Thanks for the video it was very useful. The monthly slices of January and July correspond to 1 and 6 in the third dimension but I can't get the plot with a monthly slice of later years. If I want to plot Janaury of 2100, how should I do it? Thanks in advance.

  • @dillibro
    @dillibro 5 років тому +2

    how do you save the data into shape file, so that it can be used in ArcGIS?

  • @jonas9426
    @jonas9426 4 роки тому +2

    Get error when imaging: "Error in image.default (lon, lat, kernel.slice [,, 1]):
    increasing 'x' and 'y' values expected " are there other imaging commands, that could work?

    • @LarsOrWas
      @LarsOrWas 4 роки тому

      Having the same issue. It seems we have to flip the chart anyhow to make sure, lon and lat are as they are supposed to. I'm searching for a solution and let you know if I do progress of some sort.

    • @niranjanadhikari9124
      @niranjanadhikari9124 4 роки тому

      @@LarsOrWas I think either lat or lon is not in ascending order when you performed lat

  • @pan8054
    @pan8054 4 роки тому +1

    Can we convert NetCDF file to csv with R?

  • @PoLearnCo
    @PoLearnCo 2 роки тому

    Can i plot the data just for a watershed.. I have a shapefile for this

  • @sunjingjing2002
    @sunjingjing2002 2 роки тому

    Thank you for sharing. I downloaded the netcdf data, it contains lat,lon, temp and time (days,from 1850-2100),1 I'd like to extract the data from 2100.01-2100.12 and calculated the month mean temp, how should I do? thank you

  • @vaishaliportel2410
    @vaishaliportel2410 2 роки тому

    do you know how we can get mean and standard deviation plots using the data from nc file? urgent please help

  • @liliansales9301
    @liliansales9301 5 років тому +1

    Awesome video! Helped a lot! Thanks for the time!

  • @fahmibilal
    @fahmibilal 4 роки тому

    hello...i m getting the following error
    Error: Cannot add ggproto objects together. Did you forget to add this object to a ggplot object?
    plz help

  • @y37chung
    @y37chung 3 роки тому

    What can I do when I run into an "Error: cannot allocate vector of size X Gb"? This happens on the line of variable_array creation

  • @zarrinz1865
    @zarrinz1865 3 роки тому

    Thanks a lot for your video, helps a lot. However, I stuck in a problem, Error: Package `maps` required for `map_data`.
    Please install and try again. Cou you please kindly help me out?

  • @emmanuelmawuliabalo4741
    @emmanuelmawuliabalo4741 5 років тому +1

    This is a good video. Thanks very much. Could you please elaborate on mapCDF coding

    • @empowerdat2879
      @empowerdat2879  5 років тому

      you can find all the code in this GitHub repository (github.com/angelamhkim/climateNetCDF) it's a bit of a mess but oh well

  • @ruchitripathi4204
    @ruchitripathi4204 4 роки тому +1

    Hi, it was pretty useful, can you please tell me how to plot the data with a particular boundary? Say if I have data of only Alberta, how can I plot it on Alberta map? Please tag me while answering so that i receive notification. Thanks :)

  • @sudheerbhakare304
    @sudheerbhakare304 5 років тому

    It was very helpful. I am also trying some spatial plots, Can you provide that function used to get legend and country boundaries, because it is not visible in video.

    • @muralikannansp2187
      @muralikannansp2187 5 років тому

      I hope we have to use latitudinal and longitudinal values to fix the same. Am not sure

  • @pradeepattri8375
    @pradeepattri8375 3 роки тому

    thank you for this amazing video it was really helpful but please can you help me with the netcdf data with height levels, so for example if the data has different levels (z) so how can i select the z level?

    • @empowerdat2879
      @empowerdat2879  3 роки тому

      try looking at the attributes and dimensions. It should show you the into you need to figure out how to call the z (height) values.

  • @hasbak07
    @hasbak07 4 роки тому

    hello, thank you for sharing this video it was very helpful for me, for me I wanna focus on South Africa and map only the temperature of this slice of the world how I would do it? I have also data on precipitation levels, can I do the same manipulation for it or does it differ?
    Thank you

    • @ruchitripathi4204
      @ruchitripathi4204 4 роки тому

      Hey, did you get your answer? I also have somewhat same problem and I am stuck.

  • @thaa3092
    @thaa3092 6 років тому

    Thank you very helpful. If its possible please do a video with the basics. I'm new to all this

    • @empowerdat2879
      @empowerdat2879  6 років тому

      Thanks for your comment! What kind of basics are we talking about? The basics of R, NetCDF files, or climate models? If you give me a better idea of what kind of project you're working on, I might be able to help.

  • @ВикторИванов-т7ь4х

    Very cool, thank you very much!

  • @ihssanmoin
    @ihssanmoin 5 років тому +1

    Thank you very much for this video!

  • @sandyherho1997
    @sandyherho1997 5 років тому

    Hi, Angela. I got this error message when I run mapCDFtemp function:
    Error in rename(., lon = Var1, lat = Var2) :
    could not find function "rename"
    could you tell why? Thanks

    • @sandyherho1997
      @sandyherho1997 5 років тому

      I apologize, just a silly mistake, I forgot to import dplyr and readr.

  • @engr.abdullahazzamsafi4515
    @engr.abdullahazzamsafi4515 4 роки тому

    Thank you very much such a great video. Can you please do down-scaling/bais correction and extract a station data. please generate time series scenario projection of climatic data. thanking you in anticipation

  • @sudheerbhakare304
    @sudheerbhakare304 5 років тому

    It will be very nice if you make one video on how you wrote that function. thank you..

    • @empowerdat2879
      @empowerdat2879  5 років тому

      hey! a bit of a mess but you can find the code in this GitHub repository
      github.com/angelamhkim/climateNetCDF

    • @sudheerbhakare304
      @sudheerbhakare304 5 років тому

      @@empowerdat2879 Thank you. I got it.

  • @dr.barunbiswas7132
    @dr.barunbiswas7132 6 років тому

    Thank you for such a nice tutorial. Could you please provide some help regarding slicing a definite area using a particular shape-file of a country or state.

    • @empowerdat2879
      @empowerdat2879  6 років тому

      Hey! Hmmm I’m not sure how to do that but I recommend looking up downscaled models.

    • @ruchitripathi4204
      @ruchitripathi4204 4 роки тому

      Hi. did you get your answer? I am also stuck with almost same problem .

  • @himanshupandey1410
    @himanshupandey1410 4 роки тому

    Thank you for the video it was great. I want to know how to extract data from a netcdf file and convert to excel sheet so I can visualize them.
    I'm comparing different model data with ground recorded data, I wanna know how can I convert netcdf file into excel

  • @xilin7905
    @xilin7905 5 років тому

    Thanks a lots for making this video! Its really helpful!

  • @KK-pf1ye
    @KK-pf1ye 5 років тому

    I'm trying to run it but it's giving me a weird error. I'm using CMIP6 EC-Earth data for monthly precipitation values. It runs but then takes me to a different page and says
    "function (x, mode = "any")
    .Internal(as.vector(x, mode))"
    Please help

  • @emmanuelmawuliabalo4741
    @emmanuelmawuliabalo4741 5 років тому

    So I run the ggplot code and I keep getting this message: "Error: Cannot add ggproto objects together. Did you forget to add this object to a ggplot object?" struggling to figure out what this means. Could you help out

  • @manacebationo8565
    @manacebationo8565 2 роки тому

    Thanks for your helpful tutorial. Can you share the script? Thank you.

  • @MrJunaid136
    @MrJunaid136 4 роки тому

    Please guide how to extract data from netcdf file using R. I want to extract data for my area of interest from global netcdf file.

    • @empowerdat2879
      @empowerdat2879  4 роки тому

      let me know if this helps ua-cam.com/video/il0587CiNlQ/v-deo.html&ab_channel=EmpowerDat

  • @jeffreymarak
    @jeffreymarak 6 років тому +1

    Very nice video, it was very helpful. Why dont you code using RStudio...It will be much easier for you.. and please keep making the videos. If possible pls do a video on how to extract trmm rainfall data from daily netcdf file for many years into a single excel file.

    • @empowerdat2879
      @empowerdat2879  6 років тому

      Thanks! I started with RStudio but like the cleanliness of R :)
      I'm not familiar with trmm rainfall data but the same concepts should apply. I have a video that shows how to extract data from a specific lat/lon coordinate. That might be helpful.

    • @jeffreymarak
      @jeffreymarak 6 років тому

      I saw the video it gave me idea on how to extract the data. But my problem is that I have extremely large number of files(around 7500 daily nc files). If there was a way to merge all 7500 files into one netcdf file my job would be a lot easier... :)

    • @empowerdat2879
      @empowerdat2879  6 років тому

      divertido I'm sure we could write a function for that! Why don't you send me an email and we'll figure it out? You can reach me at climateaccesscoop@gmail.com

  • @peterpauker3361
    @peterpauker3361 5 років тому

    Thanks for the video, great job!

  • @raularenasmunoz620
    @raularenasmunoz620 6 років тому

    what a nice video and what a nice explanation, thx a lot for your time

    • @empowerdat2879
      @empowerdat2879  6 років тому

      That’s a very kind comment. Thank you!

  • @estebanmeneses3107
    @estebanmeneses3107 5 років тому

    Thank you for the video! It was helpful, but what is unit on the "legend.key..." in the ggplot function? somebody know?

  • @edstewart2399
    @edstewart2399 6 років тому

    Hi there! Thank you very much for the video I found it very useful. I am looking for data on a particular region: The European Alps to measure future snow depth. Would you have an idea of how to extract and map this data? any help would be amazing. Thank you in advance.

    • @empowerdat2879
      @empowerdat2879  5 років тому

      you can set boundaries on the lat and lon variables to encompass only the area you are interested in

    • @edstewart2399
      @edstewart2399 5 років тому

      How would I do this? could I email you? Thank you in advance

  • @franciscojavierbricenozulu2098
    @franciscojavierbricenozulu2098 4 роки тому

    How i can do a zoom in the map?

  • @modelynsanchez1540
    @modelynsanchez1540 6 років тому

    im just a newbie to netcdf files.. how can i access the dimension fields.. im having below error:
    > x1

    • @empowerdat2879
      @empowerdat2879  6 років тому

      Hey! Maybe this video will help: ua-cam.com/video/il0587CiNlQ/v-deo.html
      If not, let me know!

    • @modelynsanchez1540
      @modelynsanchez1540 6 років тому +2

      Hi, thank you for ur reply, its not working.
      Previously the program is using ncdf package now upgrading to ncdf4.
      get.var.ncdf(ncin,"bottom_top") -> this one working using ncdf package
      ncvar_get(ncin,"bottom_top") -> this one after using ncdf4 package was not working.
      I have converted to below :
      ncdf ncdf4
      ----------------------------------------------------------
      open.ncdf -> nc_open
      get.var.ncdf -> ncvar_get
      dim.def.ncdf -> ncdim_def
      var.def.ncdf -> ncvar_def
      create.ncdf -> nc_create
      put.var.ncdf -> ncvar_put
      close.ncdf -> nc_close

  • @ahmadfrahmand
    @ahmadfrahmand 6 років тому

    Dearest Kim, Thanks a lot for this nice video if its possible for you just guide me how to extract a specific lat, lon and start downscale. and what is need for downscaling process please can you help me in this regards?

    • @ahmadfrahmand
      @ahmadfrahmand 6 років тому

      also please explain little bit about what is the difference between, RCP, Historical data, RCP85 and how to merge for example the CMCC-CM model the data from this model is based on year and if you download rcp85 its 100 file and how to merge it i don't know?

    • @ahmadfrahmand
      @ahmadfrahmand 6 років тому

      and also please could you send me the codes you copied from suplim text editor?

    • @ahmadfrahmand
      @ahmadfrahmand 6 років тому

      Dearest Kim, thanks for nice link i have to learn these things in another one month? could you please help me. can i have your email or skype to talk directly? please send me in my gmail . hindokush12@gmail.com

    • @ahmadfrahmand
      @ahmadfrahmand 6 років тому

      you did not make that video which is showing how to extract some specific lat and long dear kim.

    • @empowerdat2879
      @empowerdat2879  6 років тому

      hey feel free to email me at climateaccesscoop@gmail.com

  • @mohammedkareem6476
    @mohammedkareem6476 4 роки тому

    hello i want clip net cdf

  • @abiygebremichael8663
    @abiygebremichael8663 6 років тому

    plese send me procedure how to get/download/ 25km resolution downscaled climate data for 1950-2005 historical and 2006-2100 future from both NASA and CORDEX
    Thank you!

    • @empowerdat2879
      @empowerdat2879  6 років тому

      Hello! Not sure how to do that... Do you have a link to your data sources in NASA and CORDEX? I can try to figure it out.

    • @empowerdat2879
      @empowerdat2879  5 років тому

      hmm not sure how to do that but if I figure it out I'll make a video about it

    • @jonathanopokuoti9688
      @jonathanopokuoti9688 5 років тому

      You can follow her previous video on how to download climate data on ESGF website. Use the same procedure to download forCORDEX. Under projects, select CORDEX.

  • @saheedsalaudeen9141
    @saheedsalaudeen9141 4 роки тому

    Thank you for this vedio. It is very useful but all the link could not be accessed

  • @DeadrustyMeat
    @DeadrustyMeat 6 років тому +1

    This video is very helpfull. Thnks a lot, but I got a problem with some of the archives that I downloaded from the ESGF.
    Could you help me with my problem? CouldI write to your e-mail?

    • @empowerdat2879
      @empowerdat2879  6 років тому +1

      Hello! No problem! Sure thing. Email me at climateaccesscoop@gmail.com and I'll get back to you as soon as I can.

  • @farhansaleem7248
    @farhansaleem7248 6 років тому

    I am waiting for you, thanks

    • @empowerdat2879
      @empowerdat2879  6 років тому

      Hello Farhan! Is there a specific video you are looking for?

  • @capsgurl22
    @capsgurl22 5 років тому

    Thank you so much for this video! It has helped me a lot with mapping climate data in R. I am attempting to use the code with fill value 'NA', however, it creates an error due to using a discrete value on a continuous scale. Can I ask you about how to apply the code with 'NA's?

  • @juanog88
    @juanog88 5 років тому +1

    thanks for sharing

  • @ahmedatia80
    @ahmedatia80 4 роки тому

    good work, use Rstudio...

  • @levismuse
    @levismuse 6 років тому +1

    helpful

  • @CapoeiraRecio
    @CapoeiraRecio 3 роки тому

    This is awesome!!!! Thank you!