示例#1
0
    def __init__(self):
        documentation = get_special_documentation()

        brdf_non_parents=['albedo','albedo_file','albedo_library',
                                  'brdf_rossli', 'brdf_rossli_file', 'brdf_rossli_hotspot',
                                  'brdf_cam', 'brdf_cam_solar_wind', 'cox_and_munk_u10_map', 
                                  'brdf_rpv_file', 'brdf_rpv', 'brdf_rpv_library','brdf_rpv_type',
                                  'brdf_hapke', 'brdf_hapke_file',
                                  'mc_albedo_file', 'mc_rossli_file', 'mc_rpv_type', 'mc_rpv_file','mc_rpv_spectral_file', 'mc_ambrals_type', 'mc_ambrals_spectral_file',
                                  'bpdf_tsang_u10']

        albedo_library = option_definition.option(
            name='albedo_library',
            group='special',
            helpstr='Spectral albedos of different surface types.',
            documentation=documentation['albedo_library'], 
            tokens=option_definition.addToken(name='Input.alb.library', datatype=str, valid_range=['IGBP',io.IOBase]),
            parents=['uvspec'],
            non_parents=brdf_non_parents,
            childs=['brdf_rpv_type'],
            showInGui = False
                )
    
        cloud_fraction_map = option_definition.option(
            name='cloud_fraction_map',
            group='special',
            documentation=documentation['cloud_fraction_map'],
            tokens=option_definition.addToken(name='Input.filename[FN_CLOUD_FRACTION_MAP]',datatype=io.IOBase),
            developer=True,
                )

        albedo_map = option_definition.option(
            name='albedo_map',
            group='special',
            documentation=documentation['albedo_map'],
            tokens=[option_definition.addSetting(name='Input.alb.source', setting='ALBEDO_FROM_ALBEDO_MAP') ,
                    option_definition.addToken(name='Input.filename[FN_ALBEDO_MAP]',datatype=io.IOBase),
                    option_definition.addToken(name='Input.alb.netCDF_alb_name',datatype=io.IOBase,optional=True),
                    option_definition.addToken(name='Input.alb.scale_factor',datatype=float,optional=True)],
            developer=True
                )

        altitude_map = option_definition.option(
            name='altitude_map',
            group='special',
            documentation=documentation['altitude_map'],
            tokens=[option_definition.addSetting(name='Input.alt.source', setting='ALT_FROM_MAP') ,
                    option_definition.addToken(name='Input.filename[FN_ALTITUDE_MAP]',datatype=io.IOBase),
                    option_definition.addToken(name='Input.alt.netCDF_alt_name',datatype=io.IOBase,optional=True),
                    option_definition.addToken(name='Input.alt.scale_factor',datatype=float,optional=True)],
            developer=True
                )

        cox_and_munk_u10_map = option_definition.option(
            name='cox_and_munk_u10_map',
            group='special',
            helpstr='Location of netCDF file with wind speed for ocean BRDF.', 
            documentation=documentation['cox_and_munk_u10_map'], 
            tokens = [option_definition.addToken(name='Input.filename[FN_U10_MAP]', datatype=io.IOBase), 
                      option_definition.addSetting(name='Input.disort2_brdf', setting='BRDF_CAM', default='BRDF_NONE')], 
            parents=['uvspec'],
            non_parents=brdf_non_parents,
            non_parent_exceptions=['brdf_cam', 'brdf_cam_solar_wind', 'cox_and_munk_u10_map', 'mc_rossli_file'],
            showInGui= False,
            developer=True
        )

        cox_and_munk_pcl_map = option_definition.option(
            name='cox_and_munk_pcl_map',
            group='special',
            documentation=documentation['cox_and_munk_pcl_map'],
            tokens=[option_definition.addSetting(name='Input.disort2_brdf', setting='BRDF_CAM') ,
                    option_definition.addToken(name='Input.filename[FN_PIGMENTS_MAP]',datatype=io.IOBase),
                    option_definition.addToken(name='Input.cm.pcl_netCDF_name',datatype=io.IOBase,optional=True),
                    option_definition.addToken(name='Input.cm.pcl_scale_factor',datatype=float,optional=True)],
            developer=True
        )

        cox_and_munk_sal_map = option_definition.option(
            name='cox_and_munk_sal_map',
            group='special',
            documentation=documentation['cox_and_munk_sal_map'],
            tokens=[option_definition.addSetting(name='Input.disort2_brdf', setting='BRDF_CAM') ,
                option_definition.addToken(name='Input.filename[FN_SALINITY_MAP]',datatype=io.IOBase),
                option_definition.addToken(name='Input.cm.sal_netCDF_name',datatype=io.IOBase,optional=True),
                option_definition.addToken(name='Input.cm.sal_scale_factor',datatype=float,optional=True)],
            developer=True
        )

        emissivity_map = option_definition.option(
            name='emissivity_map',
            group='special',
            documentation=documentation['emissivity_map'],
            tokens=[option_definition.addSetting(name='Input.alb.source', setting='ALBEDO_FROM_EMISSIVITY_MAP') ,
                option_definition.addToken(name='Input.filename[FN_ALBEDO_MAP]',datatype=io.IOBase),
                option_definition.addToken(name='Input.alb.netCDF_alb_name',datatype=io.IOBase,optional=True),
                option_definition.addToken(name='Input.alb.scale_factor',datatype=float,optional=True)],
            developer=True
        )

        surface_temperature_map = option_definition.option(
            name='surface_temperature_map',
            group='special',
            documentation=documentation['surface_temperature_map'],
            tokens=[option_definition.addToken(name='Input.filename[FN_SURFACE_TEMP_MAP]',datatype=io.IOBase),
                    option_definition.addToken(name='Input.netCDF_name_surf_T',datatype=io.IOBase,optional=True)],
            developer=True
        )

        surface_type_map = option_definition.option(
            name='surface_type_map',
            group='special',
            documentation=documentation['surface_type_map'],
            tokens=[option_definition.addSetting(name='Input.alb.surf_type_map',setting='TRUE'),
                    option_definition.addToken(name='Input.filename[FN_SURFACE_TYPE_MAP]',datatype=io.IOBase),
                    option_definition.addToken(name='Input.alb.netCDF_surf_name',datatype=io.IOBase,optional=True)]
                )

        ECHAM_sza = option_definition.option(
            name='ECHAM_sza',
            group='special',
            documentation=documentation['ECHAM_sza'],
            tokens=[option_definition.addToken(name='Input.filename[FN_SZA]',datatype=io.IOBase),
                    option_definition.addSetting(name='Input.atm.sza',setting='NOT_DEFINED_FLOAT'),
                    option_definition.addSetting(name='Input.atm.sza_source',setting='SZA_ECHAM')],
            developer=True,
        )

        ECMWF_ozone_climatology = option_definition.option(
            name='ECMWF_ozone_climatology',
            group='special',
            documentation=documentation['ECMWF_ozone_climatology'],
            tokens=option_definition.addSetting(name='Input.atm.ECMWF_ozone_climatology',setting='TRUE'),
            developer=True
        )

        ECMWF_wc_file = option_definition.option(
            name='ECMWF_wc_file',
            group='special',
            documentation=documentation['ECMWF_wc_file'],
            tokens=[option_definition.addSetting(name='isp',setting=option_definition.CaothType('wc')),
                    option_definition.addSetting(name='Input.caoth[isp].source',setting='CAOTH_FROM_ECMWF'),
                    option_definition.addToken(name='Input.caoth[isp].filename',datatype=io.IOBase)],
            developer=True
        )

        ECMWF_ic_file = option_definition.option(
            name='ECMWF_ic_file',
            group='special',
            documentation=documentation['ECMWF_ic_file'],
            tokens=[option_definition.addSetting(name='isp',setting=option_definition.CaothType('ic')),
                    option_definition.addSetting(name='Input.caoth[isp].source',setting='CAOTH_FROM_ECMWF'),
                    option_definition.addToken(name='Input.caoth[isp].filename',datatype=io.IOBase)],
            developer=True
        )

        ECMWF_levels_only = option_definition.option(
                name='ECMWF_levels_only',
                group='special',
                documentation=documentation['ECMWF_levels_only'],
                tokens=option_definition.addSetting(name='Input.atm.rs_add_upper_levels',setting='FALSE'),
                developer=True
            )

        ECMWF_wind_file = option_definition.option(
                name='ECMWF_wind_file',
                group='special',
                documentation=documentation['ECMWF_wind_file'],
                tokens=option_definition.addToken(name='Input.filename[FN_ECMWF_WIND_MAP]',datatype=io.IOBase),
                developer=True
            )

        satellite_geometry = option_definition.option(
                name='satellite_geometry',
                group='special',
                documentation=documentation['satellite_geometry'],
                tokens=option_definition.addToken(name='Input.filename[FN_SATGEOMETRY]',datatype=io.IOBase),
                developer=True
            )

        satellite_pixel = option_definition.option(
                name='satellite_pixel',
                group='special',
                documentation=documentation['satellite_pixel'],
                tokens=[option_definition.addToken(name='Input.sat_pixel_x',datatype=int),
                        option_definition.addToken(name='Input.sat_pixel_y',datatype=int)],
                developer=True
                )

        self.options = [ ECHAM_sza,
            ECMWF_ozone_climatology, ECMWF_wc_file, ECMWF_ic_file, ECMWF_wind_file, ECMWF_levels_only,
            cox_and_munk_u10_map, cox_and_munk_pcl_map, cox_and_munk_sal_map,
            cloud_fraction_map, altitude_map, albedo_map, emissivity_map,
            surface_temperature_map, surface_type_map,
            albedo_library, satellite_geometry, satellite_pixel,
            ]

        #Special group belongs to developers options; should not be in Gui for EsasLight version; 
        for opt in self.options:
            opt.showInGui = False
示例#2
0
    def __init__(self):
        documentation = get_profile_documentation()

        profile_file = option_definition.option(     #TODO: option 3D only ifthreedmystic
            name='profile_file',
            group='profile',
            helpstr='Location of file defining profile properties.',
            documentation=documentation['profile_file'],
            gui_inputs=(GUI_definition.TextInput(name='name'),GUI_definition.ListInput(name='source', valid_range=['1D', '3D', 'moments', 'ipa', 'ipa_files'], optional=False), GUI_definition.FileInput(name='Input.caoth[isp].filename'),),
            tokens = [option_definition.addToken(name='isp', datatype=option_definition.CaothType),
                      option_definition.addLogical(name='Input.caoth[isp].source', logicals=option_definition.ProfileType().get_valid_range(), setting='CAOTH_FROM_'),
                      option_definition.addToken(name='Input.caoth[isp].filename', datatype=io.IOBase)],
            parents=['uvspec'],
            childs=['profile_properties','profile_modify','interpret_as_level'],
            plot = {'plot_type': '2D',
                'optional_args': {'column_names': (
                        "altitude",
                        "liquid water content",
                        "effective radius",)
                          }
                },
            non_unique=True,
            )

        profile_properties = option_definition.option(
            name='profile_properties',
            group='profile',
            helpstr='Define profile optical properties. ',
            documentation=documentation['profile_properties'],
            #           gui_inputs=(GUI_definition.ListInput(name='Input.caoth[isp].properties', valid_range=['hu', 'echam4', 'mie', 'fu', 'yang', 'key', 'baum_hufit', 'baum', 'hey', 'ic_mie'], optional=False), GUI_definition.ListInput(name='Input.caoth[isp].interpolate', valid_range=['','interpolate'], optional=True),),
            tokens=[
                option_definition.addToken(
                    name='isp', datatype=option_definition.CaothType),
                option_definition.addLogical(
                    name='Input.caoth[isp].properties',
                    logicals=[
                        'hu', 'echam4', 'mie', 'fu', 'yang', 'key', 'baum_v36',
                        'baum', 'hey', io.IOBase
                    ],
                    setting='PROP_'),
                option_definition.addLogical(
                    name='Input.caoth[isp].interpolate',
                    logicals=['interpolate'],
                    optional=True)
            ],  #TODO: BUTTON in GUI, not str!
            parents=['profile_file'],
            non_unique=True,
        )

        profile_modify = option_definition.option(  #TODO: valid_ranges for GUI!!
            name='profile_modify',
            group='profile',
            helpstr='Modify profile properties.',
            documentation=documentation['profile_modify'],
            #           gui_inputs=(GUI_definition.ListInput(name='id1', valid_range=['gg', 'ssa', 'tau', 'tau550'], optional=False), GUI_definition.ListInput(name='id2', valid_range=['set', 'scale'], optional=False), GUI_definition.FloatInput(name='Input.caoth[isp].modify[id1][id2]'),),
            tokens=[
                option_definition.addToken(
                    name='isp', datatype=option_definition.CaothType),
                option_definition.addLogical(
                    name='id1',
                    logicals=['gg', 'ssa', 'tau', 'tau550'],
                    setting='MODIFY_VAR_'),
                option_definition.addLogical(name='id2',
                                             logicals=['set', 'scale'],
                                             setting='MODIFY_TYPE_'),
                option_definition.addToken(
                    name='Input.caoth[isp].modify[id1][id2]', datatype=float)
            ],
            parents=['profile_file'],
            non_unique=True,
        )

        self.options = [profile_file, profile_properties, profile_modify]
示例#3
0
    def __init__(self):
        documentation = get_output_documentation()

        include = option_definition.not_yet_lex2py_option(
            name='include',
            group='output',
            helpstr='Include a file into uvspec input.',
            documentation=documentation['include'],
            gui_inputs=(GUI_definition.FileInput(name='filename'),),
            parents=['uvspec'],
            showInGui=False,
        )

        quiet = option_definition.option(
            name='quiet',
            group='output',
            helpstr='If specified, informative messages are turned off. See also \code{verbose}.',
            documentation=documentation['quiet'],
            tokens=option_definition.addSetting(name='Input.quiet', setting=1, default=0),
            parents=['uvspec'],
            non_parents=['verbose'],
        )

        verbose = option_definition.option(
            name='verbose',
            group='output',
            helpstr='If specified abundances of informative messages are output to stderr.',
            documentation=documentation['verbose'],
            tokens=option_definition.addSetting(name='Input.verbose', setting=1, default=0),
            parents=['uvspec'],
            non_parents=['quiet'],
        )

        write_ext_to_file = option_definition.option(
            name='write_ext_to_file',
            group='output',
            helpstr='If specified abundances of informative messages are output to stderr.',
            documentation=documentation['write_ext_to_file'],
            tokens=option_definition.addSetting(name='Input.write_ext_to_file', setting=1, default=0),
            parents=['uvspec'],
            islidar=True,
        )

        test_optical_properties = option_definition.option(
            name='test_optical_properties',
            group='output',
            helpstr='Write optical properties to file without solving RTE.',
            documentation=documentation['test_optical_properties'],
            tokens=option_definition.addSetting(name='Input.test_optical_properties', setting=1, default=0),
            parents=['uvspec'],
            developer=True,
        )

        print_disort_info = option_definition.option(
            name='print_disort_info',
            group='output',
            helpstr='Print various disort output. See disort.doc', 
            documentation=documentation['print_disort_info'],
            tokens=[option_definition.addToken(name="Input.rte.prndis", datatype=option_definition.Integers),
                option_definition.addSetting(name='Input.rte.nprndis',setting='ntokens')],
        )

        data_files_path = option_definition.option(
            name='data_files_path', 
            group='output', 
            documentation=documentation['data_files_path'],    
            gui_inputs=(GUI_definition.FileInput(name='Input.filename[FN_PATH]'),),
            tokens = option_definition.addToken(name='Input.filename[FN_PATH]' , datatype=io.IOBase),    
        )

        output_process = option_definition.option(
            name='output_process',
            group='output',
            helpstr='Decide how the output from \code{uvspec} is processed.',
            documentation=documentation['output_process'],
            gui_inputs=(GUI_definition.ListInput(name='Input.output_unit_processing', valid_range=['integrate', 'sum', 'rgbnorm', 'rgb_norm', 'rgb', 'per_nm', 'per_cm-1', 'per_band'], optional=False),),
            tokens=option_definition.addToken(name='Input.output_unit_processing', datatype=str, valid_range=['integrate','sum','rgbnorm','rgb_norm','rgb',
                                           'per_nm','per_cm-1','per_band']),
            parents=['uvspec'],
        )

        output_file = option_definition.option(
            name='output_file',
            group='output', 
            helpstr='Location of the output file', 
            documentation=documentation['output_file'], 
            gui_inputs=(GUI_definition.TextInput(name='Input.filename[FN_OUTFILE]'),),
            tokens=option_definition.addToken(name='Input.filename[FN_OUTFILE]', datatype=str),
            parents=['uvspec'],
        )

        output_format = option_definition.option(
            name='output_format', 
            group='output',
            helpstr='Output format',
            documentation=documentation['output_format'],
            tokens=option_definition.addLogical(name='Input.output_format', logicals=['ascii','flexstor','netCDF','sat_picture'], setting='OUTPUT_FORMAT_'), 
        )

        output_user = option_definition.not_yet_lex2py_option(
            name='output_user',
            group='output',
            helpstr='User defined output', 
            documentation=documentation['output_user'],
            gui_inputs=(GUI_definition.TextInput(name=''),),
            tokens=option_definition.addToken(name="", datatype=str),
            parents=['uvspec'],
        )

        output_quantity = option_definition.option(
            name='output_quantity',
            group='output',
            helpstr='Define output quantity to calculate instead of absolute quantities.',
            documentation=documentation['output_quantity'],
            tokens=option_definition.addLogical(name='Input.calibration', logicals=['reflectivity','transmittance','brightness'], setting='OUTCAL_'),
            parents=['uvspec'],
        )

        heating_rate = option_definition.option(
            name='heating_rate',
            group='output',    
            helpstr='Calculation of heating rates.',
            documentation=documentation['heating_rate'],
            gui_inputs=(GUI_definition.ListInput(name='Input.heating', valid_range=['none', 'local', 'layer_fd', 'layer_cd'], optional=True),),
            tokens = [option_definition.addSetting(name='Input.heating', setting='HEAT_LAYER_CD'),
                      option_definition.addLogical(name='Input.heating', logicals=['none','local','layer_fd','layer_cd'], setting='HEAT_', optional=True) ] ,
            parents=['uvspec'],
        )

        write_output_as_netcdf = option_definition.option(
            name='write_output_as_netcdf',
            group='output',
            helpstr='Output is written into netcdf file.',
            documentation=documentation['write_output_as_netcdf'],
            tokens=option_definition.addSetting(name='Input.write_output_as_netcdf', setting=1),
            parents=['uvspec'],
            islidar=True,
            showInGui=False,
        )

        slit_function_file = option_definition.option(
            name='slit_function_file',
            group='output',
            helpstr='If specified, the calculated spectrum is convolved with the function found in the slit_function_file.',
            documentation=documentation['slit_function_file'],
            gui_inputs=(GUI_definition.FileInput(name='Input.filename[FN_SLITFUNCTION]'),),
            tokens = [option_definition.addToken(name='Input.filename[FN_SLITFUNCTION]', datatype=io.IOBase),
                      option_definition.addSetting(name='Input.convolve', setting=1, default=0)],
            parents=['uvspec'],
            non_parents=['filter_function_file','thermal_bands_file'],
            plot = {'plot_type': '2D',
                'optional_args': {'column_names': (
                        "wavelength",
                        "slit function",)
                          }
                }
        )

        spline = option_definition.option(
            name='spline',
            group='output',
            helpstr='Spline interpolate the calculated spectrum.',
            documentation=documentation['spline'],
            gui_inputs=(GUI_definition.FloatInput(name='Input.spline_lambda_0', valid_range=[0, 1000000.0]), GUI_definition.FloatInput(name='Input.spline_lambda_1', valid_range=[0, 1000000.0]), GUI_definition.FloatInput(name='Input.spline_lambda_step', valid_range=[0, 1000000.0]),),
            tokens = [option_definition.addToken(name='Input.spline_lambda_0', datatype=float, valid_range=[0,1e6]), #TODO:Valid_range from option wavelength.
                      option_definition.addToken(name='Input.spline_lambda_1', datatype=float, valid_range=[0,1e6]),
                      option_definition.addToken(name='Input.spline_lambda_step', datatype=float, valid_range=[0,1e6]),
                      option_definition.addSetting(name='Input.spline', setting=1, default=0)],
            parents=['uvspec'],
            non_parents=['spline_file'],
        )

        spline_file = option_definition.option(
            name='spline_file',
            group='output',
            helpstr='Spline interpolate to arbitrary wavelengths, in nm, given as a single column in file.',
            documentation=documentation['spline_file'],
            gui_inputs=(GUI_definition.FileInput(name='Input.filename[FN_SPLINE]'),),
            tokens = [option_definition.addToken(name='Input.filename[FN_SPLINE]', datatype=io.IOBase),
                      option_definition.addSetting(name='Input.spline', setting=1, default=0) ] ,
            parents=['uvspec'],
            non_parents=['spline'],
        )

        filter_function_file = option_definition.option(
            name='filter_function_file',
            group='output',
            helpstr='If specified, the calculated spectrum is multiplied with a filter function defined in file.',
            documentation=documentation['filter_function_file'],
            tokens=[option_definition.addToken(name='Input.filename[FN_FILTERFUNCTION]',datatype=io.IOBase),
                    option_definition.addLogical(name='Input.filter_function_normalize', logicals=['normalize'], optional=True)],
            parents=['uvspec'],
            non_parents=['slit_function_file','thermal_bands_file'],
            plot = {'plot_type': '2D',
                'optional_args': {'column_names': (
                        "wavelength",
                        "filter function",)
                          }
                }
        )

        pressure_out = option_definition.not_yet_lex2py_option(
            name='pressure_out',
            group='output',
            helpstr='Specify the output levels in pressure coordinates.',
            documentation=documentation['pressure_out'],
            gui_inputs=(GUI_definition.TextInput(name=''),),
            parents=['uvspec'],
            non_parents=['zout','zout_sea'],
        )

        zout = option_definition.not_yet_lex2py_option(
            name='zout',
            group='output',    
            helpstr='Output altitude(s).', 
            documentation=documentation['zout'],
            gui_inputs=(GUI_definition.TextInput(name=''),),
            tokens=option_definition.addToken(name="", datatype=str),
            parents=['uvspec'],
            non_parents=['zout_sea','pressure_out'],
        )

        zout_sea = option_definition.not_yet_lex2py_option(
            name='zout_sea',
            group='output',    
            helpstr='Output altitude(s) above sea surface.', 
            documentation=documentation['zout_sea'],
            gui_inputs=(GUI_definition.TextInput(name=''),),
            tokens=option_definition.addToken(name="", datatype=str),
            parents=['uvspec'],
            non_parents=['zout','pressure_out'],
        )

        mc_backward_output = option_definition.option(
            name='mc_backward_output', 
            group='output',
            helpstr='Specify quantity to be calculated using backward Monte Carlo.', 
            documentation=documentation['mc_backward_output'], 
            tokens=[option_definition.addLogical(name='Input.rte.mc.backward.output', logicals=['edir','edn','eup','fdir','fdn','fup','act','abs','emis','heat','exp','exn','eyp','eyn','ednpv'], setting='MCBACKWARD_', gui_name='output'),    
                    option_definition.addLogical(name='Input.rte.mc.abs_unit', logicals=['W_per_m2_and_dz', 'W_per_m3', 'K_per_day'], setting='MCABS_UNIT_' , optional = True, gui_name='unit')], 
            parents=['mc_backward'], 
            speaker='rte_solver',
            enable_values=("mystic","montecarlo"),
            mystic =True
        )

        mc_forward_output = option_definition.option(
            name='mc_forward_output',
            group='output',
            helpstr='Specify quantity to be calculated using forward Monte Carlo.',
            documentation=documentation['mc_forward_output'],
            tokens = [option_definition.addLogical(name='Input.rte.mc.absorption', logicals=['absorption','actinic','emission','heating'], setting='MCFORWARD_ABS_', gui_name='output'), 
                      option_definition.addLogical(name='Input.rte.mc.abs_unit', logicals=['W_per_m2_and_dz', 'W_per_m3', 'K_per_day'] , setting='MCABS_UNIT_',  optional = True, gui_name='unit')],
            parents=['uvspec'], 
            non_parents=['mc_backward'],
            speaker='rte_solver',
            enable_values=("mystic","montecarlo"),
            mystic =True
        )

        mc_basename = option_definition.option(
            name='mc_basename', 
            group='output', 
            helpstr='Filename for MYSTIC output.',
            documentation=documentation['mc_basename'],
            tokens=option_definition.addToken(name='Input.rte.mc.filename[FN_MC_BASENAME]',datatype=io.IOBase),
            parents=['uvspec'], 
            speaker='rte_solver',
            enable_values=("mystic","montecarlo"),
            mystic =True
        )

        mc_backward_writeallpixels = option_definition.option(
            name='mc_backward_writeallpixels', 
            group='output', 
            helpstr='Write all pixels to the output files',
            documentation=documentation['mc_backward_writeallpixels'],    
            tokens=option_definition.addSetting(name='Input.rte.mc.backward.writeallpixels', setting=1),    
            parents=['mc_backward'], 
            speaker='rte_solver',
            enable_values=("mystic","montecarlo"),
            threedmystic =True
        )

        mc_std = option_definition.option(
            name='mc_std',
            group='output',
            helpstr='Calculate MYSTIC standard deviation.', 
            documentation=documentation['mc_std'],
            tokens=option_definition.addSetting(name='Input.rte.mc.std', setting=1, default=0), 
            parents=['uvspec'], 
            speaker='rte_solver',
            enable_values=("mystic","montecarlo"),
            threedmystic =True
        )

        mc_surfaceparallel = option_definition.option(
            name='mc_surfaceparallel',
            group='output',
            helpstr='Calculate irradiance parallel to the surface.',
            documentation=documentation['mc_surfaceparallel'],
            tokens=option_definition.addSetting(name='Input.rte.mc.surfaceparallel', setting=1),
            parents=['uvspec'],
            speaker='rte_solver',
            enable_values=("mystic","montecarlo"),
            threedmystic =True,
            showInGui=False,
        )

        mc_jacobian = option_definition.option(
            name='mc_jacobian',
            group='output',
            helpstr='Calculate jacobi matrix.',
            documentation=documentation['mc_jacobian'],
            tokens=option_definition.addSetting(name='Input.rte.mc.jacobian', setting=1),
            parents=['uvspec'],
            childs=['mc_jacobian_std'],
            speaker='rte_solver',
            enable_values=("mystic","montecarlo"),
            threedmystic =False,
            islidar=False,
            showInGui=False,
                        developer=True
        )

        mc_jacobian_std = option_definition.option(
            name='mc_jacobian_std',
            group='output',
            helpstr='Calculate jacobi matrix standard deviation.',
            documentation=documentation['mc_jacobian_std'],
            tokens=option_definition.addSetting(name='Input.rte.mc.jacobian_std', setting=1),
            parents=['mc_jacobian'],
            speaker='rte_solver',
            enable_values=("mystic","montecarlo"),
            threedmystic =True,
            islidar=True,
            showInGui=False,
                        developer=True
        )

        self.options = [include,
                    quiet, verbose, write_ext_to_file, test_optical_properties,
                print_disort_info,
                data_files_path,
                output_process,
                output_file, output_format, output_user,
                output_quantity,
                heating_rate,
                write_output_as_netcdf,
                slit_function_file, spline, spline_file,
                filter_function_file,  
                pressure_out,
                zout, zout_sea,  
                mc_backward_output,
                mc_forward_output, 
                mc_basename, 
                mc_backward_writeallpixels,
                mc_std,
                mc_surfaceparallel, mc_jacobian, mc_jacobian_std,
                ]
示例#4
0
    def __init__(self):
        documentation = get_geometry_documentation()

        sza = option_definition.option(
            name='sza',
            group='geometry',
            helpstr='Solar zenith angle',
            documentation=documentation['sza'],
            tokens=[
                option_definition.addToken(name='Input.atm.sza',
                                           datatype=float,
                                           default='NOT_DEFINED_FLOAT',
                                           valid_range=[0., 180.]),
                option_definition.addSetting(
                    name='Input.atm.sza_source',
                    setting='SZA_DIRECT_INPUT',
                    default='SZA_BY_TIME_AND_LOCATION')
            ],
            parents=['uvspec'],
            non_parents=['sza_file', 'ECHAM_sza'],
        )

        sza_file = option_definition.option(
            name='sza_file',
            group='geometry',
            helpstr='Location of solar zenith angle file.',
            documentation=documentation['sza_file'],
            tokens=[
                option_definition.addToken(name='Input.filename[FN_SZA]',
                                           datatype=io.IOBase),
                option_definition.addSetting(
                    name='Input.atm.sza_source',
                    setting='SZA_FROM_SZA_FILE',
                    default='SZA_BY_TIME_AND_LOCATION')
            ],
            parents=['uvspec'],
            non_parents=['sza', 'ECHAM_sza'],
        )

        phi0 = option_definition.option(
            name='phi0',
            group='geometry',
            helpstr='Solar azimuth angle',
            documentation=documentation['phi0'],
            tokens=option_definition.addToken(name='Input.atm.phi0',
                                              datatype=float,
                                              valid_range=[-360., 360.]),
            parents=['uvspec'],
        )

        phi = option_definition.option(
            name='phi',
            group='geometry',
            helpstr='User output azimuth angles.',
            documentation=documentation['phi'],
            tokens=[
                option_definition.addToken(
                    name='Input.rte.phi',
                    datatype=option_definition.SignedFloats),
                option_definition.addSetting(name='Input.rte.nphi',
                                             setting='ntokens'),
                option_definition.addSetting(name='Input.rte.maxphi',
                                             setting='ntokens')
            ],
            parents=['uvspec'],
        )

        umu = option_definition.option(
            name='umu',
            group='geometry',
            helpstr='Cosine of user output polar angles.',
            documentation=documentation['umu'],
            tokens=[
                option_definition.addToken(
                    name='Input.rte.umu',
                    datatype=option_definition.SignedFloats),
                option_definition.addSetting(name='Input.rte.numu',
                                             setting='ntokens'),
                option_definition.addSetting(name='Input.rte.maxumu',
                                             setting='ntokens')
            ],
            parents=['uvspec'],
            non_parents=[],
            childs=[])

        mc_bw_umu_file = option_definition.option(
            name='mc_bw_umu_file',
            group='geometry',
            helpstr='Define a different umu and phi for each pixel.',
            documentation=documentation['mc_bw_umu_file'],
            gui_inputs=(GUI_definition.FileInput(name='filename'), ),
            tokens=[
                option_definition.addToken(
                    name="Input.rte.mc.filename[FN_MC_UMU]",
                    datatype=io.IOBase),
                option_definition.addSetting(
                    name='Input.rte.mc.allocate_umu_and_phi', setting=True)
            ],
            parents=['mc_backward'],
            speaker='rte_solver',
            enable_values=("mystic", "montecarlo"),
            threedmystic=True)

        earth_radius = option_definition.option(
            name='earth_radius',
            group='geometry',
            helpstr='Radius of the Earth in km',
            documentation=documentation['earth_radius'],
            tokens=option_definition.addToken(name='Input.r_earth',
                                              datatype=float,
                                              default=6370.0),
            parents=['uvspec'],
        )

        latitude = option_definition.option(
            name='latitude',
            group='geometry',
            helpstr='Specify the latitude of the location to simulate.',
            documentation=documentation['latitude'],
            gui_inputs=(
                GUI_definition.ListInput(name='hemisphere',
                                         valid_range=['n', 's']),
                GUI_definition.FloatInput(name='degrees', valid_range=[0,
                                                                       180]),
                GUI_definition.FloatInput(name='minutes',
                                          valid_range=[0, 60],
                                          optional=True),
                GUI_definition.FloatInput(name='seconds',
                                          valid_range=[0, 60],
                                          optional=True),
            ),
            tokens=[
                option_definition.addLogical(name='Input.lat_signum',
                                             logicals=['n', 's'],
                                             setting='LATITUDE_SIGNUM_'),
                option_definition.addToken(name='Input.lat_degrees',
                                           datatype=float),
                option_definition.addToken(name='Input.lat_minutes',
                                           datatype=float,
                                           optional=True),
                option_definition.addToken(name='Input.lat_seconds',
                                           datatype=float,
                                           optional=True)
            ],
            parents=['uvspec'],
            extra_dependencies=['latitude', 'longitude'],
            showInGui=False)

        longitude = option_definition.option(
            name='longitude',
            group='geometry',
            helpstr='Specify the longitude of the location to simulate.',
            documentation=documentation['longitude'],
            gui_inputs=(
                GUI_definition.ListInput(name='hemisphere',
                                         valid_range=['e', 'w']),
                GUI_definition.FloatInput(name='degrees', valid_range=[0,
                                                                       180]),
                GUI_definition.FloatInput(name='minutes',
                                          valid_range=[0, 60],
                                          optional=True),
                GUI_definition.FloatInput(name='seconds',
                                          valid_range=[0, 60],
                                          optional=True),
            ),
            tokens=[
                option_definition.addLogical(name='Input.lon_signum',
                                             logicals=['e', 'w'],
                                             setting='LONGITUDE_SIGNUM_'),
                option_definition.addToken(name='Input.lon_degrees',
                                           datatype=float),
                option_definition.addToken(name='Input.lon_minutes',
                                           datatype=float,
                                           optional=True),
                option_definition.addToken(name='Input.lon_seconds',
                                           datatype=float,
                                           optional=True)
            ],
            parents=['uvspec'],
            extra_dependencies=['latitude', 'longitude'],
            showInGui=False,
        )

        day_of_year = option_definition.option(
            name='day_of_year',
            group='geometry',
            helpstr='Correction fo sun-earth distance',
            documentation=documentation['day_of_year'],
            tokens=option_definition.addToken(name='Input.UTC.tm_yday',
                                              datatype=int,
                                              default='NOT_DEFINED_INTEGER'),
            parents=['uvspec'],
        )

        mc_bcond = option_definition.option(
            name='mc_bcond',
            group='geometry',
            helpstr='Define MYSTIC boundary conditions.',
            documentation=documentation['mc_bcond'],
            tokens=option_definition.addLogical(
                name='Input.rte.mc.bcond',
                logicals=['periodic', 'mirror', 'absorb'],
                setting='MCBCOND_'),
            parents=['uvspec'],
            speaker='rte_solver',
            enable_values=("mystic", "montecarlo"),
            mystic=True,
            developer=True,
            showInGui=False,
        )

        mc_sample_grid = option_definition.option(
            name='mc_sample_grid',
            group='geometry',
            helpstr='Sample grid size (Nx Ny [dx dy]) for MYSTIC.',
            documentation=documentation['mc_sample_grid'],
            tokens=[
                option_definition.addToken(name="Input.rte.mc.Nx_sample",
                                           datatype=int),
                option_definition.addToken(name="Input.rte.mc.Ny_sample",
                                           datatype=int),
                option_definition.addToken(name="Input.rte.mc.dx_sample",
                                           datatype=float,
                                           optional=True),
                option_definition.addToken(name="Input.rte.mc.dy_sample",
                                           datatype=float,
                                           optional=True)
            ],
            parents=['uvspec'],
            speaker='rte_solver',
            enable_values=("mystic", "montecarlo"),
            threedmystic=True,
        )

        mc_spherical = option_definition.option(
            name='mc_spherical',
            group='geometry',
            helpstr='Use MYSTIC spherical geometry.',
            documentation=documentation['mc_spherical'],
            tokens=[
                option_definition.addLogical(name='id',
                                             logicals=['1D', '3D'],
                                             setting='DIM_'),
                option_definition.addSetting(name='Input.rte.mc.spherical[id]',
                                             setting=1)
            ],
            gui_inputs=(GUI_definition.ListInput(name='dimension',
                                                 valid_range=['1d']), ),
            parents='mc_backward',
            childs=['mc_refraction'],
            speaker='rte_solver',
            enable_values=("mystic", "montecarlo"),
            mystic=True,
            #showInGui=False,
        )

        mc_spherical3D_scene = option_definition.option(
            name='mc_spherical3D_scene',
            group='geometry',
            helpstr='Define scene on globe.',
            documentation=documentation['mc_spherical3D_scene'],
            tokens=[
                option_definition.addSetting(
                    name='Input.rte.mc.spherical3D_scene', setting=1),
                option_definition.addToken(
                    name='Input.rte.mc.spherical3D_scene_lon_min',
                    datatype=float,
                    gui_name='LON_W'),
                option_definition.addToken(
                    name='Input.rte.mc.spherical3D_scene_lon_max',
                    datatype=float,
                    gui_name='LON_E'),
                option_definition.addToken(
                    name='Input.rte.mc.spherical3D_scene_lat_min',
                    datatype=float,
                    gui_name='LAT_S'),
                option_definition.addToken(
                    name='Input.rte.mc.spherical3D_scene_lat_max',
                    datatype=float,
                    gui_name='LAT_N')
            ],
            speaker='mc_spherical',
            enable_values=("3d", ),
            islidar=True,
            showInGui=False,
        )

        mc_satellite_view = option_definition.option(
            name='mc_satellite_view',
            group='geometry',
            helpstr='Simulate a satellite image.',
            documentation=documentation['mc_satellite_view'],
            tokens=[
                option_definition.addSetting(
                    name='Input.rte.mc.pan_angles',
                    setting='calloc (4, sizeof(double))'),
                option_definition.addToken(name='Input.rte.mc.pan_angles[0]',
                                           datatype=float),
                option_definition.addToken(name='Input.rte.mc.pan_angles[1]',
                                           datatype=float),
                option_definition.addToken(name='Input.rte.mc.pan_angles[2]',
                                           datatype=float),
                option_definition.addToken(name='Input.rte.mc.pan_angles[3]',
                                           datatype=float),
                option_definition.addSetting(name='Input.rte.mc.panorama',
                                             setting='PAN_MODE_SATELLITE'),
                option_definition.addSetting(
                    name='Input.rte.mc.allocate_umu_and_phi', setting=True)
            ],
            parents=['mc_backward'],
            non_parents=['mc_panorama_view'],
            speaker='rte_solver',
            enable_values=("mystic", "montecarlo"),
            threedmystic=True,
            islidar=True,
            showInGui=False,
        )

        mc_satellite_position = option_definition.option(
            name='mc_satellite_position',
            group='geometry',
            helpstr='Define the position of the satellite.',
            documentation=documentation['mc_satellite_position'],
            tokens=[
                option_definition.addSetting(
                    name='Input.rte.mc.sensorposition',
                    setting='MC_SENSORPOSITION_SPHERICAL'),
                option_definition.addToken(
                    name='Input.rte.mc.sensorposition_lon', datatype=float),
                option_definition.addToken(
                    name='Input.rte.mc.sensorposition_lat', datatype=float),
                option_definition.addToken(
                    name='Input.rte.mc.sensorposition_alt', datatype=float)
            ],
            non_parents=['mc_sensor_position'],
            islidar=True,
            showInGui=False,
        )

        mc_sun_position = option_definition.option(
            name='mc_sun_position',
            group='geometry',
            helpstr='Sun position',
            documentation=documentation['mc_sun_position'],
            tokens=[
                option_definition.addSetting(name='Input.atm.sza_source',
                                             setting='SZA_DIRECT_INPUT'),
                option_definition.addToken(name='Input.atm.phi0_spher',
                                           datatype=float),
                option_definition.addToken(name='Input.atm.sza_spher',
                                           datatype=float)
            ],
            islidar=True,
            speaker='mc_sperical',
            enable_values=('3D', ),
            showInGui=False,
        )

        mc_sensordirection = option_definition.option(
            name='mc_sensordirection',
            group='geometry',
            helpstr='Define viewing direction of an irradiance sensor.',
            documentation=documentation['mc_sensordirection'],
            tokens=[
                option_definition.addToken(
                    name="Input.rte.mc.sensordirection_dx",
                    datatype=float,
                    gui_name='dx'),
                option_definition.addToken(
                    name="Input.rte.mc.sensordirection_dy",
                    datatype=float,
                    gui_name='dy'),
                option_definition.addToken(
                    name="Input.rte.mc.sensordirection_dz",
                    datatype=float,
                    gui_name='dz'),
                option_definition.addSetting(
                    name="Input.rte.mc.sensordirection", setting=1)
            ],
            parents=['mc_backward'],
            speaker='rte_solver',
            enable_values=("mystic", "montecarlo"),
            mystic=True,
        )

        mc_sensorposition = option_definition.option(
            name='mc_sensorposition',
            group='geometry',
            helpstr='Define the position of a sensor.',
            documentation=documentation['mc_sensorposition'],
            tokens=[
                option_definition.addToken(
                    name="Input.rte.mc.sensorposition_x",
                    datatype=float,
                    gui_name='x'),
                option_definition.addToken(
                    name="Input.rte.mc.sensorposition_y",
                    datatype=float,
                    gui_name='y'),
                option_definition.addToken(
                    name="Input.rte.mc.sensorposition_z",
                    datatype=float,
                    gui_name='z'),
                option_definition.addSetting(
                    name="Input.rte.mc.sensorposition",
                    setting='MC_SENSORPOSITION_CARTESIAN')
            ],
            parents=['mc_backward'],
            non_parents=['mc_satellite_position'],
            speaker='rte_solver',
            enable_values=("mystic", "montecarlo"),
            threedmystic=True,
        )

        mc_reference_to_nn = option_definition.option(
            name='mc_reference_to_nn',
            group='geometry',
            helpstr='The sampled pixels correspond to he surface pixels.',
            documentation=documentation['mc_reference_to_nn'],
            tokens=[
                option_definition.addSetting(
                    name='Input.rte.mc.reference_to_NN', setting=1, default=0)
            ],
            parents=['mc_backward'],
            speaker='rte_solver',
            enable_values=("mystic", "montecarlo"),
            threedmystic=True)

        mc_panorama_forward = option_definition.option(
            name='mc_panorama_forward',
            group='geometry',
            helpstr='Simulate a 4pi panorama with forward MYSTIC.',
            documentation=documentation['mc_panorama_forward'],
            tokens=[
                option_definition.addSetting(
                    name='Input.rte.mc.pan_angles',
                    setting='calloc (4, sizeof(double))'),
                option_definition.addSetting(name='Input.rte.mc.pan_angles[0]',
                                             setting=0.0),
                option_definition.addSetting(name='Input.rte.mc.pan_angles[1]',
                                             setting=360.0),
                option_definition.addSetting(name='Input.rte.mc.pan_angles[2]',
                                             setting=0.0),
                option_definition.addSetting(name='Input.rte.mc.pan_angles[3]',
                                             setting=180.0),
                option_definition.addSetting(
                    name='Input.rte.mc.panorama_forward', setting=1),
                option_definition.addSetting(
                    name='Input.rte.mc.allocate_umu_and_phi', setting=True)
            ],
            non_parents=['mc_satellite_view', 'mc_backward', 'mc_escape'],
            speaker='rte_solver',
            enable_values=("mystic", "montecarlo"),
            threedmystic=True)

        mc_panorama_view = option_definition.option(
            name='mc_panorama_view',
            group='geometry',
            helpstr='Simulate a panorama.',
            documentation=documentation['mc_panorama_view'],
            tokens=[
                option_definition.addSetting(
                    name='Input.rte.mc.pan_angles',
                    setting='calloc (4, sizeof(double))'),
                option_definition.addToken(name='Input.rte.mc.pan_angles[0]',
                                           datatype=float),
                option_definition.addToken(name='Input.rte.mc.pan_angles[1]',
                                           datatype=float),
                option_definition.addToken(name='Input.rte.mc.pan_angles[2]',
                                           datatype=float),
                option_definition.addToken(name='Input.rte.mc.pan_angles[3]',
                                           datatype=float),
                option_definition.addSetting(name='Input.rte.mc.panorama',
                                             setting='PAN_MODE_CAMERA'),
                option_definition.addSetting(
                    name='Input.rte.mc.allocate_umu_and_phi', setting=True)
            ],
            parents=['mc_backward'],
            non_parents=['mc_satellite_view'],
            speaker='rte_solver',
            enable_values=("mystic", "montecarlo"),
            threedmystic=True,
            childs=['mc_panorama_alignment', 'mc_panorama'])

        mc_panorama_alignment = option_definition.option(
            name='mc_panorama_alignment',
            group='geometry',
            helpstr='Panorama alignment.',
            documentation=documentation['mc_panorama_alignment'],
            tokens=option_definition.addLogical(
                name='Input.rte.mc.pan_alignment',
                logicals=['mu', 'sun', 'zenith'],
                setting='PAN_ALIGNMENT_'),
            threedmystic=True,
            parents=['mc_panorama_view'],
        )

        mc_panorama = option_definition.option(
            name='mc_panorama',
            group='geometry',
            helpstr='Panorama settings.',
            documentation=documentation['mc_panorama'],
            tokens=[
                option_definition.addLogical(name='id',
                                             logicals=[
                                                 'distr_photons_over_pixel',
                                                 'no_pixel', 'quicklook',
                                                 'with_direct_rad',
                                                 'weight_with_cos',
                                                 'circumsolar_var_red'
                                             ],
                                             setting='PAN_FLAG_'),
                option_definition.addSetting(name='Input.rte.mc.pan[id]',
                                             setting=1)
            ],
            parents=['mc_panorama_view'],
            threedmystic=True,
            non_unique=True,
        )

        mc_blitz_position = option_definition.option(
            name='mc_blitz_position',
            group='geometry',
            helpstr='Define lightning as source.',
            documentation=documentation['mc_blitz_position'],
            tokens=[
                option_definition.addSetting(
                    name='Input.rte.mc.blitz_position',
                    setting='calloc (6, sizeof(double))'),
                option_definition.addToken(
                    name='Input.rte.mc.blitz_position[0]', datatype=float),
                option_definition.addToken(
                    name='Input.rte.mc.blitz_position[1]', datatype=float),
                option_definition.addToken(
                    name='Input.rte.mc.blitz_position[2]', datatype=float),
                option_definition.addToken(
                    name='Input.rte.mc.blitz_position[3]', datatype=float),
                option_definition.addToken(
                    name='Input.rte.mc.blitz_position[4]', datatype=float),
                option_definition.addToken(
                    name='Input.rte.mc.blitz_position[5]', datatype=float),
                option_definition.addSetting(name='Input.source',
                                             setting='SRC_BLITZ'),
                option_definition.addSetting(
                    name='Input.rte.mc.allocate_umu_and_phi', setting=True)
            ],
            parents=['mc_forward'],
            speaker='rte_solver',
            enable_values=("mystic", "montecarlo"),
            threedmystic=True,
            showInGui=False,
        )

        self.options = [
            sza,
            sza_file,
            phi0,
            phi,
            umu,
            mc_bw_umu_file,
            earth_radius,
            latitude,
            longitude,
            # missing time,
            day_of_year,
            mc_bcond,
            mc_sample_grid,
            mc_spherical,
            mc_spherical3D_scene,
            mc_satellite_view,
            mc_satellite_position,
            mc_sun_position,
            mc_sensordirection,
            mc_sensorposition,
            mc_reference_to_nn,
            mc_panorama_view,
            mc_panorama_alignment,
            mc_panorama,
            mc_panorama_forward,
            mc_blitz_position,
        ]
示例#5
0
    def __init__(self):
        documentation = get_molecular_documentation()

        atmosphere_file = option_definition.option(
            name='atmosphere_file',
            group='atmosphere',
            helpstr='Location of the atmosphere data file.', 
            documentation=documentation['atmosphere_file'], 
            tokens= option_definition.addToken(name='Input.atmosphere_filename', datatype=str, valid_range=['subarctic_winter', 'subarctic_summer', 'midlatitude_summer', 'midlatitude_winter', 'tropics', 'US-standard', io.IOBase]),
            parents=['uvspec'], 
            plot = {'plot_type': '2D',
                'optional_args': {'column_names': (
                        "altitude",
                        "pressure",
                        "temperature",
                        "air",
                        "ozone",
                        "oxygen",
                        "water vapour",
                        "CO2",
                        "NO2",)
                          }
                },
            mandatory=True,
        )

        atmosphere_file_3D = option_definition.option(
            name='atmosphere_file_3D',
            group='atmosphere',
            helpstr='Location of the 3D atmosphere data file.', 
            documentation=documentation['atmosphere_file_3D'], 
            tokens= [option_definition.addToken(name='Input.atmosphere3d_filename', datatype=str),
                     option_definition.addSetting(name='Input.atmosphere3d', setting='True'),
                     option_definition.addSetting(name='isp', setting='get_caoth_index(&Input.caoth,&Input.n_caoth,"molecular_3d",0)'),
                     option_definition.addSetting(name='Input.caoth[isp].source', setting='CAOTH_FROM_3D'),
                     option_definition.addSetting(name='Input.caoth[isp].filename', setting='"profile_mol3d_dummy.dat"'),
                     option_definition.addSetting(name='Input.caoth[isp].properties', setting='PROP_HU')],
            parents=['uvspec'],
            showInGui = False,
            developer = False,
            threedmystic =True
                )
                

        radiosonde = option_definition.not_yet_lex2py_option(
            name='radiosonde',
            group='atmosphere',
            helpstr='Specify density profiles.',
            documentation=documentation['radiosonde'],
            gui_inputs=(GUI_definition.TextInput(name=''),),
            parents=['uvspec'],
        )

        radiosonde_levels_only = option_definition.option(
            name='radiosonde_levels_only',
            group='atmosphere', 
            helpstr='', 
            documentation=documentation['radiosonde_levels_only'], 
            tokens=option_definition.addSetting(name='Input.atm.rs_add_upper_levels',setting='FALSE'), 
            parents=['uvspec'],
        )

        mol_file = option_definition.option(
            name='mol_file',
            group='molecular',
            documentation=documentation['mol_file'],
            gui_inputs=(GUI_definition.ListInput(name='mol_id',
                          valid_range=['O3', 'O2', 'H2O',
                               'CO2', 'NO2', 'BRO',
                               'OCLO', 'HCHO', 'O4',
                               'SO2', 'CH4', 'N2O',
                               'CO', 'N2'],
                          optional=False),
                       GUI_definition.FileInput(name='Input.atm.filename[mol_id]'),
                       GUI_definition.ListInput(name='Input.atm.unit_profile[mol_id]', valid_range=['','cm_3', 'm_3', 'MMR', 'VMR', 'RH'], optional=True),),
            tokens = [option_definition.addLogical(name='mol_id', logicals=['O3', 'O2', 'H2O', 'CO2', 'NO2', 'BRO', 'OCLO', 'HCHO', 'O4', 'SO2', 'CH4', 'N2O', 'CO', 'N2'], setting='MOL_' ) ,
                      option_definition.addToken(name='Input.atm.filename[mol_id]', datatype=io.IOBase),
                      option_definition.addLogical(name='Input.atm.unit_profile[mol_id]', logicals=['cm_3', 'm_3', 'MMR', 'VMR', 'RH'], optional=True)],
            parents=['uvspec'],
            non_unique=True,
        )

        pressure = option_definition.option(
            name='pressure',
            group='atmosphere', 
            helpstr='Surface pressure',
            documentation=documentation['pressure'], 
            gui_inputs=(GUI_definition.FloatInput(name='Input.pressure', default='NOT_DEFINED_FLOAT', valid_range=[0, 1000000.0]),),
            tokens=option_definition.addToken(name='Input.pressure', datatype=float, default='NOT_DEFINED_FLOAT', valid_range=[0,1e6]),
            parents=['uvspec'],
        )

        refractive_index_file = option_definition.option(
            name='refractive_index_file',
            group='atmosphere', 
            helpstr='', 
            documentation=documentation['refractive_index_file'], 
            gui_inputs=(GUI_definition.TextInput(name='Input.filename[FN_REFIND]'),),
            tokens=option_definition.addToken(name='Input.filename[FN_REFIND]', datatype=str), 
            parents=['uvspec'],
        )

        crs_model = option_definition.option(
            name='crs_model',
            group='molecular',
            helpstr='Specify cross section.',
            documentation=documentation['crs_model'],
            gui_inputs=(GUI_definition.ListInput(name='mol_id', valid_range=['no2', 'o3', 'o4', 'rayleigh'], optional=False), GUI_definition.ListInput(name='crs_model', valid_range=['Bass_and_Paur', 'Molina', 'Daumont', 'Serdyuchenko', 'Bogumil', 'Bodhaine', 'Bodhaine29', 'Nicolet', 'Penndorf', 'Burrows', 'Vandaele', 'Greenblatt', 'Thalman'], optional=False),),
            tokens= [option_definition.addLogical(name='mol_id', logicals=['no2', 'o3', 'o4', 'rayleigh'], setting='CRS_MOL_'),
                     option_definition.addLogical(name='Input.crs_model[mol_id]',  logicals=[ 'Bodhaine', 'Nicolet', 'Penndorf', 'Bodhaine29', 'Bass_and_Paur', 'Molina', 'Daumont', 'Serdyuchenko', 'Bogumil', 'Burrows', 'Vandaele', 'Greenblatt', 'Thalman'], setting='CRS_MODEL_')],
            parents=['uvspec'],
            non_unique=True,
        )

        crs_file = option_definition.option(
            name='crs_file',
            group='molecular',
            documentation=documentation['crs_file'],
            gui_inputs=(GUI_definition.ListInput(name='mol_id', valid_range=['O3', 'O2', 'H2O', 'CO2', 'NO2', 'BRO', 'OCLO', 'HCHO', 'O4', 'SO2', 'CH4', 'N2O', 'CO', 'N2'], optional=False), GUI_definition.FileInput(name='Output.crs.filename[mol_id]'),),
            tokens = [option_definition.addLogical(name='mol_id', logicals=['O3', 'O2', 'H2O', 'CO2', 'NO2', 'BRO', 'OCLO', 'HCHO', 'O4', 'SO2', 'CH4', 'N2O', 'CO', 'N2'], setting='MOL_' ) ,
                      option_definition.addToken(name='Output.crs.filename[mol_id]', datatype=io.IOBase)],
            parents=['uvspec'],
            non_unique=True,
        )

        rayleigh_depol = option_definition.option(
            name='rayleigh_depol',
            group='atmosphere',
            helpstr='Rayleigh depolarization factor.', 
            documentation=documentation['rayleigh_depol'], 
            gui_inputs=(GUI_definition.FloatInput(name='Input.rayleigh_depol'),),
            tokens=option_definition.addToken(name='Input.rayleigh_depol', datatype=float, default='NOT_DEFINED_FLOAT'), 
            parents=['uvspec'],
        )

        mol_abs_param = option_definition.option(
            name='mol_abs_param',
            group='spectral',
            helpstr='Set correlated_k scheme. ',
            documentation=documentation['mol_abs_param'],
            tokens = [option_definition.addLogical(name='Input.ck_scheme', logicals=['kato', 'kato2', 'kato2.96','kato2andwandji','fu','avhrr_kratz','sbdart','lowtran','reptran','reptran_channel','crs',io.IOBase], setting='CK_'),
                      option_definition.addToken(name='Input.ck_reptran_arg', datatype=str, optional=True)],
            parents=['uvspec'],
            childs= ['ck_lowtran_absorption','ck_fu_h2o_continuum'],
            continious_update=True,
        )
                
        reptran_file = option_definition.option(
            name='reptran_file',
            group='spectral',
            helpstr='File containing representative wavelengths.',
            documentation=documentation['reptran_file'],
            tokens=option_definition.addToken(name='Input.filename[FN_REPTRAN]', datatype=io.IOBase), 
            parents=['uvspec'],
            showInGui = False,
                )

        ck_lowtran_absorption = option_definition.option(
            name='ck_lowtran_absorption',
            group='molecular',
            helpstr='Switch off absorption by individual minor trace gases.', 
            documentation=documentation['ck_lowtran_absorption'],
            gui_inputs=(GUI_definition.ListInput(name='Input.absorption_gas', valid_range=['O4', 'N2', 'CO', 'SO2', 'NH3', 'NO', 'HNO3']),
            GUI_definition.ListInput(name='On/Off',valid_range=['on','off'], default='On'),),
            tokens = [option_definition.addLogical(name='mol_id', logicals=['O4','N2','CO','SO2','NH3','NO','HNO3'], setting='CK_ABS_' ) ,
                      option_definition.addLogical(name='Input.ck_abs[mol_id]', logicals=['on','off'], setting='SWITCH_')],
            parents=['mol_abs_param'],
            speaker="mol_abs_param",
            enable_values=("lowtran",),
            non_unique=True,
        )

        ck_fu_h2o_continuum = option_definition.option(
            name='ck_fu_h2o_continuum',
            group='molecular',
            helpstr='', #TODO
            documentation=documentation['ck_fu_h2o_continuum'],
            tokens=option_definition.addLogical(name='Input.ck_h2ocont',logicals=['on','off','v2.1','v2.4'],setting='CK_H2OCONT_'),
            parents=['uvspec'],
            speaker='mol_abs_param',
            enable_values=('fu',), #TODO:stimmt das?
            developer=True,
        )

        mol_tau_file = option_definition.option(
            name='mol_tau_file',
            group='molecular',
            helpstr='Location of Molecular optical depth file.', 
            documentation=documentation['mol_tau_file'],
            gui_inputs=(GUI_definition.ListInput(name='id', valid_range=['sca', 'abs'], optional=False), GUI_definition.FileInput(name='Input.filename[id]'),),
            tokens = [option_definition.addLogical(name='id', logicals=[ 'sca','abs'], setting='FN_MOL_TAU_'),
                      option_definition.addToken(name='Input.filename[id]', datatype=io.IOBase)],
            parents=['uvspec'],
            non_unique=True,
        )

        mol_modify = option_definition.option(
            name='mol_modify',
            group='molecular',
            helpstr='Modify column of molecular specie', 
            documentation=documentation['mol_modify'],
            gui_inputs = ( GUI_definition.ListInput(name='moltype', valid_range=[ 'O3','O2','H2O','CO2','NO2','BRO','OCLO','HCHO','O4','SO2','CH4','N2O','CO','N2'], optional=False),
                           GUI_definition.FloatInput(name='value',  valid_range=[0, 1000000.0]),
                           GUI_definition.ListInput(name='unit', valid_range=[ 'DU', 'CM_2', 'MM'], optional=False)),
            tokens = [option_definition.addLogical(name='id', logicals=[ 'O3','O2','H2O','CO2','NO2','BRO','OCLO','HCHO','O4','SO2','CH4','N2O','CO','N2'], setting='MOL_'),
                      option_definition.addToken(name='Input.atm.column[id]', datatype=float),
                      option_definition.addLogical(name='Input.atm.unit_column[id]', logicals=[ 'DU', 'CM_2', 'MM'], setting='MOL_UNIT_')],
            parents=['uvspec'],
            non_unique=True,
        )

        mixing_ratio = option_definition.option(
            name='mixing_ratio',
            group='molecular',
            helpstr='Mixing ratio of molecular specie', 
            documentation=documentation['mixing_ratio'],
            gui_inputs = (GUI_definition.ListInput(name='moltype', valid_range=[ 'O2','H2O','CO2','NO2','CH4','N2O','F11','F12','F22'], optional=False),
                          GUI_definition.FloatInput(name='value',  valid_range=[0, 1000000.0])),
            tokens = [option_definition.addLogical(name='id', logicals=[ 'O2','H2O','CO2','NO2','CH4','N2O','F11','F12','F22'], setting='MX_'),
                      option_definition.addToken(name='Input.mixing_ratio[id]', datatype=float, valid_range=[0,1e6])],
            parents=['uvspec'],
            non_unique=True,
        )


        self.options = [atmosphere_file, atmosphere_file_3D,
            radiosonde, radiosonde_levels_only,
            mol_file, mixing_ratio, mol_modify,
            pressure,
            refractive_index_file,
            crs_model,
            crs_file,
            rayleigh_depol,
            mol_abs_param,
            ck_lowtran_absorption,
            ck_fu_h2o_continuum,
            mol_tau_file,
                            reptran_file,
            ]
示例#6
0
    def __init__(self):
        documentation = get_spectral_documentation()

        wavelength = option_definition.option(
            name='wavelength',
            group='spectral',
            helpstr=
            'Set the wavelength range by specifying first and last wavelength in nm.',
            documentation=documentation['wavelength'],
            gui_inputs=(
                GUI_definition.FloatInput(name='Input.wl.start',
                                          default=None,
                                          valid_range=[0, 1000000.0]),
                GUI_definition.FloatInput(name='Input.wl.end',
                                          default=None,
                                          valid_range=[0, 1000000.0],
                                          optional=True),
            ),
            tokens=[
                option_definition.addToken(name='Input.wl.start',
                                           datatype=float,
                                           default='NOT_DEFINED_FLOAT',
                                           valid_range=[0, 1e6]),
                option_definition.addToken(name='Input.wl.end',
                                           datatype=float,
                                           default='NOT_DEFINED_FLOAT',
                                           valid_range=[0, 1e6],
                                           optional=True)
            ],
            #TODO:argument 2 should be bigger that argument 1
            parents=['uvspec'],
            non_parents=['wavelength_index'],
        )

        wavelength_step = option_definition.option(
            name='wavelength_step',
            group='spectral',
            helpstr=
            'Set the wavelength step (in nm) in conjunction with the wavelength range.',
            documentation=['wavelength_step'],
            gui_inputs=(),
            tokens=[],
            parents=['uvspec'],
            non_parents=['wavelength_index'],
        )

        wavelength_index = option_definition.option(
            name='wavelength_index',
            group='spectral',
            helpstr='Set the wavelengths to be selected.',
            documentation=documentation['wavelength_index'],
            gui_inputs=(
                GUI_definition.IntegerInput(name='Input.wl.start_index'),
                GUI_definition.IntegerInput(name='Input.wl.end_index',
                                            optional=True),
            ),
            tokens=[
                option_definition.addToken(
                    name='Input.wl.start_index',
                    datatype=int,
                    default='NOT_DEFINED_INTEGER',
                ),
                option_definition.addToken(name='Input.wl.end_index',
                                           datatype=int,
                                           default='NOT_DEFINED_INTEGER',
                                           optional=True)
            ],
            parents=['uvspec'],
            non_parents=['wavelength'],
        )

        wavelength_grid_file = option_definition.option(
            name='wavelength_grid_file',
            group='spectral',
            helpstr=
            'Location of file with wavelength grid used for the internal transmittance calculations.',
            documentation=documentation['wavelength_grid_file'],
            gui_inputs=(GUI_definition.FileInput(
                name='Input.filename[FN_WLTRANS]'), ),
            tokens=option_definition.addToken(
                name='Input.filename[FN_WLTRANS]', datatype=io.IOBase),
            parents=['uvspec'],
            non_parents=['thermal_bands_file'],
        )

        thermal_bands_file = option_definition.option(
            name='thermal_bands_file',
            group='spectral',
            helpstr=
            'File with the center wavelengths and the wavelength band intervals for calculations in the thermal range.',
            documentation=documentation['thermal_bands_file'],
            gui_inputs=(GUI_definition.FileInput(
                name='Input.filename[FN_WLBANDS]'), ),
            tokens=option_definition.addToken(
                name='Input.filename[FN_WLBANDS]', datatype=io.IOBase),
            parents=['uvspec'],
            non_parents=['filter_function_file', 'slit_function_file'],
        )

        thermal_bandwidth = option_definition.option(
            name='thermal_bandwidth',
            group='spectral',
            documentation=documentation['thermal_bandwidth'],
            gui_inputs=(
                GUI_definition.FloatInput(name='Input.bandwidth',
                                          valid_range=[0, 1000000.0]),
                GUI_definition.ListInput(name='Input.bandwidth_unit',
                                         valid_range=['', 'nm', 'cm-1'],
                                         optional=True),
            ),
            tokens=[
                option_definition.addToken(name='Input.bandwidth',
                                           datatype=float,
                                           valid_range=[0, 1e6]),
                option_definition.addLogical(name='Input.bandwidth_unit',
                                             logicals=['nm', 'cm-1'],
                                             setting='UNIT_PER_',
                                             optional=True)
            ],
            parents=['uvspec'],
        )

        source = option_definition.option(
            name='source',
            group='spectral',
            helpstr='Source of radiation.',
            documentation=documentation['source'],
            gui_inputs=(
                GUI_definition.ListInput(name='Input.source',
                                         valid_range=['thermal', 'solar']),
                GUI_definition.FileInput(
                    name='Input.filename[FN_EXTRATERRESTRIAL]', optional=True),
                GUI_definition.ListInput(
                    name='Input.spectrum_unit',
                    valid_range=['', 'per_nm', 'per_cm-1', 'per_band'],
                    optional=True),
            ),
            tokens=[
                option_definition.addLogical(name='Input.source',
                                             logicals=['thermal', 'solar'],
                                             setting='SRC_'),
                option_definition.addToken(
                    name='Input.filename[FN_EXTRATERRESTRIAL]',
                    datatype=io.IOBase,
                    optional=True),
                option_definition.addLogical(
                    name='Input.spectrum_unit',
                    logicals=['per_nm', 'per_cm-1', 'per_band'],
                    setting='UNIT_',
                    optional=True)
            ],
            parents=['uvspec'],
            plot={
                'plot_type': '2D',
                'optional_args': {
                    'column_names': (
                        "wavelength",
                        "extraterrestrial flux",
                    )
                }
            })

        mc_sun_angular_size = option_definition.option(
            name='mc_sun_angular_size',
            group='spectral',
            documentation=documentation['mc_sun_angular_size'],
            tokens=option_definition.addToken(name='Input.rte.mc.sun_radius',
                                              datatype=float),
            threedmystic=True,
            showInGui=False,
        )

        mc_lidar = option_definition.option(
            name='mc_lidar',
            group='spectral',
            helpstr='Use local estimator to simulate a lidar.',
            documentation=documentation['mc_lidar'],
            tokens=[
                option_definition.addSetting(name='Input.source',
                                             setting='SRC_LIDAR'),
                option_definition.addSetting(name='Input.rte.mc.escape',
                                             setting=0),
                option_definition.addSetting(name='Input.rte.mc.locest',
                                             setting='MCLIDAR_SPACE'),
                option_definition.addLogical(name='Input.rte.mc.locest',
                                             logicals=[
                                                 'ascope', 'polarize', 'space',
                                                 'falcon', 'simple', 'pilot',
                                                 'moon', 'test'
                                             ],
                                             setting='MCLIDAR_',
                                             optional=True)
            ],
            parents=['uvspec'],
            non_parents=['source'],
            showInGui=False,
            islidar=True)

        mc_lidar_file = option_definition.option(
            name='mc_lidar_file',
            group='spectral',
            helpstr=
            'File containing positions, looking directions, and opening angles of lasers and detectors for lidar simulations in MYSTIC.',
            documentation=documentation['mc_lidar_file'],
            tokens=option_definition.addToken(
                name='Input.rte.mc.filename[FN_MC_LIDAR]', datatype=io.IOBase),
            parents=['uvspec'],
            non_parents=['source'],
            showInGui=False,
            islidar=True)

        mc_radar = option_definition.option(
            name='mc_radar',
            group='spectral',
            helpstr='Switch on radar.',
            documentation=documentation['mc_radar'],
            tokens=[
                option_definition.addSetting(name='Input.source',
                                             setting='SRC_LIDAR'),
                option_definition.addSetting(name='Input.rte.mc.escape',
                                             setting=0),
                option_definition.addSetting(name='Input.rte.mc.locest',
                                             setting='MCRADAR')
            ],
            parents=['uvspec'],
            non_parents=['source'],
            showInGui=False,
            islidar=True)

        self.options = [
            wavelength,
            wavelength_index,
            wavelength_grid_file,
            thermal_bands_file,
            thermal_bandwidth,
            source,
            mc_lidar,
            mc_lidar_file,
            mc_radar,
            mc_sun_angular_size,
        ]
示例#7
0
    def __init__(self):
        documentation = get_cloud_documentation()
        #uvspec function to initialize new profile

        wc_file = option_definition.option(   #TODO: option 3D only ifthreedmystic
            name='wc_file',
            group='cloud',
            helpstr='Location of file defining water cloud properties.',
            documentation=documentation['wc_file'],
            tokens = [option_definition.addSetting(name='isp', setting=option_definition.CaothType('wc')),
                      option_definition.addLogical(name='Input.caoth[isp].source', logicals=option_definition.ProfileType().get_valid_range(), setting='CAOTH_FROM_'),
                      option_definition.addToken(name='Input.caoth[isp].filename', datatype=io.IOBase)],
            parents=['uvspec'],
            childs=['wc_modify',\
                 'interpret_as_level',\
                 'wc_properties',\
                 'cloudcover'],
            plot = {'plot_type': '2D',
                'optional_args': {'column_names': (
                        "altitude",
                        "liquid water content",
                        "effective radius",)
                          }
                }
        )

        wc_properties = option_definition.option(
            name='wc_properties',
            group='cloud',
            helpstr=
            'Define how liquid water content and effective droplet radius are translated to optical properties. ',
            documentation=documentation['wc_properties'],
            tokens=[
                option_definition.addSetting(
                    name='isp', setting=option_definition.CaothType('wc')),
                option_definition.addLogical(
                    name='Input.caoth[isp].properties',
                    logicals=['hu', 'echam4', 'mie', io.IOBase],
                    setting='PROP_',
                    gui_name='properties'),
                option_definition.addLogical(
                    name='Input.caoth[isp].interpolate',
                    logicals=['interpolate'],
                    optional=True,
                    gui_name='interpolate')
            ],
            parents=['wc_file'],
        )

        wc_modify = option_definition.option(  #TODO: valid_ranges for GUI!!
            name='wc_modify',
            group='cloud',
            helpstr='Modify water cloud optical properties.',
            documentation=documentation['wc_modify'],
            tokens=[
                option_definition.addSetting(
                    name='isp', setting=option_definition.CaothType('wc')),
                option_definition.addLogical(
                    name='id1',
                    logicals=['gg', 'ssa', 'tau', 'tau550'],
                    setting='MODIFY_VAR_',
                    gui_name='variable'),
                option_definition.addLogical(name='id2',
                                             logicals=['set', 'scale'],
                                             setting='MODIFY_TYPE_',
                                             gui_name='scale/set'),
                option_definition.addToken(
                    name='Input.caoth[isp].modify[id1][id2]',
                    datatype=float,
                    gui_name='value')
            ],
            parents=['wc_file'],
            non_unique=True,
        )

        ic_file = option_definition.option(   #TODO: option 3D only ifthreedmystic
            name='ic_file',
            group='cloud',
            helpstr='Location of file defining ice cloud properties.',
            documentation=documentation['ic_file'],
            tokens = [option_definition.addSetting(name='isp', setting=option_definition.CaothType('ic')),
                      option_definition.addLogical(name='Input.caoth[isp].source', logicals=option_definition.ProfileType().get_valid_range(), setting='CAOTH_FROM_'),
                      option_definition.addToken(name='Input.caoth[isp].filename', datatype=io.IOBase)],
            parents=['uvspec'],
            childs=['ic_modify','ic_habit',\
                 'ic_fu', 'interpret_as_level',\
                 'ic_properties',\
                 'cloudcover'],
            plot = {'plot_type': '2D',
                'optional_args': {'column_names': (
                        "altitude",
                        "ice water content",
                        "effective radius",)
                          }
                }
        )

        ic_properties = option_definition.option(  # TODO: raytracing should only be enabled ifthreedmystic, see also ic_raytracing_file
            name='ic_properties',
            group='cloud',
            helpstr=
            'Define how ice water content and effective droplet radius are translated to optical properties. ',
            documentation=documentation['ic_properties'],
            tokens=[
                option_definition.addSetting(
                    name='isp', setting=option_definition.CaothType('ic')),
                option_definition.addLogical(
                    name='Input.caoth[isp].properties',
                    logicals=[
                        'fu', 'echam4', 'yang', 'key', 'baum', 'baum_v36',
                        'hey', 'yang2013', 'raytracing', io.IOBase
                    ],
                    setting='PROP_',
                    gui_name='properties'),
                option_definition.addLogical(
                    name='Input.caoth[isp].interpolate',
                    logicals=['interpolate'],
                    optional=True,
                    gui_name='interpolate')
            ],
            parents=['ic_file'],
            childs=['ic_habit', 'ic_habit_yang2013'],
            continious_update=True,
        )

        ic_modify = option_definition.option(  #TODO: valid_ranges for GUI!!
            name='ic_modify',
            group='cloud',
            helpstr='Modify ice cloud optical properties.',
            documentation=documentation['ic_modify'],
            tokens=[
                option_definition.addSetting(
                    name='isp', setting=option_definition.CaothType('ic')),
                option_definition.addLogical(
                    name='id1',
                    logicals=['gg', 'ssa', 'tau', 'tau550'],
                    setting='MODIFY_VAR_',
                    gui_name='variable'),
                option_definition.addLogical(name='id2',
                                             logicals=['set', 'scale'],
                                             setting='MODIFY_TYPE_',
                                             gui_name='scale/set'),
                option_definition.addToken(
                    name='Input.caoth[isp].modify[id1][id2]',
                    datatype=float,
                    gui_name='value')
            ],
            parents=['ic_file'],
            non_unique=True,
        )

        ic_habit = option_definition.option(
            name='ic_habit',
            group='cloud',
            helpstr=
            'Ice crystal habit for the \citet{Yang2000}, \citet{Key2002}, \code{baum_v36}, \code{hey} parameterizations.',
            documentation=documentation['ic_habit'],
            tokens=[
                option_definition.addSetting(
                    name='isp', setting=option_definition.CaothType('ic')),
                option_definition.addLogical(
                    name='Input.caoth[isp].habit',
                    logicals=[
                        'solid-column', 'hollow-column', 'rough-aggregate',
                        'rosette-4', 'rosette-6', 'plate', 'droxtal',
                        'dendrite', 'ghm'
                    ],
                    setting='IC_HABIT_')
            ],
            parents=['ic_file'],
            speaker='ic_properties',
            enable_values=('key', 'yang', 'hey', 'baum_v36'),
        )

        ic_habit_yang2013 = option_definition.option(
            name='ic_habit_yang2013',
            group='cloud',
            helpstr=
            'Ice crystal habit for the \citet{yang2013} parameterization.',
            documentation=documentation['ic_habit_yang2013'],
            tokens=[
                option_definition.addSetting(
                    name='isp', setting=option_definition.CaothType('ic')),
                option_definition.addLogical(
                    name='Input.caoth[isp].habit',
                    logicals=[
                        'column_8elements', 'droxtal', 'hollow_bullet_rosette',
                        'hollow_column', 'plate', 'plate_10elements',
                        'plate_5elements', 'solid_bullet_rosette',
                        'solid_column'
                    ],
                    setting='IC_HABIT_'),
                option_definition.addLogical(
                    name='Input.caoth[isp].roughness',
                    logicals=['smooth', 'moderate', 'severe'],
                    setting='IC_ROUGHNESS_')
            ],
            parents=['ic_file'],
            speaker='ic_properties',
            enable_values=('yang2013', ),
        )

        ic_fu = option_definition.option(
            name='ic_fu',
            group='cloud',
            documentation=documentation['ic_fu'],
            tokens=[
                option_definition.addSetting(
                    name='isp', setting=option_definition.CaothType('ic')),
                option_definition.addLogical(
                    name='id1',
                    logicals=['reff_def', 'deltascaling'],
                    setting='IC_FU_'),
                option_definition.addLogical(name='id2',
                                             logicals=['on', 'off'],
                                             setting='SWITCH_'),
                option_definition.addSetting(
                    name='Input.caoth[isp].ic_fu[id1]', setting='id2')
            ],
            parents=['ic_file'],
            non_unique=True,
        )

        ic_raytracing_file = option_definition.option(  # TODO: should only be enabled ifthreedmystic, but only if the same is true for ic_properties raytracing
            name='ic_raytracing_file',
            group='cloud',
            documentation=documentation['ic_raytracing_file'],
            tokens=[
                option_definition.addToken(
                    name='Input.filename[FN_RAYTRACING]', datatype=io.IOBase),
            ],
        )

        cloud_fraction_file = option_definition.option(
            name='cloud_fraction_file',
            group='cloud',
            documentation=documentation['cloud_fraction_file'],
            tokens=[
                option_definition.addToken(
                    name='Input.filename[FN_CLOUD_FRACTION]',
                    datatype=io.IOBase),
            ],
        )

        cloud_overlap = option_definition.option(
            name='cloud_overlap',
            group='cloud',
            documentation=documentation['cloud_overlap'],
            tokens=[
                option_definition.addLogical(
                    name='Input.cloud_overlap',
                    logicals=['rand', 'max', 'maxrand', 'off'],
                    setting='CLOUD_OVERLAP_')
            ],
        )

        cloudcover = option_definition.option(
            name='cloudcover',
            group='cloud',
            helpstr=
            'Fraction of the horizontal sky area which is covered by clouds.',
            documentation=documentation['cloudcover'],
            tokens=[
                option_definition.addToken(
                    name='isp',
                    datatype=option_definition.CaothType,
                    valid_range=['wc', 'ic']),
                option_definition.addToken(name='Input.caoth[isp].cloudcover',
                                           datatype=float,
                                           valid_range=[0, 1]),
                option_definition.addSetting(name='Input.caoth[isp].ipa',
                                             setting=1),
                option_definition.addSetting(name='Input.ipa',
                                             setting=1,
                                             default=0)
            ],
            parents=['ic_file', 'wc_file'],
            non_unique=True,
        )

        self.options = [
            wc_file, wc_properties, wc_modify, ic_file, ic_properties,
            ic_modify, ic_habit, ic_habit_yang2013, ic_fu, ic_raytracing_file,
            cloud_fraction_file, cloud_overlap, cloudcover
        ]
示例#8
0
    def __init__(self):
        documentation = get_solver_documentation()

        rte_solver = option_definition.option(
            name='rte_solver',
            group='solver',
            helpstr='Radiative transfer equation solver.',
            documentation=documentation['rte_solver'],
            gui_inputs=(GUI_definition.ListInput(name='solver',
                                                 valid_range=[
                                                     'disort', 'twostr',
                                                     'mystic', 'rodents',
                                                     'sslidar', 'null'
                                                 ],
                                                 optional=False), ),
            tokens=option_definition.addLogical(
                name='Input.rte.solver',
                logicals=[
                    'disort', 'twostr', 'mystic', 'rodents', 'sslidar', 'null',
                    'sdisort', 'spsdisort', 'fdisort1', 'fdisort2', 'sos',
                    'polradtran', 'ftwostr', 'montecarlo', 'tzs', 'sssi',
                    'sss', 'twostrebe', 'twomaxrnd', 'twomaxrnd3C'
                ],
                setting='SOLVER_'),
            parents=['uvspec'],
            childs=[
                'polradtran_quad_type',
                'polradtran',
                'polradtran_max_delta_tau',
                'pseudospherical',
                'disort_spherical_albedo',
                'disort_intcor',
                'isotropic_source_toa',
                'raman',
                'number_of_streams',
                'deltam',
                'nrefrac',
                'brdf_cam',
                'brdf_cam_solar_wind',
                # Mystic options are not enabled unless solver is mystic of monte carlo, see mc_options.py
                'mc_escape',
                'mc_vroom',
                'mc_backward',
                'mc_spectral_is',
                'mc_spectral_is_wvl',
                'mc_forward_output',
                'mc_albedo_file',
                'mc_albedo_spectral_file',
                'mc_albedo_type',
                'mc_rossli_file',
                'mc_backward_output',
                'mc_backward_writeallpixels',
                'mc_basename',
                'mc_delta_scaling',
                'mc_elevation_file',
                'mc_tenstream',
                'mc_ipa',
                'mc_tipa',
                'ipa_3d',
                'tipa',
                'mc_maxscatters',
                'mc_minscatters',
                'mc_minphotons',
                'mc_photons',
                'mc_photons_file',
                'mc_polarisation',
                'mc_wcloud_file',
                'mc_icloud_file',
                'mc_randomseed',
                'mc_rpv_file',
                'mc_rpv_spectral_file',
                'mc_rpv_type',
                'mc_ambrals_spectral_file',
                'mc_ambrals_type',
                'mc_spherical',
                'mc_std',
                'sur_temperature_file',
                'mc_sample_grid',
                'mc_sensordirection',
                'mc_sensorposition',
                'mc_reference_to_nn',
                'mc_bw_umu_file',
                'mc_truncate',
                'mc_bcond',
                'mc_coherent_backscatter',
                'mc_surface_reflectalways',
                'mc_refraction',
                'mc_visualize',
                'mc_hiddenline',
                'mc_surfaceparallel',
                'mc_jacobian',
                'mc_jacobian_std',
                'sslidar',
                'sslidar_nranges',
                'sslidar_polarisation',
                'tzs_cloud_top_height',
                'twomaxrnd3C_scale_cf',
                'mc_nca'  # CK2019 added nca    
            ],
            continious_update=True,
        )

        pseudospherical = option_definition.option(
            name='pseudospherical',
            group='solver',
            helpstr=
            'Invokes pseudospherical geometry for disort/twostr solver.',
            documentation=documentation['pseudospherical'],
            tokens=option_definition.addSetting(
                name='Input.rte.pseudospherical', setting=1),
            parents=['rte_solver'],
            speaker='rte_solver',
            enable_values=(
                "disort",
                "twostr",
            ))

        disort_spherical_albedo = option_definition.option(
            name='disort_spherical_albedo',
            group='solver',
            helpstr='Calculate spherical albedo.',
            documentation=documentation['disort_spherical_albedo'],
            tokens=[
                option_definition.addSetting(name='Input.rte.ibcnd',
                                             setting=1),
                option_definition.addSetting(name='Input.rte.nphi', setting=0)
            ],
            parents=['rte_solver'],
            speaker='rte_solver',
            enable_values=("disort", ),
            developer=True)

        disort_intcor = option_definition.option(
            name='disort_intcor',
            group='solver',
            helpstr='Intensity correction method',
            documentation=documentation['disort_intcor'],
            gui_inputs=(GUI_definition.ListInput(
                name='disort_intcor', valid_range=['phase', 'moments',
                                                   'off']), ),
            tokens=option_definition.addLogical(
                name="Input.rte.disort_icm",
                logicals=['phase', 'moments', 'off'],
                setting='DISORT_ICM_'),
            parents=['rte_solver'],
            speaker='rte_solver',
            enable_values=("disort", ))

        isotropic_source_toa = option_definition.option(
            name='isotropic_source_toa',
            group='solver',
            helpstr='Specifies that isotropic '
            'illumination is included at top-boundary.',
            documentation=documentation['isotropic_source_toa'],
            tokens=option_definition.addSetting(name='Input.rte.fisot',
                                                setting=1),
            gui_inputs=(GUI_definition.FloatInput(
                name='isotropic_source_toa'), ),
            parents=['rte_solver'],
            speaker='rte_solver',
            enable_values=(
                "disort",
                "twostr",
            ))

        raman = option_definition.option(
            name='raman',
            group='solver',
            helpstr='Include first order rotational Raman scattering.',
            documentation=documentation['raman'],
            tokens=[
                option_definition.addSetting(name='Input.raman',
                                             setting='RAMAN_CALC'),
                option_definition.addSetting(name='Input.ck_scheme',
                                             setting='CK_RAMAN'),
                option_definition.addSetting(name='Input.rte.solver',
                                             setting='SOLVER_DISORT'),
                option_definition.addSetting(name='Input.processing',
                                             setting='PROCESS_RAMAN'),
                option_definition.addLogical(name='Input.raman_original',
                                             logicals=['original'],
                                             optional=True)
            ],
            gui_inputs=(GUI_definition.ListInput(name='raman_original',
                                                 valid_range=['original'],
                                                 optional=True), ),
            parents=['rte_solver'],
            speaker='rte_solver',
            enable_values=("disort", ),
        )

        number_of_streams = option_definition.option(
            name='number_of_streams',
            group='solver',
            helpstr='Number of streams.',
            documentation=documentation['number_of_streams'],
            gui_inputs=(GUI_definition.IntegerInput(
                name='number_of_streams'), ),
            tokens=option_definition.addToken(name='Input.rte.nstr',
                                              datatype=int,
                                              default=6),
            parents=['rte_solver'],
            speaker='rte_solver',
            enable_values=(
                "disort",
                "polradtran",
            ),
        )

        polradtran = option_definition.option(
            name='polradtran',
            group='solver',
            helpstr='Set values for rte_solver polradtran.',
            documentation=documentation['polradtran'],
            tokens=[
                option_definition.addLogical(
                    name='id',
                    logicals=['aziorder', 'nstokes', 'src_code'],
                    setting='POLRADTRAN_'),
                option_definition.addToken(name='Input.rte.polradtran[id]',
                                           datatype=int)
            ],
            speaker='rte_solver',
            enable_values=('polradtran', ),
            showInGui=False,
            non_unique=True,
        )

        polradtran_quad_type = option_definition.option(
            name='polradtran_quad_type',
            group='solver',
            helpstr='Type of quadrature used',
            documentation=documentation['polradtran_quad_type'],
            tokens=option_definition.addToken(name='Input.rte.pol_quad_type',
                                              valid_range=['G', 'D', 'L', 'E'],
                                              datatype=str),
            parents=['rte_solver'],
            speaker="rte_solver",
            enable_values=("polradtran", ),
            showInGui=False,
        )

        polradtran_max_delta_tau = option_definition.option(
            name='polradtran_max_delta_tau',
            group='solver',
            helpstr='Initial layer thickness for doubling.',
            documentation=documentation['polradtran_max_delta_tau'],
            tokens=option_definition.addToken(
                name='Input.rte.pol_max_delta_tau',
                datatype=float,
                default=1e-5),
            parents=['rte_solver'],
            speaker="rte_solver",
            enable_values=("polradtran", ),
            showInGui=False,
        )

        #no_sdisort     nrefrac = conditional_enable_option(
        #no_sdisort         name='nrefrac',
        #no_sdisort         group='solver',
        #no_sdisort         helpstr='Refraction for rte_solver sdisort.',
        #no_sdisort         documentation=documentation['nrefrac'],
        #no_sdisort         gui_inputs=(GUI_definition.IntegerListInput(name='Input.rte.nrefrac', default=0, valid_range=[0, 1, 2], optional=False),),
        #no_sdisort         tokens=addToken('Input.rte.nrefrac', int, default=0, valid_range=[0,1,2]),
        #no_sdisort         parents=['rte_solver'],
        #no_sdisort         speaker="rte_solver",
        #no_sdisort         enable_values=("sdisort",)
        #no_sdisort     )

        #no_sdisort     nscat = option_definition.option(
        #no_sdisort         name='nscat',
        #no_sdisort         group='solver',
        #no_sdisort         helpstr='Order of scattering.',
        #no_sdisort         documentation=documentation['nscat'],
        #no_sdisort         gui_inputs=(GUI_definition.IntegerInput(name='Input.rte.nscat'),),
        #no_sdisort         tokens=addToken('Input.rte.nscat', int, default=20),
        #no_sdisort         parents=['rte_solver'],
        #no_sdisort         speaker="rte_solver",
        #no_sdisort         enable_values=("sdisort",)
        #no_sdisort     )

        sdisort = option_definition.option(
            name='sdisort',
            group='solver',
            helpstr='Set values for rte_solver sdisort.',
            documentation=documentation['sdisort'],
            tokens=[
                option_definition.addLogical(
                    name='id',
                    logicals=['ichapman', 'nscat', 'nrefrac'],
                    setting='SDISORT_'),
                option_definition.addToken(name='Input.rte.sdisort[id]',
                                           datatype=int)
            ],
            speaker='rte_solver',
            enable_values=('sdisort', ),
            showInGui=False,
            non_unique=True,
        )

        sos_nscat = option_definition.option(
            name='sos_nscat',
            group='solver',
            helpstr='Set order of scattering moments for rte_solver sos.',
            documentation=documentation['sos_nscat'],
            tokens=option_definition.addToken(name='Input.rte.sos_nscat',
                                              datatype=int),
            speaker='rte_solver',
            enable_values=('sos', ),
            showInGui=False,
            developer=True)

        deltam = option_definition.option(
            name='deltam',
            group='solver',
            helpstr='Turn delta-M scaling on/off.',
            documentation=documentation['deltam'],
            gui_inputs=(GUI_definition.ListInput(name='Input.rte.deltam',
                                                 valid_range=['on', 'off'],
                                                 optional=False,
                                                 default='on'), ),
            tokens=option_definition.addLogical(name='Input.rte.deltam',
                                                logicals=['on', 'off'],
                                                setting='SWITCH_',
                                                default='SWITCH_ON'),
            parents=['rte_solver'],
            speaker="rte_solver",
            enable_values=(
                "disort",
                "twostr",
            ))

        ipa_3d = option_definition.option(
            name='ipa_3d',
            group='solver',
            helpstr='',
            documentation=documentation['ipa_3d'],
            tokens=option_definition.addSetting(name='Input.ipa3d', setting=1),
            threedmystic=True,
            parents=['uvspec'],
            non_parents=[
                'tipa',
            ],
            speaker='rte_solver',
            enable_values=(
                "disort",
                "twostr",
                "rodents",
            ),
        )

        mc_tenstream = option_definition.option(
            name='mc_tenstream',
            group='solver',
            helpstr=
            'Run Tenstream approximation solver instead of Photon Tracing. Optional argument: configuration string',
            documentation=documentation['mc_tenstream'],
            tokens=[
                option_definition.addSetting(name='Input.rte.mc.tenstream',
                                             setting=1,
                                             default=0),
                option_definition.addToken(
                    name='Input.rte.mc.tenstream_options',
                    datatype=str,
                    optional=True,
                    default="NULL")
            ],
            parents=['uvspec'],
            speaker='rte_solver',
            enable_values=("mystic", ),
            threedmystic=True)

        mc_ipa = option_definition.option(
            name='mc_ipa',
            group='solver',
            helpstr='Run MYSTIC in independent pixel mode.',
            documentation=documentation['mc_ipa'],
            tokens=option_definition.addSetting(name='Input.rte.mc.ipa',
                                                setting=1,
                                                default=0),
            parents=['uvspec'],
            non_parents=[
                'mc_tipa',
            ],
            speaker='rte_solver',
            enable_values=("mystic", ),
            threedmystic=True)

        mc_tipa = option_definition.option(
            name='mc_tipa',
            group='solver',
            helpstr='Run MYSTIC in tilted independent pixel mode.',
            documentation=documentation['mc_tipa'],
            tokens=[
                option_definition.addSetting(name='Input.rte.mc.ipa',
                                             setting=1),
                option_definition.addLogical(name='Input.rte.mc.tipa',
                                             logicals=['dirdiff', 'dir3d'],
                                             setting='TIPA_')
            ],
            parents=['uvspec'],
            non_parents=[
                'mc_ipa',
            ],
            speaker='rte_solver',
            enable_values=("mystic", ),
            developer=True,
        )

        tipa = option_definition.option(
            name='tipa',
            group='solver',
            helpstr='Use the tilted independent pixel approximation.',
            documentation=documentation['tipa'],
            tokens=option_definition.addLogical(name='Input.tipa',
                                                logicals=['dirdiff', 'dir'],
                                                setting='TIPA_'),
            parents=['uvspec'],
            non_parents=[
                'ipa_3d',
            ],
            speaker='rte_solver',
            enable_values=(
                "rodents",
                'disort',
                'twostr',
            ),
            developer=True,
        )

        sslidar = option_definition.option(
            name='sslidar',
            group='solver',
            helpstr='Set single scattering lidar parameters.',
            documentation=documentation['sslidar'],
            tokens=[
                option_definition.addLogical(
                    name='id',
                    logicals=['area', 'E0', 'eff', 'position', 'range'],
                    setting='SSLIDAR_'),
                option_definition.addToken(name='Input.sslidar[id]',
                                           datatype=float)
            ],
            gui_inputs=(
                GUI_definition.ListInput(
                    name='id',
                    valid_range=['area', 'e0', 'eff', 'position', 'range']),
                GUI_definition.FloatInput(name='Input.sslidar[id]'),
            ),
            parents=['uvspec'],
            speaker='rte_solver',
            enable_values=("sslidar", ),
            non_unique=True,
        )

        sslidar_nranges = option_definition.option(
            name='sslidar_nranges',
            group='solver',
            helpstr='Set number fo range bins for single scattering lidar.',
            documentation=documentation['sslidar_nranges'],
            tokens=[
                option_definition.addToken(name='Input.sslidar_nranges',
                                           datatype=int)
            ],
            gui_inputs=(GUI_definition.IntegerInput(
                name='Input.sslidar_nranges'), ),
            parents=['uvspec'],
            speaker='rte_solver',
            enable_values=("sslidar", ),
        )

        sslidar_polarisation = option_definition.option(
            name='sslidar_polarisation',
            group='solver',
            helpstr='Turn on polarisation measurement for lidar.',
            documentation=documentation['sslidar_polarisation'],
            tokens=option_definition.addSetting(
                name='Input.sslidar_polarisation', setting=1),
            parents=['uvspec'],
            speaker='rte_solver',
            enable_values=("sslidar", ),
        )

        tzs_cloud_top_height = option_definition.not_yet_lex2py_option(
            name='tzs_cloud_top_height',
            group='solver',
            helpstr='Cloud top height[s] of blackbody clouds',
            documentation=documentation['tzs_cloud_top_height'],
            tokens=option_definition.addToken(name="", datatype=str),
            parents=['uvspec'],
            speaker='rte_solver',
            enable_values=('tzs', ),
        )

        #        twomaxrnd3C_scale_cf = option_definition.option(
        #            name='twomaxrnd3C_scale_cf',
        #            group='solver',
        #            helpstr='Scaling factor for cloud fraction split',
        #            documentation=documentation['twomaxrnd3C_scale_cf'],
        #            tokens=option_definition.addToken(name='Input.rte.twomaxrnd3C_scale_cf', datatype=float, default=1.0),
        #            parents=['rte_solver'],
        #            speaker='rte_solver',
        #            enable_values=("twomaxrnd3C",),
        #        )
        mc_nca = option_definition.option(
            name='mc_nca',
            group='solver',
            helpstr=
            'Neighboring Column Approximation (Klinger and Mayer 2016, 2019) for the calculation of 3d thermal heating rates',
            documentation=documentation['mc_nca'],
            tokens=[
                option_definition.addSetting(name='Input.rte.mc.nca',
                                             setting=1,
                                             default=0),
                option_definition.addToken(name='Input.rte.mc.nca_options',
                                           datatype=str,
                                           optional=True,
                                           default="NULL")
            ],
            parents=['uvspec'],
            speaker='rte_solver',
            enable_values=("mystic", ),
            threedmystic=False  # CK2019 added nca   
        )

        self.options = [
            rte_solver,
            pseudospherical,
            disort_spherical_albedo,
            deltam,
            isotropic_source_toa,
            raman,
            mc_tenstream,
            mc_ipa,
            ipa_3d,
            mc_tipa,
            tipa,
            number_of_streams,
            disort_intcor,
            polradtran,
            polradtran_quad_type,
            polradtran_max_delta_tau,
            sslidar,
            sslidar_polarisation,
            sslidar_nranges,
            sdisort,
            sos_nscat,
            tzs_cloud_top_height,
            #            twomaxrnd3C_scale_cf,
            mc_nca
        ]  # CK2019 added nca
示例#9
0
    def __init__(self):
        documentation = get_general_atmosphere_documentation()

        atmos_region = option_definition.option(
            name='atmos_region',
            group='general atmosphere',
            helpstr='Define atmospheric region.', 
            documentation=documentation['atmos_region'],
            tokens = [option_definition.addSetting(name="Input.rte.mc.backward.yes", setting=1),
                      option_definition.addToken(name="Input.rte.mc.ixmin", datatype=int, default='NOT_DEFINED_INTEGER'),
                      option_definition.addToken(name="Input.rte.mc.iymin", datatype=int, default='NOT_DEFINED_INTEGER'),
                      option_definition.addToken(name="Input.rte.mc.ixmax", datatype=int, default='NOT_DEFINED_INTEGER'),
                      option_definition.addToken(name="Input.rte.mc.iymax", datatype=int, default='NOT_DEFINED_INTEGER') ] ,
            parents=['uvspec'],
            showInGui =False,
            threedmystic =True,
            )

        no_absorption = option_definition.option(
            name='no_absorption',
            group='general atmosphere',
            helpstr='Switch off absorption.', 
            documentation=documentation['no_absorption'],
            gui_inputs=(GUI_definition.TextInput(name='no_absorption',optional=True),),
            tokens = [option_definition.addSetting(name='ispoff', setting='get_caothoff_index(&Input.caothoff,&Input.n_caothoff, "all")'),
                      option_definition.addToken(name='ispoff', datatype=option_definition.CaothoffType, optional=True),
                      option_definition.addSetting(name='Input.caothoff[ispoff].no_absorption', setting=1)],
            parents=['uvspec'],
            non_unique=True,
            )

        no_scattering = option_definition.option(
            name='no_scattering',
            group='general atmosphere',
            helpstr='Switch off scattering.', 
            documentation=documentation['no_scattering'],
            gui_inputs=(GUI_definition.TextInput(name='no_scattering',optional=True),),
            tokens = [option_definition.addSetting(name='ispoff', setting='get_caothoff_index(&Input.caothoff,&Input.n_caothoff, "all")'),
                      option_definition.addToken(name='ispoff', datatype=option_definition.CaothoffType, optional=True),
                      option_definition.addSetting(name='Input.caothoff[ispoff].no_scattering', setting=1)],
            parents=['uvspec'],
            non_unique=True,
            )

        interpret_as_level = option_definition.option(
            name='interpret_as_level',
            group='general atmosphere',
            helpstr='Interpret profile properties as level properties.',
            documentation=documentation['interpret_as_level'],
            gui_inputs=(GUI_definition.TextInput(name='Input.caothoff[isp].layer'),),
            tokens = [option_definition.addToken(name='isp', datatype=option_definition.CaothType),
                      option_definition.addSetting(name='Input.caoth[isp].layer', setting='FALSE')], 
            parents=['wc_file','ic_file','profile_file'],
            non_unique=True,
        )
        
        zout_interpolate = option_definition.option(
            name='zout_interpolate', 
            group='general_atmosphere',
            helpstr='Interpolate atmospheric profiles.', 
            documentation=documentation['zout_interpolate'], 
            tokens=option_definition.addSetting(name='Input.atm.zout_interpolate', setting='ZOUT_INTERPOLATE', default='NO_ZOUT_INTERPOLATE'),
            parents=['uvspec'],
            )
    
        z_interpolate = option_definition.not_yet_lex2py_option(
            name='z_interpolate',
            group='general_atmosphere',
            documentation='', #documentation['z_interpolate'], #TODO: Missing documentation
            gui_inputs=(GUI_definition.TextInput(name=''),),
            parents=['uvspec'],
            non_unique=True,
        )

        atm_z_grid = option_definition.option(
            name='atm_z_grid', 
            group='atmosphere', 
            documentation=documentation['atm_z_grid'],
            gui_inputs=(GUI_definition.TextInput(name='Input.atm.z_atm_forced_sea'),),
            tokens= [option_definition.addToken(name='Input.atm.z_atm_forced_sea', datatype=option_definition.SignedFloats), 
                     option_definition.addSetting(name='Input.atm.nz_atm_forced_sea', setting='ntokens')],
            parents=['uvspec'],
            )

        reverse_atmosphere = option_definition.option(
            name='reverse_atmosphere', 
            group='atmosphere', 
            helpstr='Atmosphere is turned on the head.',
            documentation=documentation['reverse_atmosphere'],
            tokens=option_definition.addSetting(name='Input.rte.reverse', setting=1, default=0), 
            parents=['uvspec'],
            )

        self.options = [atmos_region, no_absorption, no_scattering, 
                interpret_as_level, zout_interpolate, z_interpolate,
                atm_z_grid, reverse_atmosphere]