Project

General

Profile

Extract values of single points from netCDF files

Added by nazanin tavakoli almost 3 years ago

Hello,
I want to extract values of 100 points of a NetCDF file. I have tried the following code for a single point:

cdo -outputtab,date,lon,lat,value -remapnn,"lon=151.5683_lat=-32.7427" temp.nc > output.csv

but it shows me this error:
cdo outputtab: Started child process "remapnn,lon=151.5683_lat=-32.7427 temp.nc (pipe1.1)".
cdo outputtab (Abort): Too many different grids!

Could anybody help me?
Thank you

temp.nc (222 KB) temp.nc

Replies (1)

RE: Extract values of single points from netCDF files - Added by Uwe Schulzweida almost 3 years ago

Here are the first lines of "cdo sinfon temp.nc":

   File format : NetCDF
    -1 : Institut Source   T Steptype Levels Num    Points Num Dtype : Parameter name
     1 : unknown  ibis     v instant       1   1         1   1  F32  : time_weights  
     2 : unknown  ibis     v instant       1   1       231   2  F32  : temp          
   Grid coordinates :
     1 : generic                  : points=1
     2 : lonlat                   : points=231 (11x21)
                        longitude : 148.75 to 153.75 by 0.5 degrees_east
                         latitude : -27.75 to -37.75 by -0.5 degrees_north
You have to delete the variable time_weights:
cdo -outputtab,date,lon,lat,value -remapnn,"lon=151.5683_lat=-32.7427" -delname,time_weights temp.nc > output.csv

    (1-1/1)