In netcdf file long and rain coordinate are not correct
Added by naeem saddique over 6 years ago
I have PERSIAN CDR data set, in data longitude is at z axis and rain at x-axis, that is not correct format, i want to reverse the data position. Longitude should be at x-axis. Your help must be appreciated.
Thanks
| combine.nc (4.85 MB) combine.nc |
Replies (1)
RE: In netcdf file long and rain coordinate are not correct - Added by Karin Meier-Fleischer over 6 years ago
Hi Naeem,
first, you have to understand what the order of the dimensions of your variable means. In your case the longitude is at x-axis (lon:axis = X) and the latitude is at y-axis (lat:axis = Y).
You should always have a look at your data first using e.g. ncdump to see the metadata.
ncdump -h combine.nc
netcdf combine {
dimensions:
datetime = UNLIMITED ; // (12053 currently)
lon = 10 ;
lat = 9 ;
variables:
float datetime(datetime) ;
datetime:standard_name = "time" ;
datetime:units = "days since 1983-01-01" ;
datetime:calendar = "gregorian" ;
datetime:axis = "T" ;
float lon(lon) ;
lon:standard_name = "projection_x_coordinate" ;
lon:axis = "X" ;
float lat(lat) ;
lat:standard_name = "projection_y_coordinate" ;
lat:axis = "Y" ;
int crs ;
crs:long_name = "Lon/Lat Coords in WGS84" ;
crs:grid_mapping_name = "latitude_longitude" ;
crs:longitude_of_prime_meridian = 0. ;
crs:semi_major_axis = 6378137. ;
crs:inverse_flattening = 298.257223563 ;
float precip(datetime, lat, lon) ;
precip:grid_mapping = "crs" ;
// global attributes:
:CDI = "Climate Data Interface version 1.9.7.1 (http://mpimet.mpg.de/cdi)" ;
:history = "Tue Aug 20 16:52:59 2019: cdo cat CDR_2019-08-08073210am_1983.nc CDR_2019-08-08073210am_1984.nc CDR_2019-08-08073210am_1985.nc CDR_2019-08-08073210am_1986.nc CDR_2019-08-08073210am_1987.nc CDR_2019-08-08073210am_1988.nc CDR_2019-08-08073210am_1989.nc CDR_2019-08-08073210am_1990.nc CDR_2019-08-08073210am_1991.nc CDR_2019-08-08073210am_1992.nc CDR_2019-08-08073210am_1993.nc CDR_2019-08-08073210am_1994.nc CDR_2019-08-08073210am_1995.nc CDR_2019-08-08073210am_1996.nc CDR_2019-08-08073210am_1997.nc CDR_2019-08-08073210am_1998.nc CDR_2019-08-08073210am_1999.nc CDR_2019-08-08073210am_2000.nc CDR_2019-08-08073210am_2001.nc CDR_2019-08-08073210am_2002.nc CDR_2019-08-08073210am_2003.nc CDR_2019-08-08073210am_2004.nc CDR_2019-08-08073210am_2005.nc CDR_2019-08-08073210am_2006.nc CDR_2019-08-08073210am_2007.nc CDR_2019-08-08073210am_2008.nc CDR_2019-08-08073210am_2009.nc CDR_2019-08-08073210am_2010.nc CDR_2019-08-08073210am_2011.nc CDR_2019-08-08073210am_2012.nc CDR_2019-08-08073210am_2013.nc CDR_2019-08-08073210am_2014.nc CDR_2019-08-08073210am_2015.nc combine.nc" ;
:Conventions = "CF-1.6" ;
:CDO = "Climate Data Operators version 1.9.7.1 (http://mpimet.mpg.de/cdo)" ;
}
So, there is nothing to do.
-Karin