| 1 |  | Tests for lab_sea forward model linearity. | 
| 2 |  |  | 
| 3 | Test for lab_sea forward model linearity. | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 4 |  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 5 |  |  | 
| 6 | cd MITgcm/verification/lab_sea | cd MITgcm/verification/lab_sea | 
| 7 | mkdir build | mkdir build | 
| 8 | cd build | cd build | 
| 9 | cp ../code/*.h ../code/packages.conf . | cp ../code/*.h ../code/packages.conf . | 
| 10 |  | cp ../../../../MITgcm_contrib/lab_sea_test/*.F . | 
| 11 | ../../../tools/genmake2 | ../../../tools/genmake2 | 
| 12 | make depend | make depend | 
| 13 | make | make | 
| 14 | cd ..; mkdir run; cd run; cp ../input/* . | cd ..; mkdir run; cd run; cp ../input/* . | 
| 15 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | cp ../../../../MITgcm_contrib/lab_sea_test/* . | 
| 16 | ../build/mitgcmuv > output.txt & | ../build/mitgcmuv >& output.txt & | 
| 17 |  |  | 
| 18 | cd ..; mkdir run1; cd run1; cp ../input/* . | cd ..; mkdir run1; cd run1; cp ../input/* . | 
| 19 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | cp ../../../../MITgcm_contrib/lab_sea_test/* . | 
| 20 | mv data.exf tmp | mv data.exf tmp | 
| 21 | sed s/tair/tair01/ tmp > data.exf | sed s/tair/tair01/ tmp > data.exf | 
| 22 | ../build/mitgcmuv > output.txt & | ../build/mitgcmuv >& output.txt & | 
| 23 |  |  | 
| 24 | cd ..; mkdir run2; cd run2; cp ../input/* . | cd ..; mkdir run2; cd run2; cp ../input/* . | 
| 25 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | cp ../../../../MITgcm_contrib/lab_sea_test/* . | 
| 26 | mv data.exf tmp | mv data.exf tmp | 
| 27 | sed s/tair/tair02/ tmp > data.exf | sed s/tair/tair02/ tmp > data.exf | 
| 28 | ../build/mitgcmuv > output.txt & | ../build/mitgcmuv >& output.txt & | 
| 29 |  |  | 
| 30 | cd ..; mkdir run3; cd run3; cp ../input/* . | cd .. | 
| 31 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | matlab | 
|  | mv data.exf tmp |  | 
|  | sed s/tair/tair03/ tmp > data.exf |  | 
|  | ../build/mitgcmuv > output.txt & |  | 
| 32 |  |  | 
| 33 | cd ..; mkdir run4; cd run4; cp ../input/* . | clear all, clf reset, pn=''; ne=2; nt=53; | 
| 34 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | heff=zeros(20,16,nt,ne+1); | 
| 35 | mv data.exf tmp | area=zeros(20,16,nt,ne+1); | 
| 36 | sed s/tair/tair04/ tmp > data.exf | for e=0:ne | 
| 37 | ../build/mitgcmuv > output.txt & | for t=1:nt, disp([e t]) | 
| 38 |  | if e==0, fn=[pn 'run/HEFFtave.']; | 
| 39 |  | else fn=[pn 'run' int2str(e) '/HEFFtave.']; end | 
| 40 |  | fn=[fn myint2str(t*240,10) '.data']; | 
| 41 |  | heff(:,:,t+1,e+1)=readbin(fn,[20 16],1); | 
| 42 |  | if e==0, fn=[pn 'run/AREAtave.']; | 
| 43 |  | else fn=[pn 'run' int2str(e) '/AREAtave.']; end | 
| 44 |  | fn=[fn myint2str(t*240,10) '.data']; | 
| 45 |  | area(:,:,t+1,e+1)=readbin(fn,[20 16],1); | 
| 46 |  | end | 
| 47 |  | end | 
| 48 |  |  | 
| 49 | cd ..; mkdir run5; cd run5; cp ../input/* . | clf reset, orient tall, wysiwyg | 
| 50 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | tmp1=squeeze(sum(sum(heff(:,:,:,1)))); | 
| 51 | mv data.exf tmp | tmp2=squeeze(sum(sum(heff(:,:,:,2)))); | 
| 52 | sed s/tair/tair05/ tmp > data.exf | tmp3=squeeze(sum(sum(heff(:,:,:,3)))); | 
| 53 | ../build/mitgcmuv > output.txt & | t=1:length(tmp1); t=(t-1)*10 | 
| 54 |  | subplot(411),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 55 |  | axis([0 max(t) min(min(tmp3-tmp1),min(tmp2-tmp1)) ... | 
| 56 |  | max(max(tmp3-tmp1),max(tmp2-tmp1))]), grid | 
| 57 |  | title('sum(heff), original config') | 
| 58 |  | legend('.01^oC','.02^oC',0) | 
| 59 |  | subplot(412),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 60 |  | axis([0 max(t) -2e-5 1e-5]), grid | 
| 61 |  | title('sum(heff), original config') | 
| 62 |  | legend('.01^oC','.02^oC',0) | 
| 63 |  | tmp1=squeeze(sum(sum(area(:,:,:,1)))); | 
| 64 |  | tmp2=squeeze(sum(sum(area(:,:,:,2)))); | 
| 65 |  | tmp3=squeeze(sum(sum(area(:,:,:,3)))); | 
| 66 |  | subplot(413),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 67 |  | axis([0 max(t) min(min(tmp3-tmp1),min(tmp2-tmp1)) ... | 
| 68 |  | max(max(tmp3-tmp1),max(tmp2-tmp1))]), grid | 
| 69 |  | title('sum(area), original config') | 
| 70 |  | legend('.01^oC','.02^oC',0) | 
| 71 |  | subplot(414),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 72 |  | axis([0 max(t) -2e-5 1e-5]), grid, xlabel('days') | 
| 73 |  | title('sum(area), original config') | 
| 74 |  | legend('.01^oC','.02^oC',0) | 
| 75 |  | print -djpeg FIG_ynegminmaxrelax | 
| 76 |  |  | 
| 77 | cd ..; mkdir run6; cd run6; cp ../input/* . | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 78 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
|  | mv data.exf tmp |  | 
|  | sed s/tair/tair06/ tmp > data.exf |  | 
|  | ../build/mitgcmuv > output.txt & |  | 
| 79 |  |  | 
| 80 | cd ..; mkdir run7; cd run7; cp ../input/* . | cd MITgcm/verification/lab_sea | 
| 81 |  | mkdir build | 
| 82 |  | cd build | 
| 83 |  | cp ../code/*.h ../code/packages.conf . | 
| 84 |  | cp ../../../../MITgcm_contrib/lab_sea_test/growth.F . | 
| 85 |  | ../../../tools/genmake2 | 
| 86 |  | make depend | 
| 87 |  | make | 
| 88 |  | cd ..; mkdir run; cd run; cp ../input/* . | 
| 89 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | cp ../../../../MITgcm_contrib/lab_sea_test/* . | 
| 90 | mv data.exf tmp | mv data.pkg tmp | 
| 91 | sed s/tair/tair07/ tmp > data.exf | sed s/"GMRedi = .TRUE"/"GMRedi = .FALSE"/ tmp > tmp1 | 
| 92 | ../build/mitgcmuv > output.txt & | sed s/"KPP    = .TRUE"/"KPP    = .FALSE"/ tmp1 > data.pkg | 
| 93 |  | mv data.seaice tmp | 
| 94 |  | sed s/"DYNAMICS  = .TRUE"/"DYNAMICS  = .FALSE"/ tmp > data.seaice | 
| 95 |  | ../build/mitgcmuv >& output.txt & | 
| 96 |  |  | 
| 97 | cd ..; mkdir run8; cd run8; cp ../input/* . | cd ..; mkdir run1; cd run1; cp ../run/* . | 
|  | cp ../../../../MITgcm_contrib/lab_sea_test/* . |  | 
| 98 | mv data.exf tmp | mv data.exf tmp | 
| 99 | sed s/tair/tair08/ tmp > data.exf | sed s/tair/tair01/ tmp > data.exf | 
| 100 | ../build/mitgcmuv > output.txt & | ../build/mitgcmuv >& output.txt & | 
| 101 |  |  | 
| 102 | cd ..; mkdir run9; cd run9; cp ../input/* . | cd ..; mkdir run2; cd run2; cp ../run/* . | 
|  | cp ../../../../MITgcm_contrib/lab_sea_test/* . |  | 
| 103 | mv data.exf tmp | mv data.exf tmp | 
| 104 | sed s/tair/tair09/ tmp > data.exf | sed s/tair/tair02/ tmp > data.exf | 
| 105 | ../build/mitgcmuv > output.txt & | ../build/mitgcmuv >& output.txt & | 
| 106 |  |  | 
| 107 | cd ..; mkdir run10; cd run10; cp ../input/* . | cd .. | 
| 108 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | matlab | 
|  | mv data.exf tmp |  | 
|  | sed s/tair/tair10/ tmp > data.exf |  | 
|  | ../build/mitgcmuv > output.txt & |  | 
| 109 |  |  | 
| 110 | cd ..; mkdir run11; cd run11; cp ../input/* . | clear all, pn=''; ne=2; nt=53; | 
| 111 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | heff=zeros(20,16,nt,ne+1); | 
| 112 | mv data.exf tmp | area=zeros(20,16,nt,ne+1); | 
| 113 | sed s/tair/tair11/ tmp > data.exf | for e=0:ne | 
| 114 | ../build/mitgcmuv > output.txt & | for t=1:nt, disp([e t]) | 
| 115 |  | if e==0, fn=[pn 'run/HEFFtave.']; | 
| 116 |  | else fn=[pn 'run' int2str(e) '/HEFFtave.']; end | 
| 117 |  | fn=[fn myint2str(t*240,10) '.data']; | 
| 118 |  | heff(:,:,t+1,e+1)=readbin(fn,[20 16],1); | 
| 119 |  | if e==0, fn=[pn 'run/AREAtave.']; | 
| 120 |  | else fn=[pn 'run' int2str(e) '/AREAtave.']; end | 
| 121 |  | fn=[fn myint2str(t*240,10) '.data']; | 
| 122 |  | area(:,:,t+1,e+1)=readbin(fn,[20 16],1); | 
| 123 |  | end | 
| 124 |  | end | 
| 125 |  |  | 
| 126 | cd ..; mkdir run12; cd run12; cp ../input/* . | clf reset, orient tall, wysiwyg | 
| 127 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | tmp1=squeeze(sum(sum(heff(:,:,:,1)))); | 
| 128 | mv data.exf tmp | tmp2=squeeze(sum(sum(heff(:,:,:,2)))); | 
| 129 | sed s/tair/tair12/ tmp > data.exf | tmp3=squeeze(sum(sum(heff(:,:,:,3)))); | 
| 130 | ../build/mitgcmuv > output.txt & | t=1:length(tmp1); t=(t-1)*10 | 
| 131 |  | subplot(411),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 132 |  | axis([0 max(t) min(min(tmp3-tmp1),min(tmp2-tmp1)) ... | 
| 133 |  | max(max(tmp3-tmp1),max(tmp2-tmp1))]), grid | 
| 134 |  | title('sum(heff), original config') | 
| 135 |  | legend('.01^oC','.02^oC',0) | 
| 136 |  | subplot(412),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 137 |  | axis([0 max(t) -2e-5 1e-5]), grid | 
| 138 |  | title('sum(heff), original config') | 
| 139 |  | legend('.01^oC','.02^oC',0) | 
| 140 |  | tmp1=squeeze(sum(sum(area(:,:,:,1)))); | 
| 141 |  | tmp2=squeeze(sum(sum(area(:,:,:,2)))); | 
| 142 |  | tmp3=squeeze(sum(sum(area(:,:,:,3)))); | 
| 143 |  | subplot(413),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 144 |  | axis([0 max(t) min(min(tmp3-tmp1),min(tmp2-tmp1)) ... | 
| 145 |  | max(max(tmp3-tmp1),max(tmp2-tmp1))]), grid | 
| 146 |  | title('sum(area), original config') | 
| 147 |  | legend('.01^oC','.02^oC',0) | 
| 148 |  | subplot(414),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 149 |  | axis([0 max(t) -2e-5 1e-5]), grid, xlabel('days') | 
| 150 |  | title('sum(area), original config') | 
| 151 |  | legend('.01^oC','.02^oC',0) | 
| 152 |  | print -djpeg FIG_ynegrelax_no_kpp_gm_dyn | 
| 153 |  |  | 
| 154 | cd ..; mkdir run13; cd run13; cp ../input/* . | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 155 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
|  | mv data.exf tmp |  | 
|  | sed s/tair/tair13/ tmp > data.exf |  | 
|  | ../build/mitgcmuv > output.txt & |  | 
| 156 |  |  | 
| 157 | cd ..; mkdir run14; cd run14; cp ../input/* . | cd MITgcm/verification/lab_sea | 
| 158 |  | mkdir build | 
| 159 |  | cd build | 
| 160 |  | cp ../code/*.h ../code/packages.conf . | 
| 161 |  | cp ../../../../MITgcm_contrib/lab_sea_test/growth.F . | 
| 162 |  | ../../../tools/genmake2 | 
| 163 |  | make depend | 
| 164 |  | make | 
| 165 |  | cd ..; mkdir run; cd run; cp ../input/* . | 
| 166 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | cp ../../../../MITgcm_contrib/lab_sea_test/* . | 
| 167 | mv data.exf tmp | ../build/mitgcmuv >& output.txt & | 
|  | sed s/tair/tair14/ tmp > data.exf |  | 
|  | ../build/mitgcmuv > output.txt & |  | 
| 168 |  |  | 
| 169 | cd ..; mkdir run15; cd run15; cp ../input/* . | cd ..; mkdir run1; cd run1; cp ../input/* . | 
| 170 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | cp ../../../../MITgcm_contrib/lab_sea_test/* . | 
| 171 | mv data.exf tmp | mv data.exf tmp | 
| 172 | sed s/tair/tair15/ tmp > data.exf | sed s/tair/tair01/ tmp > data.exf | 
| 173 | ../build/mitgcmuv > output.txt & | ../build/mitgcmuv >& output.txt & | 
| 174 |  |  | 
| 175 | cd ..; mkdir run16; cd run16; cp ../input/* . | cd ..; mkdir run2; cd run2; cp ../input/* . | 
| 176 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | cp ../../../../MITgcm_contrib/lab_sea_test/* . | 
| 177 | mv data.exf tmp | mv data.exf tmp | 
| 178 | sed s/tair/tair16/ tmp > data.exf | sed s/tair/tair02/ tmp > data.exf | 
| 179 | ../build/mitgcmuv > output.txt & | ../build/mitgcmuv >& output.txt & | 
| 180 |  |  | 
| 181 | cd ..; mkdir run17; cd run17; cp ../input/* . | cd .. | 
| 182 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | matlab | 
|  | mv data.exf tmp |  | 
|  | sed s/tair/tair17/ tmp > data.exf |  | 
|  | ../build/mitgcmuv > output.txt & |  | 
| 183 |  |  | 
| 184 | cd ..; mkdir run18; cd run18; cp ../input/* . | clear all, clf reset, pn=''; ne=2; nt=53; | 
| 185 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | heff=zeros(20,16,nt,ne+1); | 
| 186 | mv data.exf tmp | area=zeros(20,16,nt,ne+1); | 
| 187 | sed s/tair/tair18/ tmp > data.exf | for e=0:ne | 
| 188 | ../build/mitgcmuv > output.txt & | for t=1:nt, disp([e t]) | 
| 189 |  | if e==0, fn=[pn 'run/HEFFtave.']; | 
| 190 |  | else fn=[pn 'run' int2str(e) '/HEFFtave.']; end | 
| 191 |  | fn=[fn myint2str(t*240,10) '.data']; | 
| 192 |  | heff(:,:,t+1,e+1)=readbin(fn,[20 16],1); | 
| 193 |  | if e==0, fn=[pn 'run/AREAtave.']; | 
| 194 |  | else fn=[pn 'run' int2str(e) '/AREAtave.']; end | 
| 195 |  | fn=[fn myint2str(t*240,10) '.data']; | 
| 196 |  | area(:,:,t+1,e+1)=readbin(fn,[20 16],1); | 
| 197 |  | end | 
| 198 |  | end | 
| 199 |  |  | 
| 200 |  | clf reset, orient tall, wysiwyg | 
| 201 |  | tmp1=squeeze(sum(sum(heff(:,:,:,1)))); | 
| 202 |  | tmp2=squeeze(sum(sum(heff(:,:,:,2)))); | 
| 203 |  | tmp3=squeeze(sum(sum(heff(:,:,:,3)))); | 
| 204 |  | t=1:length(tmp1); t=(t-1)*10 | 
| 205 |  | subplot(411),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 206 |  | axis([0 max(t) min(min(tmp3-tmp1),min(tmp2-tmp1)) ... | 
| 207 |  | max(max(tmp3-tmp1),max(tmp2-tmp1))]), grid | 
| 208 |  | title('sum(heff), original config') | 
| 209 |  | legend('.01^oC','.02^oC',0) | 
| 210 |  | subplot(412),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 211 |  | axis([0 max(t) -2e-5 1e-5]), grid | 
| 212 |  | title('sum(heff), original config') | 
| 213 |  | legend('.01^oC','.02^oC',0) | 
| 214 |  | tmp1=squeeze(sum(sum(area(:,:,:,1)))); | 
| 215 |  | tmp2=squeeze(sum(sum(area(:,:,:,2)))); | 
| 216 |  | tmp3=squeeze(sum(sum(area(:,:,:,3)))); | 
| 217 |  | subplot(413),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 218 |  | axis([0 max(t) min(min(tmp3-tmp1),min(tmp2-tmp1)) ... | 
| 219 |  | max(max(tmp3-tmp1),max(tmp2-tmp1))]), grid | 
| 220 |  | title('sum(area), original config') | 
| 221 |  | legend('.01^oC','.02^oC',0) | 
| 222 |  | subplot(414),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 223 |  | axis([0 max(t) -2e-5 1e-5]), grid, xlabel('days') | 
| 224 |  | title('sum(area), original config') | 
| 225 |  | legend('.01^oC','.02^oC',0) | 
| 226 |  | print -djpeg FIG_ynegrelax | 
| 227 |  |  | 
| 228 | cd ..; mkdir run19; cd run19; cp ../input/* . | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 229 |  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 230 |  |  | 
| 231 |  | cd MITgcm/verification/lab_sea | 
| 232 |  | mkdir build | 
| 233 |  | cd build | 
| 234 |  | cp ../code/*.h ../code/packages.conf . | 
| 235 |  | ../../../tools/genmake2 | 
| 236 |  | make depend | 
| 237 |  | make | 
| 238 |  | cd ..; mkdir run; cd run; cp ../input/* . | 
| 239 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | cp ../../../../MITgcm_contrib/lab_sea_test/* . | 
| 240 |  | mv data.pkg tmp | 
| 241 |  | sed s/"GMRedi = .TRUE"/"GMRedi = .FALSE"/ tmp > tmp1 | 
| 242 |  | sed s/"KPP    = .TRUE"/"KPP    = .FALSE"/ tmp1 > data.pkg | 
| 243 |  | mv data.seaice tmp | 
| 244 |  | sed s/"DYNAMICS  = .TRUE"/"DYNAMICS  = .FALSE"/ tmp > data.seaice | 
| 245 |  | ../build/mitgcmuv >& output.txt & | 
| 246 |  |  | 
| 247 |  | cd ..; mkdir run1; cd run1; cp ../run/* . | 
| 248 | mv data.exf tmp | mv data.exf tmp | 
| 249 | sed s/tair/tair19/ tmp > data.exf | sed s/tair/tair01/ tmp > data.exf | 
| 250 | ../build/mitgcmuv > output.txt & | ../build/mitgcmuv >& output.txt & | 
| 251 |  |  | 
| 252 | cd ..; mkdir run20; cd run20; cp ../input/* . | cd ..; mkdir run2; cd run2; cp ../run/* . | 
|  | cp ../../../../MITgcm_contrib/lab_sea_test/* . |  | 
| 253 | mv data.exf tmp | mv data.exf tmp | 
| 254 | sed s/tair/tair20/ tmp > data.exf | sed s/tair/tair02/ tmp > data.exf | 
| 255 | ../build/mitgcmuv > output.txt & | ../build/mitgcmuv >& output.txt & | 
| 256 |  |  | 
| 257 | cd .. | cd .. | 
|  |  |  | 
|  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |  | 
|  |  |  | 
| 258 | matlab | matlab | 
| 259 |  |  | 
| 260 | pn='nokpp_nogm_withseaicedyn/'; | clear all, clf reset, pn=''; ne=2; nt=53; | 
| 261 |  | heff=zeros(20,16,nt,ne+1); | 
| 262 | heff=zeros(20,16,21,21); | area=zeros(20,16,nt,ne+1); | 
| 263 | area=zeros(20,16,21,21); | for e=0:ne | 
| 264 | for e=0:20 | for t=1:nt, disp([e t]) | 
| 265 | for t=0:4, disp([e t]) | if e==0, fn=[pn 'run/HEFFtave.']; | 
| 266 | if e==0, fn=[pn 'run/HEFF.']; | else fn=[pn 'run' int2str(e) '/HEFFtave.']; end | 
|  | else fn=[pn 'run' int2str(e) '/HEFF.']; end |  | 
| 267 | fn=[fn myint2str(t*240,10) '.data']; | fn=[fn myint2str(t*240,10) '.data']; | 
| 268 | heff(:,:,t+1,e+1)=readbin(fn,[20 16],1); | heff(:,:,t+1,e+1)=readbin(fn,[20 16],1); | 
| 269 | if e==0, fn=[pn 'run/AREA.']; | if e==0, fn=[pn 'run/AREAtave.']; | 
| 270 | else fn=[pn 'run' int2str(e) '/AREA.']; end | else fn=[pn 'run' int2str(e) '/AREAtave.']; end | 
| 271 | fn=[fn myint2str(t*240,10) '.data']; | fn=[fn myint2str(t*240,10) '.data']; | 
| 272 | area(:,:,t+1,e+1)=readbin(fn,[20 16],1); | area(:,:,t+1,e+1)=readbin(fn,[20 16],1); | 
| 273 | end | end | 
| 274 | end | end | 
| 275 |  |  | 
| 276 | for t=1:21 | clf reset, orient tall, wysiwyg | 
| 277 | tmp=squeeze(sum(sum(heff(:,:,t,:)))); | tmp1=squeeze(sum(sum(heff(:,:,:,1)))); | 
| 278 | clf,subplot(211),plot(tmp-mean(tmp)) | tmp2=squeeze(sum(sum(heff(:,:,:,2)))); | 
| 279 | grid,title([int2str((t-1)*10) ' days']) | tmp3=squeeze(sum(sum(heff(:,:,:,3)))); | 
| 280 | tmp=squeeze(sum(sum(area(:,:,t,:)))); | t=1:length(tmp1); t=(t-1)*10 | 
| 281 | subplot(212),plot(tmp-mean(tmp)) | subplot(411),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 282 | grid,title([int2str((t-1)*10) ' days']) | axis([0 max(t) min(min(tmp3-tmp1),min(tmp2-tmp1)) ... | 
| 283 | pause, end | max(max(tmp3-tmp1),max(tmp2-tmp1))]), grid | 
| 284 |  | title('sum(heff), original config') | 
| 285 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | legend('.01^oC','.02^oC',0) | 
| 286 |  | subplot(412),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 287 | repeat with daily dumps for experiments 10-15, days 6-10 | axis([0 max(t) -2e-5 1e-5]), grid | 
| 288 |  | title('sum(heff), original config') | 
| 289 | cd run10; mv data tmp | legend('.01^oC','.02^oC',0) | 
| 290 | sed s/startTime=0.0,/startTime=518400.0,/ tmp > tmp2 | tmp1=squeeze(sum(sum(area(:,:,:,1)))); | 
| 291 | sed s/endTime=1728000.,/endTime=950400.0,/ tmp2 > tmp3 | tmp2=squeeze(sum(sum(area(:,:,:,2)))); | 
| 292 | sed s/"dumpFreq = 86400.,"/dumpFreq=3600.,/ tmp3 > data | tmp3=squeeze(sum(sum(area(:,:,:,3)))); | 
| 293 | ../build/mitgcmuv >! output.txt & | subplot(413),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 294 |  | axis([0 max(t) min(min(tmp3-tmp1),min(tmp2-tmp1)) ... | 
| 295 | cd ../run11; mv data tmp | max(max(tmp3-tmp1),max(tmp2-tmp1))]), grid | 
| 296 | sed s/startTime=0.0,/startTime=518400.0,/ tmp > tmp2 | title('sum(area), original config') | 
| 297 | sed s/endTime=1728000.,/endTime=950400.0,/ tmp2 > tmp3 | legend('.01^oC','.02^oC',0) | 
| 298 | sed s/"dumpFreq = 86400.,"/dumpFreq=3600.,/ tmp3 > data | subplot(414),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 299 | ../build/mitgcmuv >! output.txt & | axis([0 max(t) -2e-5 1e-5]), grid, xlabel('days') | 
| 300 |  | title('sum(area), original config') | 
| 301 | cd ../run12; mv data tmp | legend('.01^oC','.02^oC',0) | 
| 302 | sed s/startTime=0.0,/startTime=518400.0,/ tmp > tmp2 | print -djpeg FIG_no_kpp_gm_dyn | 
| 303 | sed s/endTime=1728000.,/endTime=950400.0,/ tmp2 > tmp3 |  | 
| 304 | sed s/"dumpFreq = 86400.,"/dumpFreq=3600.,/ tmp3 > data | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 305 | ../build/mitgcmuv >! output.txt & | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 306 |  |  | 
| 307 | cd ../run13; mv data tmp | cd MITgcm/verification/lab_sea | 
| 308 | sed s/startTime=0.0,/startTime=518400.0,/ tmp > tmp2 | mkdir build | 
| 309 | sed s/endTime=1728000.,/endTime=950400.0,/ tmp2 > tmp3 | cd build | 
| 310 | sed s/"dumpFreq = 86400.,"/dumpFreq=3600.,/ tmp3 > data | cp ../code/*.h ../code/packages.conf . | 
| 311 | ../build/mitgcmuv >! output.txt & | ../../../tools/genmake2 | 
| 312 |  | make depend | 
| 313 | cd ../run14; mv data tmp | make | 
| 314 | sed s/startTime=0.0,/startTime=518400.0,/ tmp > tmp2 | cd ..; mkdir run; cd run; cp ../input/* . | 
| 315 | sed s/endTime=1728000.,/endTime=950400.0,/ tmp2 > tmp3 | cp ../../../../MITgcm_contrib/lab_sea_test/* . | 
| 316 | sed s/"dumpFreq = 86400.,"/dumpFreq=3600.,/ tmp3 > data | ../build/mitgcmuv >& output.txt & | 
| 317 | ../build/mitgcmuv >! output.txt & |  | 
| 318 |  | cd ..; mkdir run1; cd run1; cp ../input/* . | 
| 319 | cd ../run15; mv data tmp | cp ../../../../MITgcm_contrib/lab_sea_test/* . | 
| 320 | sed s/startTime=0.0,/startTime=518400.0,/ tmp > tmp2 | mv data.exf tmp | 
| 321 | sed s/endTime=1728000.,/endTime=950400.0,/ tmp2 > tmp3 | sed s/tair/tair01/ tmp > data.exf | 
| 322 | sed s/"dumpFreq = 86400.,"/dumpFreq=3600.,/ tmp3 > data | ../build/mitgcmuv >& output.txt & | 
|  | ../build/mitgcmuv >! output.txt & |  | 
| 323 |  |  | 
| 324 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | cd ..; mkdir run2; cd run2; cp ../input/* . | 
| 325 |  | cp ../../../../MITgcm_contrib/lab_sea_test/* . | 
| 326 |  | mv data.exf tmp | 
| 327 |  | sed s/tair/tair02/ tmp > data.exf | 
| 328 |  | ../build/mitgcmuv >& output.txt & | 
| 329 |  |  | 
| 330 |  | cd .. | 
| 331 | matlab | matlab | 
| 332 |  |  | 
| 333 | heff=zeros(20,16,121,6); | clear all, clf reset, pn=''; ne=2; nt=53; | 
| 334 | area=zeros(20,16,121,6); | heff=zeros(20,16,nt,ne+1); | 
| 335 | for e=10:15, disp(e) | area=zeros(20,16,nt,ne+1); | 
| 336 | for t=144:264 | for e=0:ne | 
| 337 | fn=['run' int2str(e) '/HEFF.']; | for t=1:nt, disp([e t]) | 
| 338 | fn=[fn myint2str(t,10) '.data']; | if e==0, fn=[pn 'run/HEFFtave.']; | 
| 339 | heff(:,:,t-143,e-9)=readbin(fn,[20 16],1); | else fn=[pn 'run' int2str(e) '/HEFFtave.']; end | 
| 340 | fn=['run' int2str(e) '/AREA.']; | fn=[fn myint2str(t*240,10) '.data']; | 
| 341 | fn=[fn myint2str(t,10) '.data']; | heff(:,:,t+1,e+1)=readbin(fn,[20 16],1); | 
| 342 | area(:,:,t-143,e-9)=readbin(fn,[20 16],1); | if e==0, fn=[pn 'run/AREAtave.']; | 
| 343 |  | else fn=[pn 'run' int2str(e) '/AREAtave.']; end | 
| 344 |  | fn=[fn myint2str(t*240,10) '.data']; | 
| 345 |  | area(:,:,t+1,e+1)=readbin(fn,[20 16],1); | 
| 346 | end | end | 
| 347 | end | end | 
| 348 |  |  | 
| 349 | for t=144:264 | clf reset, orient tall, wysiwyg | 
| 350 | tmp=squeeze(sum(sum(heff(:,:,t-143,:)))); | tmp1=squeeze(sum(sum(heff(:,:,:,1)))); | 
| 351 | clf,subplot(211), plot(tmp-mean(tmp)), grid, title(t/24) | tmp2=squeeze(sum(sum(heff(:,:,:,2)))); | 
| 352 | tmp=squeeze(sum(sum(area(:,:,t-143,:)))); | tmp3=squeeze(sum(sum(heff(:,:,:,3)))); | 
| 353 | subplot(212), plot(tmp-mean(tmp)), grid, title(t/24) | t=1:length(tmp1); t=(t-1)*10 | 
| 354 | pause, end | subplot(411),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 355 |  | axis([0 max(t) min(min(tmp3-tmp1),min(tmp2-tmp1)) ... | 
| 356 |  | max(max(tmp3-tmp1),max(tmp2-tmp1))]), grid | 
| 357 |  | title('sum(heff), original config') | 
| 358 |  | legend('.01^oC','.02^oC',0) | 
| 359 |  | subplot(412),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 360 |  | axis([0 max(t) -2e-5 1e-5]), grid | 
| 361 |  | title('sum(heff), original config') | 
| 362 |  | legend('.01^oC','.02^oC',0) | 
| 363 |  | tmp1=squeeze(sum(sum(area(:,:,:,1)))); | 
| 364 |  | tmp2=squeeze(sum(sum(area(:,:,:,2)))); | 
| 365 |  | tmp3=squeeze(sum(sum(area(:,:,:,3)))); | 
| 366 |  | subplot(413),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 367 |  | axis([0 max(t) min(min(tmp3-tmp1),min(tmp2-tmp1)) ... | 
| 368 |  | max(max(tmp3-tmp1),max(tmp2-tmp1))]), grid | 
| 369 |  | title('sum(area), original config') | 
| 370 |  | legend('.01^oC','.02^oC',0) | 
| 371 |  | subplot(414),plot(t,tmp2-tmp1,t,tmp3-tmp1,'linewidth',2) | 
| 372 |  | axis([0 max(t) -2e-5 1e-5]), grid, xlabel('days') | 
| 373 |  | title('sum(area), original config') | 
| 374 |  | legend('.01^oC','.02^oC',0) | 
| 375 |  | print -djpeg FIG_orig | 
| 376 |  |  | 
| 377 |  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | 
| 378 |  | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |