0% found this document useful (0 votes)
11 views23 pages

1 - Multidemensional - Data

The document provides an overview of multidimensional data, particularly in the context of climate data represented in NetCDF format. It explains the structure of NetCDF files, including dimensions, variables, and attributes, and highlights its importance in atmospheric and oceanographic sciences. Additionally, it mentions various data sources and tools for accessing and visualizing NetCDF data.

Uploaded by

bankiww27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views23 pages

1 - Multidemensional - Data

The document provides an overview of multidimensional data, particularly in the context of climate data represented in NetCDF format. It explains the structure of NetCDF files, including dimensions, variables, and attributes, and highlights its importance in atmospheric and oceanographic sciences. Additionally, it mentions various data sources and tools for accessing and visualizing NetCDF data.

Uploaded by

bankiww27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

Multidimensional Data

Moustapha Tall, PhD


AIMS-Rwanda Research Department
Technical Introduction
Are you planning to use climate data
(ClimDat) for your MS report?

No
(but will use ClimDat
later)
Yes

No
(no plans to use
ClimDat)
Have you ever used ClimDat?

Yes No
How does a ClimDat file look like, have you ever
seen a ClimDat file??

Yes No
Have you ever used the
climate data operators (CDO) / R / Python / NCL ?

cdo R Python NCL

Yes Yes Yes Yes

Very little Very little Very little Very little

No No No No
Multidimensional Data

T
Data cube (3D) or hypercube (4D,5D…)

• Temperature varying with time

Y X

Z T

• Temperature varying with time and altitude

Y X
Multidimensional Data

……….. Time = N

Time = 2

Time = 1
Multidimensional Data

Time = 3
143 243 343 443

Time = 2
133 233 333 433
Y 142 242 342 442 Time
123 223 323 423
Time = 1
132 232 332 432
141 241 341 441 113 213 313 413
122 222 322 422
131 231 331 431
112 212 312 412
121 221 321 421

111 211 311 411


X
Multidimensional Data
141 241 341 441

131 231 331 431

121 221 321 421


Y
111 211 311 411

Time Time = 1
142 242 342 442

132 232 332 432

122 222 322 422

112 212 312 412

Time = 2
143 243 343 443
X
133 233 333 433

Data Cube 123 223 323 423

113 213 313 413

Time = 3

Time Slices
Multidimensional Data

143 243 343 443


Altitude
133 233 333 433 Time
Y 142 242 342 442
123 223 323 423

132 232 332 432


113 213 313 413
141 241 341 441
122 222 322 422

131 231 331 431


112 212 312 412

121 221 321 421

111 211 311 411


X

Includes variation in (x,y,z,t)


What is NetCDF?
NetCDF (network Common Data Form)
A platform independent format for representing multi-
dimensional array-orientated scientific data.
Self Describing - a netCDF file includes information about the
data it contains.
Direct Access - a small subset of a large dataset may be
accessed efficiently, without first reading through all the
preceding data.
Sharable - one writer and multiple readers may simultaneously
access the same netCDF file.
NetCDF can be treated, analyzed and plotted with softwares like
GrADS, Ferret, Python, NCL, ...
Why NetCDF?
Most commonly used format in atmospheric and
oceanographic sciences for observational data and numerical
modeling
NetCDF file description
NetCDF is a binary file

A NetCDF file consists of:


Global Attributes: Describe the contents of the file
Dimensions: Define the structure of the data
(e.g Time, Depth, Latitude, Longitude)
Variables: Holds the data in arrays shaped
by Dimensions
Variable Attributes : Describes the contents of
each variable
Storing Data in a netCDF File
netcdf mynetcdf{
dimensions:
143 243 343 443
X=4 ;
Y=4 ; 133 233 333 433
Time= UNLIMITED ; Y 142 242 342 442 Time
123 223 323 423
variables:
132 232 332 432
float X(X ); 113 213 313 413
141 241 341 441
float Y(Y) ; 122 222 322 422
int Time(Time); 131 231 331 431
112 212 312 412
float Temperature(Time, Y, X );
121 221 321 421
data:
X = 10, 20, 30, 40; 111 211 311 411
Y = 110, 120, 130, 140; X
Time = 31, 59, 90;
}
Storing Data in a netCDF File
netcdf mynetcdf{
dimensions:
143 243 343 443
X=4 ;
Y=5 ; 133 233 333 433
Time= UNLIMITED ; Y 142 242 342 442 Time
123 223 323 423
variables:
132 232 332 432
float X(X ); 141 241 341 441 113 213 313 413
float Y(Y) ; 122 222 322 422
int Time(Time); 131 231 331 431
112 212 312 412
float Temperature(Time, Y, X );
121 221 321 421
data:
X = 10, 20, 30, 40;
Y = 110, 120, 130, 140; X
Time = 31, 59, 90;

Temperature = Time = 1
111,211,311,411;
} Y=1
X = 1 to 4
Storing Data in a netCDF File
netcdf mynetcdf{
dimensions: 143 243 343 443
X =4;
Y=5; 133 233 333 433
Y Time
Time=UNLIMITED ; 142 242 342 442
123 223 323 423
variables: 132 232 332 432
float X(X); 113 213 313 413
float Y(Y) ; 122 222 322 422

int Time(Time); 112 212 312 412


float Temperature(Time, Y, X );
data:
X = 10, 20, 30, 40;
Y = 110, 120, 130, 140; X
Time = 31, 59, 90;

Temperature = Time = 1
111,211,311,411,121,221, 321, 421,
131,231,331,431,141,241, 341, 441; Y = 1 to 4
}
X = 1 to 4
Storing Data in a netCDF File
netcdf mynetcdf{
dimensions:
X=4;
Y=5 ;
Time= UNLIMITED ; Y Time
variables:
float X(X);
float Y(Y) ;
int Time(Time);
float Temperature(Time, Y, X );
data:
X = 10, 20, 30, 40;
Y = 110, 120, 130, 140; X
Time = 31, 59, 90;

Temperature = Time = 1 to 3
111,211,311,411,121,221,321,421,
131,231,331,431,141,241,341,441, Y = 1 to 4
112,212,312,412,122,222,322,422,
132,232,332,432,142,242,342,442, X = 1 to 4
113,213,313,413,123,223,323,423,
133,233,333,433,143,243,343,443 ;
}
NetCDF Data Sources
- Climate Research Unit (CRU): Precipitation, Temperature
& Pot. Evapotranspiration
(https://crudata.uea.ac.uk/cru/data/hrg/)

- Global Precipitation Climatology Project (GPCP): Precip


(https://psl.noaa.gov/data/gridded/data.gpcp.html)

- Climate Hazards Group InfraRed Precipitation with Station


data (CHIRPS) -
https://www.nature.com/articles/sdata201566
(more details on CHIRPS data)
NetCDF Data Sources

• Coupled Model Intercomparison Project (CMIP6) – IPCC Sixth


Assement Report (Intergovernmental Panel on Climate Change)
(https://esgf-node.llnl.gov/projects/cmip6/)

• Coordinated Regional Downscaling Experiment (CORDEX)


(https://cordex.org/)
NCDUMP
Shows information about netCDF files

– ncdump -h file.nc
• only header information (variables,
dimensions, etc.)

– ncdump -v var1 file.nc


• Prints out output of variable ‘var1’
Quick look using “ncview”
Go to the directory with the netcdf data is:
– cd <path_to_netcdf_data>
– Choose the file to display (e.g. temp.nc)
• ncview <temp.nc>

– In the dialogue window:


• choose the variable to display (Var:)
• change the colour palette (default is 3gauss)
• change the range of values to display (Range)
• change the type of data interpolating (Bi-lin|
Repl)
• make a snap shot of the image using Print.
Quick look using “ncview”
In the dialogue window:
• choose the variable to display (Var:)
• change the colour palette (default is 3gauss)
• change the range of values to display (Range)
• change the type of data interpolating (Bi-lin|
Repl)
• make a snap shot of the image using Print.
• click with the left mouse button on any location
of the image (a time-series plot should appear)
– change X Range and Y Range
– make a snap shot of the image using Print.

You might also like