{"id":22752434,"url":"https://github.com/perrette/icedata","last_synced_at":"2025-03-30T06:44:26.928Z","repository":{"id":30272904,"uuid":"33824366","full_name":"perrette/icedata","owner":"perrette","description":"python repository to read gridded greenland or antarctica data from various sources and return it in a standardized way","archived":false,"fork":false,"pushed_at":"2015-10-20T16:42:24.000Z","size":216,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T08:51:35.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perrette.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-12T16:30:10.000Z","updated_at":"2018-07-16T21:44:28.000Z","dependencies_parsed_at":"2022-09-07T20:50:27.636Z","dependency_job_id":null,"html_url":"https://github.com/perrette/icedata","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrette%2Ficedata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrette%2Ficedata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrette%2Ficedata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perrette%2Ficedata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perrette","download_url":"https://codeload.github.com/perrette/icedata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246285668,"owners_count":20752953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-11T05:11:46.605Z","updated_at":"2025-03-30T06:44:26.908Z","avatar_url":"https://github.com/perrette.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# icedata\npython repository to read ice data from various sources and return it in a standardized way\n\n\nGetting started\n---------------\n\nThe following code:\n\n    import icedata.greenland as grl\n    z = grl.bamber2013.load('surface_elevation')\n    print z\n    \n...will print the representation of a [dimarray](github.com/perrette/dimarray):\n\n    dimarray: 7318894 non-null elements (186607 null)\n    0 / y (3001): -3500000.0 to -500000.0\n    1 / x (2501): -1300000.0 to 1200000.0\n    array(...)\n    \nTo access the unerlying numpy array:\n\n    z.x   # x-coordinate\n    z.y   # y-coordinate\n    z.values  # underlying data, equivalent to numpy.asarray(z)\n    \nand metadata:\n\n    z.attrs  # dictionary of metadata\n    print z.summary()   # formatted print\n\nSee also [dimarray's doc](http://dimarray.readthedocs.org) for more in-depth explanations about this convenient data format.\n    \nA few standard names are given across the datasets, so that whenever the variable is present,\nwhatever its name, the corresponding variable will be known.\n\n- bedrock_elevation\n- surface_elevation\n- surface_elevation_error\n- surface_velocity\n- surface_velocity_error\n    \nFor instance:\n\n    grl.presentday.load('surface_elevation')\n    grl.bamber2013.load('surface_elevation')\n    grl.morlighem2014.load('surface_elevation')\n\n...will all work.\n\nBut you can still access the variables via their original name as present in the netCDF file (if any):\n\n    grl.presentday.load('usrf')\n    grl.bamber2013.load('SurfaceElevation')\n    grl.morlighem2014.load('surface')\n    \nIt is possible to provide a bounding box to load only a portion of the data:\n\n    grl.rignot_mouginot2012.load('surface_velocity', bbox=[-350e3, 50e3, -1500e3, -901e3])\n    \nbbox is lon_w, lon_e, lat_s, lat_n, in meters in the coordinate system the data is defined on.\n`icedata` provides a method to transform the bounding box between coordinate systems, \nbased on cartopy and dimarray: \n\n    from icedata.common import transform_bbox\n    bbox2 = transform_bbox(bbox, grl.rignot_mouginot2012.GRID_MAPPING, grl.bamber2013.GRID_MAPPING)\n    \nNote that for convenience the grid mapping is defined in each dataset as a dictionary in a GRID_MAPPING variable. \nTo transform the datasets after loading, please see [dimarray documentation on grid projections](http://dimarray.readthedocs.org/en/latest/_notebooks_rst/projection.html#projection).\n\nAdditionally, it is possible to sub-sample the data at a lower resolution by passing the `maxshape` variable:\n\n    grl.bamber2013.load('surface_elevation', maxshape=(400,400))\n    \n...which will return (to be compared to 3001x2501 in the first example above):\n    \n    dimarray: 174433 non-null elements (4460 null)\n    0 / y (429): -3500000.0 to -504000.0\n    1 / x (417): -1300000.0 to 1196000.0\n    array(...)\n\n    \nDependencies\n------------\n- numpy [1.9.2]\n- [netCDF4](https://github.com/Unidata/netcdf4-python) [1.1.7] - [see instructions here](https://github.com/perrette/python-install/blob/master/README.md#netcdf4)\n- [dimarray (dev)](https://github.com/perrette/dimarray) [0.1.9.dev-b83c7a]: please install the latest version from github. The pip version will not work  \n- [cartopy](https://github.com/SciTools/cartopy) [0.11.0]: used for grid projections, [see instructions here](https://github.com/perrette/python-install/blob/master/README.md#cartopy)\n\n\nDatasets\n--------\nNot provided here ! You need to get it yourself...\n\n- [Present-day Greenland](http://websrv.cs.umt.edu/isis/index.php/Present_Day_Greenland): [Greenland_5km_v1.1.nc](http://websrv.cs.umt.edu/isis/images/a/a5/Greenland_5km_v1.1.nc)\n- [Bamber et al (2013) dataset](http://www.the-cryosphere.net/7/499/2013/tc-7-499-2013.html) : Available upon request to the authors\n- [Rignot and Mouginot (2012) dataset for Greenland](http://onlinelibrary.wiley.com/doi/10.1029/2012GL051634) : Available upon request to the authors\n- [Morlighem et al (2013)](http://dx.doi.org/10.5067/5XKQD5Y5V3VN) : [more info here](http://sites.uci.edu/morlighem/dataproducts/mass-conservation-dataset/)\n    - Note: for ease of use, the Morlighem et al dataset is currently read-in with inverted y-coordinate. You need to transform it first before reading in the program.\n\nInstall\n-------\n\nDownload and install the code:\n\n    git clone https://github.com/perrette/icedata.git\n    cd icedata\n    python setup.py install\n    \nCurrently, the data mentioned above are expected to be located under the home directory as `~/icedata`. \nThe structure under the `icedata` directory is currently kept as close as possible to \nthe original data source. This means, no clear order... Admittedly this could be made \nsimpler, and it is planned to add a search_file function to add some simplicity in how\nthe data is organized on disk, to impose as few constraints as possible on the user.\nFor now, please check in the source files what is expected...\ne.g. for Bamber et al 2013, check in icedata/greenland/bamber2013.py\n\n    NCFILE = os.path.join('greenland','bamber_2013_1km','Greenland_bedrock_topography_V3.nc')\n    \nOr from python, for the same dataset:\n\n    import icedata.greenland.bamber2013\n    print icedata.greenland.bamber2013.NCFILE\n\nwill return:\n\n    greenland/bamber_2013_1km/Greenland_bedrock_topography_V3.nc\n    \nIn case of problem with your own data organization, just edit the source code of each dataset to indicate the \nprecise path of the corresponding netCDF file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperrette%2Ficedata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperrette%2Ficedata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperrette%2Ficedata/lists"}