netcdf - Thredds getCapabilities for ncWMS server

Thredds Data Server TDS provides getCapabilities for a netCDF file. e.g. http://localhost:8080/thredds/wms/testAll/, the filename would be a netCDF dataset present at this location in tomcat.tomcat/content/thredds/public/testdataIs there a way where I can display all layers getCapabilities document like it is explicitly available by ncWMS http://localhost:8080/ncWMS2/wms?SERVICE=WMS&REQUEST=GetCapabilities&VERSION=1.1.1...Read more

Output int32 time dimension in netCDF using xarray

Let's say I have time data that looks like this in an xarray Dataset:ds = xr.Dataset({'time': pd.date_range('2000-01-01', periods=10)})ds.to_netcdf('')xarray's to_netcdf() method outputs the time dimension as int64:$ ncdump -v time asdf.ncnetcdf asdf {dimensions: time = 10 ;variables: int64 time(time) ; time:units = "days since 2000-01-01 00:00:00" ; time:calendar = "proleptic_gregorian" ;data: time = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ;}Because I'm working with a THREDDS server which does not support int64, I would like fo...Read more

netcdf - ncks spatial hyperslabbing equivalent in CDO

I have a netcdf file and I need to perform a spatial subsetting.Here is the file structure:netcdf input {dimensions: x = 5762 ; y = 3963 ; time_counter = UNLIMITED ; // (36 currently) tbnds = 2 ;variables: ....I tried the following NCO command and it worked fine:ncks -d x,1,5 -d y,1,5 -O output.ncWhich is the equivalent command for CDO? I only found the sellonlatbox command, but it isn't the command I'm looking for.Thanks...Read more

netcdf4 - How to append new data into existing netcdf file

I have a multivariable ncdf that I created and wanted to add additional data to each variable. the lat and long dimensions will remain the same but I want to extend the time dimension by appending new data to each variable. The new data set has the same number of variables, dim1 and dim2 but its dim3 starts where the time of dim3 of the first dataset ends.Existing ncdf (has 42 variable): Here is startup code:library(ncdf4)dim1 = ncdim_def("lat")dim2 = ncdim_def( "long")dim3 = ncdim_def( "time", "days since 2004-01-01", as.integer(time))Var<-...Read more

IndexError while plotting netCDF data using Basemap, matplotlib and contour command

I am trying to plot variables of pressure and wind velocities from the netcdf file of MERRA re-analysis data at a single level. I'm using the basemap module for the plotting and other necessary packages to get the data. Unfortunately, I end up with an error. Here is my code:from netCDF4 import Dataset as NetCDFFile import matplotlib.pyplot as pltimport numpy as npfrom mpl_toolkits.basemap import Basemapimport osimport netCDF4from netCDF4 import Datasetfrom osgeo import gdal os.chdir('F:\Atmospheric rivers\MERRA')dirrec=str('F:\Atmospheric river...Read more

how can i obtain the same basemaps frames with lat lons, from diferents netcdf files, when i plot it

I have three netcdf files with different grid, I need to plot the three files in three different maps, but with the same geographical limits, without the data being stretched or shrunk to cover the entire box, I have tried with:m = Basemap (llcrnrlon = -85., llcrnrlat = 8., urcrnrlon = -68., urcrnrlat = 17, rsphere = 6371200., resolution = 'l')but what basemap does is to adapt the data that was previously defined when reading the netcdf to the box, not cutting the data in the latitudes and longitudes defined in the basemap if not adapting the d...Read more

weather - Converting Native NetCDF to Gridded NetCDF3

Attempting to access raw NEXRAD data in native NetCDF format from the NOAA servers (i.e. thredds-aws, Amazon, etc.) and convert them to a gridded NetCDF file for post-processing automatically. NOAA's Weather and Climate Toolkit is able to export a gridded NetCDF3 file (in dropbox folder below).I have trained an external code to process the exported gridded files. But, to automate this process and analyze several years for my research, I must figure out how to convert a native file from the NOAA servers into this gridded format. Specifically, I ...Read more

Error occurred in netCDF routine NF90_get_att NetCDF: Attribute not found

I have downloaded the meteorological data in NetCDF format from two different sites. I need to merge two files to put in my ocean model. when running the model with the merged file I got the below error.Error occurred in NetCDF routine NF90_get_att NetCDF: Attribute not found.I think before merging I have to same the attributes of two NetCDF files. but I don't know how to do it. could you please tell me How can I fix this ?Here is the link that I have shared the two files and the piece of the code. this code is a part of my ocean model that rea...Read more

netcdf - NcML aggregation of remote THREDDS catalog

I want to aggregate all files within a specific directory of a remote THREDDS catalog. These are grib2 files for nam forecast. This is the main list of directories for each month. Here is my ncml file for the aggregation of this catalog of files:<?xml version="1.0" encoding="UTF-8"?><netcdf xmlns="" > <aggregation dimName="time" type="joinExisting"> <scan location="" regExp="^.*\.grb2$" subdirs="false"/&...Read more

netcdf - THREDDS server using Godiva viewer

Anyone knows how I can configure the godiva viewer in order to get a specific colour palette and specific range of values?This is an example, where the colour palette is the default, but the range of values is updated according to the file displayed.The wiki only shows how to add new palettes....Read more

netcdf - Is there a way to store data-points instead of creating multi-dimensional array?

I am trying to read data available and write it to a NetCDF file.Say, I am reading temperature along different time, depth, latitude and longitude values, I will have to create a whole 4D grid of time, depth, latitude and longitude as dimensions.However, the data I am recording has values at very few points. For example, in one of the cases, I had data at 155 points, while the grid was of 50x16x16x18 along time, depth latitude and longitude respectively. Thus I had data in only 155 points out of a grid having 230400 cells. Rest all points had f...Read more

Not able to append two netcdf files using nco

I am using netcdf operators to append two NCEP netCDF files together.These files are of different sizes but they represent the same atmospheric variable i.e. geopotential height. One is at 1000 hPa and the other file is at 925 hPa.They have the same dimensions and same latitudinal and longitudinal extent. Both represent the same time instantThis is the command I am using - ncks -A hgt_925.ncThe command runs without any issue but when I look at the output of it looks the files have not merged. Looking at the NCO documentat...Read more

NCO: Extract a variable from NetCDF file using NCO ncks

I am trying to extract a variable from a multi-variable netcdf file, by entering the command: ncks -v ta out.ncHowever then I look at the header, all the variables are still there.The headers of both and are below:--- header ---dimensions: time = UNLIMITED ; // (124 currently) lon = 256 ; bnds = 2 ; lat = 128 ; lev = 40 ;variables: double time(time) ; time:standard_name = "time" ; time:long_name = "time" ; time:units =...Read more

nco - How to reorganize netcdf level by increasing order

I got a netcdf data but with strange level sequence.I like the level data to range from 1000, 900, 800, .. to 100however my data shows 300, 400, 1000, 900, 800, ... 100What's the cleanest method to reorganize this data by rising or decreasing order?p.s. I am considering about CDO or NCO, but failed to find a good method...Any one help me?...Read more

netcdf - NCO: can we remove dimension without modifying coordinates attribute?

I have a netcdf file :dimensions: y = 453 ; x = 453 ; plev = 1 ; time = UNLIMITED ; // (1460 currently)variables: double plev(plev) ; plev:name = "plev" ; plev:standard_name = "air_pressure" ; plev:long_name = "pressure" ; plev:units = "Pa" ; plev:axis = "Z" ; plev:positive = "down" ; float va925(time, plev, y, x) ; va925:_FillValue = 1.e+20f ; va925:missing_value = 1.e+20f ; va925:coordinates = "lon lat plev" ; va925:grid_mapping = "Lambert_Conformal" ;I would like to remove the plev dimension, but keep plev...Read more