{
  "id": 5716,
  "title": "Moar starter code and a NetCDF4 tutorial",
  "url": "/competitions/ams-2014-solar-energy-prediction-contest/discussion/5716",
  "author_name": "",
  "post_date": "2013-09-10T21:08:55.523Z",
  "votes": 13,
  "comment_count": 11,
  "views": 4874,
  "content": "<p>Here's an article about this competition containing a tutorial for dealing with NetCDF in Python. If you have that figured out, scroll down to&nbsp;<em>beating the benchmark </em>section. I modified Alec's code to get a slightly better score: 2215k.</p>\n<p>http://fastml.com/predicting-solar-energy-from-weather-forecasts-plus-a-netcdf4-tutorial/</p>\n<p>Like it? Then hit&nbsp;<strong>thank&nbsp;</strong>and/or&nbsp;<strong>reply</strong> link below.</p>",
  "messages": [
    {
      "id": "30686",
      "postDate": "09/10/2013 21:08:55",
      "content": "<p>Here's an article about this competition containing a tutorial for dealing with NetCDF in Python. If you have that figured out, scroll down to&nbsp;<em>beating the benchmark </em>section. I modified Alec's code to get a slightly better score: 2215k.</p>\n<p>http://fastml.com/predicting-solar-energy-from-weather-forecasts-plus-a-netcdf4-tutorial/</p>\n<p>Like it? Then hit&nbsp;<strong>thank&nbsp;</strong>and/or&nbsp;<strong>reply</strong> link below.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "30715",
      "postDate": "09/11/2013 04:37:31",
      "content": "<p>So the line 57 ==&gt;&nbsp;X = nc.Dataset(path,'r+').variables.values()[-1][:,:,:,3:7,3:13]</p>\n<p>corresponds to 1:10 x 1:4 grid?</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "30733",
      "postDate": "09/11/2013 14:41:55",
      "content": "<p>That's right.</p>\n<p>Updated the post with a better game plan and a script for extracting data for a given GEFS point from a NetCDF file.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "31095",
      "postDate": "09/18/2013 16:07:26",
      "content": "<p>Hello. This line&nbsp; 57 -----&gt;&nbsp; X = nc.Dataset(path,'r+').variables.values()[-1][:,:,:,3:7,3:13]&nbsp;</p>\n<p>causes an error in netCDF4 module.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "31108",
      "postDate": "09/18/2013 17:41:55",
      "content": "<p>Works for me with Python 2.7.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "31197",
      "postDate": "09/19/2013 16:46:01",
      "content": "<p>Hello.</p>\n<p>I think error is caused by dimensionality mismatch.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "31614",
      "postDate": "09/26/2013 15:56:03",
      "content": "<p>Thanks for tutorial Foxtrot. Finally managed to extract the data I need</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "31642",
      "postDate": "09/27/2013 03:35:32",
      "content": "<p>Another newbie question:</p>\n<p>How to change this code so that I can specify my CV sets, for example , I want to test with years : c(1994,1995,1996,1997) ; c(1995,1996,1997,1998) &nbsp;; c(1996,1997,1998,1999) , etc.&nbsp;</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "31662",
      "postDate": "09/27/2013 15:36:41",
      "content": "<p>You need to refer to the 'time' variable, or better yet, 'intTime'. They are basically dates.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "31853",
      "postDate": "10/01/2013 10:31:43",
      "content": "<p>Hi Foxtrot, is there any reason you chose Ridge Regression rather than one of the other linear models, ie Lasso?&nbsp;</p>\n<p>&nbsp;</p>\n<p>Thanks for the tutorial on netcdf4.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "31858",
      "postDate": "10/01/2013 12:43:40",
      "content": "<p>The original code by Alec Radford used Ridge, that's the only reason.</p>",
      "rawMarkdown": "",
      "votes": null
    },
    {
      "id": "52285",
      "postDate": "08/21/2014 07:19:59",
      "content": "<p>Can someone tell me how to install netcdf on windows machine??</p>",
      "rawMarkdown": "",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 30715,
      "author_name": "herimanitra",
      "author_url": "",
      "post_date": "09/11/2013 04:37:31",
      "content": "<p>So the line 57 ==&gt;&nbsp;X = nc.Dataset(path,'r+').variables.values()[-1][:,:,:,3:7,3:13]</p>\n<p>corresponds to 1:10 x 1:4 grid?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 30733,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "09/11/2013 14:41:55",
      "content": "<p>That's right.</p>\n<p>Updated the post with a better game plan and a script for extracting data for a given GEFS point from a NetCDF file.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 31095,
      "author_name": "ijaganjac",
      "author_url": "",
      "post_date": "09/18/2013 16:07:26",
      "content": "<p>Hello. This line&nbsp; 57 -----&gt;&nbsp; X = nc.Dataset(path,'r+').variables.values()[-1][:,:,:,3:7,3:13]&nbsp;</p>\n<p>causes an error in netCDF4 module.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 31108,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "09/18/2013 17:41:55",
      "content": "<p>Works for me with Python 2.7.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 31197,
      "author_name": "ijaganjac",
      "author_url": "",
      "post_date": "09/19/2013 16:46:01",
      "content": "<p>Hello.</p>\n<p>I think error is caused by dimensionality mismatch.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 31614,
      "author_name": "domcastro",
      "author_url": "",
      "post_date": "09/26/2013 15:56:03",
      "content": "<p>Thanks for tutorial Foxtrot. Finally managed to extract the data I need</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 31642,
      "author_name": "herimanitra",
      "author_url": "",
      "post_date": "09/27/2013 03:35:32",
      "content": "<p>Another newbie question:</p>\n<p>How to change this code so that I can specify my CV sets, for example , I want to test with years : c(1994,1995,1996,1997) ; c(1995,1996,1997,1998) &nbsp;; c(1996,1997,1998,1999) , etc.&nbsp;</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 31662,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "09/27/2013 15:36:41",
      "content": "<p>You need to refer to the 'time' variable, or better yet, 'intTime'. They are basically dates.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 31853,
      "author_name": "eoinlawless",
      "author_url": "",
      "post_date": "10/01/2013 10:31:43",
      "content": "<p>Hi Foxtrot, is there any reason you chose Ridge Regression rather than one of the other linear models, ie Lasso?&nbsp;</p>\n<p>&nbsp;</p>\n<p>Thanks for the tutorial on netcdf4.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 31858,
      "author_name": "zygmunt",
      "author_url": "",
      "post_date": "10/01/2013 12:43:40",
      "content": "<p>The original code by Alec Radford used Ridge, that's the only reason.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 52285,
      "author_name": "sachiitp",
      "author_url": "",
      "post_date": "08/21/2014 07:19:59",
      "content": "<p>Can someone tell me how to install netcdf on windows machine??</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "30686": "",
    "30715": "",
    "30733": "",
    "31095": "",
    "31108": "",
    "31197": "",
    "31614": "",
    "31642": "",
    "31662": "",
    "31853": "",
    "31858": "",
    "52285": ""
  },
  "source": "meta"
}