{"abstract":"Polar grids are mirrored left to right.","category":"Map projection transforms","checks":8,"contract":"Input [lon, lat, pole, lon0, k0]. pole \"N\" accepts lat >= 0 and \"S\" accepts lat <= 0; other points return None. Sphere R = 6371000, dl = rad(lon - lon0). North: rho = 2*R*k0*tan(pi/4 - phi/2), x = rho*sin(dl), y = -rho*cos(dl). South: rho = 2*R*k0*tan(pi/4 + phi/2), x = rho*sin(dl), y = rho*cos(dl). Rounded to 2 decimals.","contract_signature":"x","evaluation_group":"w2-map-projection-transforms-polar-stereographic","failed_approach":"The absolute offset folds western longitudes onto the east.","family":"w2-map-projection-transforms-polar-stereographic-longitude-offset-direction","id":"FA-70166","implementations":{"attempt":{"sha256":"b709277ee129310292a076c653fd3113c589381c65d9af7df646b3c984824228","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    lon, lat, pole, lon0, k0 = x\n    R = 6371000.0\n    if (pole == 'N' and lat < 0) or (pole == 'S' and lat > 0):\n        return None\n    phi = math.radians(lat)\n    dl = math.radians(abs(lon - lon0))\n    if pole == 'N':\n        rho = 2 * R * k0 * math.tan(math.pi / 4 - phi / 2)\n        return [round(rho * math.sin(dl), 2), round(-rho * math.cos(dl), 2)]\n    rho = 2 * R * k0 * math.tan(math.pi / 4 + phi / 2)\n    return [round(rho * math.sin(dl), 2), round(rho * math.cos(dl), 2)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [-8.993, 52.361, 'N', 180.0, 1.0], [678803.65, 4289189.08]), ('control #1', [-175.479, -58.613, 'S', 70.0, 0.994], [3237624.01, -1476903.61]), ('control #2', [-54.642, 24.763, 'N', 180.0, 0.9996], [6647880.23, 4717072.09]), ('control #3', [-55.98, 14.924, 'N', -45.0, 0.9996], [-1864055.44, -9607637.84]), ('control #4', [-10.59, -42.995, 'S', 180.0, 0.994], [1012221.27, -5413982.3]), ('regression #22', [10.0, -5.0, 'N', 0.0, 0.994], None), ('regression #23', [10.0, 5.0, 'S', 0.0, 0.994], None), ('boundary #24', [0.0, 90.0, 'N', 0.0, 0.994], [0.0, -0.0])], [('control #1', [-175.479, -58.613, 'S', 70.0, 0.994], [3237624.01, -1476903.61]), ('control #2', [-54.642, 24.763, 'N', 180.0, 0.9996], [6647880.23, 4717072.09]), ('control #5', [123.778, -15.586, 'S', 70.0, 1.0], [7804467.33, 5716609.82]), ('control #6', [48.904, -48.41, 'S', 180.0, 1.0], [-3646684.72, -3180757.54]), ('control #7', [-170.617, 3.39, 'N', 180.0, 0.994], [1946208.51, -11777778.83]), ('regression #22', [10.0, -5.0, 'N', 0.0, 0.994], None), ('regression #23', [10.0, 5.0, 'S', 0.0, 0.994], None), ('boundary #24', [0.0, 90.0, 'N', 0.0, 0.994], [0.0, -0.0])], [('control #2', [-54.642, 24.763, 'N', 180.0, 0.9996], [6647880.23, 4717072.09]), ('control #3', [-55.98, 14.924, 'N', -45.0, 0.9996], [-1864055.44, -9607637.84]), ('control #8', [27.496, -32.858, 'S', 180.0, 0.9996], [-3202270.07, -6152552.24]), ('control #9', [119.432, 24.56, 'N', 0.0, 0.994], [7087167.41, 3998630.2]), ('control #10', [112.92, -7.484, 'S', 0.0, 0.994], [10233335.79, -4326940.4]), ('regression #22', [10.0, -5.0, 'N', 0.0, 0.994], None), ('regression #23', [10.0, 5.0, 'S', 0.0, 0.994], None), ('boundary #24', [0.0, 90.0, 'N', 0.0, 0.994], [0.0, -0.0])], [('control #3', [-55.98, 14.924, 'N', -45.0, 0.9996], [-1864055.44, -9607637.84]), ('control #4', [-10.59, -42.995, 'S', 180.0, 0.994], [1012221.27, -5413982.3]), ('control #11', [38.777, -30.127, 'S', 0.0, 1.0], [4595585.04, 5720455.9]), ('control #12', [-24.24, 42.676, 'N', -45.0, 0.994], [1967139.89, -5189443.03]), ('control #13', [-123.503, 27.165, 'N', 180.0, 1.0], [6489985.88, -4296116.65]), ('regression #22', [10.0, -5.0, 'N', 0.0, 0.994], None), ('regression #23', [10.0, 5.0, 'S', 0.0, 0.994], None), ('boundary #24', [0.0, 90.0, 'N', 0.0, 0.994], [0.0, -0.0])], [('control #4', [-10.59, -42.995, 'S', 180.0, 0.994], [1012221.27, -5413982.3]), ('control #6', [48.904, -48.41, 'S', 180.0, 1.0], [-3646684.72, -3180757.54]), ('control #14', [-71.556, 31.408, 'N', 70.0, 1.0], [-4445077.72, 5599453.4]), ('control #15', [133.789, -17.059, 'S', -45.0, 0.9996], [198973.01, -9412565.04]), ('control #16', [-69.256, 8.234, 'N', 70.0, 1.0], [-7199620.38, 8357340.39]), ('regression #22', [10.0, -5.0, 'N', 0.0, 0.994], None), ('regression #23', [10.0, 5.0, 'S', 0.0, 0.994], None), ('boundary #24', [0.0, 90.0, 'N', 0.0, 0.994], [0.0, -0.0])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"57363633935bdb59bc8fda22fee42fd9f59440e4cbb5af2db8fb453bdd5aef97","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(x):\n    lon, lat, pole, lon0, k0 = x\n    R = 6371000.0\n    if (pole == 'N' and lat < 0) or (pole == 'S' and lat > 0):\n        return None\n    phi = math.radians(lat)\n    dl = math.radians(lon0 - lon)\n    if pole == 'N':\n        rho = 2 * R * k0 * math.tan(math.pi / 4 - phi / 2)\n        return [round(rho * math.sin(dl), 2), round(-rho * math.cos(dl), 2)]\n    rho = 2 * R * k0 * math.tan(math.pi / 4 + phi / 2)\n    return [round(rho * math.sin(dl), 2), round(rho * math.cos(dl), 2)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('control #0', [-8.993, 52.361, 'N', 180.0, 1.0], [678803.65, 4289189.08]), ('control #1', [-175.479, -58.613, 'S', 70.0, 0.994], [3237624.01, -1476903.61]), ('control #2', [-54.642, 24.763, 'N', 180.0, 0.9996], [6647880.23, 4717072.09]), ('control #3', [-55.98, 14.924, 'N', -45.0, 0.9996], [-1864055.44, -9607637.84]), ('control #4', [-10.59, -42.995, 'S', 180.0, 0.994], [1012221.27, -5413982.3]), ('regression #22', [10.0, -5.0, 'N', 0.0, 0.994], None), ('regression #23', [10.0, 5.0, 'S', 0.0, 0.994], None), ('boundary #24', [0.0, 90.0, 'N', 0.0, 0.994], [0.0, -0.0])], [('control #1', [-175.479, -58.613, 'S', 70.0, 0.994], [3237624.01, -1476903.61]), ('control #2', [-54.642, 24.763, 'N', 180.0, 0.9996], [6647880.23, 4717072.09]), ('control #5', [123.778, -15.586, 'S', 70.0, 1.0], [7804467.33, 5716609.82]), ('control #6', [48.904, -48.41, 'S', 180.0, 1.0], [-3646684.72, -3180757.54]), ('control #7', [-170.617, 3.39, 'N', 180.0, 0.994], [1946208.51, -11777778.83]), ('regression #22', [10.0, -5.0, 'N', 0.0, 0.994], None), ('regression #23', [10.0, 5.0, 'S', 0.0, 0.994], None), ('boundary #24', [0.0, 90.0, 'N', 0.0, 0.994], [0.0, -0.0])], [('control #2', [-54.642, 24.763, 'N', 180.0, 0.9996], [6647880.23, 4717072.09]), ('control #3', [-55.98, 14.924, 'N', -45.0, 0.9996], [-1864055.44, -9607637.84]), ('control #8', [27.496, -32.858, 'S', 180.0, 0.9996], [-3202270.07, -6152552.24]), ('control #9', [119.432, 24.56, 'N', 0.0, 0.994], [7087167.41, 3998630.2]), ('control #10', [112.92, -7.484, 'S', 0.0, 0.994], [10233335.79, -4326940.4]), ('regression #22', [10.0, -5.0, 'N', 0.0, 0.994], None), ('regression #23', [10.0, 5.0, 'S', 0.0, 0.994], None), ('boundary #24', [0.0, 90.0, 'N', 0.0, 0.994], [0.0, -0.0])], [('control #3', [-55.98, 14.924, 'N', -45.0, 0.9996], [-1864055.44, -9607637.84]), ('control #4', [-10.59, -42.995, 'S', 180.0, 0.994], [1012221.27, -5413982.3]), ('control #11', [38.777, -30.127, 'S', 0.0, 1.0], [4595585.04, 5720455.9]), ('control #12', [-24.24, 42.676, 'N', -45.0, 0.994], [1967139.89, -5189443.03]), ('control #13', [-123.503, 27.165, 'N', 180.0, 1.0], [6489985.88, -4296116.65]), ('regression #22', [10.0, -5.0, 'N', 0.0, 0.994], None), ('regression #23', [10.0, 5.0, 'S', 0.0, 0.994], None), ('boundary #24', [0.0, 90.0, 'N', 0.0, 0.994], [0.0, -0.0])], [('control #4', [-10.59, -42.995, 'S', 180.0, 0.994], [1012221.27, -5413982.3]), ('control #6', [48.904, -48.41, 'S', 180.0, 1.0], [-3646684.72, -3180757.54]), ('control #14', [-71.556, 31.408, 'N', 70.0, 1.0], [-4445077.72, 5599453.4]), ('control #15', [133.789, -17.059, 'S', -45.0, 0.9996], [198973.01, -9412565.04]), ('control #16', [-69.256, 8.234, 'N', 70.0, 1.0], [-7199620.38, 8357340.39]), ('regression #22', [10.0, -5.0, 'N', 0.0, 0.994], None), ('regression #23', [10.0, 5.0, 'S', 0.0, 0.994], None), ('boundary #24', [0.0, 90.0, 'N', 0.0, 0.994], [0.0, -0.0])]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Stipulated deterministic toy contract on a bounded input domain; results are rounded as stated and no conformance with any published standard or library is claimed. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-map-projection-transforms-polar-stereographic-longitude-offset-direction","generated_at":"2026-09-29T14:48:18.077817+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Sea-ice, Antarctic and Arctic products are gridded in polar stereographic; a sign slip rotates whole continents.","root_cause":"The longitude offset is computed as lon0 - lon.","sha256":"d3bd439c4a5c1fc2ec5f88faa8fbf637302d8928343b579eefb3189fea0bcca8","title":"Spherical polar stereographic forward: longitude offset direction · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":37.106,"exit_code":1,"observations":[{"actual":[-678803.65,4289189.08],"check":"control #0","expected":[678803.65,4289189.08],"passed":false},{"actual":[-3237624.01,-1476903.61],"check":"control #1","expected":[3237624.01,-1476903.61],"passed":false},{"actual":[-6647880.23,4717072.09],"check":"control #2","expected":[6647880.23,4717072.09],"passed":false},{"actual":[1864055.44,-9607637.84],"check":"control #3","expected":[-1864055.44,-9607637.84],"passed":false},{"actual":[-1012221.27,-5413982.3],"check":"control #4","expected":[1012221.27,-5413982.3],"passed":false},{"actual":null,"check":"regression #22","expected":null,"passed":true},{"actual":null,"check":"regression #23","expected":null,"passed":true},{"actual":[0.0,-0.0],"check":"boundary #24","expected":[0.0,-0.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [-678803.65, 4289189.08], \"expected\": [678803.65, 4289189.08], \"passed\": false}, {\"check\": \"control #1\", \"actual\": [-3237624.01, -1476903.61], \"expected\": [3237624.01, -1476903.61], \"passed\": false}, {\"check\": \"control #2\", \"actual\": [-6647880.23, 4717072.09], \"expected\": [6647880.23, 4717072.09], \"passed\": false}, {\"check\": \"control #3\", \"actual\": [1864055.44, -9607637.84], \"expected\": [-1864055.44, -9607637.84], \"passed\": false}, {\"check\": \"control #4\", \"actual\": [-1012221.27, -5413982.3], \"expected\": [1012221.27, -5413982.3], \"passed\": false}, {\"check\": \"regression #22\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression #23\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary #24\", \"actual\": [0.0, -0.0], \"expected\": [0.0, -0.0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.738,"exit_code":1,"observations":[{"actual":[-678803.65,4289189.08],"check":"control #0","expected":[678803.65,4289189.08],"passed":false},{"actual":[-3237624.01,-1476903.61],"check":"control #1","expected":[3237624.01,-1476903.61],"passed":false},{"actual":[-6647880.23,4717072.09],"check":"control #2","expected":[6647880.23,4717072.09],"passed":false},{"actual":[1864055.44,-9607637.84],"check":"control #3","expected":[-1864055.44,-9607637.84],"passed":false},{"actual":[-1012221.27,-5413982.3],"check":"control #4","expected":[1012221.27,-5413982.3],"passed":false},{"actual":null,"check":"regression #22","expected":null,"passed":true},{"actual":null,"check":"regression #23","expected":null,"passed":true},{"actual":[0.0,-0.0],"check":"boundary #24","expected":[0.0,-0.0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control #0\", \"actual\": [-678803.65, 4289189.08], \"expected\": [678803.65, 4289189.08], \"passed\": false}, {\"check\": \"control #1\", \"actual\": [-3237624.01, -1476903.61], \"expected\": [3237624.01, -1476903.61], \"passed\": false}, {\"check\": \"control #2\", \"actual\": [-6647880.23, 4717072.09], \"expected\": [6647880.23, 4717072.09], \"passed\": false}, {\"check\": \"control #3\", \"actual\": [1864055.44, -9607637.84], \"expected\": [-1864055.44, -9607637.84], \"passed\": false}, {\"check\": \"control #4\", \"actual\": [-1012221.27, -5413982.3], \"expected\": [1012221.27, -5413982.3], \"passed\": false}, {\"check\": \"regression #22\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"regression #23\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"boundary #24\", \"actual\": [0.0, -0.0], \"expected\": [0.0, -0.0], \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}