How to save multi-dimentional array values into CSV/Test file

2018-04-17 Thread shalu . ashu50
Hi All, I am using winpy 6.3 I have this array: code: clt_subset = nc.variables['clt'][:,latli:latui , lonli:lonui] print(clt_subset): [[[ 96.07967377 32.581317930.86773872 ..., 99.6185 99.7711 99.7711] [ 93.75789642 86.78536987 46.51786423 ..., 99.99756622

Problem in extracting and saving multi-dimensional time series data from netcdf file to csv file

2018-04-17 Thread shalu . ashu50
Hi All, I am using winpython spyder 3.6. I am trying to extract a variable with their time series values (daily from 1950 to 2004). The data structure is as follows: Dimensions: (bnds: 2, lat: 90, lon: 144, time: 20075) Coordinates: * lat (lat) float64 -89.0 -87.0 -85.0 -83.0 -81.

Re: How to save xarray data to csv

2018-04-16 Thread shalu . ashu50
On Tuesday, 17 April 2018 01:56:25 UTC+8, Rhodri James wrote: > On 16/04/18 15:55, shalu.ash...@gmail.com wrote: > > Hello All, > > > > I have used xarray to merge several netcdf files into one file and then I > > subset the data of my point of interest using lat/long. Now I want to save > > t

Re: How to save xarray data to csv

2018-04-16 Thread shalu . ashu50
On Tuesday, 17 April 2018 02:01:19 UTC+8, Chris Angelico wrote: > On Tue, Apr 17, 2018 at 3:50 AM, Rhodri James wrote: > > You don't say, but I assume you're using Python 2.x > > > > [snip] > > > >> getting this error - TypeError: a bytes-like object is required, not 'str' > > Actually, based on

How to save xarray data to csv

2018-04-16 Thread shalu . ashu50
Hello All, I have used xarray to merge several netcdf files into one file and then I subset the data of my point of interest using lat/long. Now I want to save this array data (time,lat,long) into csv file but I am getting an error with my code: dsmerged = xarray.open_mfdataset('F:/NTU_PDF__Wo

Installing NETCDF4 in windows using python 3.4

2018-04-12 Thread shalu . ashu50
Hi All, I have downloaded NETCDF4 module from https://pypi.python.org/pypi/netCDF4 e.g. netCDF4-1.3.1-cp34-cp34m-win_amd64.whl I have installed it using pip install netCDF4-1.3.1-cp34-cp34m-win_amd64.whl through the command prompt in Spyder. It has successfully installed. C:\python3>pip insta

How to apply LR over gridded time series datasets ?

2018-03-28 Thread shalu . ashu50
Hello all, This code is written for multivariate (multiple independent variables x1,x2,x3..xn and a dependent variable y) time series analysis using logistic regression (correlation and prediction). #Import Libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd #Impo

How to make code space variant with gridded data (lat/long)

2018-03-28 Thread shalu . ashu50
Hello all, This code is written for multivariate (multiple independent variables x1,x2,x3..xn and a dependent variable y) time series analysis using logistic regression (correlation and prediction). #Import Libraries import numpy as np import matplotlib.pyplot as plt import pandas as pd #Impo

Re: Problem in defining multidimensional array matrix and regression

2017-11-19 Thread shalu . ashu50
Hello Peter, Many thanks for your suggestion. Now I am using Pandas & I already did that but now I need to make a multi-dimensional array for reading all variables (5 in this case) at one x-axis, so I can perform multiple regression analysis. I am not getting how to bring all variables at one

Problem in defining multidimensional array matrix and regression

2017-11-19 Thread shalu . ashu50
Hi, All, I have 6 variables in CSV file. One is rainfall (dependent, at y-axis) and others are predictors (at x). I want to do multiple regression and create a correlation matrix between rainfall (y) and predictors (x; n1=5). Thus I want to read rainfall as a separate variable and others in sep