Hi Pauline, Including qpack mailing list as this of general interest.
Yes, the handling of retrieval unit can be a bit confusing. So let me try to explain things. A repetition but to be complete: Gas a priori is always given in VMR. If the retrieval unit is not 'vmr', qpack automaticaly converts the VMR to the selected unit when creating x_a. Regarding input, you need only to adopt the covariance matrix if you change retrieval unit. (There is no 100% safe way to do the conversion automatically. To answer your question, qpack does not convert your covariance matrix.) If your a priori is 100 ppm, and a priori uncertainty is 50 ppm, e.g. the standard deviation for rel is 0.5. For logrel you probably also use 0.5, but this could be discussed. Since some time, qpack2 output the retrieved state, x, following the selected unit. The same applies to the error covariance matrices, Jacobian and A. So on this side, everything follows the selected unit. All this is automatic for the defined units: vmr, nd, rel and logrel. If you want to use any other unit, you need to map things to one of the supported units (which is normally possible). Or you need to hack the code, as you have started to do. However, the natural places to add support for new units are arts_oem_init, arts_oem and arts_x2QR (I could miss something here). Please notye that I will not have time to provide support for such hacks. Some day maybe I will add this myself, as this question has appeared before, but that is not top priority for me personally. Bye, Patrick On 06/11/15 08:43, Pauline Martinet wrote: > Hi Patrick, > > I think I don't understand neither :-) > > So as I was doing before, I have to give the gas (water vapour) in > vmr (ok for this point). > > Does the other unit (rel, vmr) is only given for the covariance > matrix (I thought the "unit" argument was refering to the gas unit > but now I assume this is not the case) ? > > So, for example, if my covariance matrix is in relative humidity, > does qpack handle the differences in units between the B matrix and > the control vector x that will be given in VMR ? > > When you look for the zero of the gradient of the cost function J > (during the minimisation): > > grad_J= B-1(x-xb) + HTR-1(H(x)-y°) > > all the units between the B matrix, the Jacobians (HT) and the > vectors x and xb should agree. > > Thus I assume the jacobians unit is K/vmr whereas the B matrix is > given in the same unit as the "UNIT" argument (rel, vmr, logrel) > > Does qpack internally make the conversion between the different units > ? > > I ask you that because my B matrix for water vapour is in kg/kg, thus > I modified the oem.m routine to convert the control vector x and the > Jacobians to kg/kg and K/(kg/kg) respectively before computing the > cost function (to check if we found a minimum or not) but then, of > course, when I need to recompute the H(x) = new TB simulation with > ARTS with the new vector I use the good unit for ARTS, i.e VMR. > > Thank you for your help Patrick. > > Best regards, > > Pauline > > ----- Météo-France ----- Dr. Pauline Martinet Chercheur > CNRM/GMEI/LISA [email protected] Fixe : +33 561079031 Site > web: www.sites.google.com/site/martinetpauline31 > > ----- Mail original ----- De: "Patrick Eriksson" > <[email protected]> À: "Pauline Martinet" > <[email protected]> Envoyé: Jeudi 11 Juin 2015 07:53:50 > Objet: Re: [Qpack] unity for humidity profile and jacobians > > Hi Pauline, > > I not sure if I understand your question here. So I just state some > facts: > > * Gas a priori profiles shall always be given in VMR. > > * Unit ('rel', 'vmr' ...) and covariance matrix must match. > > * There is no direct way to work with RH. You need to do a trick > like the one I described. > > Bye, > > Patrick > > > On 06/10/15 10:39, Pauline Martinet wrote: >> Hi Patrick, >> >> Thank you for the warning. >> >> I have just seen in the arts-users-guide 2.2.0 page 114 that the >> jacobians can be computed in log rel or rel >> >> and also in qinfo(@qarts): >> >> <UNIT> Retrieval unit. Allowed choices are 'rel', 'vmr', 'nd', and >> | | 'logrel'. For some more information: >> | | arts -d jacobianAddAbsSpecies. >> | | >> >> I was just wondering if my a priori error covariance matrix is >> given in relative humidity can I compute the jacobians in relative >> humidity too to have the good units when computing the cost >> function (but the x profile should also be in relative humidity in >> this case..) >> >> Best regards, >> >> Pauline >> >> ----- Météo-France ----- Dr. Pauline Martinet Chercheur >> CNRM/GMEI/LISA [email protected] Fixe : +33 561079031 Site >> web: www.sites.google.com/site/martinetpauline31 >> >> ----- Mail original ----- De: "Patrick Eriksson" >> <[email protected]> À: "Pauline Martinet" >> <[email protected]>, [email protected] Envoyé: Mercredi >> 10 Juin 2015 10:32:37 Objet: Re: [Qpack] unity for humidity profile >> and jacobians >> >> Hi Pauline, >> >> Relative humidity (RH) is not supported in qpack and arts. What >> documentation indicates the opposite? >> >> One reason for not supporting RH, is that this would give a link >> between humidity unit and temperature jacobians. If the state >> variable for water vapour is RH, the temperature jacobians must be >> adjusted. So a warning if you plan to combine RH with temperature >> retrievals. >> >> If not, you can do a trick that I have used when trying out some >> RH retrievals. Set the a priori profile to match 50% RH. If you use >> rel, and the retrieved value is 2, you have a RH of 100% etc. You >> can of course also use logrel, but then 50% and 100% RH corresponds >> to 0 and log(2), respectively. >> >> And if using RH, an important aspect is how to treat the >> stratosphere. RH works poorly above the tropopause. >> >> Bye, >> >> Patrick >> >> >> >> On 06/10/15 10:07, Pauline Martinet wrote: >>> Hi everybody, >>> >>> I am not sure about something. >>> >>> I am using qpack2 to retrieve humidity profile. >>> >>> I would like to do the retrieval on log of relative humidity. I >>> can see this option in the documentation I just have to change >>> Unit from vmr to relative humidity. >>> >>> However, does it mean the humidity profile provided to ARTS >>> through qpack (Q.ABS_SPECIES(2).ATMDATA.DATA field) should also >>> be given in log relative humidity ? >>> >>> Thank you very much for this information. >>> >>> Best regards, >>> >>> Pauline >>> >>> >>> ----- Météo-France ----- Dr. Pauline Martinet Chercheur >>> CNRM/GMEI/LISA [email protected] Fixe : +33 561079031 >>> Site web: www.sites.google.com/site/martinetpauline31 >>> <https://www.sites.google.com/site/martinetpauline31/> >>> >>> >>> >>> _______________________________________________ qpack mailing >>> list [email protected] >>> https://www.sat.ltu.se/mailman/listinfo/qpack >>> _______________________________________________ qpack mailing list [email protected] https://www.sat.ltu.se/mailman/listinfo/qpack
