#Metview Macro

#  **************************** LICENSE START ***********************************
# 
#  Copyright 2019 ECMWF. This software is distributed under the terms
#  of the Apache License version 2.0. In applying this license, ECMWF does not
#  waive the privileges and immunities granted to it by virtue of its status as
#  an Intergovernmental Organization or submit itself to any jurisdiction.
# 
#  ***************************** LICENSE END ************************************
# 
#=============================================================================
# Function      : mixing_ratio
#
# Syntax        : number mixing_ratio(q: number)
#                                          
# Category      : THERMODYNAMICS
#
# OneLineDesc   : Computes the mixing ratio from specific humidity
#
# Description   : Compute the mixing ratio from specific humidity
#
# Parameters    : q - specific humidity (kg/kg)	 		
#           
# Return Value  : the mixing ratio (kg/kg)
#
# Dependencies  : none
#
#===============================================================================

function mixing_ratio(q: number)

    return q / (1 - q)
    
end mixing_ratio