Home > atmlab > arts > various > arts_map_daa.m

arts_map_daa

PURPOSE ^

ARTS_MAP_DAA Maps MBLOCK_AA_GRID values to correct ZA and AA

SYNOPSIS ^

function [za,aa] = arts_map_daa( za, aa0, aa )

DESCRIPTION ^

 ARTS_MAP_DAA   Maps MBLOCK_AA_GRID values to correct ZA and AA

   Sensor LOS azimuth angles and mblock_aa_grid values can not be added in a
   straightforward way due to properties of the polar coordinate system used to
   define line-of-sights. This function performs a "mapping" ensuring that the
   pencil beam directions specified by mblock_za_grid and mblock_aa_grid form
   a rectangular grid (on the unit sphere) for any za.

   *za* and *aa0* match the angles of the ARTS WSV sensor_los.
   *aa* shall hold values "close" to 0. The limit is here set to 5 degrees.

 FORMAT   [za,aa] = arts_map_daa( za, aa0, aa )
        
 OUT   za   Zenith angles matching aa0+aa.
       aa   Azimuth angles matching aa0+aa.
       dz   LOS component in z dimension.
 IN    za   Zenith angle (a scalar).
       aa0  Centre azimuth angle (a scalar). 
       aa   MBLOCK_AA_GRID values.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

arts_map_daa.m

SOURCE CODE ^

0001 % ARTS_MAP_DAA   Maps MBLOCK_AA_GRID values to correct ZA and AA
0002 %
0003 %   Sensor LOS azimuth angles and mblock_aa_grid values can not be added in a
0004 %   straightforward way due to properties of the polar coordinate system used to
0005 %   define line-of-sights. This function performs a "mapping" ensuring that the
0006 %   pencil beam directions specified by mblock_za_grid and mblock_aa_grid form
0007 %   a rectangular grid (on the unit sphere) for any za.
0008 %
0009 %   *za* and *aa0* match the angles of the ARTS WSV sensor_los.
0010 %   *aa* shall hold values "close" to 0. The limit is here set to 5 degrees.
0011 %
0012 % FORMAT   [za,aa] = arts_map_daa( za, aa0, aa )
0013 %
0014 % OUT   za   Zenith angles matching aa0+aa.
0015 %       aa   Azimuth angles matching aa0+aa.
0016 %       dz   LOS component in z dimension.
0017 % IN    za   Zenith angle (a scalar).
0018 %       aa0  Centre azimuth angle (a scalar).
0019 %       aa   MBLOCK_AA_GRID values.
0020 
0021 % 2009-09-23   Created by Patrick Eriksson.
0022 
0023 function [za,aa] = arts_map_daa( za, aa0, aa )
0024 
0025 if any( abs(aa) > 5 )
0026   error( 'Values in *aa* must be inside [-5,5].' );
0027 end
0028 
0029 % Unit vector towards aa0 at za=90
0030 %
0031 [x,y,z] = arts_zaaa2cart( 90, aa0 );
0032   
0033 % Find vector around which rotation shall be performed
0034 %
0035 vrot = cross( [0 0 1], [x;y;z] );
0036 
0037 % Unit vectors towards aa0+aa at za=90
0038 %
0039 [x,y,z] = arts_zaaa2cart( 90, aa0 + aa );
0040 
0041 % Apply rotation
0042 %
0043 u = rotationmat3D( (za-90)*pi/180, vrot) * [vec2row(x);vec2row(y);vec2row(z)];
0044 
0045 % Calculate za and aa for rotated u
0046 %
0047 [za,aa] = arts_cart2zaaa( u(1,:), u(2,:), u(3,:) );

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