Binning of MODIS L2 files
Binning of MODIS L2 files
Dear all,
in my long-term study of the coastal water turbidity around La Réunion, I need to develop a way to pool/goupe the satellite imagery data in order to be able to analyze it. I am looking at trends in the turbidity including all available MODIS Aqua data from 2002 until present. This encompasses more than 5500 scenes. Is there a way to create weekly/monthly/annual average files? I work with MODIS L2 OC data and tired l2bin + l3mapgen. According to the product level description, level 3 binned files/products "consist of the accumulated data for all L2 products in a product suite" (https://oceancolor.gsfc.nasa.gov/products/). So using the named two commands, I put togehter/combine all information from the underlying level 2 files, but do not create a file representing the average of all input files, right? How can I generate a level 3 file representing the average of all included level 2 files?
Thanks a lot! Kindest regards!
in my long-term study of the coastal water turbidity around La Réunion, I need to develop a way to pool/goupe the satellite imagery data in order to be able to analyze it. I am looking at trends in the turbidity including all available MODIS Aqua data from 2002 until present. This encompasses more than 5500 scenes. Is there a way to create weekly/monthly/annual average files? I work with MODIS L2 OC data and tired l2bin + l3mapgen. According to the product level description, level 3 binned files/products "consist of the accumulated data for all L2 products in a product suite" (https://oceancolor.gsfc.nasa.gov/products/). So using the named two commands, I put togehter/combine all information from the underlying level 2 files, but do not create a file representing the average of all input files, right? How can I generate a level 3 file representing the average of all included level 2 files?
Thanks a lot! Kindest regards!
Filters:
-
- Subject Matter Expert
- Posts: 306
- Joined: Mon Apr 07, 2008 4:40 pm America/New_York
- Been thanked: 3 times
Binning of MODIS L2 files
Regarding "How can I generate a level 3 file representing the average of all included level 2 files?"
The level3 file already DOES contain the aggregated average of the input files.
Regarding "Is there a way to create weekly/monthly/annual average files?"
You can set the time frame for l2bin:
sday=
eday=
prodtype=
some relevant prodtype options {day, 8-day, month, season, year, ...)
Also you can write a script to first make dailies using l2bin, and then make monthlies from those with l3bin and then yearlies from those with l3bin.
Danny
The level3 file already DOES contain the aggregated average of the input files.
Regarding "Is there a way to create weekly/monthly/annual average files?"
You can set the time frame for l2bin:
sday=
eday=
prodtype=
some relevant prodtype options {day, 8-day, month, season, year, ...)
Also you can write a script to first make dailies using l2bin, and then make monthlies from those with l3bin and then yearlies from those with l3bin.
Danny
Binning of MODIS L2 files
Dear Danny, thank you very much for your answer!
I ran the l2bin command for a test month (07.2002) three times with the prodtype set one time to "day", one time to "8-day" and another time to "month". All other settings (sday=blank, eday=blank, resolve=1, suite=blank, flaguse=none, l3prod=Kd_490, pversion=blank, rowgroup=blank, qual_prod=blank, qual_max=2, oformat=netCDF4, noext=selected) were not changed. I always received only one and three times the same output file named: A20021852002210.L3b_CU_OC. This nomenclature indicates that the output is a cummulated (CU) L3b file of ocean color product(s) (OC) over the period from day 185 in 2002 until day 210 in 2002, right?
To map the output file(s), I used l3mapgen with product=Kd_490, resolution=1km and oformat=netCDF4. The other parameters in this command were left by default. Resulting file name: A20021852002210.L3m_CU_Kd_490_1km.nc
Why did I get only one (and the same) output file for every run? How can I get daily output files and the respective 8-day products? Why did the change of setting prodtype to day / 8-day not have an influence? Where is my mistake?
Side questions to the l2bin command: what can be adjusted by defining something for "suite"? Would there be an advantage resulting from changing the default of "2" for the maximum acceptable quality (qual_max)?
I thank you very much for taking the time! Greetings, JC
I ran the l2bin command for a test month (07.2002) three times with the prodtype set one time to "day", one time to "8-day" and another time to "month". All other settings (sday=blank, eday=blank, resolve=1, suite=blank, flaguse=none, l3prod=Kd_490, pversion=blank, rowgroup=blank, qual_prod=blank, qual_max=2, oformat=netCDF4, noext=selected) were not changed. I always received only one and three times the same output file named: A20021852002210.L3b_CU_OC. This nomenclature indicates that the output is a cummulated (CU) L3b file of ocean color product(s) (OC) over the period from day 185 in 2002 until day 210 in 2002, right?
To map the output file(s), I used l3mapgen with product=Kd_490, resolution=1km and oformat=netCDF4. The other parameters in this command were left by default. Resulting file name: A20021852002210.L3m_CU_Kd_490_1km.nc
Why did I get only one (and the same) output file for every run? How can I get daily output files and the respective 8-day products? Why did the change of setting prodtype to day / 8-day not have an influence? Where is my mistake?
Side questions to the l2bin command: what can be adjusted by defining something for "suite"? Would there be an advantage resulting from changing the default of "2" for the maximum acceptable quality (qual_max)?
I thank you very much for taking the time! Greetings, JC
-
- Subject Matter Expert
- Posts: 306
- Joined: Mon Apr 07, 2008 4:40 pm America/New_York
- Been thanked: 3 times
Binning of MODIS L2 files
In l2bin, you have to set sday and eday otherwise it defaults to the start and end of your file, so naturally your output files did not differ.
To create daily files and corresponding 8-day file for instance:
Step 1. run l2bin with sday=2002185 and eday=2002185 , prodtype=day , ifile=files.txt
where files.txt is a listing of all the l2 files
Step 2. Repeat step 1, do this one at a time to ultimately create 8 daily bin files
Step 3. Then use the 8 daily bin files and run l3bin to create the 8-day
If you just want to create a 8 day file you can also do this directly with l2bin, setting the appropriate sday and eday values.
The prodtype of day versus 8day is meaningless legacy fields actually. It might only potentially be used, if it is even used at all, for adding a name suffix to the output file. You can pick whatever day interval span you want. Just don't select prodtype="regional" if you are trying to bin based on day.
Suite is a grouping of products, you don't need this for single products.
qual_max is used only for SST products.
Danny
To create daily files and corresponding 8-day file for instance:
Step 1. run l2bin with sday=2002185 and eday=2002185 , prodtype=day , ifile=files.txt
where files.txt is a listing of all the l2 files
Step 2. Repeat step 1, do this one at a time to ultimately create 8 daily bin files
Step 3. Then use the 8 daily bin files and run l3bin to create the 8-day
If you just want to create a 8 day file you can also do this directly with l2bin, setting the appropriate sday and eday values.
The prodtype of day versus 8day is meaningless legacy fields actually. It might only potentially be used, if it is even used at all, for adding a name suffix to the output file. You can pick whatever day interval span you want. Just don't select prodtype="regional" if you are trying to bin based on day.
Suite is a grouping of products, you don't need this for single products.
qual_max is used only for SST products.
Danny
Binning of MODIS L2 files
Dear Danny, this is good to know, thanks for clarifying! That way I was able to create 8day, monthlies and annual mean files.