UFO
ufo_utils_refractivity_calculator Module Reference

Module for containing a general refractivity forward operator and its K-matrix. More...

Functions/Subroutines

subroutine, public ufo_calculate_refractivity (nlevP, nlevq, za, zb, P, q, vert_interp_ops, pseudo_ops, min_temp_grad, refracerr, nRefLevels, refractivity, model_heights, temperature, interp_pressure)
 Calculation of the refractivity from the pressure and specific humidity. More...
 
subroutine, public ufo_refractivity_kmat (nlevP, nlevq, nRefLevels, za, zb, P, q, pseudo_ops, vert_interp_ops, min_temp_grad, dref_dP, dref_dq, dPb_dP, refractivity)
 Calculate general refractivity K matrix. More...
 
subroutine ufo_refractivity_partial_derivatives (nlevP, nlevq, za, zb, P, q, vert_interp_ops, dT_dTv, dT_dq, dref_dPb, dref_dT, dref_dq, refractivity, T, Pb, dEx_dP, dExtheta_dPb, dTv_dExtheta, dPb_dP_local, dTv_dEx)
 Calculate some partial derivatives of refractivity on model levels. More...
 

Detailed Description

Module for containing a general refractivity forward operator and its K-matrix.

Author
Neill Bowler (Met Office)
Date
6 May 2021

Function/Subroutine Documentation

◆ ufo_calculate_refractivity()

subroutine, public ufo_utils_refractivity_calculator::ufo_calculate_refractivity ( integer, intent(in)  nlevP,
integer, intent(in)  nlevq,
real(kind_real), dimension(nlevp), intent(in)  za,
real(kind_real), dimension(nlevq), intent(in)  zb,
real(kind_real), dimension(nlevp), intent(in)  P,
real(kind_real), dimension(nlevq), intent(in)  q,
logical, intent(in)  vert_interp_ops,
logical, intent(in)  pseudo_ops,
real(kind_real), intent(in)  min_temp_grad,
logical, intent(out)  refracerr,
integer, intent(out)  nRefLevels,
real(kind_real), dimension(:), intent(out), allocatable  refractivity,
real(kind_real), dimension(:), intent(out), allocatable  model_heights,
real(kind_real), dimension(nlevq), intent(out), optional  temperature,
real(kind_real), dimension(nlevq), intent(out), optional  interp_pressure 
)

Calculation of the refractivity from the pressure and specific humidity.

ufo_calculate_refractivity

  • Checks the inputs that the pressure is not missing, is monotonically decreasing and not negative.
  • Perform the calculation on the model temperature levels. It first calculates the exner function and virtual temperature from the inputs. Then using these calculates the wet and dry components of the refractivity.
  • If pseudo-level processing is being used, then calculate the temperature, pressure and specific humidity on the pseudo-levels by interpolation. Then calculate the refractivity on all levels.
Author
Neill Bowler (Met Office)
Date
6 May 2021
Parameters
[in]nlevpno. of p levels in state vec.
[in]nlevqno. of theta levels
[in]zaheights of rho levs
[in]zbheights of theta levs
[in]pstate vector
[in]qstate vector
[in]vert_interp_opsUse log(p) for vertical interpolation?
[in]pseudo_opsUse pseudo-levels to reduce errors?
[in]min_temp_gradMinimum value for the vertical temperature gradient
[out]refracerrrefractivity error
[out]nreflevelsno. of pseudo levs
[out]refractivityRef. on pseudo levs
[out]model_heightsheight of pseudo levs
[out]temperatureCalculated temperature on model levels
[out]interp_pressureModel pressure, interpolated to temperature levels

Definition at line 66 of file RefractivityCalculator.F90.

Here is the caller graph for this function:

◆ ufo_refractivity_kmat()

subroutine, public ufo_utils_refractivity_calculator::ufo_refractivity_kmat ( integer, intent(in)  nlevP,
integer, intent(in)  nlevq,
integer, intent(in)  nRefLevels,
real(kind_real), dimension(nlevp), intent(in)  za,
real(kind_real), dimension(nlevq), intent(in)  zb,
real(kind_real), dimension(nlevp), intent(in)  P,
real(kind_real), dimension(nlevq), intent(in)  q,
logical, intent(in)  pseudo_ops,
logical, intent(in)  vert_interp_ops,
real(kind_real), intent(in)  min_temp_grad,
real(kind_real), dimension(:,:), intent(out), allocatable  dref_dP,
real(kind_real), dimension(:,:), intent(out), allocatable  dref_dq,
real(kind_real), dimension(nlevq,nlevp), intent(out), optional  dPb_dP,
real(kind_real), dimension(:), intent(out), optional, allocatable  refractivity 
)

Calculate general refractivity K matrix.

ufo_refractivity_kmat

  • Allocate intermediate matrices used in calculation.
  • Calculate the refractivity and basic gradients on the temperature/theta levels.
  • If using pseudo-levels, then calculate the partial matrices on these levels, and use these to calculate the final matrices (dref_dp and dref_dq).
  • If not using pseudo-levels, then calculate the final matrices.
  • Deallocate the temporary matrices.
Author
Neill Bowler (Met Office)
Date
6 May 2021 Calculate general refractivity K matrix.
Parameters
[in]nlevpno. of pressure levels
[in]nlevqno. of specific humidity levels
[in]nreflevelsno. of refractivity levels
[in]zaHeight of the pressure levels
[in]zbHeight of the specific humidity levels
[in]pPressure
[in]qSpecific humidity
[in]pseudo_opsWhether to use pseudo-levels in calculation
[in]vert_interp_opsWhether to interpolate vertically using exner or ln(p)
[in]min_temp_gradMinimum value for the vertical temperature gradient
[out]dref_dpkmatrix for p
[out]dref_dqkmatrix for q
[out]dpb_dpGradient of pressure on theta levels wrt pressure on pressure levels
[out]refractivityCalculated refractivity

Definition at line 300 of file RefractivityCalculator.F90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ufo_refractivity_partial_derivatives()

subroutine ufo_utils_refractivity_calculator::ufo_refractivity_partial_derivatives ( integer, intent(in)  nlevP,
integer, intent(in)  nlevq,
real(kind_real), dimension(nlevp), intent(in)  za,
real(kind_real), dimension(nlevq), intent(in)  zb,
real(kind_real), dimension(nlevp), intent(in)  P,
real(kind_real), dimension(nlevq), intent(in)  q,
logical, intent(in)  vert_interp_ops,
real(kind_real), dimension(nlevq,nlevq), intent(out)  dT_dTv,
real(kind_real), dimension(nlevq,nlevq), intent(out)  dT_dq,
real(kind_real), dimension(nlevq,nlevq), intent(out)  dref_dPb,
real(kind_real), dimension(nlevq,nlevq), intent(out)  dref_dT,
real(kind_real), dimension(nlevq,nlevq), intent(out)  dref_dq,
real(kind_real), dimension(nlevq), intent(out)  refractivity,
real(kind_real), dimension(nlevq), intent(out)  T,
real(kind_real), dimension(nlevq), intent(out)  Pb,
real(kind_real), dimension(nlevp,nlevp), intent(out)  dEx_dP,
real(kind_real), dimension(nlevq,nlevq), intent(out)  dExtheta_dPb,
real(kind_real), dimension(nlevq,nlevq), intent(out)  dTv_dExtheta,
real(kind_real), dimension(nlevq,nlevp), intent(out)  dPb_dP_local,
real(kind_real), dimension(nlevq,nlevp), intent(out)  dTv_dEx 
)

Calculate some partial derivatives of refractivity on model levels.

ufo_refractivity_partial_derivatives

  • Calculate the pressure on model theta levels
  • Calculate exner on model theta level
  • Calculate mean layer T_virtual, and then various partial derivatives
Author
Neill Bowler (Met Office)
Date
26 May 2021
Parameters
[in]nlevpno. of pressure levels
[in]nlevqno. of specific humidity levels
[in]zaHeight of the pressure levels
[in]zbHeight of the specific humidity levels
[in]pPressure
[in]qSpecific humidity
[in]vert_interp_opsWhether to interpolate vertically using exner or ln(p)
[out]dt_dtvPartial derivative of temperature wrt virtual temperature
[out]dt_dqPartial derivative of temperature wrt specific humidity
[out]dref_dpbPartial derivative of refractivity wrt pressure on model theta levels
[out]dref_dtPartial derivative of refractivity wrt temperature
[out]dref_dqPartial derivative of refractivity wrt specific humidity
[out]refractivityCalculated refractivity
[out]tCalculated temperature
[out]pbPressure on model theta levels
[out]dex_dpPartial derivative of exner wrt pressure
[out]dextheta_dpbPartial derivative of refractivity wrt pressure (at ob location)
[out]dtv_dexthetaVirtual temperature divided by exner on theta levels
[out]dpb_dp_localPartial derivative of pressure on theta levels wrt pressure on pressure levels
[out]dtv_dexPartial derivative of virtual temperature wrt exner

Definition at line 650 of file RefractivityCalculator.F90.

Here is the caller graph for this function: