#DEFINITIONS: -*-sh-*- Arts2 { #========================================================================== #### Include files #### #========================================================================== INCLUDE "general/general.arts" INCLUDE "general/continua.arts" INCLUDE "general/agendas.arts" INCLUDE "general/planet_earth.arts" #========================================================================== #### Set Agendas #### #========================================================================== # Agenda for scalar gas absorption calculation Copy(abs_xsec_agenda, abs_xsec_agenda__noCIA) # cosmic background radiation Copy( iy_space_agenda, iy_space_agenda__CosmicBackground ) # standard surface agenda (i.e., make use of surface_rtprop_agenda) Copy( iy_surface_agenda,iy_surface_agenda__UseSurfaceRtprop) #Surface Agenda, see in python script # sensor-only path Copy( ppath_agenda, ppath_agenda__FollowSensorLosPath ) # no refraction Copy( ppath_step_agenda, ppath_step_agenda__GeometricPath ) # Set propmat_clearsky_agenda to use lookup table Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__LookUpTable) # (standard) emission calculation Copy( iy_main_agenda, iy_main_agenda__Emission ) # saturation pressure agenda of water vapor AgendaSet( water_p_eq_agenda ){ water_p_eq_fieldMK05 } AgendaSet( iy_cloudbox_agenda){ iyInterpCloudboxField } # surface agenda Copy( surface_rtprop_agenda, surface_rtprop_agenda__Blackbody_SurfTFromt_surface) #========================================================================== #### Basic/Sensor settings #### #========================================================================== StringSet( iy_unit, "1" ) # Dimension / type of atmosphere AtmosphereSet1D # Dimension of Stokes vector IndexSet( stokes_dim, 1) # Sensor Position MatrixSetConstant( sensor_pos, 1, 1, 200e3 ) # set frequency grid VectorNLinSpace(f_grid, 10, 3e11, 3e13 ) # set angular grid # N_za_grid is the number zenith angles, which needs to be an even number. AngularGridsSetFluxCalc( N_za_grid=6, N_aa_grid=1, za_grid_type="double_gauss") #========================================================================== #### Set up atmosphere #### #========================================================================== ##read atm data in ARTS ReadXML( batch_atm_fields_compact,"testdata/garand_profiles.xml.gz") #as the atm data has no O2, N2, and CO2 add it batch_atm_fields_compactAddConstant(name="abs_species-O2",value=0.2095, prepend=0,condensibles=["abs_species-H2O"]) batch_atm_fields_compactAddConstant(name="abs_species-N2",value=0.7808, prepend=0,condensibles=["abs_species-H2O"]) batch_atm_fields_compactAddConstant(name="abs_species-CO2",value=3.9755e-4, prepend=0,condensibles=["abs_species-H2O"]) #========================================================================== #### Set up absorption #### #========================================================================== abs_speciesSet(species=["H2O, H2O-SelfContCKDMT252, H2O-ForeignContCKDMT252", "O3", "O2, O2-CIAfunCKDMT100", "CO2, CO2-CKDMT252", "N2, N2-CIAfunCKDMT252, N2-CIArotCKDMT252", "CH4", "CO"]) # Define Line shape (no line mixing) abs_lineshape_per_tgDefine(shape=["Voigt_Kuntz6", "Voigt_Kuntz6", "Voigt_Kuntz6", "Voigt_Kuntz6", "Voigt_Kuntz6", "Voigt_Kuntz6", "Voigt_Kuntz6"], normalizationfactor=["VVH", "VVH", "VVH", "VVH", "VVH", "VVH", "VVH"], cutoff=[750e9, 750e9, 750e9, 750e9, 750e9, 750e9, 750e9]) #Read HITRAN catalog: #abs_linesReadFromHitran(abs_lines, # "HITRAN2012.par", # 2e11,4e13 #) # # abs_lines_per_speciesCreateFromLines # abs_lines_per_speciesCompact # # #Calculate absorption lookup table # abs_lookupSetupBatch # abs_xsec_agenda_checkedCalc # abs_lookupCalc # # WriteXML( "binary", abs_lines_per_species) # WriteXML( "binary", abs_lookup) #read absorption lookup table ReadXML(abs_lookup,"TestHeatingRates.abs_lookup.xml") abs_lookupAdapt #========================================================================== #### RT calculations #### #========================================================================== # Here we just take the first garand atmosphere Extract(atm_fields_compact,batch_atm_fields_compact,0) # Split up *atm_fields_compact* to generate p_grid, t_field, z_field, vmr_field: AtmFieldsFromCompact #Set surface altitude Extract( z_surface, z_field, 0 ) #Set surface skin temperature Extract( t_surface, t_field, 0 ) #set jacobian,sensor and cloudbox off jacobianOff cloudboxOff sensorOff # Consistency checks atmgeom_checkedCalc atmfields_checkedCalc(bad_partition_functions_ok=1) cloudbox_checkedCalc propmat_clearsky_agenda_checkedCalc #calculate intesity field Tensor3Create(trans_field) #calculate the full radiation field for plane parallel atmosphere doit_i_fieldClearskyPlaneParallel(trans_field=trans_field) # Calculate Radiance from doit_i_field RadiationFieldSpectralIntegrate(radiation_field=radiance_field, spectral_radiation_field=doit_i_field ) # calculate flux from radiance field irradiance_fieldFromRadiance #set specific heat capacity and set earth gravity, which are needed as input #for the heating rate calculations. npagesGet( npages, t_field ) nrowsGet( nrows, t_field ) ncolsGet( ncols, t_field ) Tensor3SetConstant(specific_heat_capacity, npages, nrows, ncols, 1.006e+03 ) NumericSet(g0,9.80665) #ARTS heating rates heating_ratesFromIrradiance Tensor3Create( heating_rates1 ) Copy(heating_rates1,heating_rates) # For testing calculate first spectral irradiance and than do spectral # integration spectral_irradiance_fieldFromiyField RadiationFieldSpectralIntegrate(radiation_field=irradiance_field, spectral_radiation_field=spectral_irradiance_field ) heating_ratesFromIrradiance Compare( heating_rates, heating_rates1, 1e-14) #========================================================================== #### Compare results #### #========================================================================== Tensor3Create( heating_rates0 ) ReadXML( heating_rates0, "TestHeatingRates.heating_ratesREFERENCE.xml" ) Compare( heating_rates, heating_rates0, 1e-9) }