This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NCDataFrame | |
using NCDatasets | |
using Pkg | |
Pkg.add("IntervalSets") | |
using IntervalSets | |
using PlotlyJS | |
ds = NCDataset("ECMWF_ERA-40_subset.nc","r") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using NCDataFrame | |
using NCDatasets | |
using PlotlyJS | |
using Pkg | |
using Statistics | |
using NaNStatistics | |
import NaNStatistics ; na=NaNStatistics | |
ds = NCDataset("ECMWF_ERA-40_subset.nc","r") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Importing libraries | |
using NCDataFrame | |
using NCDatasets | |
# create an dnetcdf dataset | |
dset = NCDataset("test.nc","c") | |
# Writing attributes | |
dset.attrib["Author"] = "Julia NCdataset" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.interpolate import griddata | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import xarray as xr | |
file = "your_ncfile.nc" | |
dset = xr.open_dataset(file) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Created on Fri May 28 21:15:01 2021 | |
@author: mathew | |
""" | |
import xarray as xr | |
import matplotlib.pyplot as plt | |
import cartopy.crs as ccrs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from netCDF4 import Dataset | |
nc = "your_file.nc" | |
dset = Dataset(nc) | |
lats = dset.variables["lat"][:] | |
lons = dset.variables["lon"][:] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Created on Wed May 19 17:55:14 2021 | |
@author: mathew | |
""" | |
import xarray as xr | |
import numpy as np | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.io import netcdf as nc | |
import numpy as np | |
#creatin an sample fil | |
net = nc.netcdf_file("test.nc",'w') | |
#making an attribute inside the netCDF file similarly an template can be created | |
net.author = "Made by NMA" | |
#creating dimension and its length | |
net.createDimension('time',10) | |
# setting up space for values for dimensions and variabls (name , datatype , (dims)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Created on Thu Mar 4 19:14:00 2021 | |
@author: nma | |
""" | |
from osgeo import gdal | |
## file to be converted | |
in_file = "in_file.tif" | |
inn = gdal.Open(in_file,gdalconst.GA_ReadOnly) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Created on Thu Mar 4 19:14:00 2021 | |
@author: nma | |
""" | |
from osgeo import gdal,gdal_array,gdalconst,osr | |
import numpy as np | |
raster_f = "A_raster_file.tif" | |
raster_s = "B_raster_file.tif" |
NewerOlder