This is a task perfectly suited for the graph processing capabilities of SNAP, which allows you to efficiently chain multiple processing steps together.
Here is a sample of a graph you might want to use to generate calibrated, multilooked and terrain-corrected images from S1 GRDs. Remove/add any steps and modify any parameters as you see fit.
preprocess.xml (4.7 KB)
<graph id="Graph">
<version>1.0</version>
<node id="Read">
<operator>Read</operator>
<sources/>
<parameters>
<file>${inFile}</file>
</parameters>
</node>
<node id="Subset">
<operator>Subset</operator>
<sources>
<sourceProduct refid="Read"/>
</sources>
<parameters>
<sourceBands/>
<region/>
<geoRegion>${georegion}</geoRegion>
<subSamplingX>1</subSamplingX>
<subSamplingY>1</subSamplingY>
<tiePointGridNames/>
<copyMetadata>true</copyMetadata>
</parameters>
</node>
<node id="Apply-Orbit-File">
<operator>Apply-Orbit-File</operator>
<sources>
<sourceProduct refid="Subset"/>
</sources>
<parameters>
<orbitType>Sentinel Precise (Auto Download)</orbitType>
<polyDegree>3</polyDegree>
</parameters>
</node>
<node id="Calibration">
<operator>Calibration</operator>
<sources>
<sourceProduct refid="Apply-Orbit-File"/>
</sources>
<parameters>
<sourceBands/>
<auxFile>Product Auxiliary File</auxFile>
<externalAuxFile/>
<outputImageInComplex>false</outputImageInComplex>
<outputImageScaleInDb>false</outputImageScaleInDb>
<createGammaBand>false</createGammaBand>
<createBetaBand>false</createBetaBand>
<selectedPolarisations/>
<outputSigmaBand>false</outputSigmaBand>
<outputGammaBand>false</outputGammaBand>
<outputBetaBand>true</outputBetaBand>
<outputDNBand>false</outputDNBand>
</parameters>
</node>
<node id="Multilook">
<operator>Multilook</operator>
<sources>
<sourceProduct refid="Calibration"/>
</sources>
<parameters>
<sourceBands/>
<nRgLooks>10</nRgLooks>
<nAzLooks>10</nAzLooks>
<outputIntensity>false</outputIntensity>
<grSquarePixel>false</grSquarePixel>
</parameters>
</node>
<node id="Terrain-Flattening">
<operator>Terrain-Flattening</operator>
<sources>
<sourceProduct refid="Multilook"/>
</sources>
<parameters>
<sourceBands/>
<demName>SRTM 1Sec HGT</demName>
<demResamplingMethod>BICUBIC_INTERPOLATION</demResamplingMethod>
<externalDEMFile/>
<externalDEMNoDataValue>0.0</externalDEMNoDataValue>
<outputSimulatedImage>false</outputSimulatedImage>
</parameters>
</node>
<node id="Terrain-Correction">
<operator>Terrain-Correction</operator>
<sources>
<sourceProduct refid="Terrain-Flattening"/>
</sources>
<parameters>
<sourceBands/>
<demName>SRTM 1Sec HGT</demName>
<externalDEMFile/>
<externalDEMNoDataValue>0.0</externalDEMNoDataValue>
<demResamplingMethod>BICUBIC_INTERPOLATION</demResamplingMethod>
<imgResamplingMethod>BICUBIC_INTERPOLATION</imgResamplingMethod>
<pixelSpacingInMeter>50.0</pixelSpacingInMeter>
<pixelSpacingInDegree>-1</pixelSpacingInDegree>
<mapProjection>${projection}</mapProjection>
<nodataValueAtSea>true</nodataValueAtSea>
<saveDEM>false</saveDEM>
<saveLatLon>false</saveLatLon>
<saveIncidenceAngleFromEllipsoid>false</saveIncidenceAngleFromEllipsoid>
<saveLocalIncidenceAngle>false</saveLocalIncidenceAngle>
<saveProjectedLocalIncidenceAngle>false</saveProjectedLocalIncidenceAngle>
<saveSelectedSourceBand>true</saveSelectedSourceBand>
<applyRadiometricNormalization>false</applyRadiometricNormalization>
<saveSigmaNought>false</saveSigmaNought>
<saveGammaNought>false</saveGammaNought>
<saveBetaNought>false</saveBetaNought>
<incidenceAngleForSigma0>Use projected local incidence angle from DEM</incidenceAngleForSigma0>
<incidenceAngleForGamma0>Use projected local incidence angle from DEM</incidenceAngleForGamma0>
<auxFile>Latest Auxiliary File</auxFile>
<externalAuxFile/>
</parameters>
</node>
<node id="Write">
<operator>Write</operator>
<sources>
<sourceProduct refid="Terrain-Correction"/>
</sources>
<parameters>
<file>${outFile}</file>
<formatName>BEAM-DIMAP</formatName>
</parameters>
</node>
</graph>
To apply it to input images, you can use either the SNAP’s batch processing tool or the GPT command-line utility. I personally prefer the GPT.
For example, you could run the above graph with the following parameters from the command line, which will generate “preprocessed.dim” as the output.
gpt preprocess.xml "-Pgeoregion=Polygon ((26.894 57.939, 27.403 57.913, 27.3
35 57.596, 26.754 57.623, 26.629 57.819, 26.894 57.939))" -Pprojection=EPSG:3301 "-PinFile=S1A_IW_GRDH_1SDV_20150603T042552_20150603T042617_006204_00817F_C6A2.zip" -PoutFile=preprocessed