Project

General

Profile

Remapping from stereographic polar to lat lon grid

Added by Tony Leboissetier over 4 years ago

Hello,
I'm trying to rewrite a GeoTIFF of NSIDC sea ice concentration from GeoTIFF in polar stereographic projection into a NetCDF in Lon Lat coordinates

The file is located here: https://www.dropbox.com/s/bkqt6qgyhpr7vjk/N_197901_concentration_v3.0.tif?dl=0

I was able to transform the file into a NetCDF file using gdal_translate:

gdal_translate -of netCDF N_197901_concentration_v3.0.tif N_197901_concentration_v3.0.nc

(Both the original tif file and the netCDF version are attached to this message)

But I'm still trying to figure out how to translate this into Lat Lon coordinates.

I'm still quite new with CDO and I'm not sure what should the input and output grid files should like.

Any help would be greatly appreciated!

Tony

N_197901_concentration_v3.0.tif (651 KB) N_197901_concentration_v3.0.tif original tiff file from NSIDC
N_197901_concentration_v3.0.nc (540 KB) N_197901_concentration_v3.0.nc tif file translated a netCDF using gdal_translate

Replies (6)

RE: Remapping from stereographic polar to lat lon grid - Added by Karin Meier-Fleischer over 4 years ago

Hi Tony,

you can use the remap operators to regrid the data to latlon coordinates after using gdal_translate.

cdo -f nc remapbil,r304x448 N_197901_concentration_v3.0.nc o.nc

-Karin

RE: Remapping from stereographic polar to lat lon grid - Added by Tony Leboissetier over 4 years ago

Hello Karin!
Is r304x448 an input source file? If so what should it look like?

Tony

RE: Remapping from stereographic polar to lat lon grid - Added by Ralf Mueller over 4 years ago

hi Tony!

CDO understands some shortcuts for predefined grids

cheers
ralf

RE: Remapping from stereographic polar to lat lon grid - Added by Karin Meier-Fleischer over 4 years ago

To get more information about the grid you can use the sinfo operator

cdo sinfo o.nc
   File format : NetCDF
    -1 : Institut Source   T Steptype Levels Num    Points Num Dtype : Parameter ID
     1 : unknown  unknown  c instant       1   1    136192   1  F32  : -1            
   Grid coordinates :
     1 : projection               : points=136192 (304x448)
                          mapping : polar_stereographic
                                x : -3837500 to 3737500 by 25000 m
                                y : -5337500 to 5837500 by 25000 m
   Vertical coordinates :
     1 : surface                  : levels=1
cdo sinfo: Processed 1 variable [0.01s 22MB]
[~/Downloads] > cdo sinfo o.nc
   File format : NetCDF2
    -1 : Institut Source   T Steptype Levels Num    Points Num Dtype : Parameter ID
     1 : unknown  unknown  c instant       1   1    136192   1  F32  : -1            
   Grid coordinates :
     1 : lonlat                   : points=136192 (304x448)
                              lon : 0 to 358.8158 by 1.184211 degrees_east  circular
                              lat : -89.79911 to 89.79911 by 0.4017857 degrees_north
   Vertical coordinates :
     1 : surface                  : levels=1
cdo sinfo: Processed 1 variable [0.00s 22MB]

or you can take a look at the lat/lon values with ncdump

ncdump -v lat o.nc
 lat = -89.7991071428571, -89.3973214285714, -88.9955357142857, -88.59375, 
    -88.1919642857143, -87.7901785714286, -87.3883928571428, 
    -86.9866071428571, -86.5848214285714, -86.1830357142857, -85.78125, 
    -85.3794642857143, -84.9776785714286, -84.5758928571428, 
    -84.1741071428571, -83.7723214285714, -83.3705357142857, -82.96875, 
    -82.5669642857143, -82.1651785714286, -81.7633928571428, 
    -81.3616071428571, -80.9598214285714, -80.5580357142857, -80.15625,
...
ncdump -v lon o.nc
 lon = 0, 1.18421052631579, 2.36842105263158, 3.55263157894737, 
    4.73684210526316, 5.92105263157895, 7.10526315789474, 8.28947368421053, 
    9.47368421052632, 10.6578947368421, 11.8421052631579, 13.0263157894737, 
    14.2105263157895, 15.3947368421053, 16.5789473684211, 17.7631578947368, 
    18.9473684210526, 20.1315789473684, 21.3157894736842, 22.5, 
...

-Karin

RE: Remapping from stereographic polar to lat lon grid - Added by Tony Leboissetier over 4 years ago

Thanks Karin!
When I tried the command in your initial reply:

cdo -f nc remapbil,r304x448 N_197901_concentration_v3.0.nc o.nc

I'm getting the following message:

cdo remapbil (Abort): Variable Band1 has an unsupported projection grid!

(the output file o.nc is not created)

This command line seems to work on your side but I'm not sure what's happening on my side (I'm using cod 1.9.1)

Tony

RE: Remapping from stereographic polar to lat lon grid - Added by Karin Meier-Fleischer over 4 years ago

I use CDO version 1.9.8 but 1.9.6 works, too.

cdo -f nc remapbil,r304x448 N_197901_concentration_v3.0.nc o2.nc
cdo remapbil: Bilinear weights from curvilinear (304x448) to lonlat (304x448) grid
cdo remapbil: Processed 136192 values from 1 variable over 1 timestep [0.45s 71MB]

cdo sinfo o2.nc 
   File format : NetCDF2
    -1 : Institut Source   T Steptype Levels Num    Points Num Dtype : Parameter ID
     1 : unknown  unknown  c instant       1   1    136192   1  F32  : -1            
   Grid coordinates :
     1 : lonlat                   : points=136192 (304x448)
                              lon : 0 to 358.8158 by 1.184211 degrees_east  circular
                              lat : -89.79911 to 89.79911 by 0.4017857 degrees_north
   Vertical coordinates :
     1 : surface                  : levels=1
cdo sinfo: Processed 1 variable [0.00s 22MB]

I've uploaded the output file o2.nc.

o2.nc (539 KB) o2.nc
    (1-6/6)