Calculating spatial statistics of netCDF files - Don't make this mistake!

  Рет қаралды 4,675

Climate Unboxed

Climate Unboxed

3 жыл бұрын

This video talks about the way you can calculate the spatial mean or average, variance, standard deviation, maximum or minimum and other spatial functions over netCDF (and grib) files. It outlines a common mistake that people make when making such calculations using python, fortran or other coding languages, and how you can avoid this mistake and calculate statistics quickly (and correctly!) from the command line using CDO (climate data operators).

Пікірлер: 23
@texloch1401
@texloch1401 3 ай бұрын
Thank you for this nc file playlist. It's been incredibly helpful.
@pradeepattri8375
@pradeepattri8375 10 ай бұрын
Can you explain how CDO climate data operator software does the averaging ?
@nikolaihemal663
@nikolaihemal663 3 жыл бұрын
Very good videos. Thank you for this!
@climateunboxed
@climateunboxed 2 жыл бұрын
you are welcome :)
@nembilwiwamashudu7692
@nembilwiwamashudu7692 2 жыл бұрын
I want to extract temperature values from netcdf file for Southern Africa (1979-2017) ..to draw Taylor diagram (Era-5 and Model) do I chose a single point(lat/lan in Southern africa) or do i chose the whole area( lon-lon / lat lat) and average then extract?
@climateunboxed
@climateunboxed 2 жыл бұрын
Thanks for your comment. Well you can do both but don't forget that performing a model evaluation on a single point is very noisy. Usually temporal variability is such that you need a long series to have statistical significance. In general i would take a spatial average for a Taylor analysis...
@abhinavagrawal4336
@abhinavagrawal4336 2 жыл бұрын
Dear Sir, Thank you very much for the video I had one query, how to calculate the time mean for all the grids of a netcdf file?
@climateunboxed
@climateunboxed 2 жыл бұрын
Check out my video on Temporal statistics, it is on precisely this topic 👍
@abhinavagrawal4336
@abhinavagrawal4336 2 жыл бұрын
@@climateunboxed Thank you very much Sir
@PedroNGV
@PedroNGV 3 жыл бұрын
Dear Adrian Tompkins, So, this means that to get the real temperature from the NetCDF cells, we need to apply real temperature (kelvin) = ((value in the t2m.nc cell) * 0.00175144904034513) + 257.318704353605 ? Another doubt, what about calculate statistics for each cell thru time. Imagine I want to get the 50th, 75th, 90th, 95th and 99th percentile for each cell of a NetCDF grid. How can we do that with CDO or other tools? Thank you very much! Fantastic explanations here in your videos! Best regards, Pedro
@climateunboxed
@climateunboxed 2 жыл бұрын
Apologies not to reply earlier, I somehow missed this comment. Not sure what you mean with the formula, if you can clarify that I'll try to answer. Concerning the second part, there is a CDO command that allows you to calculate percentiles over time. I'll put that on my list to make a tutorial for soon... The command is timpctl,X and you need to pass it a file with the minimum and another with the field max after the input file. As i say, I'll try to upload a video on that soon as it is a nice video topic suggestion
@sujathayadala6783
@sujathayadala6783 2 жыл бұрын
Hi sir, I have global data and I want to calculate the area average of a domain (for example, Lat=5,lat=40&lon=40,lon=100). I want all the values in that averaged area for a particular parameter. Could you please tell me what type of library that I have to use for this spatial average. Thankyou sir.
@climateunboxed
@climateunboxed 2 жыл бұрын
You need sellonlatbox and then fldmean. Check out my two videos on extracting subdomains and spatial averaging...
@ntangaramugondo5806
@ntangaramugondo5806 11 ай бұрын
How do I compute the spatial trend for my dataset?@@climateunboxed
@itatube89
@itatube89 Жыл бұрын
What programming language is that? Can I do this in Python? Thank you!
@climateunboxed
@climateunboxed Жыл бұрын
hi there, CDO is a command line set of tools that you usually use under linux, but it is also possible to use cdo easily from within python by installing the cdo package. There are instructions here on how to do this and access cdo commands (also alternatively from R by the way): code.mpimet.mpg.de/projects/cdo/wiki/Cdo%7Brbpy%7D
@basilihuoma5300
@basilihuoma5300 3 жыл бұрын
How can I work with .tiff Geospatial data?
@climateunboxed
@climateunboxed 3 жыл бұрын
Well if you want to convert it to netcdf you can try gdal_translate -of netcdf in.tiff out.nc . Note that the file size may increase dramatically. Hope that helps and don't forget to tell everyone about the channel, more material in the way soon! 🙂
@basilihuoma5300
@basilihuoma5300 3 жыл бұрын
@@climateunboxed Can you explain in more details, because I would need to convert the .tiff Geospatial data to NetCDF in order to use the pygrid or pysgrid of CF convention of the gridded API. Can you please give more context to how I can go about this, thanks.
@climateunboxed
@climateunboxed 3 жыл бұрын
@@basilihuoma5300 Yes, that was what the command I gave you does. If you type gdal_translate -of netcdf input.tiff output.nc it will convert your file "input.tiff" to a netcdf file "output.nc" (Hopefully!)
@basilihuoma5300
@basilihuoma5300 3 жыл бұрын
@@climateunboxed Can you do a video on this? Finding it hard to figure out. Thanks for your help.
@basilihuoma5300
@basilihuoma5300 3 жыл бұрын
Or maybe refer me to a resource or paper that can give me a piece of code on how to work with netcdf / .tiff / gridded data. I'll appreciate it. Just subscribed.
regridding and interpolation - an essential life skill !
22:30
Climate Unboxed
Рет қаралды 10 М.
Using NCDUMP to reveal the secrets of Netcdf
13:59
Climate Unboxed
Рет қаралды 4,5 М.
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 11 МЛН
Ouch.. 🤕
00:30
Celine & Michiel
Рет қаралды 26 МЛН
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 91 МЛН
Can A Seed Grow In Your Nose? 🤔
00:33
Zack D. Films
Рет қаралды 29 МЛН
A video on temporal statistics? It's about time too!
19:41
Climate Unboxed
Рет қаралды 3,7 М.
How to structure a data collection of NetCDF files - Granularity
10:01
Getting BIG DATA by unlocking the power of CDSAPI - You will go loopy!
16:34
The Beauty of NetCDF
7:42
Climate Unboxed
Рет қаралды 11 М.
Introducing NetCDF and the CF and ACDD conventions
12:16
Luke Data Manager
Рет қаралды 3,1 М.
Calculating diurnal and seasonal cycles - this video is spicy!
14:13
Climate Unboxed
Рет қаралды 1,8 М.
Download ERA5 reanalysis from the climate data store
20:41
Climate Unboxed
Рет қаралды 20 М.
Reading NetCDF Temperature Anomaly data in RStudio
20:16
TheUdorblab
Рет қаралды 19 М.
Creating a land-sea mask for gridded data - just like magic!
15:39
Climate Unboxed
Рет қаралды 2,7 М.
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 11 МЛН