Home > atmlab > arts_usage > qarts_add_jupiter_planettbox.m

qarts_add_jupiter_planettbox

PURPOSE ^

QARTS_ADD_JUPITER_PLANETTBOX Includes planet toolbox study data for Jupiter

SYNOPSIS ^

function Q = qarts_add_jupiter_planettbox( A, Q, workfolder )

DESCRIPTION ^

 QARTS_ADD_JUPITER_PLANETTBOX   Includes planet toolbox study data for Jupiter

  This function works as an interface to the data for the planet Jupiter
  gathered during the ESA study, where ARTS was extended to cover other
  planets.

  Q.ATMOSPHERE_DIM must be set and determines if a 1D or 3D atmosphere is
  created (2D is not handled).

  The following fields are mandatory:
    A.atmo
    A.basespecies
    A.h2ospecies
    A.nh3species
    A.ch4species
    A.h2species
    A.Necase
  These variables and possible settings are described in the file 
  arts/controlfiles/planetary_toolbox/DemoJupiterAtmo1D.arts.

  All "zeropadding" variables are hard-coded to 1.

  Wind and magnetic field parts are not yet handled by this function.
  
  The atmospheric grids can be cropped by the following (also mandatory) 
  fields:
    A.pmin
    A.latmin   (not needed for 1D)
    A.latmax   (not needed for 1D)
    A.lonmin   (not needed for 1D)
    A.lonmax   (not needed for 1D)
  Grid points outside these values are removed (pmax hard-coded to a very
  high value). Longitude limits can be inside [-360,360].

 FORMAT Q = qarts_add_jupiter_planettbox( A, Q, workfolder )

 OUT   Q          Modified Q
 IN    A          Atmosphere structure, see above.
       Q          Original Q
       workfolder Path to workfolder (not used, but an input is demanded)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

qarts_add_jupiter_planettbox.m

SOURCE CODE ^

0001 % QARTS_ADD_JUPITER_PLANETTBOX   Includes planet toolbox study data for Jupiter
0002 %
0003 %  This function works as an interface to the data for the planet Jupiter
0004 %  gathered during the ESA study, where ARTS was extended to cover other
0005 %  planets.
0006 %
0007 %  Q.ATMOSPHERE_DIM must be set and determines if a 1D or 3D atmosphere is
0008 %  created (2D is not handled).
0009 %
0010 %  The following fields are mandatory:
0011 %    A.atmo
0012 %    A.basespecies
0013 %    A.h2ospecies
0014 %    A.nh3species
0015 %    A.ch4species
0016 %    A.h2species
0017 %    A.Necase
0018 %  These variables and possible settings are described in the file
0019 %  arts/controlfiles/planetary_toolbox/DemoJupiterAtmo1D.arts.
0020 %
0021 %  All "zeropadding" variables are hard-coded to 1.
0022 %
0023 %  Wind and magnetic field parts are not yet handled by this function.
0024 %
0025 %  The atmospheric grids can be cropped by the following (also mandatory)
0026 %  fields:
0027 %    A.pmin
0028 %    A.latmin   (not needed for 1D)
0029 %    A.latmax   (not needed for 1D)
0030 %    A.lonmin   (not needed for 1D)
0031 %    A.lonmax   (not needed for 1D)
0032 %  Grid points outside these values are removed (pmax hard-coded to a very
0033 %  high value). Longitude limits can be inside [-360,360].
0034 %
0035 % FORMAT Q = qarts_add_jupiter_planettbox( A, Q, workfolder )
0036 %
0037 % OUT   Q          Modified Q
0038 % IN    A          Atmosphere structure, see above.
0039 %       Q          Original Q
0040 %       workfolder Path to workfolder (not used, but an input is demanded)
0041 
0042 % 2013-10-22   Created by Patrick Eriksson.
0043 
0044 function Q = qarts_add_jupiter_planettbox( A, Q, workfolder )
0045 %
0046 rqre_datatype( A, { @isstruct } );
0047 rqre_datatype( Q, { @isstruct, @ischar } );
0048 rqre_datatype( workfolder, { @ischar,@isempty } );
0049 
0050 
0051 arts_xmldata_path       = atmlab( 'ARTS_XMLDATA_PATH' );
0052 if isnan( arts_xmldata_path )
0053   error('You need to set ARTS_XMLDATA_PATH to use this function.');
0054 end
0055 
0056 
0057 % Create the variables used by getatmo_jupiter.arts
0058 %
0059 Q.WSMS_BEFORE_ATMSURF{end+1} = 'IndexCreate( atmo )';
0060 Q.WSMS_BEFORE_ATMSURF{end+1} = 'ArrayOfIndexCreate( basespecies )';
0061 Q.WSMS_BEFORE_ATMSURF{end+1} = 'ArrayOfIndexCreate( h2ospecies )';
0062 Q.WSMS_BEFORE_ATMSURF{end+1} = 'ArrayOfIndexCreate( nh3species )';
0063 Q.WSMS_BEFORE_ATMSURF{end+1} = 'ArrayOfIndexCreate( ch4species )';
0064 Q.WSMS_BEFORE_ATMSURF{end+1} = 'ArrayOfIndexCreate( h2species )';
0065 Q.WSMS_BEFORE_ATMSURF{end+1} = 'ArrayOfIndexCreate( Necase )';
0066 Q.WSMS_BEFORE_ATMSURF{end+1} = 'ArrayOfIndexCreate( windcase )';
0067 Q.WSMS_BEFORE_ATMSURF{end+1} = 'NumericCreate( pmin )';
0068 Q.WSMS_BEFORE_ATMSURF{end+1} = 'NumericCreate( pmax )';
0069 Q.WSMS_BEFORE_ATMSURF{end+1} = 'NumericCreate( latmin )';
0070 Q.WSMS_BEFORE_ATMSURF{end+1} = 'NumericCreate( latmax )';
0071 Q.WSMS_BEFORE_ATMSURF{end+1} = 'NumericCreate( lonmin )';
0072 Q.WSMS_BEFORE_ATMSURF{end+1} = 'NumericCreate( lonmax )';
0073 Q.WSMS_BEFORE_ATMSURF{end+1} = 'IndexCreate( auxfield_zeropad )';
0074 Q.WSMS_BEFORE_ATMSURF{end+1} = 'IndexCreate( vmr_zeropad )';
0075 Q.WSMS_BEFORE_ATMSURF{end+1} = 'IndexCreate( interp_order )';
0076 
0077 
0078 % Set the variables above
0079 %
0080 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( 'IndexSet( atmo, %d )',    A.atmo    );
0081 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( 'IndexSet( auxfield_zeropad, %d )', 1 );
0082 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( 'IndexSet( vmr_zeropad, %d )', 1 );
0083 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( 'IndexSet( interp_order, %d )',  ...
0084                                                               A.interp_order );
0085 %
0086 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( 'NumericSet( pmin, %d )', A.pmin );
0087 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( 'NumericSet( pmax, %d )', 1e99 );
0088 %
0089 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( ...
0090    'ArrayOfIndexSet( basespecies, [%s] )', vector2commalist( A.basespecies ) );
0091 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( ...
0092      'ArrayOfIndexSet( h2ospecies, [%s] )', vector2commalist( A.h2ospecies ) );
0093 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( ...
0094      'ArrayOfIndexSet( nh3species, [%s] )', vector2commalist( A.nh3species ) );
0095 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( ...
0096      'ArrayOfIndexSet( h2ospecies, [%s] )', vector2commalist( A.h2ospecies ) );
0097 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( ...
0098      'ArrayOfIndexSet( ch4species, [%s] )', vector2commalist( A.ch4species ) );
0099 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( ...
0100      'ArrayOfIndexSet( h2species, [%s] )', vector2commalist( A.h2species ) );
0101 Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( ...
0102              'ArrayOfIndexSet( Necase, [%s] )', vector2commalist( A.Necase ) );
0103 Q.WSMS_BEFORE_ATMSURF{end+1} = ...
0104                  'INCLUDE "planetary_toolbox/includes/common/createvars.arts"';
0105 Q.WSMS_BEFORE_ATMSURF{end+1} = ...
0106                   'INCLUDE "planetary_toolbox/includes/jupiter/atmo_jupiter.arts"';
0107 Q.WSMS_BEFORE_ATMSURF{end+1} = ...
0108                'INCLUDE "planetary_toolbox/includes/jupiter/getatmo_jupiter.arts"';
0109 
0110 
0111 if Q.ATMOSPHERE_DIM == 1
0112   Q.WSMS_BEFORE_ATMSURF{end+1} = ...
0113                  'INCLUDE "planetary_toolbox/includes/common/getgrids_1D.arts"';
0114   Q.WSMS_BEFORE_ATMSURF{end+1} = ...
0115                  'INCLUDE "planetary_toolbox/includes/common/makeatmo1D.arts"';
0116 elseif Q.ATMOSPHERE_DIM == 3
0117   Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( 'NumericSet( latmin, %d )', ...
0118                                                                    A.latmin );
0119   Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( 'NumericSet( latmax, %d )', ...
0120                                                                    A.latmax );
0121   Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( 'NumericSet( lonmin, %d )', ...
0122                                                                    A.lonmin );
0123   Q.WSMS_BEFORE_ATMSURF{end+1} = sprintf( 'NumericSet( lonmax, %d )', ...
0124                                                                    A.lonmax );
0125   Q.WSMS_BEFORE_ATMSURF{end+1} = ...
0126                 'INCLUDE "planetary_toolbox/includes/common/getgrids_3D.arts"';
0127   Q.WSMS_BEFORE_ATMSURF{end+1} = ...
0128                  'INCLUDE "planetary_toolbox/includes/common/makeatmo3D.arts"';
0129 else
0130   error( 'Only 1D and 3D atmosphere can be generated.' );
0131 end
0132 
0133 
0134

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