Hi Yogesh! This method is not suitable for a script, because is includes an iteration. Hence, it is implemented as a fortran external function. The attached file is fill.tar which contains all files you need. How to install? Put the subdirectory "fill" into "your_ferret"/ext_func/src This can be also $HOME/ferret/ext_func/src Modify fill_xy.F and Makefile for your system. Please follow the templates as found in the exaples delivered with ferret, e.g. in "your_ferret"/ext_func/src/examples Please compare in fill_xy.F and add_9.F, how underscores have to be defined. It should be either fill_xy_init_(id) and fill_xy_compute_(.... or fill_xy_init(id) and fill_xy_compute(.... Adjust the Makefile to your compiler. Follow the template delivered with ferret for your system. The Makefile in "fill" works for AIX. Only the system issues for AIX are described in external_functions_aix.html. ferret_cmn is from the version 5.41 for AIX. I suggest to should replace it by the version delivered for your system. Otherwise follow the instructions on the Ferret web pages on external functions. If the function is installed, start ferret sh func/external should list fill_xy (among all other functions ...) use coads_climatology set win 1 shade/l=1 sst !Now test, what fill does. set win 2 let mask = missing(sst,0)*0 + 1 ! 1 at the sst-grid, all points may be filled if missing let sst_fill = fill_xy(sst,mask,1) shade/l=1 sst_fill -missing(sst,0) ! shows what happens ! Now fill only in the southern ocean let mask1 =if y[gy=sst] lt 0 then mask else 1/0 let sst_fill = fill_xy(sst,mask1,20) shade/l=1 sst_fill Good luck! Martin Schmidt
Attachment:
bin00015.bin
Description: fill.tar