Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Thanks, Jana. Your email explains much of my confusions now. I will use propmat_clearsky_field and calculate abs_coef from it using other scrips, matlab, for example. The only problem is the burden of figuring out a 7 dimension tensor text file layout, but I will get there eventually. Thanks again and have a great day, Pengwang > > On Feb 16, 2016, at 9:55 AM, Jana Mendrok wrote: > > Hi, > > I tried different software package for this purpose, and found ARTS is one of > the best in terms of usability. I am not sure what was the motivation to > obsolete abs_coef, which I believe is one of the most important quantities in > radiative transfer. Is there any way to keep it in the future ARTS > development? > > essentially, propmat_clearsky_field (where propmat stands for propagation > matrix) holds the same information as abs_coef(_per_species) - the diff is > that propmat_clearsky is always per species (gets summed up inside ARTS' RT > method; you can do the same by yourinterface to your RT solver) and that it > allows for vectorized RT, while abs_coef was the scalar abs coefs (0th > element of the stokes_dim dimensions will give you the scalar abs coef). > > that is, propmat_clearsky is the more sophisticated version of abs_coef. > we went from abs_coef to propmat_clearsky when introducing Zeeman effect and > Faraday rotation - processes that introduce polarization even in case of pure > gaseous RT. > > If I could find abs_coef_per_species from the current ARTS implementation, > that would be a matrix of [f_grid,p_grid], right? If that is the case, what > is the different between abs_coef and abs_coef_per_species then? I have read > the documentation, and still have no clue on this. > > > abs_coef_per_species is an ArrayOfMatrix, where each array element holds the > abs coefs matrix (dimension [f_gid,p_grid]) for one species. note that with > this variable type, the f_grid and p_grid can theoretically be different for > each species. > > Best wishes, > Jana > > > > -- > = > Jana Mendrok, Ph.D. (Project Assistent) > Chalmers University of Technology > Earth and Space Sciences > SE-412 96 Gothenburg, Sweden > > Phone : +46 (0)31 772 1883 > = ___ arts_users.mi mailing list arts_users.mi@lists.uni-hamburg.de https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi
Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Hi, I tried different software package for this purpose, and found ARTS is one > of the best in terms of usability. I am not sure what was the motivation > to obsolete abs_coef, which I believe is one of the most important > quantities in radiative transfer. Is there any way to keep it in the > future ARTS development? > essentially, propmat_clearsky_field (where propmat stands for propagation matrix) holds the same information as abs_coef(_per_species) - the diff is that propmat_clearsky is always per species (gets summed up inside ARTS' RT method; you can do the same by yourinterface to your RT solver) and that it allows for vectorized RT, while abs_coef was the scalar abs coefs (0th element of the stokes_dim dimensions will give you the scalar abs coef). that is, propmat_clearsky is the more sophisticated version of abs_coef. we went from abs_coef to propmat_clearsky when introducing Zeeman effect and Faraday rotation - processes that introduce polarization even in case of pure gaseous RT. > If I could find abs_coef_per_species from the current ARTS implementation, > that would be a matrix of [f_grid,p_grid], right? If that is the case, > what is the different between abs_coef and abs_coef_per_species then? I > have read the documentation, and still have no clue on this. > > abs_coef_per_species is an ArrayOfMatrix, where each array element holds the abs coefs matrix (dimension [f_gid,p_grid]) for one species. note that with this variable type, the f_grid and p_grid can theoretically be different for each species. Best wishes, Jana -- = Jana Mendrok, Ph.D. (Project Assistent) Chalmers University of Technology Earth and Space Sciences SE-412 96 Gothenburg, Sweden Phone : +46 (0)31 772 1883 = ___ arts_users.mi mailing list arts_users.mi@lists.uni-hamburg.de https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi
Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Thanks very much, Richard. I am not sure how to do this then. I would appreciate it very much if you could provide a template. I need abs_coef, which is the total absorption coefficients for all gas species. Then I mix the gas absorption with aerosol and cloud scattering properties and use these as inputs to multiple scattering radiative transfer code. I typically do this in the O2 A band, but may need this in other spectral ranges. I tried different software package for this purpose, and found ARTS is one of the best in terms of usability. I am not sure what was the motivation to obsolete abs_coef, which I believe is one of the most important quantities in radiative transfer. Is there any way to keep it in the future ARTS development? If I could find abs_coef_per_species from the current ARTS implementation, that would be a matrix of [f_grid,p_grid], right? If that is the case, what is the different between abs_coef and abs_coef_per_species then? I have read the documentation, and still have no clue on this. Cheers, Pengwang > On Feb 16, 2016, at 8:34 AM, Richard Larsson wrote: > > Erratum, > > Sorry, this was wrong of me. You have to create an ArrayOfIndex of the > active species. So you need to load an ArrayOfIndex the length of > abs_species and fill it with 0,1,2,3,4,5,...n-1, where n is the number of > species you are using. > > Sorry about the spam, > //Richard > > 2016-02-16 14:31 GMT+01:00 Richard Larsson : > Dear Pengwang, > > Yeah, you have to copy abs_species to abs_species active. I forgot about > that. The Copy( out, in ) function does that so add > > Copy( abs_species active, abs_species) > > before you call the xsec agenda. > > To explain the reasoning for the active tag: Not all species can be handled > by the xsec calculations. So some must be inactive. For your calculations > --- that is to emulate how the old abs_coefCalc worked as I understand it --- > this is not a problem. > > //Richard > > > > 2016-02-16 13:44 GMT+01:00 Pengwang Zhai : > Thanks, Richard. I tried your suggestion. Unfortunately, it does not work. > The error message is: > > arts TestAbsCoeff.arts > > Version: arts-2.2.57 (compiled Fri Feb 12 21:05:27 2016) > Executing Arts > {… > … > … > } > This run took 11.10s (11.07s CPU time) > Run-time error in controlfile: TestAbsCoeff.arts > Run-time error in method: AgendaExecute > Run-time error in method: abs_xsec_per_speciesInit > Method abs_xsec_per_speciesInit needs input variable: abs_species_active > Stopping ARTS execution. > Goodbye. > > Here is the script: > > > > > #DEFINITIONS: -*-sh-*- > # > # An example ARTS controlfile that calculates absorption > # coefficients. > # SAB 16.06.2000 > > Arts2 { > > INCLUDE "general/general.arts" > INCLUDE "general/continua.arts" > INCLUDE "general/agendas.arts" > INCLUDE "general/planet_earth.arts" > > # Agenda for scalar gas absorption calculation > Copy(abs_xsec_agenda, abs_xsec_agenda__noCIA) > # on-the-fly absorption > Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__OnTheFly ) > > abs_linesReadFromHitran( abs_lines, >"/RT/HITRAN/HITRAN2012.par", > 3.880627143214052e+14, > 3.961610390054004e+14 ) > > abs_speciesSet( species=[ "H2O-PWR98", > "O2-PWR93" ] ) > > # This separates the lines into the different tag groups and creates > # the workspace variable `abs_lines_per_species': > abs_lines_per_speciesCreateFromLines > > # Dimensionality of the atmosphere > AtmosphereSet1D > > VectorNLogSpace( p_grid, 200, 10, 10 ) > > # Atmospheric profiles > AtmRawRead( t_field_raw, z_field_raw, vmr_field_raw, abs_species, > "testdata/tropical" ) > > # Now interpolate all the raw atmospheric input onto the pressure > # grid and create the atmospheric variables `t_field', `z_field', `vmr_field' > AtmFieldsCalc > > # Initialize the input variables of abs_coefCalc from the Atm fields: > AbsInputFromAtmFields > > # Create the frequency grid `f_grid': > VectorNLinSpace( f_grid, 25000,3.880627143214052e+14, 3.961610390054004e+14 ) > > IndexSet(stokes_dim, 1) > > # Calculate absorption coefficients, both total (`abs_coef') and > # separately for each tag group (`abs_coef_per_species'): > > atmfields_checkedCalc > abs_xsec_agenda_checkedCalc > AgendaExecute(abs_xsec_agenda) > abs_coefCalcFromXsec > > # Optionally write these to files: > WriteXML( output_file_format,abs_coef_per_species) > } > > > > > On Feb 16, 2016, at 3:15 AM, Richard Larsson wrote: > > > > Dear Pengwang Zhai, > > > > I think we still have what you are looking for in ARTS. > > > > The variable you are actually interested in is not abs_coef, but > > abs_coef_per_species. > > > > The way to create this is to first run abs_xsec_agenda and then > > abs_coefCalcFromXsec. > > > > I think your code should only change from: > > > > abs_coefCalc > > > > to > > > > abs_xsec_agendaExecute >
Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Hi, Richard, Thanks very much. Now it still does not run. See: arts TestAbsCoeff.arts Executing ARTS. Command line: /ARTS/arts-2.2/build/src/arts TestAbsCoeff.arts Version: arts-2.2.57 (compiled Fri Feb 12 21:05:27 2016) This run took 0.03s (0.01s CPU time) Run-time error in controlfile: TestAbsCoeff.arts Workspace variable belongs to the wrong group: abs_species is not ArrayOfIndex, it is ArrayOfArrayOfSpeciesTag File: TestAbsCoeff.arts Any suggestions? Pengwang > On Feb 16, 2016, at 8:34 AM, Richard Larsson wrote: > > Erratum, > > Sorry, this was wrong of me. You have to create an ArrayOfIndex of the > active species. So you need to load an ArrayOfIndex the length of > abs_species and fill it with 0,1,2,3,4,5,...n-1, where n is the number of > species you are using. > > Sorry about the spam, > //Richard > > 2016-02-16 14:31 GMT+01:00 Richard Larsson : > Dear Pengwang, > > Yeah, you have to copy abs_species to abs_species active. I forgot about > that. The Copy( out, in ) function does that so add > > Copy( abs_species active, abs_species) > > before you call the xsec agenda. > > To explain the reasoning for the active tag: Not all species can be handled > by the xsec calculations. So some must be inactive. For your calculations > --- that is to emulate how the old abs_coefCalc worked as I understand it --- > this is not a problem. > > //Richard > > > > 2016-02-16 13:44 GMT+01:00 Pengwang Zhai : > Thanks, Richard. I tried your suggestion. Unfortunately, it does not work. > The error message is: > > arts TestAbsCoeff.arts > > Version: arts-2.2.57 (compiled Fri Feb 12 21:05:27 2016) > Executing Arts > {… > … > … > } > This run took 11.10s (11.07s CPU time) > Run-time error in controlfile: TestAbsCoeff.arts > Run-time error in method: AgendaExecute > Run-time error in method: abs_xsec_per_speciesInit > Method abs_xsec_per_speciesInit needs input variable: abs_species_active > Stopping ARTS execution. > Goodbye. > > Here is the script: > > > > > #DEFINITIONS: -*-sh-*- > # > # An example ARTS controlfile that calculates absorption > # coefficients. > # SAB 16.06.2000 > > Arts2 { > > INCLUDE "general/general.arts" > INCLUDE "general/continua.arts" > INCLUDE "general/agendas.arts" > INCLUDE "general/planet_earth.arts" > > # Agenda for scalar gas absorption calculation > Copy(abs_xsec_agenda, abs_xsec_agenda__noCIA) > # on-the-fly absorption > Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__OnTheFly ) > > abs_linesReadFromHitran( abs_lines, >"/RT/HITRAN/HITRAN2012.par", > 3.880627143214052e+14, > 3.961610390054004e+14 ) > > abs_speciesSet( species=[ "H2O-PWR98", > "O2-PWR93" ] ) > > # This separates the lines into the different tag groups and creates > # the workspace variable `abs_lines_per_species': > abs_lines_per_speciesCreateFromLines > > # Dimensionality of the atmosphere > AtmosphereSet1D > > VectorNLogSpace( p_grid, 200, 10, 10 ) > > # Atmospheric profiles > AtmRawRead( t_field_raw, z_field_raw, vmr_field_raw, abs_species, > "testdata/tropical" ) > > # Now interpolate all the raw atmospheric input onto the pressure > # grid and create the atmospheric variables `t_field', `z_field', `vmr_field' > AtmFieldsCalc > > # Initialize the input variables of abs_coefCalc from the Atm fields: > AbsInputFromAtmFields > > # Create the frequency grid `f_grid': > VectorNLinSpace( f_grid, 25000,3.880627143214052e+14, 3.961610390054004e+14 ) > > IndexSet(stokes_dim, 1) > > # Calculate absorption coefficients, both total (`abs_coef') and > # separately for each tag group (`abs_coef_per_species'): > > atmfields_checkedCalc > abs_xsec_agenda_checkedCalc > AgendaExecute(abs_xsec_agenda) > abs_coefCalcFromXsec > > # Optionally write these to files: > WriteXML( output_file_format,abs_coef_per_species) > } > > > > > On Feb 16, 2016, at 3:15 AM, Richard Larsson wrote: > > > > Dear Pengwang Zhai, > > > > I think we still have what you are looking for in ARTS. > > > > The variable you are actually interested in is not abs_coef, but > > abs_coef_per_species. > > > > The way to create this is to first run abs_xsec_agenda and then > > abs_coefCalcFromXsec. > > > > I think your code should only change from: > > > > abs_coefCalc > > > > to > > > > abs_xsec_agendaExecute > > abs_coefCalcFromXsec > > > > Now abs_coef_per_species is an array of matrices. The array-size is the > > species and the matrices are the size of f_grid and p_grid. Save this and > > do what you want with it. > > > > This said, there is potentially a few other changes depending on what > > version you are using and what species you are interested in. You will > > want to run jacobianOff, for instance, if you are using the dev-branch. > > > > Cheers, > > //Richard > > > > 2016-02-15 22:11 GMT+01:00 Pengwang Zhai : > > Thanks, Jana. > > > > > Note that for deriving abs_coef fo
Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Erratum, Sorry, this was wrong of me. You have to create an ArrayOfIndex of the active species. So you need to load an ArrayOfIndex the length of abs_species and fill it with 0,1,2,3,4,5,...n-1, where n is the number of species you are using. Sorry about the spam, //Richard 2016-02-16 14:31 GMT+01:00 Richard Larsson : > Dear Pengwang, > > Yeah, you have to copy abs_species to abs_species active. I forgot about > that. The Copy( out, in ) function does that so add > > Copy( abs_species active, abs_species) > > before you call the xsec agenda. > > To explain the reasoning for the active tag: Not all species can be > handled by the xsec calculations. So some must be inactive. For your > calculations --- that is to emulate how the old abs_coefCalc worked as I > understand it --- this is not a problem. > > //Richard > > > > 2016-02-16 13:44 GMT+01:00 Pengwang Zhai : > >> Thanks, Richard. I tried your suggestion. Unfortunately, it does not >> work. The error message is: >> >> arts TestAbsCoeff.arts >> >> Version: arts-2.2.57 (compiled Fri Feb 12 21:05:27 2016) >> Executing Arts >> {… >> … >> … >> } >> This run took 11.10s (11.07s CPU time) >> Run-time error in controlfile: TestAbsCoeff.arts >> Run-time error in method: AgendaExecute >> Run-time error in method: abs_xsec_per_speciesInit >> Method abs_xsec_per_speciesInit needs input variable: abs_species_active >> Stopping ARTS execution. >> Goodbye. >> >> Here is the script: >> >> >> >> >> #DEFINITIONS: -*-sh-*- >> # >> # An example ARTS controlfile that calculates absorption >> # coefficients. >> # SAB 16.06.2000 >> >> Arts2 { >> >> INCLUDE "general/general.arts" >> INCLUDE "general/continua.arts" >> INCLUDE "general/agendas.arts" >> INCLUDE "general/planet_earth.arts" >> >> # Agenda for scalar gas absorption calculation >> Copy(abs_xsec_agenda, abs_xsec_agenda__noCIA) >> # on-the-fly absorption >> Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__OnTheFly ) >> >> abs_linesReadFromHitran( abs_lines, >>"/RT/HITRAN/HITRAN2012.par", >> 3.880627143214052e+14, >> 3.961610390054004e+14 ) >> >> abs_speciesSet( species=[ "H2O-PWR98", >> "O2-PWR93" ] ) >> >> # This separates the lines into the different tag groups and creates >> # the workspace variable `abs_lines_per_species': >> abs_lines_per_speciesCreateFromLines >> >> # Dimensionality of the atmosphere >> AtmosphereSet1D >> >> VectorNLogSpace( p_grid, 200, 10, 10 ) >> >> # Atmospheric profiles >> AtmRawRead( t_field_raw, z_field_raw, vmr_field_raw, abs_species, >> "testdata/tropical" ) >> >> # Now interpolate all the raw atmospheric input onto the pressure >> # grid and create the atmospheric variables `t_field', `z_field', >> `vmr_field' >> AtmFieldsCalc >> >> # Initialize the input variables of abs_coefCalc from the Atm fields: >> AbsInputFromAtmFields >> >> # Create the frequency grid `f_grid': >> VectorNLinSpace( f_grid, 25000,3.880627143214052e+14, >> 3.961610390054004e+14 ) >> >> IndexSet(stokes_dim, 1) >> >> # Calculate absorption coefficients, both total (`abs_coef') and >> # separately for each tag group (`abs_coef_per_species'): >> >> atmfields_checkedCalc >> abs_xsec_agenda_checkedCalc >> AgendaExecute(abs_xsec_agenda) >> abs_coefCalcFromXsec >> >> # Optionally write these to files: >> WriteXML( output_file_format,abs_coef_per_species) >> } >> >> >> >> > On Feb 16, 2016, at 3:15 AM, Richard Larsson >> wrote: >> > >> > Dear Pengwang Zhai, >> > >> > I think we still have what you are looking for in ARTS. >> > >> > The variable you are actually interested in is not abs_coef, but >> abs_coef_per_species. >> > >> > The way to create this is to first run abs_xsec_agenda and then >> abs_coefCalcFromXsec. >> > >> > I think your code should only change from: >> > >> > abs_coefCalc >> > >> > to >> > >> > abs_xsec_agendaExecute >> > abs_coefCalcFromXsec >> > >> > Now abs_coef_per_species is an array of matrices. The array-size is >> the species and the matrices are the size of f_grid and p_grid. Save this >> and do what you want with it. >> > >> > This said, there is potentially a few other changes depending on what >> version you are using and what species you are interested in. You will >> want to run jacobianOff, for instance, if you are using the dev-branch. >> > >> > Cheers, >> > //Richard >> > >> > 2016-02-15 22:11 GMT+01:00 Pengwang Zhai : >> > Thanks, Jana. >> > >> > > Note that for deriving abs_coef for this, you need to sum up over all >> species (i.e. over the 0th dimension of propmat_clearsky_field. >> > >> > This is exactly what I wanted to do within arts to get “abs_coef”. If >> it is not possible with arts, I will use matlab to do this. >> > >> > The three dimensions are: [species, f_grid, p_grid] >> > >> > Cheers, >> > >> > PZ >> > >> > >> > > On Feb 15, 2016, at 3:47 PM, Jana Mendrok >> wrote: >> > > >> > > Hi, >> > > >> > > what do you intend to do with abs_coef
Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Dear Pengwang, Yeah, you have to copy abs_species to abs_species active. I forgot about that. The Copy( out, in ) function does that so add Copy( abs_species active, abs_species) before you call the xsec agenda. To explain the reasoning for the active tag: Not all species can be handled by the xsec calculations. So some must be inactive. For your calculations --- that is to emulate how the old abs_coefCalc worked as I understand it --- this is not a problem. //Richard 2016-02-16 13:44 GMT+01:00 Pengwang Zhai : > Thanks, Richard. I tried your suggestion. Unfortunately, it does not > work. The error message is: > > arts TestAbsCoeff.arts > > Version: arts-2.2.57 (compiled Fri Feb 12 21:05:27 2016) > Executing Arts > {… > … > … > } > This run took 11.10s (11.07s CPU time) > Run-time error in controlfile: TestAbsCoeff.arts > Run-time error in method: AgendaExecute > Run-time error in method: abs_xsec_per_speciesInit > Method abs_xsec_per_speciesInit needs input variable: abs_species_active > Stopping ARTS execution. > Goodbye. > > Here is the script: > > > > > #DEFINITIONS: -*-sh-*- > # > # An example ARTS controlfile that calculates absorption > # coefficients. > # SAB 16.06.2000 > > Arts2 { > > INCLUDE "general/general.arts" > INCLUDE "general/continua.arts" > INCLUDE "general/agendas.arts" > INCLUDE "general/planet_earth.arts" > > # Agenda for scalar gas absorption calculation > Copy(abs_xsec_agenda, abs_xsec_agenda__noCIA) > # on-the-fly absorption > Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__OnTheFly ) > > abs_linesReadFromHitran( abs_lines, >"/RT/HITRAN/HITRAN2012.par", > 3.880627143214052e+14, > 3.961610390054004e+14 ) > > abs_speciesSet( species=[ "H2O-PWR98", > "O2-PWR93" ] ) > > # This separates the lines into the different tag groups and creates > # the workspace variable `abs_lines_per_species': > abs_lines_per_speciesCreateFromLines > > # Dimensionality of the atmosphere > AtmosphereSet1D > > VectorNLogSpace( p_grid, 200, 10, 10 ) > > # Atmospheric profiles > AtmRawRead( t_field_raw, z_field_raw, vmr_field_raw, abs_species, > "testdata/tropical" ) > > # Now interpolate all the raw atmospheric input onto the pressure > # grid and create the atmospheric variables `t_field', `z_field', > `vmr_field' > AtmFieldsCalc > > # Initialize the input variables of abs_coefCalc from the Atm fields: > AbsInputFromAtmFields > > # Create the frequency grid `f_grid': > VectorNLinSpace( f_grid, 25000,3.880627143214052e+14, > 3.961610390054004e+14 ) > > IndexSet(stokes_dim, 1) > > # Calculate absorption coefficients, both total (`abs_coef') and > # separately for each tag group (`abs_coef_per_species'): > > atmfields_checkedCalc > abs_xsec_agenda_checkedCalc > AgendaExecute(abs_xsec_agenda) > abs_coefCalcFromXsec > > # Optionally write these to files: > WriteXML( output_file_format,abs_coef_per_species) > } > > > > > On Feb 16, 2016, at 3:15 AM, Richard Larsson > wrote: > > > > Dear Pengwang Zhai, > > > > I think we still have what you are looking for in ARTS. > > > > The variable you are actually interested in is not abs_coef, but > abs_coef_per_species. > > > > The way to create this is to first run abs_xsec_agenda and then > abs_coefCalcFromXsec. > > > > I think your code should only change from: > > > > abs_coefCalc > > > > to > > > > abs_xsec_agendaExecute > > abs_coefCalcFromXsec > > > > Now abs_coef_per_species is an array of matrices. The array-size is the > species and the matrices are the size of f_grid and p_grid. Save this and > do what you want with it. > > > > This said, there is potentially a few other changes depending on what > version you are using and what species you are interested in. You will > want to run jacobianOff, for instance, if you are using the dev-branch. > > > > Cheers, > > //Richard > > > > 2016-02-15 22:11 GMT+01:00 Pengwang Zhai : > > Thanks, Jana. > > > > > Note that for deriving abs_coef for this, you need to sum up over all > species (i.e. over the 0th dimension of propmat_clearsky_field. > > > > This is exactly what I wanted to do within arts to get “abs_coef”. If > it is not possible with arts, I will use matlab to do this. > > > > The three dimensions are: [species, f_grid, p_grid] > > > > Cheers, > > > > PZ > > > > > > > On Feb 15, 2016, at 3:47 PM, Jana Mendrok > wrote: > > > > > > Hi, > > > > > > what do you intend to do with abs_coeff_user? > > > Do you really process this further within ARTS itself? only then it > makes sense to process propmat_clearsky_field into a Tensor3*, i think. > > > Else, I strongly recommend to do any re-shaping / reduction outside of > ARTS; other programming languages are much better suited for this kind of > task (e.g. you can use the matlab-interface atmlab to have easy access to > ARTS output. or the python interface typhon). > > > > > > abs_coef was a Matrix of dimension [f_grid, abs_p] (and >
Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Thanks, Richard. I tried your suggestion. Unfortunately, it does not work. The error message is: arts TestAbsCoeff.arts Version: arts-2.2.57 (compiled Fri Feb 12 21:05:27 2016) Executing Arts {… … … } This run took 11.10s (11.07s CPU time) Run-time error in controlfile: TestAbsCoeff.arts Run-time error in method: AgendaExecute Run-time error in method: abs_xsec_per_speciesInit Method abs_xsec_per_speciesInit needs input variable: abs_species_active Stopping ARTS execution. Goodbye. Here is the script: #DEFINITIONS: -*-sh-*- # # An example ARTS controlfile that calculates absorption # coefficients. # SAB 16.06.2000 Arts2 { INCLUDE "general/general.arts" INCLUDE "general/continua.arts" INCLUDE "general/agendas.arts" INCLUDE "general/planet_earth.arts" # Agenda for scalar gas absorption calculation Copy(abs_xsec_agenda, abs_xsec_agenda__noCIA) # on-the-fly absorption Copy( propmat_clearsky_agenda, propmat_clearsky_agenda__OnTheFly ) abs_linesReadFromHitran( abs_lines, "/RT/HITRAN/HITRAN2012.par", 3.880627143214052e+14, 3.961610390054004e+14 ) abs_speciesSet( species=[ "H2O-PWR98", "O2-PWR93" ] ) # This separates the lines into the different tag groups and creates # the workspace variable `abs_lines_per_species': abs_lines_per_speciesCreateFromLines # Dimensionality of the atmosphere AtmosphereSet1D VectorNLogSpace( p_grid, 200, 10, 10 ) # Atmospheric profiles AtmRawRead( t_field_raw, z_field_raw, vmr_field_raw, abs_species, "testdata/tropical" ) # Now interpolate all the raw atmospheric input onto the pressure # grid and create the atmospheric variables `t_field', `z_field', `vmr_field' AtmFieldsCalc # Initialize the input variables of abs_coefCalc from the Atm fields: AbsInputFromAtmFields # Create the frequency grid `f_grid': VectorNLinSpace( f_grid, 25000,3.880627143214052e+14, 3.961610390054004e+14 ) IndexSet(stokes_dim, 1) # Calculate absorption coefficients, both total (`abs_coef') and # separately for each tag group (`abs_coef_per_species'): atmfields_checkedCalc abs_xsec_agenda_checkedCalc AgendaExecute(abs_xsec_agenda) abs_coefCalcFromXsec # Optionally write these to files: WriteXML( output_file_format,abs_coef_per_species) } > On Feb 16, 2016, at 3:15 AM, Richard Larsson wrote: > > Dear Pengwang Zhai, > > I think we still have what you are looking for in ARTS. > > The variable you are actually interested in is not abs_coef, but > abs_coef_per_species. > > The way to create this is to first run abs_xsec_agenda and then > abs_coefCalcFromXsec. > > I think your code should only change from: > > abs_coefCalc > > to > > abs_xsec_agendaExecute > abs_coefCalcFromXsec > > Now abs_coef_per_species is an array of matrices. The array-size is the > species and the matrices are the size of f_grid and p_grid. Save this and do > what you want with it. > > This said, there is potentially a few other changes depending on what version > you are using and what species you are interested in. You will want to run > jacobianOff, for instance, if you are using the dev-branch. > > Cheers, > //Richard > > 2016-02-15 22:11 GMT+01:00 Pengwang Zhai : > Thanks, Jana. > > > Note that for deriving abs_coef for this, you need to sum up over all > > species (i.e. over the 0th dimension of propmat_clearsky_field. > > This is exactly what I wanted to do within arts to get “abs_coef”. If it is > not possible with arts, I will use matlab to do this. > > The three dimensions are: [species, f_grid, p_grid] > > Cheers, > > PZ > > > > On Feb 15, 2016, at 3:47 PM, Jana Mendrok wrote: > > > > Hi, > > > > what do you intend to do with abs_coeff_user? > > Do you really process this further within ARTS itself? only then it makes > > sense to process propmat_clearsky_field into a Tensor3*, i think. > > Else, I strongly recommend to do any re-shaping / reduction outside of > > ARTS; other programming languages are much better suited for this kind of > > task (e.g. you can use the matlab-interface atmlab to have easy access to > > ARTS output. or the python interface typhon). > > > > abs_coef was a Matrix of dimension [f_grid, abs_p] (and > > abs_coef_per_species an Array holding one abs_coef matrix per defined > > abs_species). > > propmat_clearsky_field is a Tensor7 of dimension [species, f_grid, > > stokes_dim, stokes_dim, p_grid, lat_grid, lon_grid]. > > > > That is, for reducing propmat_clearsky_field to what was > > abs_coef_per_species before would be > > propmat_clearsky_field[:, :, 0, 0, :, lat_index, lon_index] (in case of > > 0-indexed varibales; in case of a 1D calculation furthermore > > lat_index=lon_index=0). As far as I know, that's not possible (at least not > > easily possible) within ARTS itself. > > > > Note that for deriving abs_coef for this, you need to sum up over all > > species (i.e. over the 0th dimension of propmat_clearsky_field. >
Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Dear Pengwang Zhai, I think we still have what you are looking for in ARTS. The variable you are actually interested in is not abs_coef, but abs_coef_per_species. The way to create this is to first run abs_xsec_agenda and then abs_coefCalcFromXsec. I think your code should only change from: abs_coefCalc to abs_xsec_agendaExecute abs_coefCalcFromXsec Now abs_coef_per_species is an array of matrices. The array-size is the species and the matrices are the size of f_grid and p_grid. Save this and do what you want with it. This said, there is potentially a few other changes depending on what version you are using and what species you are interested in. You will want to run jacobianOff, for instance, if you are using the dev-branch. Cheers, //Richard 2016-02-15 22:11 GMT+01:00 Pengwang Zhai : > Thanks, Jana. > > > Note that for deriving abs_coef for this, you need to sum up over all > species (i.e. over the 0th dimension of propmat_clearsky_field. > > This is exactly what I wanted to do within arts to get “abs_coef”. If it > is not possible with arts, I will use matlab to do this. > > The three dimensions are: [species, f_grid, p_grid] > > Cheers, > > PZ > > > > On Feb 15, 2016, at 3:47 PM, Jana Mendrok > wrote: > > > > Hi, > > > > what do you intend to do with abs_coeff_user? > > Do you really process this further within ARTS itself? only then it > makes sense to process propmat_clearsky_field into a Tensor3*, i think. > > Else, I strongly recommend to do any re-shaping / reduction outside of > ARTS; other programming languages are much better suited for this kind of > task (e.g. you can use the matlab-interface atmlab to have easy access to > ARTS output. or the python interface typhon). > > > > abs_coef was a Matrix of dimension [f_grid, abs_p] (and > abs_coef_per_species an Array holding one abs_coef matrix per defined > abs_species). > > propmat_clearsky_field is a Tensor7 of dimension [species, f_grid, > stokes_dim, stokes_dim, p_grid, lat_grid, lon_grid]. > > > > That is, for reducing propmat_clearsky_field to what was > abs_coef_per_species before would be > > propmat_clearsky_field[:, :, 0, 0, :, lat_index, lon_index] (in case of > 0-indexed varibales; in case of a 1D calculation furthermore > lat_index=lon_index=0). As far as I know, that's not possible (at least not > easily possible) within ARTS itself. > > > > Note that for deriving abs_coef for this, you need to sum up over all > species (i.e. over the 0th dimension of propmat_clearsky_field. > > > > Best wishes, > > Jana > > > > > > ps. > > *by the way, what are the 3 dimensions? neither abs_coeff nor > abs_coef_per_species is (or has been for a long time) a Tensor3. That is, > you must have post-processed abs_coef(_per_species) anyways? > > > > On Mon, Feb 15, 2016 at 6:09 PM, Pengwang Zhai wrote: > > Thanks, Jana. Too bad that the only arts feature that I am using is now > obsolete. > > > > Now given propmat_clearsky_field, can I somehow obtain abs_coeff from it? > > > > I used the following commands to create abs_coeff_user, which is the > absorption coefficients per specie, > > > > Tensor3Create(abs_coeff_user) > > Reduce(abs_coeff_user,propmat_clearsky_field) > > > > can I add the coefficients per specie abs_coeff_user together to create > abs_coeff within arts? > > > > I could do this with other tools but wish to know how to do in arts, > which is more convenient. > > > > Thanks, > > > > Pengwang > > > > > > > On Feb 15, 2016, at 12:00 PM, Jana Mendrok > wrote: > > > > > > Dear Pengwang, > > > > > > please take a look at the workspace variable propmat_clearsky_field > (and the workspace method propmat_clearsky_fieldCalc, that calculates this > variables). Could they probably provide the output you need? > > > > > > abs_coef and its *Calc method are obsolete and not supported anymore. > > > > > > Best wishes, > > > Jana > > > > > > > > > On Mon, Feb 15, 2016 at 4:30 PM, Pengwang Zhai > wrote: > > > Hi, > > > > > > I used earlier version of ARTS to calculate the total absorption > coefficients with: > > > > > > abs_coefCalc > > > > > > and found it is very useful. Now with the new version, this does not > work any more. After reading the change log I found that it is replaced with > > > > > > abs_coefCalcFromXsec > > > > > > However, after numerous attemps I could not make this method working > for me. Would you please provide a template arts file on the usage of this > method? > > > > > > Thanks very much and hope all the best, > > > > > > Yours > > > > > > ___ > > > arts_users.mi mailing list > > > arts_users.mi@lists.uni-hamburg.de > > > https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi > > > > > > > > > > > > -- > > > = > > > Jana Mendrok, Ph.D. (Project Assistent) > > > Chalmers University of Technology > > > Earth and Space Sciences > > > SE-412 96 Gothenburg, Sweden > > > > > > Phone : +4
Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Thanks, Jana. > Note that for deriving abs_coef for this, you need to sum up over all species > (i.e. over the 0th dimension of propmat_clearsky_field. This is exactly what I wanted to do within arts to get “abs_coef”. If it is not possible with arts, I will use matlab to do this. The three dimensions are: [species, f_grid, p_grid] Cheers, PZ > On Feb 15, 2016, at 3:47 PM, Jana Mendrok wrote: > > Hi, > > what do you intend to do with abs_coeff_user? > Do you really process this further within ARTS itself? only then it makes > sense to process propmat_clearsky_field into a Tensor3*, i think. > Else, I strongly recommend to do any re-shaping / reduction outside of ARTS; > other programming languages are much better suited for this kind of task > (e.g. you can use the matlab-interface atmlab to have easy access to ARTS > output. or the python interface typhon). > > abs_coef was a Matrix of dimension [f_grid, abs_p] (and abs_coef_per_species > an Array holding one abs_coef matrix per defined abs_species). > propmat_clearsky_field is a Tensor7 of dimension [species, f_grid, > stokes_dim, stokes_dim, p_grid, lat_grid, lon_grid]. > > That is, for reducing propmat_clearsky_field to what was abs_coef_per_species > before would be > propmat_clearsky_field[:, :, 0, 0, :, lat_index, lon_index] (in case of > 0-indexed varibales; in case of a 1D calculation furthermore > lat_index=lon_index=0). As far as I know, that's not possible (at least not > easily possible) within ARTS itself. > > Note that for deriving abs_coef for this, you need to sum up over all species > (i.e. over the 0th dimension of propmat_clearsky_field. > > Best wishes, > Jana > > > ps. > *by the way, what are the 3 dimensions? neither abs_coeff nor > abs_coef_per_species is (or has been for a long time) a Tensor3. That is, you > must have post-processed abs_coef(_per_species) anyways? > > On Mon, Feb 15, 2016 at 6:09 PM, Pengwang Zhai wrote: > Thanks, Jana. Too bad that the only arts feature that I am using is now > obsolete. > > Now given propmat_clearsky_field, can I somehow obtain abs_coeff from it? > > I used the following commands to create abs_coeff_user, which is the > absorption coefficients per specie, > > Tensor3Create(abs_coeff_user) > Reduce(abs_coeff_user,propmat_clearsky_field) > > can I add the coefficients per specie abs_coeff_user together to create > abs_coeff within arts? > > I could do this with other tools but wish to know how to do in arts, which is > more convenient. > > Thanks, > > Pengwang > > > > On Feb 15, 2016, at 12:00 PM, Jana Mendrok wrote: > > > > Dear Pengwang, > > > > please take a look at the workspace variable propmat_clearsky_field (and > > the workspace method propmat_clearsky_fieldCalc, that calculates this > > variables). Could they probably provide the output you need? > > > > abs_coef and its *Calc method are obsolete and not supported anymore. > > > > Best wishes, > > Jana > > > > > > On Mon, Feb 15, 2016 at 4:30 PM, Pengwang Zhai wrote: > > Hi, > > > > I used earlier version of ARTS to calculate the total absorption > > coefficients with: > > > > abs_coefCalc > > > > and found it is very useful. Now with the new version, this does not work > > any more. After reading the change log I found that it is replaced with > > > > abs_coefCalcFromXsec > > > > However, after numerous attemps I could not make this method working for > > me. Would you please provide a template arts file on the usage of this > > method? > > > > Thanks very much and hope all the best, > > > > Yours > > > > ___ > > arts_users.mi mailing list > > arts_users.mi@lists.uni-hamburg.de > > https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi > > > > > > > > -- > > = > > Jana Mendrok, Ph.D. (Project Assistent) > > Chalmers University of Technology > > Earth and Space Sciences > > SE-412 96 Gothenburg, Sweden > > > > Phone : +46 (0)31 772 1883 > > = > > > > > -- > = > Jana Mendrok, Ph.D. (Project Assistent) > Chalmers University of Technology > Earth and Space Sciences > SE-412 96 Gothenburg, Sweden > > Phone : +46 (0)31 772 1883 > = ___ arts_users.mi mailing list arts_users.mi@lists.uni-hamburg.de https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi
Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Hi, what do you intend to do with abs_coeff_user? Do you really process this further within ARTS itself? only then it makes sense to process propmat_clearsky_field into a Tensor3*, i think. Else, I strongly recommend to do any re-shaping / reduction outside of ARTS; other programming languages are much better suited for this kind of task (e.g. you can use the matlab-interface atmlab to have easy access to ARTS output. or the python interface typhon). abs_coef was a Matrix of dimension [f_grid, abs_p] (and abs_coef_per_species an Array holding one abs_coef matrix per defined abs_species). propmat_clearsky_field is a Tensor7 of dimension [species, f_grid, stokes_dim, stokes_dim, p_grid, lat_grid, lon_grid]. That is, for reducing propmat_clearsky_field to what was abs_coef_per_species before would be propmat_clearsky_field[:, :, 0, 0, :, lat_index, lon_index] (in case of 0-indexed varibales; in case of a 1D calculation furthermore lat_index=lon_index=0). As far as I know, that's not possible (at least not easily possible) within ARTS itself. Note that for deriving abs_coef for this, you need to sum up over all species (i.e. over the 0th dimension of propmat_clearsky_field. Best wishes, Jana ps. *by the way, what are the 3 dimensions? neither abs_coeff nor abs_coef_per_species is (or has been for a long time) a Tensor3. That is, you must have post-processed abs_coef(_per_species) anyways? On Mon, Feb 15, 2016 at 6:09 PM, Pengwang Zhai wrote: > Thanks, Jana. Too bad that the only arts feature that I am using is now > obsolete. > > Now given propmat_clearsky_field, can I somehow obtain abs_coeff from it? > > I used the following commands to create abs_coeff_user, which is the > absorption coefficients per specie, > > Tensor3Create(abs_coeff_user) > Reduce(abs_coeff_user,propmat_clearsky_field) > > can I add the coefficients per specie abs_coeff_user together to create > abs_coeff within arts? > > I could do this with other tools but wish to know how to do in arts, which > is more convenient. > > Thanks, > > Pengwang > > > > On Feb 15, 2016, at 12:00 PM, Jana Mendrok > wrote: > > > > Dear Pengwang, > > > > please take a look at the workspace variable propmat_clearsky_field (and > the workspace method propmat_clearsky_fieldCalc, that calculates this > variables). Could they probably provide the output you need? > > > > abs_coef and its *Calc method are obsolete and not supported anymore. > > > > Best wishes, > > Jana > > > > > > On Mon, Feb 15, 2016 at 4:30 PM, Pengwang Zhai wrote: > > Hi, > > > > I used earlier version of ARTS to calculate the total absorption > coefficients with: > > > > abs_coefCalc > > > > and found it is very useful. Now with the new version, this does not > work any more. After reading the change log I found that it is replaced with > > > > abs_coefCalcFromXsec > > > > However, after numerous attemps I could not make this method working for > me. Would you please provide a template arts file on the usage of this > method? > > > > Thanks very much and hope all the best, > > > > Yours > > > > ___ > > arts_users.mi mailing list > > arts_users.mi@lists.uni-hamburg.de > > https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi > > > > > > > > -- > > = > > Jana Mendrok, Ph.D. (Project Assistent) > > Chalmers University of Technology > > Earth and Space Sciences > > SE-412 96 Gothenburg, Sweden > > > > Phone : +46 (0)31 772 1883 > > = > > -- = Jana Mendrok, Ph.D. (Project Assistent) Chalmers University of Technology Earth and Space Sciences SE-412 96 Gothenburg, Sweden Phone : +46 (0)31 772 1883 = ___ arts_users.mi mailing list arts_users.mi@lists.uni-hamburg.de https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi
Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Thanks, Jana. Too bad that the only arts feature that I am using is now obsolete. Now given propmat_clearsky_field, can I somehow obtain abs_coeff from it? I used the following commands to create abs_coeff_user, which is the absorption coefficients per specie, Tensor3Create(abs_coeff_user) Reduce(abs_coeff_user,propmat_clearsky_field) can I add the coefficients per specie abs_coeff_user together to create abs_coeff within arts? I could do this with other tools but wish to know how to do in arts, which is more convenient. Thanks, Pengwang > On Feb 15, 2016, at 12:00 PM, Jana Mendrok wrote: > > Dear Pengwang, > > please take a look at the workspace variable propmat_clearsky_field (and the > workspace method propmat_clearsky_fieldCalc, that calculates this variables). > Could they probably provide the output you need? > > abs_coef and its *Calc method are obsolete and not supported anymore. > > Best wishes, > Jana > > > On Mon, Feb 15, 2016 at 4:30 PM, Pengwang Zhai wrote: > Hi, > > I used earlier version of ARTS to calculate the total absorption coefficients > with: > > abs_coefCalc > > and found it is very useful. Now with the new version, this does not work > any more. After reading the change log I found that it is replaced with > > abs_coefCalcFromXsec > > However, after numerous attemps I could not make this method working for me. > Would you please provide a template arts file on the usage of this method? > > Thanks very much and hope all the best, > > Yours > > ___ > arts_users.mi mailing list > arts_users.mi@lists.uni-hamburg.de > https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi > > > > -- > = > Jana Mendrok, Ph.D. (Project Assistent) > Chalmers University of Technology > Earth and Space Sciences > SE-412 96 Gothenburg, Sweden > > Phone : +46 (0)31 772 1883 > = ___ arts_users.mi mailing list arts_users.mi@lists.uni-hamburg.de https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi
Re: [arts-users] calculate absorption coefficients from abs_coefCalc
Dear Pengwang, please take a look at the workspace variable propmat_clearsky_field (and the workspace method propmat_clearsky_fieldCalc, that calculates this variables). Could they probably provide the output you need? abs_coef and its *Calc method are obsolete and not supported anymore. Best wishes, Jana On Mon, Feb 15, 2016 at 4:30 PM, Pengwang Zhai wrote: > Hi, > > I used earlier version of ARTS to calculate the total absorption > coefficients with: > > abs_coefCalc > > and found it is very useful. Now with the new version, this does not work > any more. After reading the change log I found that it is replaced with > > abs_coefCalcFromXsec > > However, after numerous attemps I could not make this method working for > me. Would you please provide a template arts file on the usage of this > method? > > Thanks very much and hope all the best, > > Yours > > ___ > arts_users.mi mailing list > arts_users.mi@lists.uni-hamburg.de > https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi > -- = Jana Mendrok, Ph.D. (Project Assistent) Chalmers University of Technology Earth and Space Sciences SE-412 96 Gothenburg, Sweden Phone : +46 (0)31 772 1883 = ___ arts_users.mi mailing list arts_users.mi@lists.uni-hamburg.de https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi
[arts-users] calculate absorption coefficients from abs_coefCalc
Hi, I used earlier version of ARTS to calculate the total absorption coefficients with: abs_coefCalc and found it is very useful. Now with the new version, this does not work any more. After reading the change log I found that it is replaced with abs_coefCalcFromXsec However, after numerous attemps I could not make this method working for me. Would you please provide a template arts file on the usage of this method? Thanks very much and hope all the best, Yours ___ arts_users.mi mailing list arts_users.mi@lists.uni-hamburg.de https://mailman.rrz.uni-hamburg.de/mailman/listinfo/arts_users.mi