Back to OASIS3 home

Arborescence of the scrip library (in oasis3/lib/scrip/src) :

scriprmp.F : (called by oasis3 in oasis3/src/interp.F)
Main routine of SCRIP remapping
- finds out, whether remapping matrix exists
- drives calculation of missing remapping matrices
- performs matrix multiplication
If lcalc == true then
'CONSERV'
=> call corners(nlon_src, nlat_src, ncrn_src,
     $           src_lon, src_lat,
     $           src_name, cdgrdtyp, id_sper, cd_sper,
     $           src_corner_lon, src_corner_lat)
=> call corners(nlon_dst, nlat_dst, ncrn_dst,
     $           dst_lon, dst_lat,
     $           dst_name, cl_tgt, id_tper, cd_tper,
     $           dst_corner_lon, dst_corner_lat)
Endif
=> call grid_init(map_method, rst_type, n_srch_bins,
     $                  src_size, dst_size, src_dims, dst_dims,
     $                  src_rank, dst_rank, ncrn_src, ncrn_dst,
     $                  sou_mask, tgt_mask, src_name, dst_name,
     $                  src_lat, src_lon, dst_lat, dst_lon,
     $                  src_corner_lat, src_corner_lon,
     $                  dst_corner_lat, dst_corner_lon,
     $                  src_area_origin, dst_area_origin)
=> call scrip(crmpfile, cmapping, map_method, normalize_opt,
     $              lextrapdone, rl_varmul, id_scripvoi)
=> call init_remap_vars
=> call remap_conserv
=> call remap_bilin_reduced
=> call remap_bilin
=> call remap_distwgt
=> call remap_gauswgt
=> call remap_bicub_reduced
=> call remap_bicub
=> call sort_add (to make sure that dst_addr is monotonous)
If (lfracnnei .or. lfracnntr) THEN
=> call fracnnei_vmm (calculate the number of the tricky points in an interpolation : ie target cells with all source cells masked and target cells without link (out of domain))
=> call fracnnei
=> call sort_add (to make sure that dst_addr is monotonous)
Endif
=> call resize_remap_vars
=> call write_remap
=> call free_grids
=> call free_remap_vars
else apply weights from the remapping file
'CONSERV', 'SECOND'
=> call gradient(nlon_src, nlat_src, src_array, sou_mask,
     $                       src_lat, src_lon, id_sper, cd_sper,
     $                       gradient_lat, gradient_lon)
'BICUBIC', 'LR'
=> call gradient_bicubic(nlon_src,nlat_src,src_array,
     $             sou_mask, src_lat, src_lon, id_sper, cd_sper,
     $             gradient_i, gradient_j, gradient_ij)
'BILINEAR' ; 'BICUBIC D'
Endif