Opened 12 years ago

Closed 12 years ago

#190 closed help (fixed)

rotated grid to real lat/lon grid

Reported by: anmcr Owned by: jeff
Component: UM Mesoscale Keywords:
Cc: Platform:
UM Version:

Description

Hello,

I want to convert a Limited Area Model rotated lat/lon grid to its corresponding 'real' or 'actual' lat/lon values. The reason for this is I wish to map my own SST/sea-ice values to the grid.

Do you have any documentation which details the various equations/steps required?

Thanks,

Andrew (anmcr)

Attachments (2)

avhrr20020221.pdf (17.9 KB) - added by anmcr 12 years ago.
new_lsm.pdf (15.8 KB) - added by anmcr 12 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 in reply to: ↑ description Changed 12 years ago by jeff

Hi Andrew

I want to convert a Limited Area Model rotated lat/lon grid to its corresponding 'real' or 'actual' lat/lon values. The reason for this is I wish to map my own SST/sea-ice values to the grid.

Xconv can interpolate from a real grid to a limited area grid, as long as the field is not a vector component, then xancil can make your sst/sea-ice ancillary fields. If your data has missing data values then you should extrapolate your data values to fill in the missing points first, using xconv. Xancil will use a land/sea mask to mask out the land points on your ancillary file.

Do you have any documentation which details the various equations/steps required?

If you still want to do it yourself then see chapter 5 of this document

http://ncas-cms.nerc.ac.uk/component/option,com_docman/task,doc_download/gid,53/

alternatively look at these UM routines on hector

/work/n02/n02/hum/vn6.1/pathscale/source/umpl/EQTOLL1A.dk
/work/n02/n02/hum/vn6.1/pathscale/source/umpl/LLTOEQ1A.dk

Jeff.

comment:2 Changed 12 years ago by anmcr

Dear Jeff,

Thank you for this help. Using xconv and xancil I've managed to create a SST ancillary file from daily AVHRR SST data.

I confess that I did not know that xconv could do the interpolation and grid changes. With this in mind, there's no reason for me to write my own IDL program to do the interpolation, etc.

However, I was wondering whether the process of i) xconv to interpolate on to a rotated grid and ii) xancil to create the ancillary has any limitations? I want to create a way of 'batch' processing multiple daily SST/ICE ancillary files. I read that xconv can be run on the command line using convsh. Is something similar possible for xancil?

Thanks,

Andrew

comment:3 Changed 12 years ago by jeff

Hi Andrew

Yes you can use convsh to automate the interpolation part. It is possible to script xancil but not in the same way as xconv. I have an example of doing this in some very preliminary documentation I wrote some time ago, see this web page http://ncas-cms.nerc.ac.uk/~jeff/xancil/. For sst files replace the ozone variables with sst, look at the job file for the full list of variables which can be changed.

Jeff.

comment:4 Changed 12 years ago by anmcr

Hello Jeff,

Thanks again for this information. I'II have a go with this. So I might need to ask you additional questions over the coming weeks. But for the moment please consider this ticket closed.

Andrew

Changed 12 years ago by anmcr

Changed 12 years ago by anmcr

comment:5 Changed 12 years ago by anmcr

Dear Jeff,

I'm afraid I've run into a problem already. I've tried to sort it myself but have not been able to.

I followed the following procedure:
i) converted a .nc global AVHRR SST field at 0.25x0.25 deg resolution from celsius to kelvin.
i) read this field using xconv.
ii) interpolated the SST data to rotated model grid centered over the Antarctic Pensinsula, and saved as a .nc file.
iii) read this .nc file and a relevant landmask file (computed using BADC ancillary file generation) using xancil0.40.
v) computed SST ancillary file using the SST data and landmask.

I've attached the SST and 'new' landmask ancillary files.

You will see that i) the new landmask has 'holes' over it, and ii) 273.0 K has been added to the SST data.

Have you came across this problem before, or have any suggestions as to where I am going wrong?

Thanks,

Andrew

comment:6 Changed 12 years ago by jeff

  • Owner changed from um_support to jeff
  • Status changed from new to assigned

Hi Andrew

Do you have this data on hector so I can look at what you have done?

Jeff.

comment:7 Changed 12 years ago by anmcr

Hello Jeff,

The files are on HECToR, in

/home/n02/n02/anmcr/work/UMAncil/12kmAPdaily

I think I've given you the correct rwx permission.

The files are

1) qrparm.mask: 12km resolution LSM ancillary file (from BADC)
2) qrparm.mask.nc: equivalent .nc file created using xconv
3) avhrr20020221.nc: AVHRR global SST field (in degrees C)
4) avhrr20020221_AP.nc: AVHRR SST field interpolated to model domain and in degrees K (conversion from degrees C to K using IDL)
5) avhrr20020221_AP: corresponding ancillary field created using xancil
6) qrparm.mask.new: corresponding qrparm.mask field if 'create new' lsm option used

7) There are also two files using degrees C, rather than K

Thanks for your help,

Andrew

comment:8 Changed 12 years ago by jeff

Hi Andrew

I don't have access to your files, to give group access to your files run these commands

chmod -R g+rX /home/n02/n02/anmcr
chmod -R g+rX /work/n02/n02/anmcr

Jeff.

comment:9 Changed 12 years ago by anmcr

Hello Jeff,

I run the two chmod commands you suggested.

Thanks,

Andrew

comment:10 Changed 12 years ago by jeff

Hi Andrew

There are 2 problems here, firstly file qrparm.mask.nc has a band of values on the left hand side which are missing data points, this causes the strange holes in your data, I'm not sure why it does this. When I created the mask netcdf file, using xconv on hector, I don't get these missing data values, I suggest you recreate the mask netcdf file. The other thing you need to do is extrapolate the missing data values on your original sst file using xconv (as I said in my original reply) before you interpolate to the new grid. Xconv will complain "Exceeding maximum number of iterations (100) for extrapolation" but this doesn't matter as it doesn't affect the area you are interpolating to. You don't need to convert between celsius and kelvin as xancil will do this automatically provided your sst values are sensible.

Jeff.

comment:11 Changed 12 years ago by anmcr

Hi Jeff,

Thank you very much.

I followed your instructions and successfully created the sst ancil file.

(I think that the problem with the qrparm.mask.nc file may have been that I made it on my Linux machine using xconv1.91 which I got from the PUM 6.1 disk.)

Andrew

comment:12 Changed 12 years ago by anmcr

Hello Jeff,

I have a final query regarding the creation of sst files.

When making a global N216 SST ancillary file from the AVHRR data I got a warning of 'Exceeding maximum number of iterations (100) for extrapolation' at both the 'Extrapolate over missing data' and 'Bilinear interpolation' steps.

I know you said this was not a problem when creating the LAM ancillary. But is it a problem when creating the global ancillary?

The new ancillary file, qrclim.sst, looks very much like the initial data, avhrr20020221.nc, as expected. All files are in ~anmcr/work/UMAncil/20020221/N216. The corresponsing .nc file made using xconv is qrclim.sst.nc.

Thanks again,

Andrew

comment:13 Changed 12 years ago by jeff

Hi Andrew

The reason for extrapolating is so that mismatches in the land-sea masks don't cause any problems and this will only happen around coastal points. The above warning means not all the missing data has been extrapolated but as the coastal points are done first it shouldn't make any difference, the unextrapolated points will be masked in the ancillary file. It will be very obvious if this hasn't worked as the values will be totally wrong.

Jeff.

comment:14 Changed 12 years ago by jeff

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.