{"action":"created","issue":{"url":"https://api.github.com/repos/OceanPARCELS/parcels/issues/41","repository_url":"https://api.github.com/repos/OceanPARCELS/parcels","labels_url":"https://api.github.com/repos/OceanPARCELS/parcels/issues/41/labels{/name}","comments_url":"https://api.github.com/repos/OceanPARCELS/parcels/issues/41/comments","events_url":"https://api.github.com/repos/OceanPARCELS/parcels/issues/41/events","html_url":"https://github.com/OceanPARCELS/parcels/issues/41","id":137855448,"number":41,"title":"Depth-less netCDF fields","user":{"login":"Jacketless","id":17003951,"avatar_url":"https://avatars.githubusercontent.com/u/17003951?v=3","gravatar_id":"","url":"https://api.github.com/users/Jacketless","html_url":"https://github.com/Jacketless","followers_url":"https://api.github.com/users/Jacketless/followers","following_url":"https://api.github.com/users/Jacketless/following{/other_user}","gists_url":"https://api.github.com/users/Jacketless/gists{/gist_id}","starred_url":"https://api.github.com/users/Jacketless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jacketless/subscriptions","organizations_url":"https://api.github.com/users/Jacketless/orgs","repos_url":"https://api.github.com/users/Jacketless/repos","events_url":"https://api.github.com/users/Jacketless/events{/privacy}","received_events_url":"https://api.github.com/users/Jacketless/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OceanPARCELS/parcels/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"mlange05","id":5585005,"avatar_url":"https://avatars.githubusercontent.com/u/5585005?v=3","gravatar_id":"","url":"https://api.github.com/users/mlange05","html_url":"https://github.com/mlange05","followers_url":"https://api.github.com/users/mlange05/followers","following_url":"https://api.github.com/users/mlange05/following{/other_user}","gists_url":"https://api.github.com/users/mlange05/gists{/gist_id}","starred_url":"https://api.github.com/users/mlange05/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlange05/subscriptions","organizations_url":"https://api.github.com/users/mlange05/orgs","repos_url":"https://api.github.com/users/mlange05/repos","events_url":"https://api.github.com/users/mlange05/events{/privacy}","received_events_url":"https://api.github.com/users/mlange05/received_events","type":"User","site_admin":false},"assignees":[{"login":"mlange05","id":5585005,"avatar_url":"https://avatars.githubusercontent.com/u/5585005?v=3","gravatar_id":"","url":"https://api.github.com/users/mlange05","html_url":"https://github.com/mlange05","followers_url":"https://api.github.com/users/mlange05/followers","following_url":"https://api.github.com/users/mlange05/following{/other_user}","gists_url":"https://api.github.com/users/mlange05/gists{/gist_id}","starred_url":"https://api.github.com/users/mlange05/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlange05/subscriptions","organizations_url":"https://api.github.com/users/mlange05/orgs","repos_url":"https://api.github.com/users/mlange05/repos","events_url":"https://api.github.com/users/mlange05/events{/privacy}","received_events_url":"https://api.github.com/users/mlange05/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-03-02T11:59:01Z","updated_at":"2016-08-08T16:06:57Z","closed_at":null,"body":"Hi gang,\r\nAs I'm now importing fields from more new ocean/ecosystem models, I'm coming across the issue of fields that have no depth dimension, i.e. just represent some variable that has been integrated through the water column at a lat/long position. I suspect that we will use these kinds of fields more and more going forward- habitat maps, fields that give the starting densities of particles (another feature I'd like to try and code up), and perhaps even our own internal particle density field that we have discussed using to simulate local interactions.\r\n\r\nCorrect me if I'm wrong, from what I can tell at the moment, field.py expects four-dimensional datasets (even though we only advect in 2d) structured [time, depth, lat, lon]\r\nFrom field.py:\r\n`       # Pre-allocate grid data before reading files into buffer\r\n        data = np.empty((time.size, 1, lat.size, lon.size), dtype=np.float32)\r\n        tidx = 0\r\n        for tslice, dset in zip(timeslices, datasets):\r\n            data[tidx:, 0, :, :] = dset[dimensions['data']][:, 0, :, :]\r\n            tidx += tslice.size`\r\nit appears that we expect four dimensions but only take the top depth slice anyway. \r\n\r\nA quick fix for me is to try and add a depth dimension of length 1 to these \"2d\" netCDFs, but perhaps we want to be able to allow PARCELS to deal with such fields explicitly?"},"comment":{"url":"https://api.github.com/repos/OceanPARCELS/parcels/issues/comments/238285705","html_url":"https://github.com/OceanPARCELS/parcels/issues/41#issuecomment-238285705","issue_url":"https://api.github.com/repos/OceanPARCELS/parcels/issues/41","id":238285705,"user":{"login":"Thomas-95","id":20111220,"avatar_url":"https://avatars.githubusercontent.com/u/20111220?v=3","gravatar_id":"","url":"https://api.github.com/users/Thomas-95","html_url":"https://github.com/Thomas-95","followers_url":"https://api.github.com/users/Thomas-95/followers","following_url":"https://api.github.com/users/Thomas-95/following{/other_user}","gists_url":"https://api.github.com/users/Thomas-95/gists{/gist_id}","starred_url":"https://api.github.com/users/Thomas-95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thomas-95/subscriptions","organizations_url":"https://api.github.com/users/Thomas-95/orgs","repos_url":"https://api.github.com/users/Thomas-95/repos","events_url":"https://api.github.com/users/Thomas-95/events{/privacy}","received_events_url":"https://api.github.com/users/Thomas-95/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T16:06:57Z","updated_at":"2016-08-08T16:06:57Z","body":"I have created a new kernel, `landmass_kernel`, related to this topic. I was hoping to create a kernel capable of determining a particle's distance from the coast, for which I would require a grid of values that are 'land'. Such a grid doesn't have a time dimension, whereas `field.py` dictates that this must be that case. "}}
{"actor":{"display_login":"Thomas-95"}}