wrf.cloudfrac

wrf.cloudfrac(pres, relh, meta=True)

Return the cloud fraction.

The leftmost dimension of the returned array represents three different quantities:

  • return_val[0,...] will contain LOW level cloud fraction
  • return_val[1,...] will contain MID level cloud fraction
  • return_val[2,...] will contain HIGH level cloud fraction

This is the raw computational algorithm and does not extract any variables from WRF output files. Use wrf.getvar() to both extract and compute diagnostic variables.

Parameters:
  • pres (xarray.DataArray or numpy.ndarray) –

    Full pressure (perturbation + base state pressure) in [Pa], with the rightmost dimensions as bottom_top x south_north x west_east

    Note

    This variable must be supplied as a xarray.DataArray in order to copy the dimension names to the output. Otherwise, default names will be used.

  • relh (xarray.DataArray or numpy.ndarray) – humidity with the same dimensionality as pres
  • meta (bool) – Set to False to disable metadata and return numpy.ndarray instead of xarray.DataArray. Default is True.

Warning

The input arrays must not contain any missing/fill values or numpy.nan values.

Returns:The cloud fraction array whose leftmost dimension is 3 (LOW=0, MID=1, HIGH=2). If xarray is enabled and the meta parameter is True, then the result will be an xarray.DataArray object. Otherwise, the result will be a numpy.ndarray object with no metadata.
Return type:xarray.DataArray or numpy.ndarray