MER_FRS_2P version 1

MER_FR__2P_v1

This definition is based on version 5/B of product specification PO-RS-MDA-GS-2009 Vol11

root type

binary record
idfield namedefinition
0mph
ascii record "MPH"size: 1247
1sph
ascii record "MER_RR__2P_SPH"size: 1542
2dsd
ascii array[dim_0]
dim_0: $num_dsd
ascii record "DSD"size: 280
3Quality_ADS
binary array[dim_0]
Level 2 Summary Quality ADS (SQ ADS)

dim_0: $num_dsr[0]
binary record "MER_RR__2P_ADSR_sq_meris_rec_data"size: 32
4Scaling_Factor_GADS
binary array[dim_0]
Level 2 GADS Scaling Factor and Offsets

dim_0: $num_dsr[1]
binary record "MER_RR__2P_GADS_sfgi_meris_rec_data"size: 440
5Tie_points_ADS
binary array[dim_0]
Level 2 ADS Tie Points Location and Aux. Data (L ADS)

dim_0: $num_dsr[2]
binary record "MER_RR__1P_ADSR_tie_pt_meris_rec_data"
6Norm_rho_surf_1
binary array[dim_0]
Level 2 MDS(1) normalised surface reflectance

dim_0: $num_dsr[3]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
7Norm_rho_surf_2
binary array[dim_0]
Level 2 MDS(2) normalised surface reflectance

dim_0: $num_dsr[4]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
8Norm_rho_surf_3
binary array[dim_0]
Level 2 MDS(3) normalised surface reflectance

dim_0: $num_dsr[5]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
9Norm_rho_surf_4
binary array[dim_0]
Level 2 MDS(4) normalised surface reflectance

dim_0: $num_dsr[6]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
10Norm_rho_surf_5
binary array[dim_0]
Level 2 MDS(5) normalised surface reflectance

dim_0: $num_dsr[7]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
11Norm_rho_surf_6
binary array[dim_0]
Level 2 MDS(6) normalised surface reflectance

dim_0: $num_dsr[8]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
12Norm_rho_surf_7
binary array[dim_0]
Level 2 MDS(7) normalised surface reflectance

dim_0: $num_dsr[9]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
13Norm_rho_surf_8
binary array[dim_0]
Level 2 MDS(8) normalised surface reflectance

dim_0: $num_dsr[10]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
14Norm_rho_surf_9
binary array[dim_0]
Level 2 MDS(9) normalised surface reflectance

dim_0: $num_dsr[11]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
15Norm_rho_surf_10
binary array[dim_0]
Level 2 MDS(10) normalised surface reflectance

dim_0: $num_dsr[12]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
16Norm_rho_surf_11
binary array[dim_0]
Level 2 MDS(11) normalised surface reflectance

dim_0: $num_dsr[13]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
17Norm_rho_surf_12
binary array[dim_0]
Level 2 MDS(12) normalised surface reflectance

dim_0: $num_dsr[14]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
18Norm_rho_surf_13
binary array[dim_0]
Level 2 MDS(13) normalised surface reflectance

dim_0: $num_dsr[15]
binary record "MER_RR__2P_MDSR_1_13_meris_rec_data"
19Vapour_Content
binary array[dim_0]
Level 2 MDS(14) water vapour content

dim_0: $num_dsr[16]
binary record "MER_RR__2P_MDSR_14_meris_rec_data"
20Chl_1_TOAVI_CTP
binary array[dim_0]
Level 2 MDS(15) algal index I or TOAVI

dim_0: $num_dsr[17]
binary record "MER_RR__2P_MDSR_15_meris_rec_data"
21YS_SPM_Rect_rho
binary array[dim_0]
Level 2 MDS(16) yellow substance total suspended matter

dim_0: $num_dsr[18]
binary record "MER_RR__2P_MDSR_16_meris_rec_data"
22Chl_2_BOAVI
binary array[dim_0]
Level 2 MDS(17) algal index II BOAVI

dim_0: $num_dsr[19]
binary record "MER_RR__2P_MDSR_17_meris_rec_data"
23Press_PAR_Alb
binary array[dim_0]
Level 2 MDS(18) surface pressure PAR cloud albedo

dim_0: $num_dsr[20]
binary record "MER_RR__2P_MDSR_18_meris_rec_data"
24Alpha_OPT
binary array[dim_0]
Level 2 MDS(19) aerosol Angstrom exponent or cloud type and optical thickness

dim_0: $num_dsr[21]
binary record "MER_RR__2P_MDSR_19_meris_rec_data_v1"
25Flags
binary array[dim_0]
Level 2 MDS(20) flags

dim_0: $num_dsr[22]
binary record "MER_RR__2P_MDSR_20_meris_rec_data"

detection rule

This product definition is applicable if a product matches the following rule:

bytes(/,0,8) == "PRODUCT=" and
bytes(/,9,10) == "MER_FRS_2P"

product variables

namesizeinitialisation
sceneRasterWidth$sceneRasterWidth = int(/sph/line_length)
tiePointGridWidth$tiePointGridWidth = int(/sph/line_length) / int(/sph/samples_per_tie_pt) + if(int(/sph/line_length) % int(/sph/samples_per_tie_pt) == 0, 0, 1)
num_dsd$num_dsd = int(/mph/num_dsd)
num_ds$num_ds = 23
ds_to_dsd_index[$num_ds]$ds_to_dsd_index[0] = index(/dsd, str(./ds_name) == "Quality ADS                 ");
$ds_to_dsd_index[1] = index(/dsd, str(./ds_name) == "Scaling Factor GADS         ");
$ds_to_dsd_index[2] = index(/dsd, str(./ds_name) == "Tie points ADS              ");
$ds_to_dsd_index[3] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(1)     ");
$ds_to_dsd_index[4] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(2)     ");
$ds_to_dsd_index[5] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(3)     ");
$ds_to_dsd_index[6] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(4)     ");
$ds_to_dsd_index[7] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(5)     ");
$ds_to_dsd_index[8] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(6)     ");
$ds_to_dsd_index[9] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(7)     ");
$ds_to_dsd_index[10] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(8)     ");
$ds_to_dsd_index[11] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(9)     ");
$ds_to_dsd_index[12] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(10)    ");
$ds_to_dsd_index[13] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(11)    ");
$ds_to_dsd_index[14] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(12)    ");
$ds_to_dsd_index[15] = index(/dsd, str(./ds_name) == "Norm. rho_surf - MDS(13)    ");
$ds_to_dsd_index[16] = index(/dsd, str(./ds_name) == "Vapour Content - MDS(14)    ");
$ds_to_dsd_index[17] = index(/dsd, str(./ds_name) == "Chl_1, TOAVI   - MDS(15)    ");
$ds_to_dsd_index[18] = index(/dsd, str(./ds_name) == "YS, SPM, Rect. Rho- MDS(16) ");
$ds_to_dsd_index[19] = index(/dsd, str(./ds_name) == "Chl_2, BOAVI   - MDS(17)    ");
$ds_to_dsd_index[20] = index(/dsd, str(./ds_name) == "Press PAR Alb  - MDS(18)    ");
$ds_to_dsd_index[21] = index(/dsd, str(./ds_name) == "Alpha, OPT     - MDS(19)    ");
$ds_to_dsd_index[22] = index(/dsd, str(./ds_name) == "Flags          - MDS(20)    ")
ds_available[$num_ds]for i = 0 to $num_ds - 1 do
$ds_available[i] = if($ds_to_dsd_index[i] != -1 and !(bytes(/dsd[$ds_to_dsd_index[i]]/filename,8) == "NOT USED"), 1, 0)
ds_offset[$num_ds]for i = 0 to $num_ds - 1 do
$ds_offset[i] = 8 * int(/dsd[$ds_to_dsd_index[i]]/ds_offset)
num_dsr[$num_ds]for i = 0 to $num_ds - 1 do
$num_dsr[i] = int(/dsd[$ds_to_dsd_index[i]]/num_dsr)