User Tools

Site Tools


tools:interpolation

Objective

Description

interp.bash is a script encapsulating the interpolator and the preparation of its namelist. It is able to interpolate from and to 11 different horizontal grids (ORCA1t_v2.2/ORCA1t_v3.2/ORCA025t_v3.2/ERA40/ERAint/EcEarth2/EcEarth3/HadISST/NCEP/NOAAv3b/NSIDC) and with 4 different interpolation (conservative, bilinear, bicubic, distance-weighted) methods. Usually, the conservative method is used for surface fluxes or tas/tos which ensures that their global mean is conserved through the interpolation. If you are interested in extremes, it is better to use the bicubic method which avoid smoothing the extrema. interp.bash can interpolate files with dimentions (lon,lat) or (lon,lat,time). The input file is written also in the output file so that you can check whether it is correctly read by the interpolator. All the attributes of your variable and history of your input file will be copied to the output file. interp.bash compensates for the unability of cdo to interpolate from and to irregular grids. The interp.bash script should be used to interpolate from and to the various ORCA grid which we manipulates at CFU. For any other interpolation, you can use cdo. Running interp.bash without argument will print an help. For any questions about the script and interpolator itself, please feel free to ask Virginie. If you want to include a new ORCA grid, Isabel can also teach you how to prepare your weights.

If the default options chosen by interp.bash do not fit your needs, you'll need to know a bit more about the interpolator itself. The interpolator is named scrip_use and it is stored at https://dev.cfu.local/cfu_tools.git interpolation folder. It uses weights computed with SCRIP, a free software that you can download. scrip_use works with a namelist named scrip_use_in. An example can be found in https://dev.cfu.local/cfu_tools.git interpolation folder. In case your input field appears upside down in the output file, put the invertlat option to TRUE in the namelist. A second interpolator, named scrip_use_extrap, is also in the directory. The namelist is exactly the same as scrip_use. It also works both on (lon,lat) and (lon,lat,time) fields. The difference is that after the interpolation (bicubic/bilinear/conservative/neighbour) scrip_use_extrap performs an extrapolation to fill the missing value by the neighbour method. This can be useful if for example your input and output grid do not have the same land-sea mask. scrip_use will put missing value in the interpolated field where there is no data in the input field to interpolate while scrip_use_extrap will fill in these blanks by an extrapolation. So the interpolator to use depends on what you want to do with your interpolated field.

List of functions

Requirements

Use

Repository

The link to the GIT repository is https://dev.cfu.local/cfu_tools.git

Contact

The coordinator of this project is Domingo Manubens Gil domingo.manubens@ic3.cat

Virginie Guemas virginie.guemas@ic3.cat

As a new user, please register to this mailing list: http://cfutools.ic3.cat/mailman/listinfo/cfutools You'll then have access to the history of all the emails sent to the users and presenting the functions and their available options.

Development

Package structure

How to develop

Download the repository folder to your computer ( git clone https://dev.cfu.local/cfu_tools.git <local_folder> ) and check-out to the branch you want to develop in.

Steps to add a new function to a package

  • Put the code of the function in a file.
  • Make sure the code of the function follows the style rules (information below header, history, …).
  • Fill in the file with the function documentation.

Style Guide

You can check the style guide for the Interpolation package here

tools/interpolation.txt · Last modified: 2015/05/26 11:27 (external edit)