/[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.4 - (show annotations) (download)
Wed Dec 19 02:44:21 2012 UTC (11 years, 4 months ago) by dimitri
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.3: +25 -24 lines
disabling SEAICE_GROWTH_LEGACY for verification/seaice_obcs

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

  ViewVC Help
Powered by ViewVC 1.1.22