Actions

NCPLOT: Define DataSet

From BAWiki

Revision as of 09:24, 5 July 2018 by imported>Spohr Susanne
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


This page should help to find the right start, step and stride values. The parameters have to be specified in a Dataset block of the NCPLOT control file.

Preliminary remark

The command

ncdump -h <filename>.nc
 

shows the header of a CF-NetCDF file in CDL-syntax. The name of the offered variables and their dimensions can be found in this metadata.

1.) Dimensions of the variables

  dimensions:
	nMesh2_node = 19508 ;
	nMesh2_edge = 37784 ;
	nMesh2_face = 18274 ;
	nMesh2_time = 1 ;
	two = 2 ;
	nMaxMesh2_face_nodes = 4 ;
	nMesh2_data_time = UNLIMITED ; // (4177 currently)
	nMesh2_layer_2d = 1 ;
	nMesh2_layer_3d = 50 ;
 

Hint: The dimensions are at the beginning of the file.

2.) List of variables

  float Mesh2_face_Wasserstand_2d(nMesh2_data_time, nMesh2_face) ;
	Mesh2_face_Wasserstand_2d:long_name = "Wasserstand [ face ]" ;
	Mesh2_face_Wasserstand_2d:units = "m" ;
        ...        

  float Mesh2_face_Salzgehalt_3d(nMesh2_data_time, nMesh2_layer_3d, nMesh2_face) ;
	Mesh2_face_Salzgehalt_3d:long_name = "Salzgehalt [ face ]" ;
 	Mesh2_face_Salzgehalt_2d:units = "1e-3" ;
 


Hint:

  1. The DUMP file is in CDL syntax.
  2. The order of the dimensions specified in Fortran is the inverted order as in the DUMP file.
  3. The Fortran syntax is used for the steering data.


Example: Water level

      CDL : Mesh2_face_Wasserstand_2d(nMesh2_data_time, nMesh2_face)
  Fortran : Mesh2_face_Wasserstand_2d(nMesh2_face, nMesh2_data_time)
 


Example: Salinity

      CDL : Mesh2_face_Salzgehalt_3d(nMesh2_data_time, nMesh2_layer_3d, nMesh2_face)
  Fortran : Mesh2_face_Salzgehalt_3d(nMesh2_face, nMesh2_layer_3d, nMesh2_data_time)
 


Example: Dataset 1

The water level should be displayed.
It should begin with the 1234th result time.
Overall one picture should be generated.
The water level should be displayed for each result.

File           = <fileName>.nc NETCDF
Variable       = Mesh2_face_Wasserstand_2d
Start          =      1  1234
Step           =  18274     1
Stride         =      1     1
 

Conclusion:
It is produced only one picture of the water level for the 1234-th output-date.

Example: Dataset 2

The water level should be displayed.
It should begin with the 100th result time.
The representations for 50 time points should be generated.
Every sixth time point should be displayed.

File           = <fileName>.nc NETCDF
Variable       = Mesh2_face_Wasserstand_2d
Start          =      1   100
Step           =  18274    50
Stride         =      1     6
 

Conclusion:
50 images are produced.

Example: Dataset 3

The 3D-salinity should be displayed.
It should begin with 5th layer and the 100th result time.
The representations for 9 layers and 50 time points should be generated.
Every fifth layer and every 6th time point should be displayed.

File           = <fileName>.nc NETCDF
Variable       = Mesh2_face_Salzgehalt_3d
Start          =      1     5   100
Step           =  18274     9    50
Stride         =      1     5     6
 

Conclusion:
50 x 9 = 450 images are produced.
From the fifth till the 45th layer each 5th layer is displayed at each of the selected 50 time points.

Summary

  1. Use NCDUMP.
  2. Determine the dimensions.
  3. Determine the names of the variables and their dimensions.
  4. Invert the CDL order of dimensions.
  5. Determine start(:) (for location dimension = 1).
  6. Determine step(:) (for location dimension = max. number of locations).
  7. Determine stride(:) (for location dimension = 1).



back to NCPLOT.DAT