LES2HTCP(1) General Commands Manual LES2HTCP(1)

les2htcpconvert cloud properties from netCDF to htcp(5)

les2htcp [-cfhqv] [-m float_to_meter] [-o output] [-p pagesize] -i netcdf

les2htcp generates a htcp(5) file from cloud properties stored in a netCDF file. The variables expected in the submitted netCDF file are:

  • W_E_direction and S_N_direction: one-dimensional list of the position at the center of each cell along the west-east and south-north horizontal axis, respectively. The mesh must be homogeneous: each cell must have the same width along each axis. The unit is assumed to be meters, but this can be adjusted via the -m option.
  • VLEV or vertical_levels: position at the center of each cell along the vertical axis. The vertical mesh can be inhomogeneous, i.e. each cell can have a different vertical extent. At least one of these variables must be defined. Note that VLEV is a four-dimensional variable, whereas vertical_levels is assumed to be one-dimensional. In all cases les2htcp assumes that the vertical columns are the same for each cell along the west-east and south-north axes. The unit is assumed to be meters, but this can be adjusted via the -m option.
  • RCT: mixing ratio of liquid suspended water in each grid cell; in kg of water per kg of dry air.
  • PABST: pressure in each grid cell in Pascal.
  • THT: potential temperature in each grid cell in Kelvin.

The options are as follows:

Advanced checks of the validity of the input netcdf file against les2htcp prerequisites on netCDF data. Note that this option can significantly increase conversion time.
Forces overwriting of output file.
Display short help.
netcdf
netCDF file to convert.
float_to_meter
Scale factor to be applied to floating-point number 1.0 to convert it to meters. By default, it is set to 1.
output
Output file. If not defined, data is written to standard output.
pagesize
Page size in bytes on which htcp data will be aligned. It must be a power of 2 and greater than or equal to the size of a system page, which is the default value (see sysconf(3)).
Writes nothing to the output. Can be used in conjunction with the -c option to check only the validity of the input netCDF.
Display the version number and exit.

The les2htcp utility exits 0 on success, and >0 if an error occurs.

Convert the netCDF clouds.nc file. The resulting htcp(5) file is stored in the cloud.htcp file unless it already exists; in this case, an error is notified, the program stops and the cloud.htcp file remains unchanged:

les2htcp -i clouds.nc -o clouds.htcp

Converts netCDF file clouds_km.nc to htcp(5) format. Use the -f option to write the output file clouds.htcp even if it already exists. The input file to be converted has its spatial unit in kilo-meters, whereas the htcp file format assumes meters; use the -m 1000 option to perform the conversion:

les2htcp -i clouds_km.nc -m 1000 -o clouds.htcp

Check that the netCDF file clouds.nc is a valid input file for les2htcp. Use the -q option to disable file conversion:

les2htcp -c -i clouds.nc -q

htrdr(1), sysconf(3), htcp(5)

Edward Hartnett, netCDF4/HDF5 File Format, ESDS-RFC-022v1, March 2011.

les2htcp has been developed to generate cloud properties as input to the htrdr(1) program.

September 5, 2023 UNIX