Project

General

Profile

Best practice for converting coordinates and cropping for extracting time series from an RCM netCDF ?

Added by Sanita Dhaubanjar over 6 years ago

Hi,

I am working with netCDF files for various CORDEX South Asian RCMs and am looking for guidance on the order of things in my workflow. The goal is to set up netCDF files in order to extract time-series data for a user specified list of lat/lon location in ArcGIS. In the past I have successfully used remapnn on my original netCDF files for doing this, so I have not done grid remapping and cropping prior to extraction. But now my groups wants to be able to do data extraction in ArcGIS as well. And many of the netCDF files I have are in rotated coordinated that do not open directly in ArcGIS. I have figured out how to use remapbil and remapnn to convert the coordinates and setlonlatbox for cropping.

My questions are:
- Is it best to just keep doing things in CDO and avoid the intermediate processing that can introduce interpolation errors to the data?
- Is it better to crop files to desired extents before or after converting coordinates?
- Is it better to use remapbil or remapnn for regridding from rotated coordinate to regular?
- When remapping, what is the best practice for choosing gridsize that best resembles the original one in rotated coordinates? If my input is in 0.44 deg resolution in rotated grid, can I use 0.44 deg for regular grid as well? South asia is my region of interest.
- One particular set of files from IITM-RegCM4 RCM is in rotated_mercator and has x,y variables with coordinate in Cartesian system. these seem to produce the following error when I do cropping or regridding:
Warning (cdf_set_var) : Inconsistent variable definition for lon!
Warning (cdf_set_var) : Inconsistent variable definition for lat!

Should I be worried? is there something else I need to do when working with rotated_mercator? I have attached a sample file here that is a cropped version of the IITM-RegCM4 netCDF I am working with. Following are the outputs of ncdump on the file.

tmp$ ncdump -h npl_IITM-RegCM4_tmp.nc
netcdf npl_IITM-RegCM4_tmp {
dimensions:
x = 19 ;
y = 13 ;
time = UNLIMITED ; // (31 currently)
bnds = 2 ;
variables:
double lon(y, x) ;
lon:standard_name = "longitude" ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
lon:_CoordinateAxisType = "Lon" ;
double lat(y, x) ;
lat:standard_name = "latitude" ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;
lat:_CoordinateAxisType = "Lat" ;
float x(x) ;
x:standard_name = "projection_x_coordinate" ;
x:long_name = "x-coordinate in Cartesian system" ;
x:units = "m" ;
x:axis = "X" ;
float y(y) ;
y:standard_name = "projection_y_coordinate" ;
y:long_name = "y-coordinate in Cartesian system" ;
y:units = "m" ;
y:axis = "Y" ;
int crs ;
crs:proj4_params = "+proj=omerc +lat_0=16.00 +alpha=90.0 +lonc=70.00 +x_0=-25000. +y_0=-25000. +ellps=sphere +a=6371229. +b=6371229. +units=m +no_defs" ;
crs:grid_mapping_name = "rotated_mercator" ;
crs:latitude_of_projection_origin = 16. ;
crs:longitude_of_projection_origin = 70. ;
crs:scale_factor_at_projection_origin = 1. ;
crs:semi_major_axis = 6371229. ;
crs:inverse_flattening = 0. ;
crs:false_easting = -25000. ;
crs:false_northing = -25000. ;
crs:_CoordinateTransformType = "Projection" ;
crs:_CoordinateAxisTypes = "GeoX GeoY" ;
double time(time) ;
time:standard_name = "time" ;
time:long_name = "time" ;
time:bounds = "time_bnds" ;
time:units = "days since 1949-12-01 00:00:00" ;
time:calendar = "365_day" ;
time:axis = "T" ;
double time_bnds(time, bnds) ;
float pr(time, y, x) ;
pr:standard_name = "precipitation_flux" ;
pr:long_name = "Precipitation" ;
pr:units = "kg m-2 s-1" ;
pr:grid_mapping = "crs" ;
pr:coordinates = "lat lon" ;
pr:_FillValue = 1.e+20f ;
pr:missing_value = 1.e+20f ;
pr:cell_methods = "time: mean" ;