Dear Ole Martin, 

Thank you for your quick answer. 

I probably made a mistake on the definition of the frequency grid. 

H.F_BACKEND is defined as a vector of 14 values (in the capt structure that is 
an input to my Q file see attached file) : 
[22.24 , 23.04 , 23.84 , 25.44 , 26.24 , 27.84 , 31.40, 51.26 , 52.28 , 53.86 , 
54.94 , 56.66 , 57.3 , 58] 

Whereas Q.F_GRID is defined as : 
Q.F_GRID = linspace (fc(1)-df(1)*0.51, fc(end)+df(end)*0.51,100)'; 

with df the spectral bandwith of the receivers : 
df = 1e6 * [230 230 230 230 230 230 230 230 230 230 230 600 1000 2000 ]'; 

I thought Q.F_GRID would define the spectral resolution of the line-by-line 
calculation of ARTS but it is not clear for me... 

By the way I have now a second problem. I am comparing ARTS with two radiative 
transfer models and we have a 1.5 K difference in the most opaque channels. 
Theses channels should see approximately the same values as the temperature 
profile in the lowest layers. In my case the lowest values of my temperature 
profile are: 
285.0548 
284.9542 
284.7708 

for the first three atmospheric levels 

but my brightness temperatures are too low (these are the most opaque channels 
of the O2 band at 56.66, 57.3 and 58 GHz): 
283.6000 
283.8423 
283.9169 

it seems like my sensor is upper in the atmosphere but my Q.Z_surface is set to 
0. 

I am also working in 1D but as I created the ATMDATA of the temperature profile 
by reading the climatological file cira86 I have a 4D field 
with 3 grids. I am not sure this is good neither.. 

Sorry for all these questions but thank you very much for all your help. 

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: "Ole Martin Christensen" <[email protected]> 
À: "Pauline Martinet" <[email protected]>, [email protected] 
Envoyé: Mardi 19 Mai 2015 10:09:32 
Objet: RE: monochromatic pencil beam calculation 

What frequency grid are you running on in the two cases? If you have sensor_do 
and backend_do your output frequencies will be determined by you instrument 
backend, while if you have sensor_do = false it will be given by f_grid. 

Could you attach your Q file? 

Ole Martin 

From: [email protected] [[email protected]] on behalf of 
Pauline Martinet [[email protected]] 
Sent: Tuesday, May 19, 2015 8:50 AM 
To: [email protected] 
Subject: [Qpack] monochromatic pencil beam calculation 

Hi everybody, 

I am used to simulate ground-based microwave spectra with qpack (22GHz to 58 
GHz). 

I normally define a double side band average but now I would like to test my 
simulations with the assumption of monochromatic pencil beam. 

I keep the same qpack code and I only changed the variable Q.SENSOR_DO to false 
instead of true. However I obtain unreasonable 
brightness temperature in the most opaque channels of the O2 absorption band. 

Here is the spectrum that I simulate with the double side band average: 

37.1335 
36.2098 
31.8496 
23.8967 
21.4893 
18.8657 
17.9993 
109.5801 
151.6191 
249.6631 
278.5141 
283.6000 
283.8424 
283.9169 

whereas this is what I obtain with a monochromatic pencil beam calculation: 
36.9074 
37.6239 
36.9598 
35.3325 
33.2136 
30.9684 
28.8201 
26.8801 
25.1884 
23.7449 
22.5305 
21.5187 
20.6823 
19.9959 

I obtain 19K instead of 283 K for the most opaque channels, this is weird (the 
last 7 channels). 

Does anyone see what the problem is, I probably did not define all the 
variables needed, I just turned out the SENSOR_DO variable.. 

Thank you very much for your help. 

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 


%% Modification de la fonction q pour tenir compte de la largeur de bande df

function [Q,O,RST, RSgph, RSp] = M2_q_MWR_T(Y,jour,capt,path_arts,tp)

%
%- Atmlab settings
%

arts_xmldata_path = path_arts.xmldata_path;
arts_includes     = path_arts.includes;
arts_path         = path_arts.arts;

if isnan( arts_xmldata_path )                                               %&%
  error( 'You need to set ARTS_XMLDATA_PATH to run this file.' );           %&%
end                                                                         %&%
if isnan( arts_includes )                                                   %&%
  error( 'You need to ARTS_INCLUDES to run this file.' );                   %&%
end                                                                         %&%

%- Init Q
%
Q = qarts;


%- General 
%
Q.INCLUDES            = { fullfile( arts_includes, 'general.arts' ), ...
                          fullfile( arts_includes, 'agendas.arts' ),...
                          fullfile( arts_includes, 'continua.arts' ), ...
                          fullfile( arts_includes, 'planet_earth.arts' ) };
                      
%   Q.INCLUDES            = { fullfile( arts_includes, 'general.arts' ), ...
%                             fullfile( arts_includes, 'continua.arts' )};                      
                      
Q.ATMOSPHERE_DIM      = 1;
Q.STOKES_DIM          = 1;
%Q.J_DO                = true;
Q.CLOUDBOX_DO         = false;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Q.PPATH_AGENDA               = { 'ppath_agenda__FollowSensorLosPath'   };
Q.PPATH_STEP_AGENDA          = { 'ppath_step_agenda__GeometricPath'    };
Q.BLACKBODY_RADIATION_AGENDA = { 'blackbody_radiation_agenda__Planck'  };
Q.IY_SPACE_AGENDA            = { 'iy_space_agenda__CosmicBackground'   };
Q.IY_SURFACE_AGENDA          = { 'iy_surface_agenda__UseSurfaceRtprop' };
Q.IY_MAIN_AGENDA= {'iy_main_agenda__Emission' };
Q.WSMS_BEFORE_RTE{1} ='propmat_clearsky_fieldCalc';
Q.WSMS_BEFORE_RTE{2} = 'WriteXML("ascii",propmat_clearsky_field)';

%- Radiative transfer
%
Q.IY_UNIT              = 'RJBT'; 
%Q.Y_UNIT              = 'RJBT'; 
Q.YCALC_WSMS          = { 'yCalc' };


%
Q.PPATH_LMAX          = 250;
%Q.PPATH_STEP_AGENDA   = { 'ppath_stepGeometric' };


%- Surface
%
%Q.R_GEOID             = constants( 'EARTH_RADIUS' );
Q.Z_SURFACE           = capt.alt; 

%- Absorption
%
Q.ABS_LINES           = [];
Q.ABS_LINES_FORMAT      = 'None';
%
% The option 'OnTheFly' is more accurate, and here also faster!
if 1
  Q.ABSORPTION          = 'OnTheFly';
else
  Q.ABSORPTION          = 'LoadTable';
  Q.ABS_LOOKUP          = fullfile( pwd, 'abs_lookup.xml' ); 
end


%- GRIDS
%
%Q.P_GRID                = z2p_simple( -250 : 100 : z_toa )';%153 el pour z_toa=15km
Q.P_GRID=tp.pressures*100;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% define spectrometer passbands 
fc = 1e9 * capt.freq';
df = 1e6 * [230 230 230 230 230 230 230 230 230 230 230 600 1000 2000 ]';

%- Sensor variables 
%
H                     = qartsSensor;
%
Q.ANTENNA_DIM         = 1;
H.BACKEND_DO          = true;
%
H.F_BACKEND                = fc ;

%ema %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%bandwith RPG [ 230 230 230 230 600 1000 2000] in MHz
B.name        = 'Spectrometer channel response function';
B.gridnames   = {'Frequency'};
B.dataname    = 'Response';
B.data        = [1 1];

% here we need to define one response for each channel but only the width
% differs

%%A COMMENTER SI ON VEUT SIMULER UN MONOCHOMATIC PENCIL
for i = 1:length(df)
    B.grids = { df(i)/2*[-1 1]};
    H.BACKEND_CHANNEL_RESPONSE{i} =B;
end
clear B;
% 
H.SENSOR_NORM         = true;
Q.SENSOR_RESPONSE     = H;

 % frequency grid
 Q.F_GRID  = linspace (fc(1)-df(1)*0.51, fc(end)+df(end)*0.51,100)';

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 

Q.MBLOCK_ZA_GRID=0;
Q.MBLOCK_AA_GRID=[];

Q.SENSOR_POS = capt.alt;
Q.SENSOR_LOS = [0 60 70.8 75.6 78.6 81.6 83.4 84.6 85.2 85.8 90]';
%Q.SENSOR_LOS = [0 48 60 70.8 79.8 84.6 90]';

Q.SENSOR_DO           = false;
%- Thermal noise 
%
%f          = qarts_get(H.F_BACKEND);
f          = H.F_BACKEND;

%%%%%%%%%%%%%%%%%%%%%%%%%
%MEAS COVMAT
%%%%%%%%%%%%%%%%%%%%%%%%%

%Q.TNOISE_C = covmat1d_from_cfun(repmat(f,length(Q.MBLOCK_ZA_GRID),1),[],'drc'); %'drc'=pas de corr�lation

%cl=0.12*(f(2)-f(1));
%Q.TNOISE_C=covmat1d_from_cfun(repmat(f,length(Q.MBLOCK_ZA_GRID),1),[],'exp',cl,0.05);
%%%%%%%%%%%%%%%%%%%%%%%%%%
%
clear H f

%- Define L2 structure (beside retrieval quantities above)
%
Q.L2_EXTRA = { 'cost', 'dx', 'xa', 'y', 'yf', 'bl', 'ptz', 'mresp', ...
               'e', 'eo', 'es', 'date','A','tnoise' };

%  Temperature Retrieval and HSE

Q.T.ATMDATA = gf_artsxml( fullfile( arts_xmldata_path, 'climatology', ...
                'cira86', 'cira86.t.xml' ), 'Temperature', 't_field' );
		
Q.T.RETRIEVE = false;
Q.T.L2       = false;

Q.HSE.ON       = true;
Q.HSE.ACCURACY = 0.1;

if Q.HSE.ON == false
  Q.Z_ATMDATA = gf_artsxml( fullfile( arts_xmldata_path, 'climatology', ...
                        'cira86', 'cira86.z.xml' ), 'Altitudes', 'z_field' );
  
end

%
%- Species
%
Q.ABS_SPECIES(1).TAG      = {'O2-PWR93'};
%Q.ABS_SPECIES(1).TAG      = {'O2-MPM93'};
Q.ABS_SPECIES(1).RETRIEVE = false; %%modif Pauline
Q.ABS_SPECIES(1).ATMDATA  = gf_artsxml(fullfile( arts_xmldata_path, ...
                              'atmosphere/fascod', ...
                              'midlatitude-winter.O2.xml'),'O2','vmr_field');
                                                                                               
%
Q.ABS_SPECIES(2).TAG      = {'H2O-PWR98'};
Q.ABS_SPECIES(2).RETRIEVE = false;
Q.ABS_SPECIES(2).ATMDATA  = gf_artsxml(fullfile( arts_xmldata_path, ...
                              'atmosphere/fascod', ...
                              'midlatitude-winter.H2O.xml'),'H2O','vmr_field');

Q.ABS_SPECIES(3).TAG      = {'N2-SelfContMPM93'};
%Q.ABS_SPECIES(3).TAG      = {'N2'};
Q.ABS_SPECIES(3).RETRIEVE = false;
Q.ABS_SPECIES(3).ATMDATA  = gf_artsxml(fullfile( arts_xmldata_path, ...
                              'atmosphere/fascod', ...
                              'midlatitude-winter.N2.xml'),'N2','vmr_field');
                          
%%%%%%%AJOUT DE LEAU LIQUIDE DANS LES VARIABLES DENTREE DE ARTS
%Q.ABS_SPECIES(4).TAG      = {'liquidcloud-MPM93'};
%Q.ABS_SPECIES(4).RETRIEVE = false;
%Q.ABS_SPECIES(4).ATMDATA  =gf_artsxml(fullfile( arts_xmldata_path, ...
%                              'atmosphere/fascod', ...
%                              'midlatitude-winter.H2O.xml'),'H2O','vmr_field');                          
                          
%%%%%%%%%%%%%%%%%%%%%%%%%%%%		
%RS as apriori
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

[Q.T.ATMDATA.GRID1,Q.T.ATMDATA.DATA,RST,RSgph,RSp]=APRIORI_RS_T_CNRM(jour,tp);
[Q.ABS_SPECIES(2).ATMDATA.GRID1,Q.ABS_SPECIES(2).ATMDATA.DATA,RSH,RSgph,RSp]=APRIORI_RS_H_CNRM(jour,tp);
%[Q.ABS_SPECIES(4).ATMDATA.GRID1,Q.ABS_SPECIES(4).ATMDATA.DATA,RSql,RSgph,RSp]=APRIORI_RS_LWC_CNRM(jour,tp);
%RST=0;
%RSgph=0;
%RSp=0;

for lt=1:35 
Q.T.ATMDATA.DATA(:,lt,1,1)=Q.T.ATMDATA.DATA(:,1,1,1);
end
for doy=1:14 
Q.T.ATMDATA.DATA(:,1:35,1,doy)=Q.T.ATMDATA.DATA(:,1:35,1,1);
end

%- OEM 
%
O = qp2_l2( Q );
%
O.linear = false;
%
if ~O.linear 
  O.itermethod = 'GN';
  O.stop_dx    = 0.001;
  O.maxiter  = 1;
  O.ga_start = 100;
  O.ga_max   = 1e7;
  O.ga_factor_ok = 10;
  O.ga_factor_not_ok = 10;
end     
_______________________________________________
qpack mailing list
[email protected]
https://www.sat.ltu.se/mailman/listinfo/qpack

Reply via email to