Opened 4 years ago

Closed 4 years ago

#1624 closed help (completed)

Conversion of rotated pole to regular lat lon grid

Reported by: ata27 Owned by: um_support
Component: UM Mesoscale Keywords:
Cc: Platform:
UM Version: <select version>

Description

Hi,
I've been playing with CDO for a while to convert some UM files (I've converted to netCDF) on a limited area rotated grid to a regular lat lon grid. But so far I've had no success. I just wondered if any one had any success using CDO to do this?

Cheers,
Alex

Change History (3)

comment:1 Changed 4 years ago by ata27

Hi,

So I managed to do this in the end with the following:
cdo griddes rotated.nc > mygrid

Then edit the mygrid file to remove xname,xlongname,xunits,yname,ylongname,yunits

Then used the following commands:
cdo setgrid,mygrid rotated.nc out.nc
cdo remapbil,rnlonxnlat out.nc converted.nc

The last command performs a bi-linear interpolation of the netCDF file "out.nc" onto a nlonxnlat grid. NB you will need to change nlon and nlat to be real values of the number of longitude and latitude nodes.

This worked nicely although a bit clunky as it results in a really big - mainly empty - netCDF file! To save space, still using CDO, I then have done this:
cdo sellonlatbox,-20,20,45,65 converted.nc out2.nc

Cheers!
Alex

comment:2 Changed 4 years ago by ata27

Following a bit of googling I actually found that nco is quicker at doing the subsampling of the netCDF file (something about the way in which CDO reads data into memory).

ncea -d lat,45.0,65.0 -d lon,-20.0,20.0 converted.nc out2.nc

comment:3 Changed 4 years ago by grenville

  • Resolution set to completed
  • Status changed from new to closed

Alex

Thanks for the information - I'll close this for now.

Grenville

Note: See TracTickets for help on using tickets.