Тёмный

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

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

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

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

 

20 окт 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 22   
@pradeepattri8375
@pradeepattri8375 Год назад
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...
@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
@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
@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 Год назад
How do I compute the spatial trend for my dataset?@@climateunboxed
@itatube89
@itatube89 2 года назад
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.
Далее
Using NCDUMP to reveal the secrets of Netcdf
13:59
Просмотров 4,8 тыс.
NCT DOJAEJUNG 엔시티 도재정 'Perfume' MV
3:07
Yəni, sizcə, indi bu nə deməkdir?
0:23
Просмотров 82 тыс.
Почему Катар богатый? #shorts
0:45
A video on temporal statistics? It's about time too!
19:41
Calculating Zonal Statistics of a Raster using Python
31:59
The Beauty of NetCDF
7:42
Просмотров 12 тыс.
Download ERA5 reanalysis from the climate data store
20:41
NCT DOJAEJUNG 엔시티 도재정 'Perfume' MV
3:07