Dear XuWei,
The method that enables to combine different observations is
yCalcAppend. I have no example in Python, but below you find a
demonstration script from the time we used control files. It should
hopefully show you have to go about it.
Bye,
Patrick
On 7/22/25 16:40, 徐伟 via arts_users.mi wrote:
Dear ARTS Team,
I am following up on my previous inquiry regarding the configuration of
both limb and nadir observation modes for atmospheric retrievals on
Venus using the ARTS library.
As mentioned, I am encountering difficulties configuring the model to
process both observation modes simultaneously, each with its respective
frequency band. My work is currently at a standstill, and your guidance
would be immensely helpful in resolving this issue.
Could you kindly provide assistance to help configure ARTS for this
dual-mode setup? Your prompt response would be greatly appreciated, as
it is critical for the progress of my research.
Thank you again for your time and support. I look forward to your response.
Best regards,
XuWei
#DEFINITIONS: -*-sh-*-
# A simple test and demonstration of *yCalcAppend*.
#
# A retrieval based on a combination of three sources is assumed:
# 1. Emission spectrum of 110.8 GHz ozone transition
# 2. A solar occultation spectrum of the same transition
# 3. Data from a 2-channel tropospheric microwave radiometer
#
# The set-up and selection of retrieval quantities are not realistic, rather
# selected to test the code in various ways.
#
# Author: Patrick Eriksson
Arts2 {
water_p_eq_agendaSet
gas_scattering_agendaSet
PlanetSet(option="Earth")
# standard surface agenda (i.e., make use of surface_rtprop_agenda)
iy_surface_agendaSet
iy_space_agendaSet
# sensor-only path
ppath_agendaSet( option="FollowSensorLosPath" )
# no refraction
ppath_step_agendaSet( option="GeometricPath" )
# ---- Basic and common stuff
-----------------------------------------------
# Number of Stokes components to be computed
IndexSet( stokes_dim, 1 )
# Frequency grid
VectorNLinSpace( f_grid, 201, 110e9, 111e9 )
# Dimensionality of the atmosphere
AtmosphereSet1D
# Species and absorption
abs_speciesSet( species=[
"O3",
"H2O-PWR98",
"N2-SelfContStandardType",
"O2-PWR98" ] )
ReadARTSCAT( abs_lines, "ozone_line.xml" )
abs_lines_per_speciesCreateFromLines
propmat_clearsky_agendaAuto
# Surface altitude
MatrixSetConstant( z_surface, 1, 1, 0 )
# A pressure grid rougly matching 0 to 80 km in 500 m steps.
VectorNLogSpace( p_grid, 160, 1.013e5, 1 )
AtmRawRead( basename = "testdata/tropical" )
AtmFieldsCalc
atmfields_checkedCalc
atmgeom_checkedCalc
lbl_checkedCalc
# ---- Part 1: An emission measurement at 110.8 GHz
--------------------------
iy_main_agendaSet(option="Emission")
MatrixSetConstant( sensor_pos, 1, 1, 0 )
MatrixSetConstant( sensor_los, 1, 1, 0 )
sensorOff
sensor_checkedCalc
StringSet( iy_unit, "RJBT" )
ArrayOfStringSet( iy_aux_vars, ["Optical depth","Radiative background"] )
jacobianInit
jacobianAddAbsSpecies( g1=p_grid, g2=lat_grid, g3=lon_grid,
species="O3", unit="rel" )
jacobianAddPolyfit( poly_order=1 )
jacobianAddTemperature( g1=p_grid, g2=lat_grid, g3=lon_grid )
jacobianClose
# No cloudbox
cloudboxOff
cloudbox_checkedCalc
yCalc
# ---- Part 2: Corresponding transmission (at another angle)
-----------------
AgendaSet( iy_main_agenda){
Ignore( iy_unit )
Ignore( iy_id )
MatrixUnitIntensity( iy_transmitter, stokes_dim, f_grid )
ppathCalc( cloudbox_on=0 )
iyTransmissionStandard
VectorSet(geo_pos, [])
}
StringSet( iy_unit, "1" )
MatrixSetConstant( sensor_los, 1, 1, 45 )
sensorOff
sensor_checkedCalc
ArrayOfStringSet( iy_aux_vars, ["Optical depth"] )
ArrayOfRetrievalQuantityCreate( jacobian_quantities_copy )
Copy( jacobian_quantities_copy, jacobian_quantities )
jacobianInit
jacobianAddAbsSpecies( g1=p_grid, g2=lat_grid, g3=lon_grid,
species="H2O-PWR98", unit="rel" )
VectorCreate( rgrid ) # Here just to test check of consistency between grids
#VectorNLogSpace( rgrid, 159, 1.013e5, 1 )
Copy( rgrid, p_grid )
jacobianAddAbsSpecies( g1=rgrid, g2=lat_grid, g3=lon_grid,
species="O3", unit="rel" )
jacobianAddPolyfit( poly_order=0 )
jacobianAddTemperature( g1=rgrid, g2=lat_grid, g3=lon_grid )
jacobianClose
# No cloudbox
cloudboxOff( jacobian_quantities=jacobian_quantities_copy )
cloudbox_checkedCalc( jacobian_quantities=jacobian_quantities_copy )
yCalcAppend( jacobian_quantities_copy=jacobian_quantities_copy,
append_instrument_wfs=0 )
# ---- Part 3: Data from tropospheric water vapour radiometer
-----------------
VectorSet( f_grid, [ 23.4e9, 31e9 ] )
iy_main_agendaSet(option="Emission")
MatrixSetConstant( sensor_los, 1, 1, 0 )
sensorOff
sensor_checkedCalc
StringSet( iy_unit, "RJBT" )
ArrayOfStringSet( iy_aux_vars, [] )
Copy( jacobian_quantities_copy, jacobian_quantities )
jacobianInit
jacobianAddAbsSpecies( g1=p_grid, g2=lat_grid, g3=lon_grid,
species="H2O-PWR98", unit="rel" )
jacobianClose
# No cloudbox
cloudboxOff( jacobian_quantities=jacobian_quantities_copy )
cloudbox_checkedCalc( jacobian_quantities=jacobian_quantities_copy )
yCalcAppend( jacobian_quantities_copy=jacobian_quantities_copy )
# Save reults
#WriteXML( output_file_format, y, "TestYCalcAppend.y.xml" )
#WriteXML( output_file_format, y_f, "TestYCalcAppend.y_f.xml" )
#WriteXML( output_file_format, y_pol, "TestYCalcAppend.y_pol.xml" )
#WriteXML( output_file_format, y_pos, "TestYCalcAppend.y_pos.xml" )
#WriteXML( output_file_format, y_los, "TestYCalcAppend.y_los.xml" )
#WriteXML( output_file_format, y_aux, "TestYCalcAppend.y_aux.xml" )
#
#WriteXML( output_file_format, jacobian,
# "TestYCalcAppend.jacobian.xml" )
#WriteXML( output_file_format, jacobian_quantities,
# "TestYCalcAppend.jacobian_quantities.xml" )
}