How to calculate cross granules' granule ID?

Issues related to VIIRS EDR algorithms and data
Post Reply
wzchen
Posts: 89
Joined: Wed Jul 18, 2012 3:01 pm

How to calculate cross granules' granule ID?

Post by wzchen »

I want to know how ADL calculate all cross granules' granule ID. Can anyone explain it? or please let me know where I can find it in the ADL's source code?
Thanks,
geoffc
Posts: 34
Joined: Mon Feb 14, 2011 3:02 pm
Location: Madison, WI
Contact:

Re: How to calculate cross granules' granule ID?

Post by geoffc »

From CDFCB-X Vol. 6 ...

##################

The unique identifier for each RDR granule composed of the concatenation
of two components:

(1) The three character satellite identifier [alias
“Platform_Short_Name”],

(2) A zero left filled, 12 character number, specifying the number of
tenths of a second since the first ascending node after launch)

See CDFCB-X Vol V, Table 4.4-4, Metadata Delivered in NPOESS Data
Products for details Example: NPP001212126658

####################

And from CDFCB-X VOl. 5 ...

####################

A 15 character string, where the first three characters have allowable
values of NPP, N01, components:

(1) The three character satellite identifier [alias
“Platform_Short_Name”],

(2) A zero left filled, 12 character number, specifying the number of
tenths of a second since the first ascending node after launch).

The Granule ID is calculated using the observation time (Time O) found
in the header of a given Application Packet, the time of the first
ascending node after launch (TimeF), and the granule size (TimeG). The
calculation is:

* NumberG = floor[( TimeO – TimeF )/ TimeG]

* Granule Start Time = NumberG * TimeG + TimeF

* Granule End Time = Granule Start Time + TimeG

* Granule ID Value = ( NumberG * TimeG ) / 10^5

The same granule identifier that is applied to the RDR granule is also
used for the SDR/TDR and EDR/IP/ARP granules that result.

The combination of N_Granule_ID, N_Collection_Short_Name, and the
N_Granule_Version uniquely identifies each granule in the IDPS. For the
QST IP, this attribute is not applicable ( = Default Value)

#####################


So, I think to get the N_Granule_ID attribute for a cross granule, you would add or subtract the number of tenths of seconds between the central granule and the cross granule. From my experience the difference in Granule ID seems to alternate between 853 and 854 (due to rounding I suppose). So if the difference between the previous granule and the current granule is 853, the difference between the current granule and the next granule would be 854, and then a further 853 to the granule after that etc...
Geoff P. Cureton, PhD
Cooperative Institute for Meteorological Satellite Studies
University of Wisconsin-Madison
1225 W. Dayton St.
Madison WI 53706, USA
Phone: +1 608 890 0706
kbisanz
Posts: 280
Joined: Wed Jan 05, 2011 7:02 pm
Location: Omaha NE

Re: How to calculate cross granules' granule ID?

Post by kbisanz »

The precise time for a VIIRS granule is 85350000 microseconds. This is from the NPP_VIIRS-SCIENCE_GRANULE_SIZE group in $ADL_HOME/cfg/INF_CFG.xml. So that would be 853.5 tenths of seconds. The extra 0.5 tenths of a second would account for the variation between 853 and 854.
Kevin Bisanz
Raytheon Company
Post Reply