<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def calc_contriarea_v1(self):
 """Determine the relative size of the contributing area of the whole subbasin. Required control parameters: |NmbZones| |ZoneType| |RespArea| |FC| |Beta| Required derived parameter: |RelSoilArea| Required state sequence: |SM| Calculated fluxes sequences: |ContriArea| Basic equation: :math:`ContriArea = \\left( \\frac{SM}{FC} \\right)^{Beta}` Examples: Four zones are initialized, but only the first two zones of type field and forest are taken into account in the calculation of the relative contributing area of the catchment (even, if also glaciers contribute to the inflow of the upper zone layer):
 With a relative soil moisture of 100 % in the whole subbasin, the contriarea(1.0) area of 0 %: contriarea(0.0) With the given value 2 of the nonlinearity parameter Beta, soil moisture of 50 % results in a contributing area estimate of 25%: contriarea(0.25) contriarea(1.0) contriarea(1.0) contriarea(1.0) """

    con = self.parameters.control.fastaccess
    der = self.parameters.derived.fastaccess
    flu = self.sequences.fluxes.fastaccess
    sta = self.sequences.states.fastaccess
    if con.resparea and (der.relsoilarea > 0.):
        flu.contriarea = 0.
        for k in range(con.nmbzones):
            if con.zonetype[k] in (FIELD, FOREST):
                if con.fc[k] > 0.:
                    flu.contriarea += (der.relsoilzonearea[k] *
                                       (sta.sm[k]/con.fc[k])**con.beta[k])
                else:
                    flu.contriarea += der.relsoilzonearea[k]
    else:
        flu.contriarea = 1.