wrf.g_ctt.get_ctt

wrf.g_ctt.get_ctt(wrfin, timeidx=0, method='cat', squeeze=True, cache=None, meta=True, _key=None, fill_nocloud=False, missing=9.969209968386869e+36, opt_thresh=1.0, units='degC')

Return the cloud top temperature.

This functions extracts the necessary variables from the NetCDF file object in order to perform the calculation.

Parameters:
  • wrfin (netCDF4.Dataset, Nio.NioFile, or an iterable) – WRF-ARW NetCDF data as a netCDF4.Dataset, Nio.NioFile or an iterable sequence of the aforementioned types.
  • timeidx (int or wrf.ALL_TIMES, optional) – The desired time index. This value can be a positive integer, negative integer, or wrf.ALL_TIMES (an alias for None) to return all times in the file or sequence. The default is 0.
  • method (str, optional) – The aggregation method to use for sequences. Must be either ‘cat’ or ‘join’. ‘cat’ combines the data along the Time dimension. ‘join’ creates a new dimension for the file index. The default is ‘cat’.
  • squeeze (bool, optional) – Set to False to prevent dimensions with a size of 1 from being automatically removed from the shape of the output. Default is True.
  • cache (dict, optional) – A dictionary of (varname, ndarray) that can be used to supply pre-extracted NetCDF variables to the computational routines. It is primarily used for internal purposes, but can also be used to improve performance by eliminating the need to repeatedly extract the same variables used in multiple diagnostics calculations, particularly when using large sequences of files. Default is None.
  • meta (bool, optional) – Set to False to disable metadata and return numpy.ndarray instead of xarray.DataArray. Default is True.
  • _key (int, optional) – A caching key. This is used for internal purposes only. Default is None.
  • fill_nocloud (bool, optional) – Set to True to use fill values in regions where clouds are not detected (optical depth less than 1). Otherwise, the output will contain the surface temperature for areas without clouds. Default is False.
  • missing (float, optional) – The fill value to use for areas where no clouds are detected. Only used if fill_nocloud is True. Default is wrf.default_fill(numpy.float64).
  • opt_thresh (float, optional) – The amount of optical depth (integrated from top down) required to trigger a cloud top temperature calculation. The cloud top temperature is calculated at the vertical level where this threshold is met. Vertical columns with less than this threshold will be treated as cloud free areas. In general, the larger the value is for this threshold, the lower the altitude will be for the cloud top temperature calculation, and therefore higher cloud top temperature values. Default is 1.0, which should be sufficient for most users.
  • units (str) – The desired units. Refer to the getvar() product table for a list of available units for ‘ctt’. Default is ‘degC’.
Returns:

The cloud top temperature. If xarray is enabled and the meta parameter is True, then the result will be a xarray.DataArray object. Otherwise, the result will be a numpy.ndarray object with no metadata.

Return type:

xarray.DataArray or numpy.ndarray