Bypassing an Optional Input

Issues related to VIIRS EDR algorithms and data
Post Reply
JeffVI
Posts: 18
Joined: Mon Jul 21, 2014 8:42 am

Bypassing an Optional Input

Post by JeffVI »

Dear All,
I will appreciate an urgent help on the matter.
For the VI Algorithm, we are getting AOT IP as an optional input. Therefore, we will need to Audit the existence of the AOT IP input and if it is not available, the following reading in portion of the code will be bypassed, and the aeroQuality should be FILLVALUE:

Code: Select all

/New, additional QF bits being copied from Aerosol IP
   aeroQuality = viData->aot->qf1[modRow][modCol] &
                               PRO_AEROS_AOT_QUALITY_MASK;
I am not very familiar with the Audit module and will sincerely appreciate any kind and timely help on the matter. The Calculate_VegIndex.cpp is provided in the zip file attached. Thank you very much!
Attachments
Calculate_VegIndex.zip
Calculate_VegIndex.zip
(6.03 KiB) Downloaded 1058 times
tsimpson
Posts: 23
Joined: Wed Apr 02, 2014 9:23 am
Location: Riverdale, MD, USA

Re: Bypassing an Optional Input

Post by tsimpson »

There are three files you would need to change to make AOT IP an input. You might have done some of them already, but I'll just mention them here on the forum.

1. Make the AOT IP an input by adding it to the config guide, ProEdrViirsVI_CFG.xml. In the input group, add these lines as a new 'group' element:

<group name="VIIRS-AOT-IP">
<config>
<name>Mode</name>
<configValue>Optional</configValue>
</config>
<config>
<name>DataEndianType</name>
<configValue>Big</configValue>
</config>
<config>
<name>OfficialShortName_1</name>
<configValue>VIIRS-Aeros-Opt-Thick-IP</configValue>
</config>
<config>
<name>SubstituteShortName_1</name>
<configValue>VIIRS-Aeros-Opt-Thick-IP-SUB</configValue>
</config>
</group>

The first config element in the group makes this input optional.

2. In ProEdrViirsVIStruct.h, add the following to the VVI_DATA_TYPE structure:

ViirsAotIpType* aot;

3. In ProEdrViirsVI.cpp, add the following to the doProcessing() function:

viDataType_.aot = inputVIIRS_AOT_IP_.start_Ptr;

This line would go near the beginning of the function where there are similar lines for the other inputs.

After making these changes, you would use the following in Calculate_VegIndex.cpp to check if the AOT input was available:

if (viData->aot == DM_BADADDRESS)
{
// the AOT is not available
}
else
{
// the AOT is available
}

Run 'make clean library' in the $ADL_HOME/EDR/VIIRS/land/VegIndex/src directory to rebuild the code.

Hope this helps ... please let me know if you have more questions or comments.

Thanks,
Todd
Todd Simpson
Raytheon Company
tsimpson
Posts: 23
Joined: Wed Apr 02, 2014 9:23 am
Location: Riverdale, MD, USA

Re: Bypassing an Optional Input

Post by tsimpson »

Just wanted to correct my last post ... I should have said to run 'make clean library program' not 'make clean library'.
Todd Simpson
Raytheon Company
JeffVI
Posts: 18
Joined: Mon Jul 21, 2014 8:42 am

Re: Bypassing an Optional Input

Post by JeffVI »

Thanks a lot, Todd,
That was very very helpful!
Appreciate all your kind and timely help!
Post Reply