Hi,

I'm new to ARTS and I set up a simple 1D test where there is sun, absorption 
only gas and a specular surface with reflectivity 1. The sun and sensor is both 
at 0 latitude and 0 longitude, with the sensor looking down (los=180). For 
simplicity I force it to be just 1 layer by providing the pressures on the top 
of the atmosphere and at 0km. I noticed that the radiance output is almost 
zero, which is unexpected. However, if I comment out the operation that 
subtracts the direct radiation (iy-=iy_aux[0]) in iySurfaceRtpropAgenda the 
result looks correct (and validated against libRadtran). I'm puzzled why in 
this case the subtraction is needed; or maybe I made simple mistakes in the set 
up. It would be great if you could help me with this problem. Thank you!



The main part of the code is copied here:


ws = Workspace(verbosity=2)
ws.ReadHITRAN(filename='/home/mandy/Github/MiAtmosphere/HITRAN/ALL.par', 
hitran_type="Online", abs_lines=ws.abs_lines)

ws.LegacyContinuaInit()
ws.water_p_eq_agendaSet()
ws.gas_scattering_agendaSet()
ws.PlanetSet(option="Earth")
ws.iy_main_agendaSet( option="Clearsky" )
ws.iy_space_agendaSet( option="CosmicBackground" )
ws.iy_surface_agendaSet()

ws.ArrayOfStringSet( ws.iy_aux_vars, [ "Optical depth", "Radiative background"] 
)

ws.propmat_clearsky_agenda=propmat_clearsky_agenda

ws.NumericSet( ws.ppath_lmax, 1e10)
ws.ppath_step_agendaSet( option="GeometricPath" )
ws.ppath_agendaSet( option="FollowSensorLosPath" )

# define environment
# =============================================================================
# Number of Stokes components to be computed
ws.IndexSet(ws.stokes_dim, 1)

# Read the spectroscopic line data from the ARTS catalogue and
# create the workspace variable `lines'.
ws.ReadHITRAN(filename='/home/mandy/Github/MiAtmosphere/HITRAN/ALL.par', 
hitran_type="Online", abs_lines=ws.abs_lines)
ws.abs_linesNormalization(ws.abs_lines, "VVH")

# Frequency grid
c = 299792458
wavelengths = np.linspace(1178e-9, 1177e-9, 2)
f_grid = c / wavelengths
ws.f_grid = f_grid

####
# set a simple blackbody sun
ws.starsAddSingleBlackbody(latitude=sun_pos[0], longitude=sun_pos[1])
ws.Print(ws.stars, 2)

# A pressure grid rougly matching 0 to 80 km, in steps of 2 km.
#ws.p_grid = data.p.to_numpy()
ws.p_grid = np.array([1.01040e+05, 2.54000e-03]) # 0 and 120km

# Definition of species
ws.abs_speciesSet(species=
                      ["H2O", "O3", "N2O", "CO", "CH4", "CO2", "O2"])

# This separates the lines into the different tag groups and creates
# the workspace variable `abs_lines_per_species':
ws.abs_lines_per_speciesCreateFromLines()

# Load atmospheric data
ws.AtmRawRead(basename="../controlfiles/testdata/afglUS")

# Set surface relectivity
Reflectivity = [1]
ws.VectorSet(ws.surface_scalar_reflectivity, Reflectivity)
ws.surface_rtprop_agendaSet(option="Specular_NoPol_ReflFix_SurfTFromt_surface" )

# Reference ellipsoid
ws.refellipsoidEarth(ws.refellipsoid, "Sphere")

# No jacobian calculations
ws.jacobianOff()

# No particulate scattering
ws.cloudboxOff()

# No sensor model
ws.sensorOff()

ws.StringSet( ws.iy_unit, "1" )

ws.AtmosphereSet1D()
ws.AtmFieldsCalc()

# Postion and line-of-sight of sensor
ws.rte_pos = [600e3]
ws.rte_los = [180]
ws.VectorSet(ws.rte_pos2, [])

# Check model atmosphere
ws.propmat_clearsky_agendaAuto()
ws.propmat_clearsky_agenda_checkedCalc()
ws.atmfields_checkedCalc()
ws.atmgeom_checkedCalc()
ws.cloudbox_checkedCalc()
ws.lbl_checkedCalc()

# the actual simulation
ws.iyCalc()

# output iy file
ws.WriteXML(ws.output_file_format, ws.iy)


Reply via email to