HydrologyFrankfurt / ReWaterGAP

GNU Lesser General Public License v3.0
4 stars 0 forks source link

Snow Storage Page Header #16

Closed Leon-Muehlenbruch closed 5 months ago

Leon-Muehlenbruch commented 1 year ago

— The snow storage page is very long and I thought a more expansive introduction area might help readability so i moved some things around on the page to make this header area. —

Note Simulation of the snow dynamics is calculated such that each 0.5°×0.5° grid cell is subdivided into 100 non localized subgrids that are assigned different land surface elevations according to GTOPO30 (U.S. Geological Survey, 1996) 1. The daily temperature of each subgrid is calculated from daily temperature at the 0.5◦ × 0.5◦ cell by applying an adiabatic lapse rate of 0.6 °/100 2. The daily snow water balance is computed for each of the subcells such that within a 0.5◦ × 0.5◦ cell there may be subcells with and without snow cover or snowfall 3. Subgrid values are then aggregated to 0.5◦ × 0.5◦ cell values. See section 4.3 of Müller Schmied et al 2021 3.

Snow Storage consists of two modules.

1.Numba optimized snow water content  This module is made up of two functions. Function A: numba_snow, which computes the snow water content for the 100 subgrids in each 0.5° x 0.5° grid in series. Function B: subgrid_snow_balance_parallel, which parallelizes the computation for each 0.5° x 0.5° grid in parallel.

2.Snow water equivalent This module calls the numba optimized module numba_snow using the cal_snow method to compute snow water storage.  

— Following this the page explains the 2 modules and their 3 functions with minor formatting changes. —

1.Numba optimized snow water content  This module is made up of two functions. Function A. numba_snow which computes snow water content for the the 100 subgrid of 0.5 grid in series.

.. autofunction:: snow_subgrid.subgrid_snow_balance

Function B: subgrid_snow_balance_parallel    Input data of dimensions 360x720 is divided into N chunks for parallel computations (Default is 20 chunks).   .. autofunction:: snow_subgrid.subgrid_snow_balance_parallel   Compute snow water balance and related storages and fluxes in parallel.   This module calls the numba optimized snow water balance function from the snow_subgrid module to compute snow water balance, including snow water storage and related fluxes for all grid cells in parallel. To achieve this, each grid is subdivided into 100 non localized subgrids that are assigned different land surface elevations according to GTOPO30 (U.S. Geological Survey, 1996). These grid cells are then further split  into 'n' chunks across rows to allow parallel computations. Default is 20 (18x720 cells). Total 0.5 grid cell size is (360 x 720)   The default 360x720 degree grid cell is divided into the desired chunks. The default value is 20 along rows which results in 20 chunks of 18x720 degree cells. The return variables are saved in same chunks size.

  1. Snow water equivalent This module calls the numba optimized module numba_snow using the cal_snow method to compute snow water storage. .. autoclass:: snow.Snow