From dev-return-10663-archive-asf-public=cust-asf.ponee.io@climate.apache.org Thu Aug 8 22:12:30 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id C2C2F180642 for ; Fri, 9 Aug 2019 00:12:29 +0200 (CEST) Received: (qmail 3337 invoked by uid 500); 8 Aug 2019 22:12:29 -0000 Mailing-List: contact dev-help@climate.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@climate.apache.org Delivered-To: mailing list dev@climate.apache.org Received: (qmail 3301 invoked by uid 99); 8 Aug 2019 22:12:28 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Aug 2019 22:12:28 +0000 From: GitBox To: dev@climate.apache.org Subject: [GitHub] [climate] agoodm commented on issue #524: CLIMATE-966 - Jupyter Notebook to run cordex.py on AWS Message-ID: <156530234874.15834.10703670515602542853.gitbox@gitbox.apache.org> Date: Thu, 08 Aug 2019 22:12:28 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit agoodm commented on issue #524: CLIMATE-966 - Jupyter Notebook to run cordex.py on AWS URL: https://github.com/apache/climate/pull/524#issuecomment-519706424 It works well. I have made a few modifications to fix download links. First, the last import should be changed to the following: ```python from IPython.display import Markdown, Image, FileLink ``` Then replace the very last cell with: ```python display(Markdown('Evaluation results')) ip_address = (requests.get('http://169.254.169.254/latest/meta-data/public-ipv4').content).decode('utf-8') for obs_info in obs_extractor.data: inst_name = obs_info['instrument'] var_name = obs_info['variable'] display(Markdown('Instrument: '+inst_name+'& Variable: '+var_name)) for season in seasons: savedir = os.path.join('evaluation_result', domain, inst_name, var_name, season) png_files = glob(os.path.join(savedir, '*.png')) for png_file in png_files: display(Image(png_file)) nc_file = glob(os.path.join(savedir, '*.nc'))[0] display(FileLink(nc_file)) os.chdir(cwd) ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services