Тёмный

Extracting subregions from netcdf files - this video makes the cut! 

Climate Unboxed
Подписаться 2,5 тыс.
Просмотров 8 тыс.
50% 1

Опубликовано:

 

19 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 63   
@arjunkaushik5075
@arjunkaushik5075 3 года назад
I seriously have no words for this video. I seriously want to thank you in person for such great help. I was struggling for a long. God bless you, dear.
@climateunboxed
@climateunboxed 2 года назад
Thank you!
@Oceansteve
@Oceansteve 2 года назад
As others say, much gratitude for the tutorial.
@climateunboxed
@climateunboxed 2 года назад
My pleasure. The nearest neighbor interpolation trick to extract a single grid point is really nice no?
@Oceansteve
@Oceansteve 2 года назад
@@climateunboxed it’s near essential. It’s been quite interesting extracting on the command line. Hope you do more videos!
@climateunboxed
@climateunboxed 2 года назад
@@Oceansteve more in the pipeline at editing stage. I'm slow, this is a side hobby fighting for time with family and house renovations 🤣😉
@user-oq1mu5lt3e
@user-oq1mu5lt3e 2 года назад
Thank you very much for such a great job. This playlist is extremely helpful for me as for student
@climateunboxed
@climateunboxed 2 года назад
You are very welcome, glad you find it helpful. More material slowly on its way... Don't forget to subscribe so you will get notifications when new material sporadically appears....
@Geooutlook852
@Geooutlook852 2 года назад
Sir, How to extract a dedicated region suppose a catchment region?
@shunrei1974
@shunrei1974 2 года назад
I tried to reproduce your example but it says 'command not found: cdo -sellonlatbox'. Do you know why?
@climateunboxed
@climateunboxed 2 года назад
are you on ubuntu? You probably need to install it. Try sudo apt install cdo ... on a mac I use homebrew, thus brew install cdo
@rachalaishram9699
@rachalaishram9699 Год назад
this channel is such a treasure for budding climate researchers such as myself. sir i would like to know one thing , though, how to extract region based on the shapefile of a region in cdo? or if not possible what is the work around way for cropping a netcdf data using shapefile? thank you sir
@climateunboxed
@climateunboxed Год назад
Unfortunately you will need to do this in python or R...
@hajarelhlaissi914
@hajarelhlaissi914 2 года назад
Thank you sir for the precision but this site will not define my region. Do you have an idea to help me define the region of Africa?
@climateunboxed
@climateunboxed 2 года назад
Sellonlatbox only cuts a rectangle... If you want to remove the sea points, you can refer to my video on a land sea mask... Removing the middle east countries from the lonlat box requires the use of shape files which is beyond the capabilities of CDO to my knowledge. For that you'd need to use R or python etc .
@anjaisadnya
@anjaisadnya 2 месяца назад
sir, i was wondering if we could modify the size of the map in display when we open ncview? i've been looking for how to do that, but no avail. is it maybe depends on the file?
@Leksa135
@Leksa135 3 года назад
Thanks a lot. I have been having trouble with too large nc-files.
@climateunboxed
@climateunboxed 2 года назад
What is the issue? You mean for the download?
@theres_more
@theres_more Год назад
Hi, thank you for posting this tutorial. I have cmip6 ocean data on a curvilinear grid (x, y coordinates). Let’s say I want to select the nino 3.4 region. Can I still select a box using latitude and longitude values?
@climateunboxed
@climateunboxed Год назад
Yes, in fact my very next video is on making an enso index. Will take a couple of weeks but will be out soon
@KNOgbu
@KNOgbu 2 года назад
I enjoy your videos and I am currently using many of them to learn. Will you show us how to perform spatial statistics using two or more gridded rainfall datesets?
@climateunboxed
@climateunboxed 2 года назад
Thanks for your nice comments. What exactly did you have in mind for the request though? Can you be a bit more specific?
@somtoonyechi5925
@somtoonyechi5925 2 года назад
@@climateunboxed for example, comparison of CMIP5 (e.g. rainfall) against CHIRPS or GPCC datasets
@shunrei1974
@shunrei1974 2 года назад
Thank you Sir for those very much needed video. Do you think of doing the same kind of teachings for R users?
@climateunboxed
@climateunboxed 2 года назад
I'm afraid not, sorry. I tried R for a while before converting to python, I'm really not a fan... After I've finished my next few CDO videos though my next project is a series of videos on the physics of climate... 🙂
@cengizhancengiz1919
@cengizhancengiz1919 11 месяцев назад
if ncdump is not available for us, could we modify the code before running to request data?
@brunodepaulak
@brunodepaulak 2 года назад
Neat! Thanks!
@KNOgbu
@KNOgbu 2 года назад
MANY THANKS
@climateunboxed
@climateunboxed 2 года назад
You are welcome! 👍
@davidragatoa7174
@davidragatoa7174 2 года назад
That's a great one. Thank you Sir. How do I merge subsets if I want to bring spatial subsets together (same time steps and variables for the files) ? Thanks
@climateunboxed
@climateunboxed 2 года назад
Thanks for the feedback. Not sure I fully understand the question. The time step and variables are the same. Does that mean the grids are different?
@Leksa135
@Leksa135 3 года назад
I tried it and it worked quite well. Only question I have is that why the output area is not strictly limited by the longitudes and latitudes I gave, but is clearly larger? I am dealing with Lambert conformal projection, if that matters.
@climateunboxed
@climateunboxed 3 года назад
It shouldn't be the case. What is the exact command you tried?
@Leksa135
@Leksa135 3 года назад
@@climateunboxed The command I used: "cdo sellonlatbox,19.5,31.7,59.7,70.2 original.nc output.nc" In the output file, I have longitudes from 16.51 to 40.67 latitudes from 58.34 to 71.16. The spatial resolution is approximately 0.03 degrees. The result is good enough for my use, but I'm just confused.
@climateunboxed
@climateunboxed 3 года назад
@@Leksa135 I haven't worked with this projection before, but have you tried regridding to a regular lat-lon grid first? Something like "cdo -L sellonlatbox,19.5,31.7,59.7,70.2 -remapbil,global_0.1 in.nc out.nc" ?
@Leksa135
@Leksa135 3 года назад
​@@climateunboxed I tried it now, and some interesting things happened. First, the new area is now exactly what I wanted it to be. Second, the file size is much smaller now. The new output file is is like 10 % of the first output file I got (might be partly because lat/lon data type is now "linear" instead of "Geo2d"). But unfortunately there seems to be some issues with the conservation of data. In the remapped file, the target grid cells have very different looking data when compared to the output file without remapping. The data is 1h precipitation, and I read that bilinear remapping might not be suitable for that kind of data. Or I'm doing something wrong. There might be some remapping methods that would work, but I'm not sure if I have the time to go very deep into that. But anyways, just extracting a subregion without remapping worked well enough and is very useful. Thank you for you help.
@climateunboxed
@climateunboxed 3 года назад
@@Leksa135 yes it was just a test. Better to use "remapcon" for rain. It also depends on the resolution change. I strongly recommend checking out my video on remapping. Please subscribe if you find the material useful and pass the word. 😊
@isratjahan207
@isratjahan207 Год назад
Hi, I am trying to extract a subregion using the cdo sel lonlatbox command but a new dimension south_north_2 gets created in the output file. In the output file, south_north=309, and also south_north_2=308 gets created. Why is this happening? and how to get rid of this?
@silverreserve5174
@silverreserve5174 Год назад
Thanks Is there a command to statistically downscaled the NetCDF
@climateunboxed
@climateunboxed Год назад
Not a single command but you can construct a lapse rate downscaling using a combination of the commands i show. I may try to find time to have a separate video on that as it will feature in my new edX course
@silverreserve5174
@silverreserve5174 Год назад
@@climateunboxed Thanks
@geosciences5097
@geosciences5097 7 месяцев назад
Thanks, why, when I use ncview infile.nc, I don’t have the graph, i working on the server
@nurulain1082
@nurulain1082 2 года назад
Hi. Thank you for the sharing. It is what I am looking for, ncdump -v,latitude file.nc. But, can I extract the latitude as a new nc file? Thank you in advance!
@climateunboxed
@climateunboxed Год назад
Not sure what you mean? Latitude is a dimension, but the values are stored in the file as a variable that you can read in to R python fortran etc just as any other variable.
@manacebationo8565
@manacebationo8565 2 года назад
Thanks for your helpful tutorial. Pls, How can I extract data from a netCDF file for a specific location? Thanks...
@climateunboxed
@climateunboxed 2 года назад
Thanks. I have a video specifically on that topic called "extracting a location, do you get the point?" It should be linked in the playlist on my channel... Hope it helps
@alorsan2012
@alorsan2012 9 месяцев назад
Hello, Could you show us how to use "cdo selregions", please? Thanks for a lot !!
@MultiRose86
@MultiRose86 Год назад
Thanks for a nice video. Which program is this please and can we do this for a multiple NetCDf files please
@climateunboxed
@climateunboxed Год назад
cdo, climate data operators... from the command line in linux - and yes you can use with multiple files in a loop or with wildcards
@MultiRose86
@MultiRose86 Год назад
@@climateunboxed Thanks I have a windows laptop, can I install CDO please. any video on this please I am struggling on this
@climateunboxed
@climateunboxed Год назад
@@MultiRose86 the easiest thing is to install the linux subsystem - just a couple of clicks... once you have that you can install cdo with "sudo apt install cdo"
@arjunkaushik5075
@arjunkaushik5075 3 года назад
Is there a way to change the units of rainfall variable in a NetCDF file from mm/day to mm? Similarly, temperature Kelvin to Celcius
@climateunboxed
@climateunboxed 2 года назад
Temperature from k to c is cdo subc,273.15 in out . I'm just editing a video on this now to upload. The metadata still needs editing with NCO though. That's a video on my to-do list
@arjunkaushik5075
@arjunkaushik5075 2 года назад
@@climateunboxed I will wait for the video.
@zarrinz1865
@zarrinz1865 3 года назад
Thank you a million for your video, it is very useful for me to do the data preprocessing, I appreciate it very much. However, when I run this code in the terminal, I came across a problem, which always shows "Too many streams specified! Operator sellonlatbox needs 1 input stream and 1 output stream!". In fact, What I want to do is extracting NorthAmerica data between 1960 and 2014 from the CMIP6 model (which is a global dataset, and the time series is from 1850 to 2014). Can you please kindly help me out?
@climateunboxed
@climateunboxed 3 года назад
It sounds like you are inserting spaces between sellonlatbox and the comma or the options... As I warn in the video it is important that sellonlatbox,lon1,lon2,lat1,lat2 is all together with no spaces, then you need one input file and one output file name - I hope that helps! Thanks for your kind words, some more videos on other aspects of processing will be appearing soon....
@zarrinz1865
@zarrinz1865 3 года назад
@@climateunboxed Thanks for your kind reply. It works now. But I come across another problem, I'd like to extract a subregion time series for 1960 to 2014 from an original global dataset whose time series is between 1850 to 2014. My code is "cdo -sellonlatbox,-170,-55,7,72 -selyear,1960/2014 infile.nc outfile.nc", but an error shows that: segmentation fault cdo -sellonlatbox,-170,-55,7,72 -selyear,1960/2014 outfile.nc. So I'd like to ask whether this command is suitable for a continuous-time series extracting? Or what I should notice in it? Sorry for disturbing you again, since I'm a newbie to start CDO. Thanks for your time and help.
@climateunboxed
@climateunboxed 3 года назад
@@zarrinz1865 Try using the option -L (i.e. cdo -L -sellonlatbox etc) f you get a core error or seg fault when piping, it forces sequential I/O access... I'll put a video on temporal stats soon, hopefully this week, but your comment reminds me that I should put out on piping too, thanks :-)
@kingnnaemeka2231
@kingnnaemeka2231 2 года назад
Thank you for this video. How can you cut out a region using a polygon shapefile?
@climateunboxed
@climateunboxed 2 года назад
Unfortunately that's beyond the scope of CDO and needs python or R. I may put in a video on that later but I need to finish some CDO based material first for my online course in April
@rohitgautam5310
@rohitgautam5310 2 года назад
@@climateunboxed what type of online course is it? Can we also participate? From India
@climateunboxed
@climateunboxed 2 года назад
@@rohitgautam5310 it is an edX courses I'm putting together using these videos that will hopefully run this spring with UNESCO certification for those completing the units. More details to follow soon. It will be open to all. There will also be interactive sessions organized in gather for those signing up. As i say, as soon as I can i will post more details.
@kuttiyash
@kuttiyash 4 месяца назад
I have more than 500 files. how to use all files to crop the region? instead of selecting one by one.
Далее
Using NCDUMP to reveal the secrets of Netcdf
13:59
Просмотров 4,7 тыс.
Ромарио стал Ромой
00:46
Просмотров 56 тыс.
Merging Multiple NetCDF Files
4:35
Просмотров 8 тыс.
Visualising data in NetCDF format
39:56
Просмотров 65 тыс.
Part 4-  Climate Data Operators (CDO) Demonstration
43:32
The Beauty of NetCDF
7:42
Просмотров 12 тыс.