User Tools

Site Tools


internal:administration:idl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
internal:administration:idl [2019/10/10 16:03]
jan [speed]
internal:administration:idl [2019/10/10 17:11] (current)
jan [NETCDF]
Line 1016: Line 1016:
 ==== NETCDF ==== ==== NETCDF ====
  
-We prefer to save data as **NETCDF files**\\  +We prefer to save data as **NETCDF files** ​(=**N**etwork **C**ommon **D**ata **F**ormat) ​\\  
-NetCDF is a platform independent binary format which includes meta information about its content. It can be easily read in many programming platforms like matlab, python, C, ... As a binary format reading is very fast and access to a subset of the content is easy.+NetCDF is a platform independent binary format which includes meta information about its content. ​\\ 
 +It can be easily read in many programming platforms like matlab, python, C, ... \\ 
 +As a binary format reading is very fast and access to a subset of the content is easy.\\
  
   * NETCDF was developed by [[http://​www.unidata.ucar.edu/​software/​netcdf/​|Unidata]]@[[http://​www.ucar.edu|UCAR]] see also [[http://​de.wikipedia.org/​wiki/​NetCDF|en.wikipedia.org]] ...   * NETCDF was developed by [[http://​www.unidata.ucar.edu/​software/​netcdf/​|Unidata]]@[[http://​www.ucar.edu|UCAR]] see also [[http://​de.wikipedia.org/​wiki/​NetCDF|en.wikipedia.org]] ...
Line 1206: Line 1208:
 IDL can read NETCDF4 file as of version 8.0 (see IDL ref pages at [[https://​www.harrisgeospatial.com/​docs/​NCDF_CREATE.html|harrisgeospatial.com]]) : IDL can read NETCDF4 file as of version 8.0 (see IDL ref pages at [[https://​www.harrisgeospatial.com/​docs/​NCDF_CREATE.html|harrisgeospatial.com]]) :
  
-To use this you need the NETCDF4_FORMAT keyword when generating the file, the GZIP, CHUNK_DIMENSIONS and SHUFFLE keywords when defining the variable:+To use this you need to set the NETCDF4_FORMAT keyword when generating the file,\\ 
 +and the GZIP, CHUNK_DIMENSIONS and SHUFFLE keywords when defining the variable:
  
   ; create netcdf output file   ; create netcdf output file
-  nc_file = NCDF_CREATE( filename , /​clobber, ​NETCDF4_FORMAT=NETCDF4_FORMAT )+  nc_file = NCDF_CREATE( filename , /​clobber, ​/NETCDF4_FORMAT )
   ...   ...
 +  g_zip_level = 5 ; a value between 0..9 for low...high compression but also fast...slow access
 +  c_dim1 = N_time div 4 ; i guess that is the way to use it
 +  c_dim2 = N_data div 4 ; i guess that is the way to use it
 +  ​
   ; get id for a variable dependent on time,    ; get id for a variable dependent on time, 
   ; possible types are: /BYTE , /CHAR, /DOUBLE , /FLOAT , /LONG , /SHORT   ; possible types are: /BYTE , /CHAR, /DOUBLE , /FLOAT , /LONG , /SHORT
-  data_id = NCDF_VARDEF( nc_file, '​data',​ N_time_id, /FLOAT , GZIP=g_zip, CHUNK_DIMENSIONS=c_dim, /SHUFFLE )+  data_id = NCDF_VARDEF( nc_file, '​data',​ N_time_id, /FLOAT , GZIP=g_zip_level, CHUNK_DIMENSIONS=chunk_dim, /SHUFFLE )
   ; multidimensional arrays are defined via   ; multidimensional arrays are defined via
-  data_2d_id = NCDF_VARDEF( nc_file, '​data_2d',​ [ N_time_id, N_data_id ], /FLOAT , GZIP=g_zip , CHUNK_DIMENSIONS=[c_dim1,​ c_dim2], /SHUFFLE )+  data_2d_id = NCDF_VARDEF( nc_file, '​data_2d',​ [ N_time_id, N_data_id ], /FLOAT , GZIP=g_zip_level ​, CHUNK_DIMENSIONS=[c_dim1,​ c_dim2], /SHUFFLE )
   ...   ...
  
internal/administration/idl.txt · Last modified: 2019/10/10 17:11 by jan