Skip to content

Correct calculations of snow precipitation #279

Closed
@MostafaGomaa93

Description

@MostafaGomaa93

The snow precipitation was not calculated correctly in the code. There are a couple of issues that are solved in this branch

In principle, at any timestep, if surface temperature is <= zero, then precipitation is snow (not liquid) and should not be used in this time step. Rather, this snow_precipitation should be accumulated and go to next time step. At any of the further time steps, once surface temperature becomes > 0, then the accumulated snow precipitation is added to the liquid precipitation of this particular time step to define the total available precipitation. Then also proper runoff and infiltration will be calculated

The following corrections are implemented

  1. The accumulated snow precipitation was set to zero every timestep (see here), so the accumulation is wrong. Instead, the accumulated snow precipitation:
    a) has a more representative name Precip_snowAccum
    b) is initialized with zero value at the first time step (Lines 48-52)
    c) goes back to zero again once the surface temperature becomes > 0 (Line 70).
  2. Proper accumulation based on the surface temperature value is done:
    a) As long as surface temperature is < 0 -> then precipitation will be accumulated in snow precipitation (Lines 54-62).
    b) Once surface temperature is > 0 -> accumulated snow precipitation is added to liquid precipitation (lines 63-71).
  3. Because these modifications are done in the +soilmoisture/calculateBoundaryConditions.m, which runs through the STEMMUS iteration loop within every time step (loop start here, and the calculations are part of the loop here), these snow_precipitation calculations has to be done only once per time step (and not per every iteration within the time step), so an if condition is added for that purpose (Line 58 and Line 64).
  4. This Precip variable refers actually to the applied infiltration (after removing runoff) so, it got a more representative name applied_inf (here) and added to the ForcingData structure (also for BMI purposes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions