Project

General

Profile

Regridding issue with CDO

Added by InWon Kim almost 2 years ago

Hello,

I am trying to regrid from polar stereographic projection (with 1km resolution) to regular lat/lon grid using cdo.

I used this data from the link (https://data.ceda.ac.uk/neodc/esacci/permafrost/data/active_layer_thickness/L4/area4/pp/v03.0/).
The Netcdf information of the file is as below.

=============================================================================================================

netcdf ESACCI-PERMAFROST-L4-ALT-MODISLST_CRYOGRID-AREA4_PP-2003-fv03.0 {
dimensions:
time = UNLIMITED ; // (1 currently)
x = 14762 ;
y = 10353 ;
variables:
int polar_stereographic ;
polar_stereographic:grid_mapping_name = "polar_stereographic" ;
polar_stereographic:straight_vertical_longitude_from_pole = 0. ;
polar_stereographic:false_easting = 0. ;
polar_stereographic:false_northing = 0. ;
polar_stereographic:latitude_of_projection_origin = 90. ;
polar_stereographic:standard_parallel = 71. ;
polar_stereographic:longitude_of_prime_meridian = 0. ;
polar_stereographic:semi_major_axis = 6378137. ;
polar_stereographic:inverse_flattening = 298.257223563 ;
polar_stereographic:crs_wkt = "PROJCS[\"WGS 84 / Arctic Polar Stereographic\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Polar_Stereographic\"],PARAMETER[\"latitude_of_origin\",71],PARAMETER[\"central_meridian\",0],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH],AUTHORITY[\"EPSG\",\"3995\"]]" ;
polar_stereographic:esri_wkt = "PROJCS[\"WGS_84_Arctic_Polar_Stereographic\",GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Stereographic_North_Pole\"],PARAMETER[\"standard_parallel_1\",71],PARAMETER[\"central_meridian\",0],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]" ;
polar_stereographic:spatial_ref = "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Polar_Stereographic\"],PARAMETER[\"latitude_of_origin\",45],PARAMETER[\"central_meridian\",-170],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]]" ;
polar_stereographic:GeoTransform = "-8679599.425969256 926.6254331383326 0 4120958.560533902 0 -926.6254331383326 " ;
double time(time) ;
time:axis = "T" ;
time:standard_name = "time" ;
time:long_name = "time" ;
time:calendar = "standard" ;
time:units = "hours since 1950-01-01 00:00:00" ;
double x(x) ;
x:standard_name = "projection_x_coordinate" ;
x:long_name = "x coordinate of projection" ;
x:units = "m" ;
x:axis = "X" ;
x:actual_range = -6111938.53511132, 7566906.10887676 ;
double y(y) ;
y:standard_name = "projection_y_coordinate" ;
y:long_name = "y coordinate of projection" ;
y:units = "m" ;
y:axis = "Y" ;
y:actual_range = -5477994.70186797, 4115358.40741319 ;
ushort ALT ;
ALT:standard_name = "permafrost_active_layer_thickness" ;
ALT:grid_mapping = "polar_stereographic" ;
ALT:units = "metres" ;
ALT:conversion = "to metres: x*0.01" ;
ALT:scale_factor = 0.01 ;
ALT:add_offset = 0. ;
ALT:_FillValue = 0US ;
ALT:valid_min = 0US ;
ALT:valid_max = 10000US ;
ALT:actual_min = 0.01 ;
ALT:actual_max = 100. ;

// global attributes:
:title = "CCI Permafrost active layer thickness" ;
:institution = "University of Oslo" ;
:source = "MODIS MOD11A1 and MYD11A1 level 3 Collection 6, ESA CCI Land Cover dataset v1.6.1, ERA5 Reanalysis" ;
:history = "2021-02-24 10:28:09" ;
:references = "http://cci.esa.int/Permafrost, https://doi.org/10.5194/gmd-9-523-2016" ;
:tracking_id = "5eef2210-7c02-4954-9eea-051a1fd0e672" ;
:Conventions = "CF-1.9" ;
:product_version = "03.0" ;
:summary = "ESA CCI Permafrost product level 4" ;
:keywords = "permafrost, active layer thickness" ;
:id = "ESACCI-PERMAFROST-L4-ALT-MODISLST_CRYOGRID-AREA4_PP-2003-fv03.0.nc" ;
:naming\ authority = "no.uio" ;
:keywords_vocabulary = "NASA Global Change Master Directory (GCMD) Science Keywords" ;
:cdm_data_type = "Grid" ;
:comment = "These data were produced at ESA CCI as part of the ESA Permafrost CCI+ project Contract No 4000123681-18-I-NB. They are part of the 2nd Climate Research Data Package release." ;
:date_created = "2021-02-24T10:28:09+0000" ;
:creator_name = "University of Oslo" ;
:creator_url = "https://www.uio.no/english/" ;
:project = "Climate Change Initiative - European Space Agency" ;
:geospatial_lat_min = 30. ;
:geospatial_lat_max = 90. ;
:geospatial_lon_min = 180. ;
:geospatial_lon_max = 180. ;
:geospatial_vertical_min = "0.0" ;
:geospatial_vertical_max = "0.0" ;
:time_coverage_start = "20030101000000" ;
:time_coverage_end = "20031231000000" ;
:time_coverage_duration = "P1Y" ;
:time_coverage_resolution = "P1Y" ;
:standard_name_vocabulary = "CF Standard Name Table v73" ;
:license = "ESA CCI Data Policy: free and open access" ;
:platform = "Aqua, Terra, ENVISAT, SPOT, PROBA-V, NOAA
<15,16,17>" ;
:sensor = "MODIS, MERIS, ASAR, AVHRR/3, SPOT, SAR-X" ;
:spatial_resolution = "926.62543305 m" ;
:geospatial_lat_units = "none" ;
:geospatial_lon_units = "none" ;
:geospatial_lon_resolution = "variable" ;
:geospatial_lat_resolution = "variable" ;
:key_variables = "permafrost active layer thickness" ;
:format_version = "CCI Data Standards v2.2" ;
}

=============================================================================================================

I used this command line.
*cdo -f nc remapbil,r360x180 ESACCI-PERMAFROST-L4-ALT-MODISLST_CRYOGRID-AREA4_PP-2003-fv03.0.nc o2.nc

The error was "cdo remapbil (Abort): proj library error: major axis or radius = 0 or not given".

If you have some suggestion, it would be great.

Thanks,
InWon


Replies (1)

RE: Regridding issue with CDO - Added by Karin Meier-Fleischer almost 2 years ago

Hi InWon,

you can remap the data using a specified grid description file.

Grid description file:

gridtype  = projection
gridsize  = 152830986
xsize     = 14762
ysize     = 10353
xname     = x
xlongname = "x coordinate of projection" 
xunits    = "m" 
yname     = y
ylongname = "y coordinate of projection" 
yunits    = "m" 
xfirst    = -6111475.22239475
xinc      = 926.625433138333
yfirst    = 4114895.09469662
yinc      = -926.625433138333
grid_mapping = polar_stereographic
grid_mapping_name = polar_stereographic
straight_vertical_longitude_from_pole = 0.
false_easting = 0.
false_northing = 0.
latitude_of_projection_origin = 90.
standard_parallel = 71.
longitude_of_prime_meridian = 0.
semi_major_axis = 6378137.
inverse_flattening = 298.257223563
proj_params = "+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs" 

Remap the ESACCI data file (it takes some time):

cdo -remapbil,r360x180 -setgrid,ESACCI_grid.txt ESACCI-PERMAFROST-L4-ALT-MODISLST_CRYOGRID-AREA4_PP-2003-fv03.0.nc outfile.nc

-Karin

    (1-1/1)