0

I have downloaded .nc files (you can see here the .csv format of it RCP4.5 CLOUD COVER ---see image1enter image description here) from https://cds.climate.copernicus.eu/ (both historical files and RCP scenarios --RCP 4.5, 6 AND 8.5). I have browsed the net about how to preprocess them (looked for some tutorials and more direct answers and approach online) but I am still not sure of it. I uploaded the .nc files (1 or 2 files) in QGIS and used gdal2xyz and found out that each .nc file consists of several bands (see image2--enter image description here.

I really want to understand .nc file component so I will be able to preprocess it using programming languages like python (maybe)----or if not, be able to understand .nc file's components (at least).

All I want to do is be able to have a time series data of the average of the whole square grid or location I need with variables such as:

Precipitation             Time

and other variables available in the https://cds.climate.copernicus.eu/ like temperature, cloud cover etc

Will anyone enlighten me about .nc files and how I can pre-process it?

**To download my sample .nc file, please go to this link: https://drive.google.com/file/d/1Ok2tVD_iCXe93Q1HYGv1jtyaTIc7wY2N/view?usp=sharing

PS. The image of .csv file above is for variable: "cloud cover"(RCP4.5 CLOUD COVER)

kiwi_kimchi
  • 345
  • 3
  • 12
  • If you are new to NetCDF please look through libraries such as xarray or my package nctoolkit on Python. On the terminal use CDO or NCO. – Robert Wilson May 09 '22 at 08:02
  • @RobertWilson I tried to use nctoolkit in python but I keep on getting this "Please install CDO version 1.9.3 or above: https://code.mpimet.mpg.de/projects/cdo/ or https://anaconda.org/conda-forge/cdo" probably because I'm using windows. Is there a workaround for this? – kiwi_kimchi May 10 '22 at 02:58
  • @RobertWilson so now I'm trying to use the nctoolkit, but i got this error when i'm trying to calculate the weighted mean: AttributeError: 'DataFrame' object has no attribute 'weighted' :( – kiwi_kimchi May 10 '22 at 03:48
  • On Windows you will need the linux subsystem or something similar. – Robert Wilson May 10 '22 at 07:09
  • I'm not sure what you mean by weighted mean. I don't think "weighted" is used anywhere in the nctoolkit code, so can't see what would cause that error. If something is not working it is probably better to raise an issue here: https://github.com/pmlmodelling/nctoolkit/issues – Robert Wilson May 10 '22 at 07:12
  • @kiwi_kimchi : Did you make any progressing understanding NetCDF files? – msi_gerva Nov 08 '22 at 21:43

0 Answers0