Beispiel #1
0
"""
beginnings of the wrapper script

"""

############
# Grabing data from web
############

import request_nc

lat_bounds = [80, 85]
lon_bounds = [45, 90]
time_bounds = ['2017-08-01T12:00:00Z', '2017-08-03T12:00:00Z']

request_nc.getSSTfiles(lat_bounds, lon_bounds, time_bounds)
Beispiel #2
0
"""
beginnings of the wrapper script

"""

############
# Grabing data from web
############

import request_nc
<<<<<<< HEAD
import xarray_troubleshoot
=======
import xarray
>>>>>>> 14f3c56f11545ebcf03b749dc1f818bff429716f

lat_bounds = [80,85]
lon_bounds = [45,90]
time_bounds = ['2017-08-01T12:00:00Z', '2017-08-03T12:00:00Z']

<<<<<<< HEAD
filepath, filename = request_nc.getSSTfiles(lat_bounds,lon_bounds,time_bounds)
=======
[filepath,filename]=request_nc.getSSTfiles(lat_bounds,lon_bounds,time_bounds)

sst_xarray=xarray.open_dataset(filepath + filename,engine='scipy',decode_times=False)

>>>>>>> 14f3c56f11545ebcf03b749dc1f818bff429716f
Beispiel #3
0
from cartopy import config
import cartopy.crs as ccrs
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER
import request_nc

#################
#open and read the dataset, save an iterable range of times
#note to zinka: time iterable is fricken stupid as it stands
#################

lat_bounds = [-20, 20]
lon_bounds = [-15, 15]
time_bounds = ['2017-08-01T12:00:00Z', '2017-08-20T12:00:00Z']

[filepathSST, filenameSST] = request_nc.getSSTfiles(lat_bounds, lon_bounds,
                                                    time_bounds)

#create filepath to save png files to
filepath = 'PNG_files/'
if os.path.isdir(filepath) == False:
    os.mkdir(filepath)

dataset = netcdf_dataset(filepathSST + filenameSST,
                         "r",
                         format="NETCDF3_64BIT_DATA")
time = dataset.variables['analysed_sst'][:, 0, 0]
time = len(time)
time = np.arange(time)
time = np.asarray(time)
print(time)