Flags and Reprojected files
Flags and Reprojected files
Hello,
I have been processing L1 to L2 using l2gen. One of the output OLCI L2 files has the following flag statistics (I believe it in % of pixels with each flag value in the image):
ATMFAIL 0.0000
LAND 72.8164
PRODWARN 0.00000
HIGLINT 0.00000
HILT 0.00000
HISATZEN 0.00000
COASTZ 26.6807
SPARE 0.00000
STRAYLIGHT 0.00000
CLDICE 49.3987
COCCOLITH 0.445776
TURBIDW 2.25399
HISOLZEN 0.00000
LOWLW 0.00000
CHLFAIL 0.00000
NAVWARN 0.00000
ABSAER 0.00000
MAXAERITER 0.00000
MODGLINT 18.2133
CHLWARN 0.00000
ATMWARN 0.00000
SEAICE 0.00000
NAVFAIL 0.00000
FILTER 0.00000
BOWTIEDEL 0.00000
HIPOL 0.00000
PRODFAIL 0.00000
But when I reproject the file (using gpt.sh), all of the above flag values are -119! This is true for all reprojected images. Am I doing something wrong?
Thank you.
Amita
I have been processing L1 to L2 using l2gen. One of the output OLCI L2 files has the following flag statistics (I believe it in % of pixels with each flag value in the image):
ATMFAIL 0.0000
LAND 72.8164
PRODWARN 0.00000
HIGLINT 0.00000
HILT 0.00000
HISATZEN 0.00000
COASTZ 26.6807
SPARE 0.00000
STRAYLIGHT 0.00000
CLDICE 49.3987
COCCOLITH 0.445776
TURBIDW 2.25399
HISOLZEN 0.00000
LOWLW 0.00000
CHLFAIL 0.00000
NAVWARN 0.00000
ABSAER 0.00000
MAXAERITER 0.00000
MODGLINT 18.2133
CHLWARN 0.00000
ATMWARN 0.00000
SEAICE 0.00000
NAVFAIL 0.00000
FILTER 0.00000
BOWTIEDEL 0.00000
HIPOL 0.00000
PRODFAIL 0.00000
But when I reproject the file (using gpt.sh), all of the above flag values are -119! This is true for all reprojected images. Am I doing something wrong?
Thank you.
Amita
Filters:
Flags and Reprojected files
Depending on the method used, reprojection can mix data from more than one pixel, so you end up mixing "good" data with "bad" data. For this reason, flags are normally used to mask "bad" data and reprojection is done only for "good" pixels. Examples are provided in
GPT Cookbook: Reproject
GPT Cookbook: Reproject
-
- Subject Matter Expert
- Posts: 306
- Joined: Mon Apr 07, 2008 4:40 pm America/New_York
- Been thanked: 3 times
Flags and Reprojected files
You can apply the flag masks using the original unprojected flag by setting the following field within the Reproject operator:
<maskExpression>${maskExpression}</maskExpression>
The flags themselves should not be reprojected as they really have no meaning since they are tied to multiple unprojected pixels.
<maskExpression>${maskExpression}</maskExpression>
The flags themselves should not be reprojected as they really have no meaning since they are tied to multiple unprojected pixels.
Flags and Reprojected files
Thanks for the reply.
I understand that reprojection would 'mix' pixels and can affect l2flags. But in reprojected files also l2flag array looks fine. It is the flag_percentages that are not correct in reprojected files. This is what I find in OLCI L2 files.
When I checked the same in MODIS L2 files, I find that unprojected L2 file has flag_percentages but they are not written out in reprojected files. I am trying to find out whether flag_percentages in reprojected files should be even looked at.
Thanks again.
Amita
I understand that reprojection would 'mix' pixels and can affect l2flags. But in reprojected files also l2flag array looks fine. It is the flag_percentages that are not correct in reprojected files. This is what I find in OLCI L2 files.
When I checked the same in MODIS L2 files, I find that unprojected L2 file has flag_percentages but they are not written out in reprojected files. I am trying to find out whether flag_percentages in reprojected files should be even looked at.
Thanks again.
Amita
Flags and Reprojected files
Yes, I thought that reprojection of flags would no make sense - but thanks you so much confirming, Danny.
Amita
Amita
Flags and Reprojected files
Hello,
In my l2gen caluclations for L1 to L2 conversion of OLCI image I am setting cloudmask=0 as we want to decide our own threshold for clouds. But in my l2flag array I still see pixels are flagged with CLDICE! Is there anything else I have to specify or turnoff in l2gen inout parameters?
Thanks.
Amita
In my l2gen caluclations for L1 to L2 conversion of OLCI image I am setting cloudmask=0 as we want to decide our own threshold for clouds. But in my l2flag array I still see pixels are flagged with CLDICE! Is there anything else I have to specify or turnoff in l2gen inout parameters?
Thanks.
Amita
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Flags and Reprojected files
The option I assume you meant was
Sean
maskcloud=0
. All that does is tell l2gen to continue processing a pixel it has deemed to be a cloud. The flag will still be set, since it determined a cloud was present. It's just a flag now that you set maskcloud=0
. You can ignore it.Sean
Flags and Reprojected files
Hello,
When I reproject OLCI L2 files I find that in some cases original L2 files look fine but reprojected files are NaN over water at most locations!
I use geographic reprojection and bilinear resampling. I got the par file and xml file from gpt Cookbook website:
pixelSize=0.003
resampling=Bilinear
maskExpression=!l2_flags.HIGLINT and !l2_flags.HISATZEN and !l2_flags.LOWLW and !l2_flags.HILT
transferValidPixelExpression=true
applyValidPixelExpression=true
I changed pixelsize for OLCI
Kept the maskExpression at default.
I am really confused about what happens during reprojection.
[img]S3A_OLCI_20160706T154459_rhos_490.png[/img]
[img]S3A_OLCI_20160706T154459_reproj_rhos_490.png[/img]

When I reproject OLCI L2 files I find that in some cases original L2 files look fine but reprojected files are NaN over water at most locations!
I use geographic reprojection and bilinear resampling. I got the par file and xml file from gpt Cookbook website:
pixelSize=0.003
resampling=Bilinear
maskExpression=!l2_flags.HIGLINT and !l2_flags.HISATZEN and !l2_flags.LOWLW and !l2_flags.HILT
transferValidPixelExpression=true
applyValidPixelExpression=true
I changed pixelsize for OLCI
Kept the maskExpression at default.
I am really confused about what happens during reprojection.
[img]S3A_OLCI_20160706T154459_rhos_490.png[/img]
[img]S3A_OLCI_20160706T154459_reproj_rhos_490.png[/img]


-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
Flags and Reprojected files
What flags are set in the L2 file? You're telling the reprojection tool to exclude these HIGLINT, HISATZEN, LOWLW and HILT
maskExpression=!l2_flags.HIGLINT and !l2_flags.HISATZEN and !l2_flags.LOWLW and !l2_flags.HILT
HISATZEN and HILT probably aren't set, but HIGLINT and LOWLW very well may be.
maskExpression=!l2_flags.HIGLINT and !l2_flags.HISATZEN and !l2_flags.LOWLW and !l2_flags.HILT
HISATZEN and HILT probably aren't set, but HIGLINT and LOWLW very well may be.