-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fix(CII): replace hard-cap HAPI fallback with log scale + finer displacement tiers #2577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
fuleinist
wants to merge
4
commits into
koala73:main
Choose a base branch
from
fuleinist:fix/issue-2457-cii-bias
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+330
−37
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d6d25d3
fix(climate): replace 30-day rolling baseline with WMO 30-year normals
cc576f5
fix(climate): address greptile-apps review comments on WMO normals PR
4975fce
fix(CII): replace hard-cap HAPI fallback with log scale + finer displ…
ac1321d
fix(climate): address greptile-apps review comments on PR #2577
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /** | ||
| * Shared climate zone definitions. | ||
| * ZONES = original 15 geopolitical zones | ||
| * CLIMATE_ZONES = 7 additional climate-specific zones | ||
| * ALL_ZONES = ZONES + CLIMATE_ZONES | ||
| * | ||
| * Single source of truth — import this in both seeders to keep them in sync. | ||
| */ | ||
|
|
||
| export const ZONES = [ | ||
| { name: 'Ukraine', lat: 48.4, lon: 31.2 }, | ||
| { name: 'Middle East', lat: 33.0, lon: 44.0 }, | ||
| { name: 'Sahel', lat: 14.0, lon: 0.0 }, | ||
| { name: 'Horn of Africa', lat: 8.0, lon: 42.0 }, | ||
| { name: 'South Asia', lat: 25.0, lon: 78.0 }, | ||
| { name: 'California', lat: 36.8, lon: -119.4 }, | ||
| { name: 'Amazon', lat: -3.4, lon: -60.0 }, | ||
| { name: 'Australia', lat: -25.0, lon: 134.0 }, | ||
| { name: 'Mediterranean', lat: 38.0, lon: 20.0 }, | ||
| { name: 'Taiwan Strait', lat: 24.0, lon: 120.0 }, | ||
| { name: 'Myanmar', lat: 19.8, lon: 96.7 }, | ||
| { name: 'Central Africa', lat: 4.0, lon: 22.0 }, | ||
| { name: 'Southern Africa', lat: -25.0, lon: 28.0 }, | ||
| { name: 'Central Asia', lat: 42.0, lon: 65.0 }, | ||
| { name: 'Caribbean', lat: 19.0, lon: -72.0 }, | ||
| ]; | ||
|
|
||
| export const CLIMATE_ZONES = [ | ||
| { name: 'Arctic', lat: 70.0, lon: 0.0 }, | ||
| { name: 'Greenland', lat: 72.0, lon: -42.0 }, | ||
| { name: 'WestAntarctic', lat: -78.0, lon: -100.0 }, | ||
| { name: 'TibetanPlateau', lat: 31.0, lon: 91.0 }, | ||
| { name: 'CongoBasin', lat: -1.0, lon: 24.0 }, | ||
| { name: 'CoralTriangle', lat: -5.0, lon: 128.0 }, | ||
| { name: 'NorthAtlantic', lat: 55.0, lon: -30.0 }, | ||
| ]; | ||
|
|
||
| export const ALL_ZONES = [...ZONES, ...CLIMATE_ZONES]; | ||
|
|
||
| export const MIN_ZONES = Math.ceil(ALL_ZONES.length * 2 / 3); // 15 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currentMonthuses local system time — can be off by one at month boundariesnew Date().getMonth() + 1resolves the month in the Railway container's local timezone. If the container timezone differs from UTC, the month lookup could be off by one during the first few hours of each month, causingmonthNormalto not be found and silently returningnullfor those zones.Consider using UTC explicitly:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your comment has been addressed: currentMonth now uses new Date().getUTCMonth() + 1 instead of getMonth() + 1, eliminating the risk of off-by-one errors at month boundaries when the Railway container's local timezone differs from UTC.