netcdf

Only positive latitude and longitude when importing netcdf in R from paleoView probably wrong projection

不打扰是莪最后的温柔 提交于 2019-12-06 11:13:56
I used the paleoview software to download some variables from past climate, including the mean temperature from 15000BP-10000BP (I could upload a file on request but its a GB at least). The main problem is that when I read the raster, it contains only positive latitude and positive longitude. I know from the article that this has a 2.5*2.5 resolution. Using Raster I loaded both the raster and ncdf4 libraries to read it using raster library(raster) library(ncdf4) When I read it using the following code r <- raster("mean_temperature-15000BP-10000BP.nc", varname = "14000BP-13000BP/13300BP") I get

How to change longitude range in a NetCDF

梦想的初衷 提交于 2019-12-06 11:13:30
My NetCDF file has 4 dimensions (longitude, latitude, time, level pressure) and several variables. I want to replace the longitude data which is [340 342 344 ... 360 0 2 4 ... 18 20] by [-20 -18 -16 ... -2 0 2 4 ... 18 20]. In fact the longitude is counted from 0° to 360° but I need to have it from -180° to 180°. I have found some ideas on Internet but I don't know how to apply them. Here an explanation: "Some netcdf files contain strictly positive values [0,360] which are not compatible with the way gdal/QGis treat longitude values - they do not wrap around the dateline. This also causes

Geoserver - GetFeatureInfo of raster/wms layer multiple points/location or bounding box

寵の児 提交于 2019-12-06 10:43:50
问题 I am using Geoserver 2.8.1 version. I have netcdf and grib files, and I am uploading those to Geoserver through Geoserver extensions . After that, I use those data to show layer feature info in the map. (According to zoom scale and image size)I put arrows in the map to reference wind and wave directions. I calculate, to which angle the arrow will be positioned, by getting netcdf info like this; localhost:8080/geoserver/wms?Service=WMS&version=1.3&bbox=23.75,32.75,24.25,33.25&layers=it

Interpolating Gridded 3D Data to a finer scale

断了今生、忘了曾经 提交于 2019-12-06 10:37:21
I have a NetCDF file of a probability surface. It's a 30x30 grid of 0.25 degree lat/lon intervals with a probability surface described in the z dimension. I can easily import this into Panoply, a NetCDF viewer: And it's then a breeze (checking one box) to interpolate/smooth the raw data to a finer grid size: However, I don't just want to visualize the data, I want to plot it in R along with bathymetry and point data. That all is no problem, but I have not found a straightforward way to interpolate the gridded data in R. Here's the code I use to import and plot the data: library(RNetCDF) nc <-

Error on using xarray open_mfdataset function

雨燕双飞 提交于 2019-12-06 09:23:06
I am trying to combine multiple netCDF files with the same dimensions, their dimensions are as follows: OrderedDict([(u'lat', <type 'netCDF4._netCDF4.Dimension'>: name = 'lat', size = 720 ), (u'lon', <type 'netCDF4._netCDF4.Dimension'>: name = 'lon', size = 1440 ), (u'time', <type 'netCDF4._netCDF4.Dimension'>: name = 'time', size = 96 ), (u'nv', <type 'netCDF4._netCDF4.Dimension'>: name = 'nv', size = 2 )]) OrderedDict([(u'lat', <type 'netCDF4._netCDF4.Dimension'>: name = 'lat', size = 720 ), (u'lon', <type 'netCDF4._netCDF4.Dimension'>: name = 'lon', size = 1440 ), (u'time', <type 'netCDF4.

How to concatenate monthly TRMM netCDF files into a single netCDF file using NCO or R on windows 7?

时光总嘲笑我的痴心妄想 提交于 2019-12-06 08:59:30
问题 I have downloaded TRMM monthly precipitation rate in netCDF format from 1998 -2016, so approximately more than 200 files.The names of these files are 3B43.19980101.7.HDF.nc 3B43.19980201.7.HDF.nc 3B43.19980301.7.HDF.nc , and so on. I would like to concatenate all of these files into a single netCDF. I've tried using the NCO operator "ncrcat" which should be able to concatenate a very long series of files along the record dimension, in this case time, but so far no luck. I tried at first

NetCDF: How to mask/filter out non-land values in global dataset, preferably using Python and/or NCO?

陌路散爱 提交于 2019-12-06 08:02:33
I have a global data at 0.25 degree resolution that I'd like to mask so that it only contains data values over land. The data covers full 360 degrees in the lon dimension and from -60 to 60 degrees in the lat dimension. The file header, as well as summary lat and lon coordinate values, are listed below: netcdf cmorph_global_daily { dimensions: lat = UNLIMITED ; // (480 currently) lon = 1440 ; time = 7305 ; variables: float lat(lat) ; lat:units = "degrees_north" ; lat:long_name = "Latitude" ; float lon(lon) ; lon:units = "degrees_east" ; lon:long_name = "Longitude" ; float prcp(lat, lon, time)

Python Interpolation with matplotlib/basemap

谁都会走 提交于 2019-12-06 04:51:07
问题 I am rather new to programming and am having a very hard time understanding interpolation. Every single source I can find that attempts to explain it is extremely cryptic (especially the package specific sites for basemap/matplotlib). I am mapping using matplotlib's basemap however the nature of my data is that it comes in 5 degree by 5 degree blocks (lat lon blocks). I want to smooth out the map by interpolation. So first here is my code. from netCDF4 import Dataset import numpy as np import

Visual Studio - adding netCDF library

匆匆过客 提交于 2019-12-06 01:49:36
I want to use netCDF formats in a C project using Visual Studio Express 2013 on a Windows 64bit. I've downloaded the installation file from the official website and executed the .exe. Then, I've looked into this post to see how I should do the linking etc. More specifically, in my project in Visual Studio, I did the following: Put #include < netcdf.h > in VC++ Directories, Library directories, I added C:\Program Files (x86)\netCDF 4.3.3.1\lib; C:\Program Files (x86)\netCDF 4.3.3.1\bin; in VC++ Directories, Include directories, I added C:\Program Files (x86)\netCDF 4.3.3.1\include; C:\Program

How to create a netCDF file with python netCDF4?

自作多情 提交于 2019-12-05 19:19:18
I am learning how to use netCDF4 using Pyhton module in Anaconda. I am trying to append values to two variables I have created time and field : from netCDF4 import Dataset import numpy as np root_grp = Dataset('py_netcdf4.nc', 'w', format='NETCDF4') root_grp.description = 'Example simulation data' ndim = 128 # Size of the matrix ndim*ndim xdimension = 0.75 ydimension = 0.75 # dimensions root_grp.createDimension('time', None) root_grp.createDimension('x', ndim) root_grp.createDimension('y', ndim) # variables time = root_grp.createVariable('time', 'f8', ('time',)) x = root_grp.createVariable('x'