{"action":"closed","number":618,"pull_request":{"url":"https://api.github.com/repos/OpenCPN/OpenCPN/pulls/618","id":66050398,"html_url":"https://github.com/OpenCPN/OpenCPN/pull/618","diff_url":"https://github.com/OpenCPN/OpenCPN/pull/618.diff","patch_url":"https://github.com/OpenCPN/OpenCPN/pull/618.patch","issue_url":"https://api.github.com/repos/OpenCPN/OpenCPN/issues/618","number":618,"state":"closed","locked":false,"title":"compute the right value for accumulation records","user":{"login":"did-g","id":12138026,"avatar_url":"https://avatars.githubusercontent.com/u/12138026?v=3","gravatar_id":"","url":"https://api.github.com/users/did-g","html_url":"https://github.com/did-g","followers_url":"https://api.github.com/users/did-g/followers","following_url":"https://api.github.com/users/did-g/following{/other_user}","gists_url":"https://api.github.com/users/did-g/gists{/gist_id}","starred_url":"https://api.github.com/users/did-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/did-g/subscriptions","organizations_url":"https://api.github.com/users/did-g/orgs","repos_url":"https://api.github.com/users/did-g/repos","events_url":"https://api.github.com/users/did-g/events{/privacy}","received_events_url":"https://api.github.com/users/did-g/received_events","type":"User","site_admin":false},"body":"Hi\r\nCompute the right value for accumulation records, ie subtract the previous value if it overlaps.\r\n\r\nIt was mostly ok for zyGrib NOAA total precipitation data, they are reset every 6 hours (cf stepRange column):\r\ngrib_ls output\r\n\r\n```\r\nedition      centre       typeOfLevel  level        dataDate     stepRange    shortName    packingType  gridType     \r\n1            kwbc         surface      0            20160411     0-3          tp          grid_simple  regular_ll  \r\n1            kwbc         surface      0            20160411     0-6          tp          grid_simple  regular_ll  \r\n1            kwbc         surface      0            20160411     6-9          tp          grid_simple  regular_ll  \r\n1            kwbc         surface      0            20160411     6-12         tp          grid_simple  regular_ll  \r\n1            kwbc         surface      0            20160411     12-15        tp          grid_simple  regular_ll  \r\n1            kwbc         surface      0            20160411     12-18        tp          grid_simple  regular_ll  \r\n1            kwbc         surface      0            20160411     18-21        tp          grid_simple  regular_ll  \r\n1            kwbc         surface      0            20160411     18-24        tp          grid_simple  regular_ll  \r\n  \r\n```\r\nbut not so for french grib which is summing  from the start.\r\n```\r\nedition      centre       date         dataType     gridType     stepRange    typeOfLevel  level        shortName    packingType\r\n1            lfpw         20160411     not_found    regular_ll   0-6          surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-7          surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-8          surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-9          surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-10         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-11         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-12         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-13         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-14         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-15         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-16         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-17         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-18         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-19         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-20         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-21         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-22         surface      0            tp           grid_simple \r\n1            lfpw         20160411     not_found    regular_ll   0-23         surface      0            tp           grid_simple \r\n\r\n```\r\nCurrently only compute values for tp (same for tcc ?)\r\n  \r\nEx. 2 MB file: \r\n[tp.zip](https://github.com/OpenCPN/OpenCPN/files/213636/tp.zip)\r\n\r\nfrench total precipitation  (format grib v1, slightly modified for being readable by  zyGrib, even if it's unable to display this grib correctly)\r\n \r\nfrom \r\n[parameters description (in french)](https://donneespubliques.meteofrance.fr/client/document/description_parametres_modeles-arpege-arome-v2_185.pdf)\r\n\r\n\r\n> INFO sorties «CUMUL»\r\n> : il s’agit d’un cumul des valeurs du champ considéré depuis le début de la simulation de ARPEGE ou AROME. Ce cumul est obtenu en faisant la somme (pour chaque pas de temps) des produits du champ par le pas de temps du modèle (ARPEGE ou AROME). Mais il n’est  pas nécessaire de connaître la valeur du pas de temps utilisé par le modèle. Par exemple, si on veut la moyenne entre 6h et 18h des précipitations totale (PRECIP), il  suffit de retrancher la valeur à 18h de celle à 6h, puis de diviser le résultat par 12 x 3600 = 43200s.\r\n> Si on veut connaître le cumul des précipitations entre 6h et 18h, il suffit de retrancher la valeur à\r\n> 18h par celle à 6h","created_at":"2016-04-11T19:42:48Z","updated_at":"2016-04-26T02:07:21Z","closed_at":"2016-04-26T02:07:21Z","merged_at":"2016-04-26T02:07:21Z","merge_commit_sha":"bb409b691a368346d275cfd3cc15f1ea49c9251b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenCPN/OpenCPN/pulls/618/commits","review_comments_url":"https://api.github.com/repos/OpenCPN/OpenCPN/pulls/618/comments","review_comment_url":"https://api.github.com/repos/OpenCPN/OpenCPN/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenCPN/OpenCPN/issues/618/comments","statuses_url":"https://api.github.com/repos/OpenCPN/OpenCPN/statuses/249aa55c413dbcef9dd7e0ce0d3541a13a95666c","head":{"label":"did-g:accum_record","ref":"accum_record","sha":"249aa55c413dbcef9dd7e0ce0d3541a13a95666c","user":{"login":"did-g","id":12138026,"avatar_url":"https://avatars.githubusercontent.com/u/12138026?v=3","gravatar_id":"","url":"https://api.github.com/users/did-g","html_url":"https://github.com/did-g","followers_url":"https://api.github.com/users/did-g/followers","following_url":"https://api.github.com/users/did-g/following{/other_user}","gists_url":"https://api.github.com/users/did-g/gists{/gist_id}","starred_url":"https://api.github.com/users/did-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/did-g/subscriptions","organizations_url":"https://api.github.com/users/did-g/orgs","repos_url":"https://api.github.com/users/did-g/repos","events_url":"https://api.github.com/users/did-g/events{/privacy}","received_events_url":"https://api.github.com/users/did-g/received_events","type":"User","site_admin":false},"repo":{"id":34712593,"name":"OpenCPN","full_name":"did-g/OpenCPN","owner":{"login":"did-g","id":12138026,"avatar_url":"https://avatars.githubusercontent.com/u/12138026?v=3","gravatar_id":"","url":"https://api.github.com/users/did-g","html_url":"https://github.com/did-g","followers_url":"https://api.github.com/users/did-g/followers","following_url":"https://api.github.com/users/did-g/following{/other_user}","gists_url":"https://api.github.com/users/did-g/gists{/gist_id}","starred_url":"https://api.github.com/users/did-g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/did-g/subscriptions","organizations_url":"https://api.github.com/users/did-g/orgs","repos_url":"https://api.github.com/users/did-g/repos","events_url":"https://api.github.com/users/did-g/events{/privacy}","received_events_url":"https://api.github.com/users/did-g/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/did-g/OpenCPN","description":"A concise ChartPlotter/Navigator. A cross-platform ship-borne GUI application supporting * GPS/GPDS Postition Input * BSB Raster Chart Display * S57 Vector ENChart Display * AIS Input Decoding * Waypoint Autopilot Navigation","fork":true,"url":"https://api.github.com/repos/did-g/OpenCPN","forks_url":"https://api.github.com/repos/did-g/OpenCPN/forks","keys_url":"https://api.github.com/repos/did-g/OpenCPN/keys{/key_id}","collaborators_url":"https://api.github.com/repos/did-g/OpenCPN/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/did-g/OpenCPN/teams","hooks_url":"https://api.github.com/repos/did-g/OpenCPN/hooks","issue_events_url":"https://api.github.com/repos/did-g/OpenCPN/issues/events{/number}","events_url":"https://api.github.com/repos/did-g/OpenCPN/events","assignees_url":"https://api.github.com/repos/did-g/OpenCPN/assignees{/user}","branches_url":"https://api.github.com/repos/did-g/OpenCPN/branches{/branch}","tags_url":"https://api.github.com/repos/did-g/OpenCPN/tags","blobs_url":"https://api.github.com/repos/did-g/OpenCPN/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/did-g/OpenCPN/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/did-g/OpenCPN/git/refs{/sha}","trees_url":"https://api.github.com/repos/did-g/OpenCPN/git/trees{/sha}","statuses_url":"https://api.github.com/repos/did-g/OpenCPN/statuses/{sha}","languages_url":"https://api.github.com/repos/did-g/OpenCPN/languages","stargazers_url":"https://api.github.com/repos/did-g/OpenCPN/stargazers","contributors_url":"https://api.github.com/repos/did-g/OpenCPN/contributors","subscribers_url":"https://api.github.com/repos/did-g/OpenCPN/subscribers","subscription_url":"https://api.github.com/repos/did-g/OpenCPN/subscription","commits_url":"https://api.github.com/repos/did-g/OpenCPN/commits{/sha}","git_commits_url":"https://api.github.com/repos/did-g/OpenCPN/git/commits{/sha}","comments_url":"https://api.github.com/repos/did-g/OpenCPN/comments{/number}","issue_comment_url":"https://api.github.com/repos/did-g/OpenCPN/issues/comments{/number}","contents_url":"https://api.github.com/repos/did-g/OpenCPN/contents/{+path}","compare_url":"https://api.github.com/repos/did-g/OpenCPN/compare/{base}...{head}","merges_url":"https://api.github.com/repos/did-g/OpenCPN/merges","archive_url":"https://api.github.com/repos/did-g/OpenCPN/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/did-g/OpenCPN/downloads","issues_url":"https://api.github.com/repos/did-g/OpenCPN/issues{/number}","pulls_url":"https://api.github.com/repos/did-g/OpenCPN/pulls{/number}","milestones_url":"https://api.github.com/repos/did-g/OpenCPN/milestones{/number}","notifications_url":"https://api.github.com/repos/did-g/OpenCPN/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/did-g/OpenCPN/labels{/name}","releases_url":"https://api.github.com/repos/did-g/OpenCPN/releases{/id}","deployments_url":"https://api.github.com/repos/did-g/OpenCPN/deployments","created_at":"2015-04-28T06:21:10Z","updated_at":"2016-01-12T14:13:58Z","pushed_at":"2016-04-13T19:18:24Z","git_url":"git://github.com/did-g/OpenCPN.git","ssh_url":"git@github.com:did-g/OpenCPN.git","clone_url":"https://github.com/did-g/OpenCPN.git","svn_url":"https://github.com/did-g/OpenCPN","homepage":"http://sourceforge.net/projects/opencpn/","size":233170,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OpenCPN:grib2","ref":"grib2","sha":"2bc5303d3531510ebcb9bae92d9fb7328fca70f1","user":{"login":"OpenCPN","id":194497,"avatar_url":"https://avatars.githubusercontent.com/u/194497?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenCPN","html_url":"https://github.com/OpenCPN","followers_url":"https://api.github.com/users/OpenCPN/followers","following_url":"https://api.github.com/users/OpenCPN/following{/other_user}","gists_url":"https://api.github.com/users/OpenCPN/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenCPN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenCPN/subscriptions","organizations_url":"https://api.github.com/users/OpenCPN/orgs","repos_url":"https://api.github.com/users/OpenCPN/repos","events_url":"https://api.github.com/users/OpenCPN/events{/privacy}","received_events_url":"https://api.github.com/users/OpenCPN/received_events","type":"User","site_admin":false},"repo":{"id":498850,"name":"OpenCPN","full_name":"OpenCPN/OpenCPN","owner":{"login":"OpenCPN","id":194497,"avatar_url":"https://avatars.githubusercontent.com/u/194497?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenCPN","html_url":"https://github.com/OpenCPN","followers_url":"https://api.github.com/users/OpenCPN/followers","following_url":"https://api.github.com/users/OpenCPN/following{/other_user}","gists_url":"https://api.github.com/users/OpenCPN/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenCPN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenCPN/subscriptions","organizations_url":"https://api.github.com/users/OpenCPN/orgs","repos_url":"https://api.github.com/users/OpenCPN/repos","events_url":"https://api.github.com/users/OpenCPN/events{/privacy}","received_events_url":"https://api.github.com/users/OpenCPN/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OpenCPN/OpenCPN","description":"A concise ChartPlotter/Navigator. A cross-platform ship-borne GUI application supporting * GPS/GPDS Postition Input * BSB Raster Chart Display * S57 Vector ENChart Display * AIS Input Decoding * Waypoint Autopilot Navigation","fork":false,"url":"https://api.github.com/repos/OpenCPN/OpenCPN","forks_url":"https://api.github.com/repos/OpenCPN/OpenCPN/forks","keys_url":"https://api.github.com/repos/OpenCPN/OpenCPN/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenCPN/OpenCPN/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenCPN/OpenCPN/teams","hooks_url":"https://api.github.com/repos/OpenCPN/OpenCPN/hooks","issue_events_url":"https://api.github.com/repos/OpenCPN/OpenCPN/issues/events{/number}","events_url":"https://api.github.com/repos/OpenCPN/OpenCPN/events","assignees_url":"https://api.github.com/repos/OpenCPN/OpenCPN/assignees{/user}","branches_url":"https://api.github.com/repos/OpenCPN/OpenCPN/branches{/branch}","tags_url":"https://api.github.com/repos/OpenCPN/OpenCPN/tags","blobs_url":"https://api.github.com/repos/OpenCPN/OpenCPN/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenCPN/OpenCPN/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenCPN/OpenCPN/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenCPN/OpenCPN/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenCPN/OpenCPN/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenCPN/OpenCPN/languages","stargazers_url":"https://api.github.com/repos/OpenCPN/OpenCPN/stargazers","contributors_url":"https://api.github.com/repos/OpenCPN/OpenCPN/contributors","subscribers_url":"https://api.github.com/repos/OpenCPN/OpenCPN/subscribers","subscription_url":"https://api.github.com/repos/OpenCPN/OpenCPN/subscription","commits_url":"https://api.github.com/repos/OpenCPN/OpenCPN/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenCPN/OpenCPN/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenCPN/OpenCPN/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenCPN/OpenCPN/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenCPN/OpenCPN/contents/{+path}","compare_url":"https://api.github.com/repos/OpenCPN/OpenCPN/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenCPN/OpenCPN/merges","archive_url":"https://api.github.com/repos/OpenCPN/OpenCPN/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenCPN/OpenCPN/downloads","issues_url":"https://api.github.com/repos/OpenCPN/OpenCPN/issues{/number}","pulls_url":"https://api.github.com/repos/OpenCPN/OpenCPN/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenCPN/OpenCPN/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenCPN/OpenCPN/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenCPN/OpenCPN/labels{/name}","releases_url":"https://api.github.com/repos/OpenCPN/OpenCPN/releases{/id}","deployments_url":"https://api.github.com/repos/OpenCPN/OpenCPN/deployments","created_at":"2010-02-02T11:55:06Z","updated_at":"2016-04-20T03:55:54Z","pushed_at":"2016-04-26T02:07:21Z","git_url":"git://github.com/OpenCPN/OpenCPN.git","ssh_url":"git@github.com:OpenCPN/OpenCPN.git","clone_url":"https://github.com/OpenCPN/OpenCPN.git","svn_url":"https://github.com/OpenCPN/OpenCPN","homepage":"http://sourceforge.net/projects/opencpn/","size":351753,"stargazers_count":172,"watchers_count":172,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":141,"mirror_url":null,"open_issues_count":28,"forks":141,"open_issues":28,"watchers":172,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenCPN/OpenCPN/pulls/618"},"html":{"href":"https://github.com/OpenCPN/OpenCPN/pull/618"},"issue":{"href":"https://api.github.com/repos/OpenCPN/OpenCPN/issues/618"},"comments":{"href":"https://api.github.com/repos/OpenCPN/OpenCPN/issues/618/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenCPN/OpenCPN/pulls/618/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenCPN/OpenCPN/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenCPN/OpenCPN/pulls/618/commits"},"statuses":{"href":"https://api.github.com/repos/OpenCPN/OpenCPN/statuses/249aa55c413dbcef9dd7e0ce0d3541a13a95666c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"bdbcat","id":1015682,"avatar_url":"https://avatars.githubusercontent.com/u/1015682?v=3","gravatar_id":"","url":"https://api.github.com/users/bdbcat","html_url":"https://github.com/bdbcat","followers_url":"https://api.github.com/users/bdbcat/followers","following_url":"https://api.github.com/users/bdbcat/following{/other_user}","gists_url":"https://api.github.com/users/bdbcat/gists{/gist_id}","starred_url":"https://api.github.com/users/bdbcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdbcat/subscriptions","organizations_url":"https://api.github.com/users/bdbcat/orgs","repos_url":"https://api.github.com/users/bdbcat/repos","events_url":"https://api.github.com/users/bdbcat/events{/privacy}","received_events_url":"https://api.github.com/users/bdbcat/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":4,"additions":102,"deletions":27,"changed_files":7}}