Created At: 2026-06-14T13:53:36Z
Completed At: 2026-06-14T13:53:36Z
File Path: `file:///c:/Users/HP/Downloads/climate-system/climate-system/index.php`
Total Lines: 4582
Total Bytes: 193648
Showing lines 55 to 75
The following code has been modified to include a line number before every line, in the format: <line_number>: <original_line>. Please note that any changes targeting the original code should remove the line number, colon, and leading space.
55: }
56: 
57: // Fungsi membuat 4 file CSV simulasi IPCC (historical, ensmean, ensmin, ensmax) jika belum tersedia
58: function ensure_sample_csv_exists_ipcc($location_sanitized, $variable_sanitized) {
59:     $dir = __DIR__ . "/data/{$location_sanitized}/{$variable_sanitized}";
60:     if (!is_dir($dir)) {
61:         mkdir($dir, 0777, true);
62:     }
63: 
64:     $base = 26.5; // default baseline (suhu)
65:     if (stripos($variable_sanitized, 'precip') !== false || stripos($variable_sanitized, 'hujan') !== false) {
66:         $base = 2300; // default baseline (curah hujan)
67:     } else if (stripos($variable_sanitized, 'kelembaban') !== false || stripos($variable_sanitized, 'humidity') !== false) {
68:         $base = 82.0;
69:     } else if (stripos($variable_sanitized, 'kecepatan') !== false || stripos($variable_sanitized, 'angin') !== false || stripos($variable_sanitized, 'wind') !== false) {
70:         $base = 2.4;
71:     } else if (stripos($variable_sanitized, 'radiasi') !== false || stripos($variable_sanitized, 'matahari') !== false || stripos($variable_sanitized, 'solar') !== false) {
72:         $base = 178.0;
73:     }
74: 
75:     // 1. historical_timeseries.csv (1991 - 2020)
The above content does NOT show the entire file contents. If you need to view any lines of the file which were not shown to complete your task, call this tool again to view those lines.
