Write Optional Cross Section Cards to File Method

def _writeOptionalXsecCards(self, fileObject, xSec, replaceParamFile):
        """
        Write Optional Cross Section Cards to File Method
        """
        if xSec.erode:
            fileObject.write('ERODE\n')

        if xSec.maxErosion != None:
            fileObject.write('MAX_EROSION    %.6f\n' % xSec.maxErosion)

        if xSec.subsurface:
            fileObject.write('SUBSURFACE\n')

        if xSec.mRiver != None:
            mRiver = vwp(xSec.mRiver, replaceParamFile)
            try:
                fileObject.write('M_RIVER        %.6f\n' % mRiver)
            except:
                fileObject.write('M_RIVER        %s\n' % mRiver)

        if xSec.kRiver != None:
            kRiver = vwp(xSec.kRiver, replaceParamFile)
            try:
                fileObject.write('K_RIVER        %.6f\n' % kRiver)
            except:
                fileObject.write('K_RIVER        %s\n' % kRiver)