Title: memory usage in scaloa · Issue #10 · OceanLabPy/OceanLab · GitHub
Open Graph Title: memory usage in scaloa · Issue #10 · OceanLabPy/OceanLab
X Title: memory usage in scaloa · Issue #10 · OceanLabPy/OceanLab
Description: Hey guys, I've used your objective mapping function scaloa and noticed there is a simple way to reduce memory usage. The variables d2 and dc2 can occupy a huge memory space, so deleting them after defining both correlation and cross corr...
Open Graph Description: Hey guys, I've used your objective mapping function scaloa and noticed there is a simple way to reduce memory usage. The variables d2 and dc2 can occupy a huge memory space, so deleting them after ...
X Description: Hey guys, I've used your objective mapping function scaloa and noticed there is a simple way to reduce memory usage. The variables d2 and dc2 can occupy a huge memory space, so deleting them af...
Opengraph URL: https://github.com/OceanLabPy/OceanLab/issues/10
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"memory usage in scaloa","articleBody":"Hey guys,\r\n\r\nI've used your objective mapping function scaloa and noticed there is a simple way to reduce memory usage. \r\n\r\nThe variables d2 and dc2 can occupy a huge memory space, so deleting them after defining both correlation and cross correlation matrices (A,C, respectively) and before inverting the matrix is useful. In one of my cases, it it frees up a few gbs of memory (of course, this depends on both grid and data). \r\n\r\n```\r\n(...)\r\n d2 = ((np.tile(x, (n, 1)).T - np.tile(x, (n, 1))) ** 2 +\r\n (np.tile(y, (n, 1)).T - np.tile(y, (n, 1))) ** 2)\r\n nv = len(xc)\r\n xc, yc = np.reshape(xc, (1, nv)), np.reshape(yc, (1, nv))\r\n # Squared distance between the observations and the grid points.\r\n dc2 = ((np.tile(xc, (n, 1)).T - np.tile(x, (nv, 1))) ** 2 +\r\n (np.tile(yc, (n, 1)).T - np.tile(y, (nv, 1))) ** 2)\r\n # Correlation matrix between stations (A) and cross correlation (stations\r\n # and grid points (C))\r\n A = (1 - err) * np.exp(-d2 / corrlen ** 2)\r\n C = (1 - err) * np.exp(-dc2 / corrlen ** 2)\r\n if 0: # NOTE: If the parameter zc is used (`scaloa2.m`)\r\n A = (1 - d2 / zc ** 2) * np.exp(-d2 / corrlen ** 2)\r\n C = (1 - dc2 / zc ** 2) * np.exp(-dc2 / corrlen ** 2)\r\n \r\n # here!!!!!!!!! \u003c----------\r\n del(d2, dc2)\r\n \r\n(...)\r\n```\r\n \r\n ","author":{"url":"https://github.com/dksasaki","@type":"Person","name":"dksasaki"},"datePublished":"2021-08-11T14:10:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/10/OceanLab/issues/10"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b567334d-a09c-0570-b83f-f0dc337e1f45 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C24E:144733:2629F:32502:6A4D7856 |
| html-safe-nonce | 80cfaefde7a8e414bddd8aa25b3c27d4f3f69916e6a72da9f622097ba97c2855 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjRFOjE0NDczMzoyNjI5RjozMjUwMjo2QTRENzg1NiIsInZpc2l0b3JfaWQiOiIxNTM2MTI0NjY4OTk3MzY3ODk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5fec8db55fa6c6f5eb347e8eb65fb7c23617da73e3a247e7e6e8148c7e5990af |
| hovercard-subject-tag | issue:966794673 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/OceanLabPy/OceanLab/10/issue_layout |
| twitter:image | https://opengraph.githubassets.com/55a3a2c9305a09ce566051a32103cf1fd8c50a76f7c5765444c8c3719737e9d6/OceanLabPy/OceanLab/issues/10 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/55a3a2c9305a09ce566051a32103cf1fd8c50a76f7c5765444c8c3719737e9d6/OceanLabPy/OceanLab/issues/10 |
| og:image:alt | Hey guys, I've used your objective mapping function scaloa and noticed there is a simple way to reduce memory usage. The variables d2 and dc2 can occupy a huge memory space, so deleting them after ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dksasaki |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7f8e15305e2ab58890ca84b830615e375f5df303cf471cafcba0c08272981be3 |
| turbo-cache-control | no-preview |
| go-import | github.com/OceanLabPy/OceanLab git https://github.com/OceanLabPy/OceanLab.git |
| octolytics-dimension-user_id | 85704166 |
| octolytics-dimension-user_login | OceanLabPy |
| octolytics-dimension-repository_id | 32599942 |
| octolytics-dimension-repository_nwo | OceanLabPy/OceanLab |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 32599942 |
| octolytics-dimension-repository_network_root_nwo | OceanLabPy/OceanLab |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8608b0750fc35e283e5ec5b094bff942d7a0e197 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width