Surface Type EDR's snow cover data

Issues related to VIIRS EDR algorithms and data
Post Reply
tangyouhua
Posts: 4
Joined: Mon Sep 24, 2012 2:23 pm

Surface Type EDR's snow cover data

Post by tangyouhua »

Hi,

I have a question of the snow cover data used in Viirs Surface Type EDR. In the $ADL_HOME/cfg/ProEdrViirsSurfType_CFG.xml, there is
<group name="VIIRS_SCD_BINARY_SNOW_FRAC_EDR">
<config>
<name>Mode</name>
<configValue>Optional</configValue>
</config>

The snow cover is provided by optional "VIIRS_SCD_BINARY_SNOW_FRAC_EDR". When I removed that input file, the ST EDR can
still run, but its output is different on the ST EDR QF1. My question is where the missed snow cover comes from, and how I can control
the fall back solution. If I want to change to a different fall back snow cover product, like IVSIC, how can I do it?

Thanks

Youhua
bhenders
Posts: 72
Joined: Wed Jan 05, 2011 9:27 am
Location: Omaha, NE

Re: Surface Type EDR's snow cover data

Post by bhenders »

Youhua,

The VIIRS_SCD_BINARY_SNOW_FRAC_EDR is currently coded as an optional input and when I looked at the Surface Type algorithm it seems to have no current fall back when missing. It merely checks that the input was not retrieved and when setting quality flags in Set_SurfType_Flags.cpp it does the following:

// check to see if SnowFraction data is available
if((dataAvailable &
SNOW_COVER_DATA_NOT_AVAILABLE)== 0)
{
if(iodata->snowCover->scdFractionFromBinaryMap[row][column] >
iodata->surfTypeCoefficients->Snow_Fraction_Threshold)
{
iodata->surfType->qcFlags0[row][column] |=
SURFTYPE_SNOWICE_MASK;
}
}

When it's not available the snowice flags aren't being set.

If you want to switch over to using VIIRS-GridIP-VIIRS-Snow-Ice-Cover-Mod-Gran as a fall back when the VIIRS_SCD_BINARY_SNOW_FRAC_EDR isn't available (graceful degradation) this is harder since these two products have different formats. If you just want to add another optional input for VIIRS-GridIP-VIIRS-Snow-Ice-Cover-Mod-Gran you'd add the following to the algorithm config file:

<group name="GIP_SIC_GRAN">
<config>
<name>OfficialShortName_1</name>
<configValue>VIIRS-GridIP-VIIRS-Snow-Ice-Cover-Mod-Gran</configValue>
</config>
<config>
<name>DataEndianType</name>
<configValue>Little</configValue>
</config>
</group>

This will allow the input to be set up for the algorithm automatically if you rebuild the ST algorithm.

Then you would have to add additional code to ProEdrViirsSurfType.cpp to probably check for retrieval.

Add it to the ptrs_ structure as was done for snowCover such as shown in bold below:

// Get binary snow fraction EDR
ptrs_.snowCover = inputVIIRS_SCD_BINARY_SNOW_FRAC_EDR_.start_Ptr;
ptrs_.snowGrid = inputGIP_SIC_GRAN_.start_Ptr;

Then add it to the data available structure:

if(ptrs_.snowCover == DM_BADADDRESS)
{
dataAvailable_ |= SNOW_COVER_DATA_NOT_AVAILABLE;
}

if(ptrs_.snowGrid == DM_BADADDRESS)
{
dataAvailable_ |= SNOW_GRID_DATA_NOT_AVAILABLE;
}


Then modify the previous code I showed in Set_SurfType_Flags.cpp to make use of the Grid data when available and the SNOW EDR data isn't.

If you truly want it to be a gracefully degraded scenario, there are numerous more code changes involved and we'd need to set up different algorithm branches so we could determine exactly which input was retrieved and allow the CMN code to allow for the format of the input to change size. I'd almost have to code that scenario to outline it for you.

Thanks,

Bryan Henderson
Raytheon Company
tangyouhua
Posts: 4
Joined: Mon Sep 24, 2012 2:23 pm

Re: Surface Type EDR's snow cover data

Post by tangyouhua »

Thanks for your answer. My problem was solved
Post Reply