source: TOOLS/MOSAIX/Utils/CreateBounds.bash @ 4186

Last change on this file since 4186 was 3665, checked in by omamce, 6 years ago

O.M. : mise a jour des properties

  • Property svn:executable set to *
  • Property svn:keywords set to Date Revision HeadURL Author Id
File size: 763 bytes
Line 
1#!/bin/bash
2
3cp  essai_grid.nc   essai1.nc
4
5cat <<EOF > add_bound.nco
6defdim ("nvertex_lmd", 4) ;
7delta_x = alon(0,1) - alon(0,0) ;
8delta_y = alat(1,0) - alat(0,0) ;
9//
10bounds_alon[nvertex_lmd,lat,lon] = 0.0 ;
11bounds_alat[nvertex_lmd,lat,lon] = 0.0 ;
12//
13bounds_alon (0,:,:) = alon + delta_x*0.5 ;
14bounds_alat (0,:,:) = alat + delta_y*0.5 ;
15bounds_alon (1,:,:) = alon + delta_x*0.5 ;
16bounds_alat (1,:,:) = alat - delta_y*0.5 ;
17bounds_alon (2,:,:) = alon - delta_x*0.5 ;
18bounds_alat (2,:,:) = alat - delta_y*0.5 ;
19bounds_alon (3,:,:) = alon - delta_x*0.5 ;
20bounds_alat (3,:,:) = alat + delta_y*0.5 ;
21//
22where (bounds_alat >  90.0 ) bounds_alat =  90.0 ;;
23where (bounds_alat < -90.0 ) bounds_alat = -90.0 ;;
24//
25EOF
26 
27ncap2 -S add_bound.nco -O -h essai1.nc essai2.nc
Note: See TracBrowser for help on using the repository browser.