28.12.2012 Views

RWAPI on L2 product - CESBIO

RWAPI on L2 product - CESBIO

RWAPI on L2 product - CESBIO

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SMOS<br />

The training course<br />

SMOS <strong>L2</strong> SOIL MOISTURE <strong>product</strong><br />

Use of the Matlab toolbox: <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g><br />

SMOS Workshop<br />

27-29 September<br />

Arles, France


Aim of this talk<br />

� Give an overview of the soil moisture <strong>product</strong>: UDP, User Data Product<br />

� How to interpret some flags<br />

� reference to the main documents<br />

� Use of matlab toolbox « rwapi », developed by ARRAY Inc.<br />

But<br />

NOT present every field of the <strong>L2</strong> Soil Moisture <strong>product</strong><br />

No word about the DAP (if you have heard of it...courses at <strong>CESBIO</strong> !)


3<br />

Outline<br />

I) Documents<br />

II) How to derive <strong>on</strong> the Soil Moisture retrieval<br />

III) Read the <strong>L2</strong> <strong>product</strong>s with the <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g><br />

IV) Examples


4<br />

Outline<br />

I) Documents<br />

II) How to derive <strong>on</strong> the Soil Moisture retrieval<br />

III) Read the <strong>L2</strong> <strong>product</strong>s with the <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g><br />

IV) Examples


Documents<br />

2 doc.<br />

� Spec Level 2, describes all Inputs/Outputs files of the <strong>L2</strong><br />

� ATBD: algorithm to derive the soil moisture<br />

Where ?<br />

� <strong>CESBIO</strong> website: http://www.cesbio.ups-tlse.fr/fr/smos/smos_atbd.html<br />

� SMOSBlog


Documents<br />

Spec <strong>L2</strong> = all the details of Inputs / Output files


7<br />

Outline<br />

I) Documents<br />

II) How to derive <strong>on</strong> the Soil Moisture retrieval<br />

III) Read the <strong>L2</strong> <strong>product</strong>s with the <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g><br />

IV) Examples


● <strong>L2</strong> <strong>product</strong>s: per ½ orbit<br />

UDP: User Data Product<br />

<strong>L2</strong> Soil Moisture course refresher<br />

● Ascending orbits: ~6 a.m. solar local time<br />

Descending orbits: ~6 p.m. solar local time<br />

● 2 files: *.HDR : Header<br />

*.DBL : Datablock,<br />

BINARY file, c<strong>on</strong>tains the data<br />

● <strong>L2</strong> soil moisture Grid : isea4h9, spatial resoluti<strong>on</strong> ~15 km<br />

BUT<br />

~15km<br />

Soil Moisture NOT retrieved over an hexag<strong>on</strong>al area<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />


<strong>L2</strong> Soil Moisture course refresher<br />

9<br />

Antenna Pattern<br />

Weighted functi<strong>on</strong> : WEF<br />

To account for the radiometric sensitivity of<br />

SMOS instrument<br />

Emissi<strong>on</strong> of the Surface<br />

dielectric Model<br />

● Dobs<strong>on</strong> model (Dobs<strong>on</strong> et al. 1985)<br />

Mir<strong>on</strong>ov's model (Mir<strong>on</strong>ov et al, 2007)<br />

Nominal wet soil<br />

Water (Pure and Saline)<br />

● Simple empirical relati<strong>on</strong>ship<br />

Frozen soil<br />

Snow and Ice<br />

Barren rocks<br />

Urban<br />

Vegetati<strong>on</strong> Layer<br />

Radiative transfer model : L-Meb<br />

L band Microwave Emissi<strong>on</strong> of the Biosphere<br />

Wigner<strong>on</strong> et al. 2007<br />

�Atmosphere<br />

Water<br />

Low Vegetati<strong>on</strong><br />

Forest


<strong>L2</strong> Soil Moisture course refresher<br />

Surface classificati<strong>on</strong><br />

� For each DGG<br />

� Definiti<strong>on</strong> of a Working Area<br />

- 123 km x 123 km<br />

- Surface classificati<strong>on</strong>: Ecoclimap, at ~4km<br />

� Ecoclimap reclassified to 12 main classes<br />

10<br />

Low vegetati<strong>on</strong><br />

Forest<br />

Water<br />

Barren / rock soil<br />

Urban area<br />

Wetlands<br />

Str<strong>on</strong>g Topography<br />

Moderate Topography<br />

Wet Snow<br />

Mixed Snow<br />

frozen soil<br />

Ice cover<br />

Nominal =<br />

low vegetati<strong>on</strong><br />

Forest<br />

water<br />

~123 km<br />

⇒ Soil moisture derived ONLY<br />

LOW VEGETATION or FOREST fracti<strong>on</strong><br />

~123 km


<strong>L2</strong> Soil Moisture course refresher<br />

Surface classificati<strong>on</strong><br />

��Selecti<strong>on</strong> of a branch of the Decisi<strong>on</strong> tree<br />

ATBD, Table 18, « branches of the Decisi<strong>on</strong> Tree »<br />

��Selecti<strong>on</strong> of models for each of the classes of a Working Area<br />

ATBD, Table 20 « Selected models »<br />

4 dielectric models (ATBD, Table 19 « Structure of forward model »)<br />

MN = nominal: L-MEB (Dobs<strong>on</strong>'s)<br />

MW & MS = Water (Dobs<strong>on</strong>'s)<br />

MD = Cardioid model<br />

Snow<br />

Source: ATBD


12<br />

Outline<br />

I) Documents<br />

II) How to derive <strong>on</strong> the Soil Moisture retrieval<br />

III) Read the <strong>L2</strong> <strong>product</strong>s with the <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g><br />

IV) Examples


<strong>L2</strong> soil moisture <strong>product</strong>: UDP -User Data Product-<br />

� Parameters of the model<br />

- SM<br />

- TAU<br />

- Hr : roughness<br />

- Surface Temperature<br />

- Dielectric c<strong>on</strong>stant<br />

- TB @ 42.5° (from models!)<br />

- their DQX = index, quality of the retrieval NOT an error compared to in-situ...<br />

- ...<br />

⇒ Retrieved = value<br />

Not retrieved = filled value, e.g. -999<br />

� Informati<strong>on</strong> about the c<strong>on</strong>diti<strong>on</strong>s: Science Flags<br />

forest, topography, rain, snow...<br />

� Evaluati<strong>on</strong> of the retrieval : C<strong>on</strong>fidence flags<br />

retrieval failed (FL_NO_PROD)<br />

is retrieved soil moisture within an expected range? its DQX ?<br />

quality of the models<br />

RFI c<strong>on</strong>taminati<strong>on</strong>s<br />

� C<strong>on</strong>diti<strong>on</strong>s of the retrieval: Processing Flags<br />

model used, initial tau c<strong>on</strong>diti<strong>on</strong>s, ..<br />

Source: Spec <strong>L2</strong>, Table 4.9 SM_SWATH Data Set Record


Tools to read SMOS <strong>product</strong>s<br />

*) BEAM + SMOS beam toolbox (See Ahmad's presentati<strong>on</strong>)<br />

● Where to find it : http://www.brockmann­c<strong>on</strong>sult.de/cms/web/beam/software<br />

● What for ?<br />

→ L1C, <strong>L2</strong> UDP<br />

→ export data to ascii file<br />

*) <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g> (Array Inc)<br />

● Matlab tool to read and extract data L1C, <strong>L2</strong> (UDP, DAP), input data …<br />

● Where to find it:<br />

C<strong>on</strong>tact Ali Mahmoodi : ali@array.ca …. offer him a beer<br />

Access to ftp site to download the toolbox


<str<strong>on</strong>g>RWAPI</str<strong>on</strong>g> with Matlab<br />

� Load a <strong>L2</strong> <strong>product</strong><br />

Matlab functi<strong>on</strong> : <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g>.<strong>product</strong>.m<br />

Input = name of the directory c<strong>on</strong>taining the *HDR and *DBL<br />

Important !


Load Data for ALL nodes of the <strong>L2</strong> soil moisture <strong>product</strong><br />

�load all DGG


17<br />

Outline<br />

I) Documents<br />

II) How to derive <strong>on</strong> the Soil Moisture retrieval<br />

III) Read the <strong>L2</strong> <strong>product</strong>s with the <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g><br />

IV) Examples<br />

Read retrieved data<br />

Flags


Extract informati<strong>on</strong> for 1 DGG and understand the results<br />

Example : 87406 th DGG of the <strong>L2</strong> <strong>product</strong>


Example 1:<br />

Retrieved parameters<br />

SM = 0.1672<br />

TAU = -999 (= not retrieved)<br />

..... WHY ?!


Example 1:<br />

SM retrieved but not TAU ....<br />

Is it expected ? a bug ? ... How to find why ?<br />

1) Call Philippe Richaume....<br />

I do !!<br />

Or<br />

2) look at the FLAGS of the UDP <strong>L2</strong> <strong>product</strong><br />

tables of the documents : ATBD and the <strong>L2</strong> specificati<strong>on</strong> <strong>product</strong>


Example 1<br />

Fracti<strong>on</strong> of →<br />

working area<br />

S_Tree1 : branch of the Decisi<strong>on</strong> Tree (see ATBD, table 18)<br />

� Threshold<br />

ATBD, Table 17, « Decisi<strong>on</strong><br />

Tree stage <strong>on</strong>e thresholds »<br />

WO : open water<br />

TS : str<strong>on</strong>g topography<br />

TM : moderate topo.<br />

SW: wet snow<br />

SM : Mixed snow<br />

FRZ : frozen soil<br />

FO : Forest<br />

NO : Nominal<br />

WL : Forest<br />

EB : Barren<br />

TI : Ice<br />

EU : Urban<br />

S_Tree1 = 12 ⇒ FNO > TH_NO: low vegetati<strong>on</strong> > 40% of the Working area


Example 1<br />

S_Tree2 : c<strong>on</strong>diti<strong>on</strong>s of the retrieval<br />

Use Table under table 4-9, doc. Spec <strong>L2</strong> to analyse the binary<br />

understand the flag = c<strong>on</strong>vert to a binary


Example 1<br />

00000001<br />

� Results : Retrieval c<strong>on</strong>diti<strong>on</strong>s<br />

- R2<br />

- Very low initial vegetati<strong>on</strong><br />

optical depth : TAU<br />

- Model used MN : L-Meb!<br />

S_Tree2 : c<strong>on</strong>diti<strong>on</strong>s of the retrieval<br />

Spec'<strong>L2</strong>, Table under table 4-9


Example 1<br />

S_Tree2 = 00000001<br />

��R2<br />

�� Very low initial TAU<br />

�� Model used MN : L-Meb<br />

From Table: �<br />

Initial std <strong>on</strong> Parameters<br />

to be RETRIEVED<br />

� Nil � not derived<br />

� Only SM retrieved<br />

S_Tree2: c<strong>on</strong>diti<strong>on</strong>s of the retrieval<br />

Source : ATBD, Page 89, Table 23


R2 R3 R4 ... what 's the difference ?<br />

� The more TBL1C the more parameters can be retrieved<br />

See in the <strong>L2</strong> <strong>product</strong> Value of M_AVA0 and M_AVA<br />

� If retrieval failed in R3 c<strong>on</strong>figurati<strong>on</strong><br />

� retrieval tried with R2, i.e. less parameters to be derived<br />

� R4: no more


Note:<br />

Initial TAU compared to 2<br />

thresholds: TH_Tau_R_ 23<br />

TH_Tau_R_34<br />

Defined in the AUX_CNFSMF:<br />

C<strong>on</strong>figurati<strong>on</strong> input file of<br />

<strong>L2</strong> processor<br />

Source : ATBD, Page 89, Table 23


Example 2<br />

DGG Id = 223130<br />

SM = - 999<br />

TAU = 0.4587<br />

SM not retrieved ....BUT TAU !!!!!!!


Example 2


Example 2<br />

Fracti<strong>on</strong> of the →<br />

working area<br />

S_Tree1 = 17 heterogeneous surface<br />

Working Area composed with<br />

Nominal < 40 %<br />

Forest < 60 %<br />

etc..<br />

Threshold defined<br />

in the ATBD, Table 17,<br />

« Decisi<strong>on</strong> Tree stage<br />

<strong>on</strong>e thresholds »<br />

WO : open water<br />

TS : str<strong>on</strong>g topography<br />

TM : moderate topo.<br />

SW: wet snow<br />

SM : Mixed snow<br />

FRZ : frozen soil<br />

FO : Forest<br />

NO : Nominal<br />

WL : Forest<br />

EB : Barren<br />

TI : Ice<br />

EU : Urban


Example 2<br />

S_Tree2 =00100110<br />

00100110<br />

��Retrieval c<strong>on</strong>diti<strong>on</strong>s<br />

● R3<br />

● Medium initial TAU<br />

● Model for the dielectric c<strong>on</strong>stant MD : cardioid<br />

Spec'<strong>L2</strong>, Table under table 4-9


Example 2<br />

S_Tree2 =00100110<br />

��Retrieval c<strong>on</strong>diti<strong>on</strong>s<br />

● R3<br />

● Medium initial TAU<br />

● Model for the dielectric c<strong>on</strong>stant MD : cardioid<br />

4 dielectric models (ATBD, Table 19 « Structure of forward model »)<br />

MN = nominal: L-MEB<br />

Water = MW & MS<br />

Cardioid = MD


Example 2<br />

S_Tree2 gives<br />

● R3<br />

● Medium initial TAU<br />

● Model used MD : cardioid<br />

��Parameters retrieved<br />

● Tau and the<br />

● Dielectric c<strong>on</strong>stant<br />

(CADIOID model)<br />

Source : ATBD, Page 89, Table 23


33<br />

Outline<br />

I) Documents<br />

II) How to derive <strong>on</strong> the Soil Moisture retrieval<br />

III) Read the <strong>L2</strong> <strong>product</strong>s with the <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g><br />

IV) Examples<br />

Read retrieved data<br />

Flags


Flags


Science Flags<br />

Source, Spec' <strong>L2</strong> document, Table 4-11 « Structure of the Science Flags in the DSR »


Science Flags<br />

→ from Table 4.11 « Structure of the Science Flags in the DSR », Spec. <strong>L2</strong> document<br />

FL_TAU_FO : optical thickness > a defined threshold<br />

FL_External : FL_Rain or FL_TEC or N_Sky>0<br />

FL_Nominal<br />

FL_Forest : fracti<strong>on</strong> of forest > defined threshold<br />

FL_Scene_T<br />

FL_N<strong>on</strong>_Nom


C<strong>on</strong>fidence Flags<br />

Source: spec. <strong>L2</strong> document


C<strong>on</strong>fidence Flags<br />

5 th field: FL_NO_PROD = 1<br />

���������������� retrieval failed<br />

See Table 4-10 « Structure of the C<strong>on</strong>fidence Flag in the DSR »


No value reported in the UDP � No retrieval


Processing Flags<br />

Source: Spec'<strong>L2</strong>, Table 4-12


Processing Flags<br />

R3 retrieval was tried, failed � R2 attempted


Time series<br />

2 soluti<strong>on</strong>s<br />

� <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g> matlab<br />

loop to read all your <strong>product</strong>s<br />

Find your DGG<br />

extract the data you want<br />

� Beam (see Ahmad's presentati<strong>on</strong>)<br />

either<br />

- From the Graphic User Interface : Task bar� Tools ��Export SMOS Grid Points<br />

- Linux, shell command (see Beam Help: export grid point)<br />

« sh /path_to_beam/beam-4.9.0.1/bin/export-grid-points.sh -box $l<strong>on</strong>min $l<strong>on</strong>max $latmin $latmax<br />

-o myfile /path2my<strong>product</strong>s/SM_????_MIR_*UDP*»


Time series<br />

Matlab example : functi<strong>on</strong> with a loop to read several <strong>L2</strong> soil moisture <strong>product</strong>s<br />

%% Extract Temporal serie<br />

serie = <strong>on</strong>es(length(List_Product),5) ;<br />

for ifile = 1:length(List_Product) ;<br />

% cd to <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g> directory<br />

cd /home/mial<strong>on</strong>/Documents/SMOS/ToolBox/<str<strong>on</strong>g>RWAPI</str<strong>on</strong>g>/V14/test ;<br />

produitSMOS = <str<strong>on</strong>g>RWAPI</str<strong>on</strong>g>.<strong>product</strong>(List_Product{ifile}) ;<br />

% load dataset<br />

d=produitSMOS.dataset(1) ;<br />

% extract all DGGid of the <strong>product</strong><br />

dggid=d(:).Grid_Point_ID ;<br />

% find index of your DGG<br />

idxdgg = find(your_DGGid,dggid) ;<br />

% time of the overpass<br />

time = cat(2,double(d(idxdgg).Mean_Acq_Time.Days'),...<br />

double(d(idxdgg).Mean_Acq_Time.Sec<strong>on</strong>ds'),...<br />

double(d(idxdgg).Mean_Acq_Time.Microsec<strong>on</strong>ds')) ;<br />

serie(ifile,1) = d(idxdgg).Grid_Point_ID ;<br />

% extract Soil moisture<br />

serie(ifile,2) = d(idxdgg).Retrieval_Results_Data.Soil_Moisture ;<br />

% extract Soil Moisture DQX<br />

serie(ifile,3) = d(idxdgg).Retrieval_Results_Data.Soil_Moisture_DQX ;<br />

% extract TAU<br />

serie(ifile,4) = d(idxdgg).Retrieval_Results_Data.Optical_Thickness_Nad ;<br />

% extract TAU DQX<br />

serie(ifile,5) = d(idxdgg).Retrieval_Results_Data.Optical_Thickness_Nad_DQX ;<br />

% release memory !<br />

delete(d) ;<br />

delete(produitSMOS) ;<br />

end


44<br />

� <strong>CESBIO</strong> website<br />

Thanks for your attenti<strong>on</strong>...<br />

http://www.cesbio.ups­tlse.fr/fr/indexsmos.html<br />

ATBD document available = soil moisture retrieval algorithm<br />

http://www.cesbio.ups­tlse.fr/fr/smos/smos_atbd.html<br />

� <strong>CESBIO</strong> blog : many info, results, tools …<br />

http://www.cesbio.ups­tlse.fr/SMOS_blog/<br />

� ESA website<br />

http://earth.esa.int/SMOS/


Find DGG coordinates from any latitude / l<strong>on</strong>gitude<br />

Matlab functi<strong>on</strong> <strong>on</strong> SMOSBlog, tool page<br />

● Download the matlab fct :find_nearestDGG.m<br />

● .txt : file c<strong>on</strong>taining all the DGG and their coordinates<br />

Node of the grid DGG<br />

Each DGG has an ID (fixed : does not change with <strong>product</strong>s)


Example how to use find_nearestDGG.m<br />

Arles, DGG Id : 2018331 Latitude : 43.744 ° L<strong>on</strong>gitude : 4.619°

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!