{
  "schemaVersion": 1,
  "slug": "rain-to-snow-converter",
  "category": "weather",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "3f847c33f0d1ed8a672d08ab7a0a47ae97c9409d11d4c08d2430f8c20f4bbe48",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/rain-to-snow-converter.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "S = R×k; k: T≥34→6, 28≤T<34→10, 20≤T<28→15, 10≤T<20→20, T<10→25",
    "vars": [
      [
        "R",
        "Rainfall (in)"
      ],
      [
        "T",
        "Temperature (°F)"
      ],
      [
        "k",
        "Snow-to-rain ratio"
      ],
      [
        "S",
        "Snowfall (in)"
      ]
    ],
    "note": "The temperature bands select a simple snow-to-liquid ratio. Actual snowfall varies with storm structure and snow density, so use a local forecast for planning."
  },
  "externalEvidence": {
    "reviewedAt": "2026-10-12",
    "sources": [
      {
        "name": "NWS — Snowfall and snow-to-liquid variability",
        "url": "https://www.weather.gov/arx/why_snowratios"
      }
    ],
    "referenceRole": "context",
    "implementationHash": "3f847c33f0d1ed8a672d08ab7a0a47ae97c9409d11d4c08d2430f8c20f4bbe48",
    "basis": "S = R×k; k: T≥34→6, 28≤T<34→10, 20≤T<28→15, 10≤T<20→20, T<10→25",
    "limitations": "The references provide context and limitations. They do not validate this page’s illustrative multipliers, lookup values or predictions."
  },
  "contract": {
    "compute": "const T = unit === 'c' ? temperature*9/5 + 32 : temperature; let ratio; let type; if (manualRatio > 0) { ratio = manualRatio; type = 'Manual ratio'; } else if (T >= 34) { ratio = 6; type = 'Wet, heavy snow'; } else if (T >= 28) { ratio = 10; type = 'Average snow'; } else if (T >= 20) { ratio = 15; type = 'Dry snow'; } else if (T >= 10) { ratio = 20; type = 'Very dry powder'; } else { ratio = 25; type = 'Cold, fluffy powder'; } const inches = rainfall*ratio; return { snowRatio: ratio + ' to 1', snowInches: inches, snowCm: inches*2.54, snowFeet: inches/12, snowType: type };",
    "inputs": [
      {
        "name": "rainfall",
        "type": "number",
        "default": 1,
        "min": 0,
        "max": 100,
        "step": 0.01
      },
      {
        "name": "temperature",
        "type": "number",
        "default": 28,
        "min": -60,
        "max": 50,
        "step": 1,
        "slider": true
      },
      {
        "name": "unit",
        "type": "select",
        "default": "f",
        "options": [
          {
            "value": "f"
          },
          {
            "value": "c"
          }
        ]
      },
      {
        "name": "manualRatio",
        "type": "number",
        "default": 0,
        "min": 0,
        "max": 60,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "snowRatio",
        "precision": 0,
        "unit": "",
        "type": "text"
      },
      {
        "name": "snowInches",
        "precision": 1,
        "unit": "in"
      },
      {
        "name": "snowCm",
        "precision": 1,
        "unit": "cm"
      },
      {
        "name": "snowFeet",
        "precision": 2,
        "unit": "ft"
      },
      {
        "name": "snowType",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
