/[MITgcm]/MITgcm/verification/seaice_obcs/input/mk_input.m
ViewVC logotype

Contents of /MITgcm/verification/seaice_obcs/input/mk_input.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu Jan 17 20:48:08 2008 UTC (16 years, 5 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59o, checkpoint59n, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.1: +33 -22 lines
o verification/seaice_obcs: updated for restart test and latest options

1 % Generate input files for MITgcm/verification/seaice_obcs
2 % the pkg/seaice + pkg/obcs verification experiment
3 % by carving them out of ../lab_sea/input.salt_plume
4
5 % preamble
6 nx=20; ny=16; nz=23; nt=12; ix=8:17; iy=4:11;
7 pn='../../lab_sea/tr_run.salt_plume/';
8
9 % initial U/V/T/S conditions
10 for f={'T','S','U','V'}
11 fn=[pn f{1} '.0000000000.data'];
12 tmp=readbin(fn,[nx ny nz]);
13 writebin([f{1} '.seaice_obcs'],tmp(ix,iy,:));
14 end
15
16 % U/V/T/S lateral boundary conditions
17 for f={'T','S','U','V'}
18 x1=ix(1); x2=ix(end); y1=iy(1); y2=iy(end);
19 if strcmp(f{1},'U'), x1=ix(2); end
20 if strcmp(f{1},'V'), y1=iy(2); end
21 for t=0:nt
22 fn=[pn f{1} '.' myint2str(t,10) '.data'];
23 tmp=readbin(fn,[nx ny nz]);
24 for d={'N','S','E','W'}
25 fo=['OB' d{1} lower(f{1}) '.seaice_obcs'];
26 switch d{1}
27 case 'N', writebin(fo,tmp(ix,y2,:),1,'real*4',t);
28 case 'S', writebin(fo,tmp(ix,y1,:),1,'real*4',t);
29 case 'E', writebin(fo,tmp(x2,iy,:),1,'real*4',t);
30 case 'W', writebin(fo,tmp(x1,iy,:),1,'real*4',t);
31 end
32 end
33 end
34 end
35
36 % initial sea ice conditions
37 for f={'AREA','HSNOW','HSALT','HEFF'}
38 fn=[pn f{1} '.0000000000.data'];
39 tmp=readbin(fn,[nx ny]);
40 writebin([f{1} '.seaice_obcs'],tmp(ix,iy));
41 end
42
43 % sea ice lateral boundary conditions
44 fld={'AREA','HEFF','HSALT','HSNOW','UICE','VICE'};
45 nme={'a','h','sl','sn','uice','vice'};
46 for f=1:length(fld)
47 x1=ix(1); x2=ix(end); y1=iy(1); y2=iy(end);
48 if strcmp(fld{f},'UICE'), x1=ix(2); end
49 if strcmp(fld{f},'VICE'), y1=iy(2); end
50 for t=1:nt
51 fn=[pn fld{f} '.' myint2str(t,10) '.data'];
52 tmp=readbin(fn,[nx ny]);
53 for d={'N','S','E','W'}
54 fo=['OB' d{1} nme{f} '.seaice_obcs'];
55 switch d{1}
56 case 'N', writebin(fo,tmp(ix,y2,:),1,'real*4',t-1);
57 case 'S', writebin(fo,tmp(ix,y1,:),1,'real*4',t-1);
58 case 'E', writebin(fo,tmp(x2,iy,:),1,'real*4',t-1);
59 case 'W', writebin(fo,tmp(x1,iy,:),1,'real*4',t-1);
60 end
61 end
62 end
63 end
64
65 % bathymetry
66 tmp=readbin([pn 'bathy.labsea1979'],[nx ny]);
67 writebin('bathy.seaice_obcs',tmp(ix,iy));
68
69 % surface forcing fields
70 for f={'tair','qa','u10m','v10m','prate','flo','fsh','SSS_monthly'}
71 fn=[pn f{1} '.labsea1979'];
72 tmp=readbin(fn,[nx ny 14]);
73 writebin([f{1} '.seaice_obcs'],tmp(ix,iy,:));
74 end

  ViewVC Help
Powered by ViewVC 1.1.22