Home > atmlab > geophysics > vmr2nd.m

vmr2nd

PURPOSE ^

=============================================================

SYNOPSIS ^

function n = vmr2nd(vmr,p,t)

DESCRIPTION ^

=============================================================
 n = vmr2nd(vmr,p,t)

 Calculates number density values from VMR-values.

 If any of vmr, p or t is not a scalar, the otehrs must have the 
 same size or be scalars.

 Input: vmr    vector(s) of VMR-values [-]
        p      vector of pressure values [Pa]
        t      vector of temperature values [K]

 Output:   n   vector of number density values [1/m3]

 Patrick Eriksson 1993
 PE 2001-12-12, Adapted to AMI
 PE 2004-09-11, Adapted to Atmlab
=============================================================

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

vmr2nd.m

SOURCE CODE ^

0001 %=============================================================
0002 % n = vmr2nd(vmr,p,t)
0003 %
0004 % Calculates number density values from VMR-values.
0005 %
0006 % If any of vmr, p or t is not a scalar, the otehrs must have the
0007 % same size or be scalars.
0008 %
0009 % Input: vmr    vector(s) of VMR-values [-]
0010 %        p      vector of pressure values [Pa]
0011 %        t      vector of temperature values [K]
0012 %
0013 % Output:   n   vector of number density values [1/m3]
0014 %
0015 % Patrick Eriksson 1993
0016 % PE 2001-12-12, Adapted to AMI
0017 % PE 2004-09-11, Adapted to Atmlab
0018 %=============================================================
0019 
0020 function n = vmr2nd(vmr,p,t)
0021 
0022 kb = constants( 'BOLTZMANN_CONST' );
0023 
0024 n = (vmr.*p./(kb*t)); 
0025

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005