-
Notifications
You must be signed in to change notification settings - Fork 0
/
ncl_interp_OSTIA_SICE_overland.ncl
43 lines (32 loc) · 1.41 KB
/
ncl_interp_OSTIA_SICE_overland.ncl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
;***********************************************************
; Program: ncl_interp_OSTIA_SICE_overland.ncl
; Author: Mitchell Black ([email protected])
; Purpose: Script to interpolate OSTIA field over land.
; Script required for producing W@H ancillary files.
;
;***********************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; read infile
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fin=addfile ("OSTIA_SICE_N96_2013_12_2014_12.nc" , "r");
sic = fin->sea_ice_fraction;
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; interpolation
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
guess = 1 ; use zonal means
is_cyclic = True ; cyclic [global]
nscan = 2000 ; usually much less than this
eps = 1.e-2 ; variable dependent
relc = 0.6 ; relaxation coefficient
opt = 0 ; not used
poisson_grid_fill( sic, is_cyclic, guess, nscan, eps, relc, opt)
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
; ouput
;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fout = addfile ("OSTIA_SICE_N96_2013_12_2014_12_interp_land.nc", "c")
copy_VarAtts(fin,fout)
fout->sic=sic
end