Commit c5b6a1a5884f8ead7f6d887c0727641a5d6774d7

Authored by Jérémy Baudry
1 parent 68586e03
Exists in master

makefile and display messages

No preview for this file type
batch/RUN_BATCH_Ec.sh
... ... @@ -3,17 +3,14 @@
3 3  
4 4  
5 5 strain="3e-5 4e-5 5e-5 6e-5 7e-5 8e-5 9e-5 1e-4 2e-4 3e-4"
6   -pc="0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55"
7 6  
8 7 let "count=0"
9 8 for a in $strain
10 9 do
11   -for b in $pc
12   -do
13   - name_exp=pc_ec$count
  10 + name_exp=ec$count
14 11 cat parameter.txt | sed \
15 12 -e "s/nmebatch/$name_exp/g" \
16   - -e "s/probcritbatch/$b/g" \
  13 + -e "s/probcritbatch/0.37/g" \
17 14 -e "s/strainbatch/$a/g" \
18 15 -e "s/Hsbatch/1/g" \
19 16 -e "s/hbatch/3/g" \
... ... @@ -30,6 +27,6 @@ do
30 27  
31 28 let "count=count+1"
32 29 done
33   -done
  30 +
34 31  
35 32  
... ...
batch/RUN_BATCH_EcPc.sh 0 → 100755
... ... @@ -0,0 +1,35 @@
  1 +#!/bin/bash
  2 +
  3 +
  4 +
  5 +strain="3e-5 4e-5 5e-5 6e-5 7e-5 8e-5 9e-5 1e-4 2e-4 3e-4"
  6 +pc="0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55"
  7 +
  8 +let "count=0"
  9 +for a in $strain
  10 +do
  11 +for b in $pc
  12 +do
  13 + name_exp=pc_ec$count
  14 + cat parameter.txt | sed \
  15 + -e "s/nmebatch/$name_exp/g" \
  16 + -e "s/probcritbatch/$b/g" \
  17 + -e "s/strainbatch/$a/g" \
  18 + -e "s/Hsbatch/1/g" \
  19 + -e "s/hbatch/3/g" \
  20 + -e "s/Tmbatch/8/g" \
  21 + > parameter.nml
  22 +
  23 + mv parameter.nml ../nml/
  24 +
  25 +
  26 + qsub ./lanceur.sh
  27 +
  28 + sleep 30s
  29 +
  30 +
  31 + let "count=count+1"
  32 +done
  33 +done
  34 +
  35 +
... ...
batch/RUN_BATCH_Pc.sh
1 1 #!/bin/bash
2 2  
3 3  
4   -name_exp=('test1' 'test2' 'test3' 'test4')
5   -
6   -prob="0.15 0.20 0.30 0.50"
  4 +pc="0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55"
7 5  
8 6 let "count=0"
9   -for a in $prob
  7 +for b in $pc
10 8 do
  9 + name_exp=Pc$count
11 10 cat parameter.txt | sed \
12   - -e "s/nmebatch/${name_exp[$count]}/g" \
13   - -e "s/probcritbatch/$a/g" \
  11 + -e "s/nmebatch/$name_exp/g" \
  12 + -e "s/probcritbatch/$b/g" \
14 13 -e "s/strainbatch/3e-5/g" \
  14 + -e "s/Hsbatch/1/g" \
  15 + -e "s/hbatch/3/g" \
  16 + -e "s/Tmbatch/8/g" \
15 17 > parameter.nml
16 18  
17 19 mv parameter.nml ../nml/
... ... @@ -19,7 +21,7 @@ do
19 21  
20 22 qsub ./lanceur.sh
21 23  
22   - sleep 5s
  24 + sleep 30s
23 25  
24 26  
25 27 let "count=count+1"
... ...
batch/WIM.o10808 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +compute-2-8.local
  2 + processing 2% processing 3% processing 4% processing 5% processing 6% processing 7% processing 8% processing 9% processing 10% processing 11% processing 12% processing 13% processing 14% processing 16% processing 16% processing 17% processing 18% processing 19% processing 20% processing 21% processing 22% processing 23% processing 24% processing 25% processing 26% processing 28% processing 28% processing 29% processing 31% processing 31% processing 32% processing 33% processing 34% processing 35% processing 36% processing 37% processing 38% processing 39% processing 40% processing 41% processing 42% processing 43% processing 44% processing 45% processing 46% processing 47% processing 48% processing 49% processing 50% processing 51% processing 52% processing 53% processing 55% processing 55% processing 56% processing 57% processing 58% processing 59% processing 61% processing 61% processing 62% processing 63% processing 64% processing 65% processing 66% processing 67% processing 68% processing 69% processing 70% processing 71% processing 72% processing 73% processing 74% processing 75% processing 76% processing 77% processing 78% processing 79% processing 80% processing 81% processing 82% processing 83% processing 84% processing 85% processing 86% processing 87% processing 88% processing 89% processing 90% processing 91% processing 92% processing 93% processing 94% processing 95% processing 96% processing 97% processing 98% processing 99% processing 100%
  3 + simulation completed!
... ...
batch/WIM.o10809 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +compute-2-7.local
  2 + processing 2% processing 3% processing 4% processing 5% processing 6% processing 7% processing 8% processing 9% processing 10% processing 11% processing 12% processing 13% processing 14% processing 16% processing 16% processing 17% processing 18% processing 19% processing 20% processing 21% processing 22% processing 23% processing 24% processing 25% processing 26% processing 28% processing 28% processing 29% processing 31% processing 31% processing 32% processing 33% processing 34% processing 35% processing 36% processing 37% processing 38% processing 39% processing 40% processing 41% processing 42% processing 43% processing 44% processing 45% processing 46% processing 47% processing 48% processing 49% processing 50% processing 51% processing 52% processing 53% processing 55% processing 55% processing 56% processing 57% processing 58% processing 59% processing 61% processing 61% processing 62% processing 63% processing 64% processing 65% processing 66% processing 67% processing 68% processing 69% processing 70% processing 71% processing 72% processing 73% processing 74% processing 75% processing 76% processing 77% processing 78% processing 79% processing 80% processing 81% processing 82% processing 83% processing 84% processing 85% processing 86% processing 87% processing 88% processing 89% processing 90% processing 91% processing 92% processing 93% processing 94% processing 95% processing 96% processing 97% processing 98% processing 99% processing 100%
  3 + simulation completed!
... ...
batch/WIM.o10810 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +compute-2-8.local
  2 + processing 2% processing 3% processing 4% processing 5% processing 6% processing 7% processing 8% processing 9% processing 10% processing 11% processing 12% processing 13% processing 14% processing 16% processing 16% processing 17% processing 18% processing 19% processing 20% processing 21% processing 22% processing 23% processing 24% processing 25% processing 26% processing 28% processing 28% processing 29% processing 31% processing 31% processing 32% processing 33% processing 34% processing 35% processing 36% processing 37% processing 38% processing 39% processing 40% processing 41% processing 42% processing 43% processing 44% processing 45% processing 46% processing 47% processing 48% processing 49% processing 50% processing 51% processing 52% processing 53% processing 55% processing 55% processing 56% processing 57% processing 58% processing 59% processing 61% processing 61% processing 62% processing 63% processing 64% processing 65% processing 66% processing 67% processing 68% processing 69% processing 70% processing 71% processing 72% processing 73% processing 74% processing 75% processing 76% processing 77% processing 78% processing 79% processing 80% processing 81% processing 82% processing 83% processing 84% processing 85% processing 86% processing 87% processing 88% processing 89% processing 90% processing 91% processing 92% processing 93% processing 94% processing 95% processing 96% processing 97% processing 98% processing 99% processing 100%
  3 + simulation completed!
... ...
batch/WIM.o10811 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +compute-2-7.local
  2 + processing 2% processing 3% processing 4% processing 5% processing 6% processing 7% processing 8% processing 9% processing 10% processing 11% processing 12% processing 13% processing 14% processing 16% processing 16% processing 17% processing 18% processing 19% processing 20% processing 21% processing 22% processing 23% processing 24% processing 25% processing 26% processing 28% processing 28% processing 29% processing 31% processing 31% processing 32% processing 33% processing 34% processing 35% processing 36% processing 37% processing 38% processing 39% processing 40% processing 41% processing 42% processing 43% processing 44% processing 45% processing 46% processing 47% processing 48% processing 49% processing 50% processing 51% processing 52% processing 53% processing 55% processing 55% processing 56% processing 57% processing 58% processing 59% processing 61% processing 61% processing 62% processing 63% processing 64% processing 65% processing 66% processing 67% processing 68% processing 69% processing 70% processing 71% processing 72% processing 73% processing 74% processing 75% processing 76% processing 77% processing 78% processing 79% processing 80% processing 81% processing 82% processing 83% processing 84% processing 85% processing 86% processing 87% processing 88% processing 89% processing 90% processing 91% processing 92% processing 93% processing 94% processing 95% processing 96% processing 97% processing 98% processing 99% processing 100%
  3 + simulation completed!
... ...
batch/WIM.o10812 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +compute-2-8.local
  2 + processing 2% processing 3% processing 4% processing 5% processing 6% processing 7% processing 8% processing 9% processing 10% processing 11% processing 12% processing 13% processing 14% processing 16% processing 16% processing 17% processing 18% processing 19% processing 20% processing 21% processing 22% processing 23% processing 24% processing 25% processing 26% processing 28% processing 28% processing 29% processing 31% processing 31% processing 32% processing 33% processing 34% processing 35% processing 36% processing 37% processing 38% processing 39% processing 40% processing 41% processing 42% processing 43% processing 44% processing 45% processing 46% processing 47% processing 48% processing 49% processing 50% processing 51% processing 52% processing 53% processing 55% processing 55% processing 56% processing 57% processing 58% processing 59% processing 61% processing 61% processing 62% processing 63% processing 64% processing 65% processing 66% processing 67% processing 68% processing 69% processing 70% processing 71% processing 72% processing 73% processing 74% processing 75% processing 76% processing 77% processing 78% processing 79% processing 80% processing 81% processing 82% processing 83% processing 84% processing 85% processing 86% processing 87% processing 88% processing 89% processing 90% processing 91% processing 92% processing 93% processing 94% processing 95% processing 96% processing 97% processing 98% processing 99% processing 100%
  3 + simulation completed!
... ...
batch/WIM.o10813 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +compute-2-7.local
  2 + processing 2% processing 3% processing 4% processing 5% processing 6% processing 7% processing 8% processing 9% processing 10% processing 11% processing 12% processing 13% processing 14% processing 16% processing 16% processing 17% processing 18% processing 19% processing 20% processing 21% processing 22% processing 23% processing 24% processing 25% processing 26% processing 28% processing 28% processing 29% processing 31% processing 31% processing 32% processing 33% processing 34% processing 35% processing 36% processing 37% processing 38% processing 39% processing 40% processing 41% processing 42% processing 43% processing 44% processing 45% processing 46% processing 47% processing 48% processing 49% processing 50% processing 51% processing 52% processing 53% processing 55% processing 55% processing 56% processing 57% processing 58% processing 59% processing 61% processing 61% processing 62% processing 63% processing 64% processing 65% processing 66% processing 67% processing 68% processing 69% processing 70% processing 71% processing 72% processing 73% processing 74% processing 75% processing 76% processing 77% processing 78% processing 79% processing 80% processing 81% processing 82% processing 83% processing 84% processing 85% processing 86% processing 87% processing 88% processing 89% processing 90% processing 91% processing 92% processing 93% processing 94% processing 95% processing 96% processing 97% processing 98% processing 99% processing 100%
  3 + simulation completed!
... ...
batch/WIM.o10814 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +compute-2-8.local
  2 + processing 2% processing 3% processing 4% processing 5% processing 6% processing 7% processing 8% processing 9% processing 10% processing 11% processing 12% processing 13% processing 14% processing 16% processing 16% processing 17% processing 18% processing 19% processing 20% processing 21% processing 22% processing 23% processing 24% processing 25% processing 26% processing 28% processing 28% processing 29% processing 31% processing 31% processing 32% processing 33% processing 34% processing 35% processing 36% processing 37% processing 38% processing 39% processing 40% processing 41% processing 42% processing 43% processing 44% processing 45% processing 46% processing 47% processing 48% processing 49% processing 50% processing 51% processing 52% processing 53% processing 55% processing 55% processing 56% processing 57% processing 58% processing 59% processing 61% processing 61% processing 62% processing 63% processing 64% processing 65% processing 66% processing 67% processing 68% processing 69% processing 70% processing 71% processing 72% processing 73% processing 74% processing 75% processing 76% processing 77% processing 78% processing 79% processing 80% processing 81% processing 82% processing 83% processing 84% processing 85% processing 86% processing 87% processing 88% processing 89% processing 90% processing 91% processing 92% processing 93% processing 94% processing 95% processing 96% processing 97% processing 98% processing 99% processing 100%
  3 + simulation completed!
... ...
batch/WIM.o10815 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +compute-2-7.local
  2 + processing 2% processing 3% processing 4% processing 5% processing 6% processing 7% processing 8% processing 9% processing 10% processing 11% processing 12% processing 13% processing 14% processing 16% processing 16% processing 17% processing 18% processing 19% processing 20% processing 21% processing 22% processing 23% processing 24% processing 25% processing 26% processing 28% processing 28% processing 29% processing 31% processing 31% processing 32% processing 33% processing 34% processing 35% processing 36% processing 37% processing 38% processing 39% processing 40% processing 41% processing 42% processing 43% processing 44% processing 45% processing 46% processing 47% processing 48% processing 49% processing 50% processing 51% processing 52% processing 53% processing 55% processing 55% processing 56% processing 57% processing 58% processing 59% processing 61% processing 61% processing 62% processing 63% processing 64% processing 65% processing 66% processing 67% processing 68% processing 69% processing 70% processing 71% processing 72% processing 73% processing 74% processing 75% processing 76% processing 77% processing 78% processing 79% processing 80% processing 81% processing 82% processing 83% processing 84% processing 85% processing 86% processing 87% processing 88% processing 89% processing 90% processing 91% processing 92% processing 93% processing 94% processing 95% processing 96% processing 97% processing 98% processing 99% processing 100%
  3 + simulation completed!
... ...
batch/WIM.o10816 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +compute-2-8.local
  2 + processing 2% processing 3% processing 4% processing 5% processing 6% processing 7% processing 8% processing 9% processing 10% processing 11% processing 12% processing 13% processing 14% processing 16% processing 16% processing 17% processing 18% processing 19% processing 20% processing 21% processing 22% processing 23% processing 24% processing 25% processing 26% processing 28% processing 28% processing 29% processing 31% processing 31% processing 32% processing 33% processing 34% processing 35% processing 36% processing 37% processing 38% processing 39% processing 40% processing 41% processing 42% processing 43% processing 44% processing 45% processing 46% processing 47% processing 48% processing 49% processing 50% processing 51% processing 52% processing 53% processing 55% processing 55% processing 56% processing 57% processing 58% processing 59% processing 61% processing 61% processing 62% processing 63% processing 64% processing 65% processing 66% processing 67% processing 68% processing 69% processing 70% processing 71% processing 72% processing 73% processing 74% processing 75% processing 76% processing 77% processing 78% processing 79% processing 80% processing 81% processing 82% processing 83% processing 84% processing 85% processing 86% processing 87% processing 88% processing 89% processing 90% processing 91% processing 92% processing 93% processing 94% processing 95% processing 96% processing 97% processing 98% processing 99% processing 100%
  3 + simulation completed!
... ...
batch/WIM.o10817 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +compute-2-7.local
  2 + processing 2% processing 3% processing 4% processing 5% processing 6% processing 7% processing 8% processing 9% processing 10% processing 11% processing 12% processing 13% processing 14% processing 16% processing 16% processing 17% processing 18% processing 19% processing 20% processing 21% processing 22% processing 23% processing 24% processing 25% processing 26% processing 28% processing 28% processing 29% processing 31% processing 31% processing 32% processing 33% processing 34% processing 35% processing 36% processing 37% processing 38% processing 39% processing 40% processing 41% processing 42% processing 43% processing 44% processing 45% processing 46% processing 47% processing 48% processing 49% processing 50% processing 51% processing 52% processing 53% processing 55% processing 55% processing 56% processing 57% processing 58% processing 59% processing 61% processing 61% processing 62% processing 63% processing 64% processing 65% processing 66% processing 67% processing 68% processing 69% processing 70% processing 71% processing 72% processing 73% processing 74% processing 75% processing 76% processing 77% processing 78% processing 79% processing 80% processing 81% processing 82% processing 83% processing 84% processing 85% processing 86% processing 87% processing 88% processing 89% processing 90% processing 91% processing 92% processing 93% processing 94% processing 95% processing 96% processing 97% processing 98% processing 99% processing 100%
  3 + simulation completed!
... ...
nml/parameter.nml
... ... @@ -37,7 +37,7 @@ disp =0
37 37 nbin =100
38 38 dx =5000
39 39 Cfl =1
40   -name_sim ='temp1'
  40 +name_sim ='temp2'
41 41 root = 'output/'
42 42  
43 43 /
... ... @@ -82,23 +82,16 @@ swell_Hs=0.09
82 82 ! hice -> Ice thickness (if ice_thick=0) [m]
83 83 ! hmax -> Maximum ice thickness (if ice_thick=1) [m]
84 84 ! Xh -> distance where h=hmax/2 (if ice_thicl=1) [m]
85   -! D0 -> initial floe size in the domain [m]
86   -! gam ->
87   -! Dmin -> Minimum floe size (if FSD_sheme=1) [m]
88 85 !------------------------------------------------------------------------------
89 86 &ice_parameters
90 87 X_ice =50000
91 88 cice =1
92 89 ice_thick =0
93   -hice =2
  90 +hice =3
94 91 hmax =3
95 92 Xh =200000
96   -D0 =500
97   -gam =1.5
98   -Dmin =20
99   -stress_crit =0.67e6
100 93 strain_crit =3e-5
101   -P_c =0.37
  94 +P_c =0.55
102 95  
103 96 /
104 97 !________________________________________________________________________________
... ...
scripts_matlab/anim_joint_distribution.m
... ... @@ -50,8 +50,8 @@ for i=1:length(hcat)
50 50 nfloe(:,i)=((FSD1(:,i)*(5000)^2)./Fsize.^2) ;
51 51 end
52 52 nfloe=nfloe/sum(sum(nfloe));
53   -
54 53 FSD2(j,:)=sum(FSD1,2);
  54 +
55 55 subplot(2,2,1)
56 56 hh=surf(hcat,Fsize,nfloe);
57 57 shading interp
... ...
scripts_matlab/anim_joint_distribution.m~ 0 → 100644
... ... @@ -0,0 +1,99 @@
  1 +clear all;
  2 +close all;
  3 +
  4 +
  5 +dossier=['temp1'];
  6 +path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
  7 +
  8 +x=ncread(path,'x_axis');
  9 +t=ncread(path,'time');
  10 +om=ncread(path,'omega');
  11 +spectre=ncread(path,'Spectrum');
  12 +Dave=ncread(path,'Dave');
  13 +Dmax=ncread(path,'Dmax');
  14 +FSD=ncread(path,'Floe size distribution');
  15 +Fsize=ncread(path,'floe size');
  16 +thick=ncread(path,'Ice thickness');
  17 +conc=ncread(path,'Ice concentration');
  18 +Hs=ncread(path,'significant height');
  19 +IDT=ncread(path,'Ice Thickness Distribution');
  20 +hcat=ncread(path,'thickness categories');
  21 +
  22 +
  23 +fig=figure(1);
  24 +u = fig.Units;
  25 +fig.Units = 'inches';
  26 +set(fig,'outerposition',[3 3 12 10])
  27 +
  28 +cm=colormap('jet');
  29 +
  30 +
  31 +cm1(1,:)=[1 1 1];
  32 +for i=2:10
  33 + cm1(i,:)=[1-0.08*i 1-0.06*i 1];
  34 +end
  35 +cmap(1:10,:)=cm1;
  36 +cmap(11:59,:)=cm(16:end,:);
  37 +
  38 +
  39 + w = waitforbuttonpress;
  40 +%figure
  41 +%filename = 'joint_distribution_anim.gif';
  42 +
  43 +for j=1:length(t)
  44 +
  45 +FSD1=reshape(FSD(j,j,:,:),length(Fsize),length(hcat));
  46 +
  47 +IDT1=IDT(j,:);
  48 +for i=1:length(hcat)
  49 + FSD1(:,i)=FSD1(:,i)*IDT1(i);
  50 + nfloe(:,i)=((FSD1(:,i)*(5000)^2)./Fsize.^2) ;
  51 +end
  52 + nfloe=nfloe/sum(sum(nfloe));
  53 +FSD2(j,:)=sum(FSD1,2);
  54 +
  55 +subplot(2,2,1)
  56 +hh=surf(hcat,Fsize,nfloe);
  57 + shading interp
  58 +%
  59 +zoom(1.5)
  60 +caxis([0 0.06])
  61 +
  62 +colormap(cmap)
  63 + axis([0.1 10 0 400 0 0.1])
  64 + view(108,60)
  65 +
  66 + xlabel('Ice thickness [m]')
  67 + ylabel('Floe size [m]')
  68 + zlabel('area fraction')
  69 + subplot(2,2,2)
  70 +nfloe2=((FSD2(j,:)*5000^2)./Fsize.^2')/sum((FSD2(j,:)*5000^2)./Fsize.^2');
  71 + plot((Fsize),nfloe2)
  72 +
  73 + axis([0 400 0 1])
  74 + xlabel('Floe size [m]')
  75 + ylabel('normalized number of floe')
  76 +
  77 + subplot(2,2,3:4)
  78 + plot(x,thick)
  79 + hold on
  80 + plot(x(j),thick(j),'ro','markerfacecolor','r')
  81 + hold off
  82 + xlabel('distance [km]')
  83 + ylabel('Average ice thickness [m]')
  84 +%pause(0.02)
  85 + w = waitforbuttonpress;
  86 +
  87 +% drawnow
  88 +% frame = getframe(1);
  89 +% im = frame2im(frame);
  90 +% [A,map] = rgb2ind(im,256);
  91 +% if j == 1;
  92 +% imwrite(A,map,filename,'gif','LoopCount',Inf,'DelayTime',0);
  93 +% else
  94 +% imwrite(A,map,filename,'gif','WriteMode','append','DelayTime',0);
  95 +% end
  96 +end
  97 +
  98 +
  99 +
... ...
scripts_matlab/fig8_article.m
... ... @@ -61,4 +61,10 @@ end
61 61 set(l,'interpreter','latex','Box','off','location','eastoutside');
62 62  
63 63  
  64 +
  65 +
  66 +
  67 +
  68 +
  69 +
64 70  
65 71 \ No newline at end of file
... ...
scripts_matlab/fig8_article.m~ 0 → 100644
... ... @@ -0,0 +1,124 @@
  1 +clear all;
  2 +close all;
  3 +
  4 +
  5 +for i=1:100
  6 +
  7 +
  8 + dossier=['pc_ec',num2str(i-1)];
  9 + path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
  10 + Dave=ncread(path,'Dave');
  11 +
  12 + x=ncread(path,'x_axis');
  13 +
  14 + Lmiz(i)=length(find(Dave>0 & Dave<396))*(x(2)-x(1));
  15 +
  16 + i
  17 +
  18 +end
  19 +
  20 +Lmiz2=reshape(Lmiz,10,10);
  21 +Ec=[3e-5 4e-5 5e-5 6e-5 7e-5 8e-5 9e-5 1e-4 2e-4 3e-4];
  22 +
  23 +legende=['$P_c=0.10$';'$P_c=0.15$';'$P_c=0.20$';'$P_c=0.25$';'$P_c=0.30$'...
  24 + ;'$P_c=0.35$';'$P_c=0.40$';'$P_c=0.45$';'$P_c=0.50$';'$P_c=0.55$'];
  25 +legende=cellstr(legende);
  26 +
  27 +cmap=jet(10);
  28 +M=['*','o','+','*','o','+','*','o','+','*'];
  29 +
  30 +
  31 +
  32 +fig=figure;
  33 +
  34 +fig.Units='inches';
  35 +fig.Position=[7.0729 6.7396 4.2708 2.600];
  36 +fig.OuterPosition=[7.0729 6.7396 4.2708 3.600];
  37 +
  38 +fig.PaperUnits = 'inches';
  39 +fig.PaperPosition = [0 0 4.2708 2.600];
  40 +fig.PaperPositionMode = 'manual';
  41 +fig.PaperOrientation='landscape';
  42 +fig.PaperSize=[4.2708 2.600];
  43 +
  44 +
  45 +for i=1:10
  46 +
  47 +
  48 + plot(Ec,Lmiz2(i,:),'color',cmap(i,:),'Marker',M(i));
  49 + hold on
  50 +
  51 +end
  52 + xlabel('$\varepsilon_c$','interpreter','latex')
  53 + ylabel('$L_{MIZ}$ [km]','interpreter','latex')
  54 + a=gca;
  55 +% a.Position(2)=a.Position(2)+0.2;
  56 +% a.Position(3)=a.Position(3)-0.2;
  57 +% a.Position(4)=a.Position(4)-0.2;
  58 +
  59 +
  60 + l=legend(char(legende));
  61 + set(l,'interpreter','latex','Box','off','location','eastoutside');
  62 +
  63 +
  64 + %------------------------------------------------------------------------------------------------------
  65 + figure
  66 + cmap=jet(10);
  67 + for j=1:10
  68 +
  69 +
  70 + dossier=['ec',num2str(j)];
  71 + path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
  72 + x=ncread(path,'x_axis');
  73 +t=ncread(path,'time');
  74 +om=ncread(path,'omega');
  75 +spectre=ncread(path,'Spectrum');
  76 +Dave=ncread(path,'Dave');
  77 +Dmax=ncread(path,'Dmax');
  78 +FSD=ncread(path,'Floe size distribution');
  79 +Fsize=ncread(path,'floe size');
  80 +thick=ncread(path,'Ice thickness');
  81 +conc=ncread(path,'Ice concentration');
  82 +Hs=ncread(path,'significant height');
  83 +IDT=ncread(path,'Ice Thickness Distribution');
  84 +hcat=ncread(path,'thickness categories');
  85 +
  86 +
  87 +
  88 + FSD1=reshape(FSD(10,10,:,:),length(Fsize),length(hcat));
  89 +
  90 +IDT1=IDT(10,:);
  91 +for i=1:length(hcat)
  92 + FSD1(:,i)=FSD1(:,i)*IDT1(i);
  93 + nfloe(:,i)=((FSD1(:,i)*(5000)^2)./Fsize.^2) ;
  94 +end
  95 + nfloe=nfloe/sum(sum(nfloe));
  96 +FSD2=sum(FSD1,2);
  97 +
  98 +nfloe2=((FSD2*5000^2)./Fsize.^2)/sum((FSD2*5000^2)./Fsize.^2);
  99 + plot((Fsize),nfloe2,'color',cmap(j,:))
  100 +
  101 + axis([0 400 0 1])
  102 + xlabel('Floe size [m]')
  103 + ylabel('normalized number of floe')
  104 + hold on
  105 + axis([0 250 0 0.2])
  106 +
  107 +a=a+10
  108 +
  109 + end
  110 +
  111 + legende=['$\varepsilon_c=3\times 10^{-5}$';'$\varepsilon_c=4\times 10^{-5}$';'$\varepsilon_c=5\times 10^{-5}$'...
  112 + ;'$\varepsilon_c=6\times 10^{-5}$';'$\varepsilon_c=7\times 10^{-5}$';'$\varepsilon_c=8\times 10^{-5}$'...
  113 + ;'$\varepsilon_c=9\times 10^{-5}$';'$\varepsilon_c=1\times 10^{-4}$';'$\varepsilon_c=2\times 10^{-4}$'...
  114 + ;'$\varepsilon_c=3\times 10^{-4}$'];
  115 +legende=cellstr(legende);
  116 + l=legend(char(legende));
  117 + set(l,'interpreter','latex','Box','off','location','eastoutside');
  118 +%
  119 +
  120 +
  121 +
  122 +
  123 +
  124 +
0 125 \ No newline at end of file
... ...
scripts_matlab/temp_results.m
... ... @@ -34,9 +34,106 @@ for i=1:length(t)
34 34 FSD2(:,i)=sum(reshape(FSD1(i,:,:),size(FSD1,2),size(FSD1,3)),2);
35 35 FSD2(find(FSD2(:,i)<0.0001),i)=0;
36 36 if FSD2(end,i)<0.999
37   - FSD3(:,a)=FSD2(:,i);
38   - a=a+1;
39   - end
  37 + FSD3(:,a)=FSD2(:,i);
  38 + a=a+1;
  39 + end
  40 +end
  41 +
  42 +
  43 +a=1;
  44 +FSD4(:,a)=FSD3(:,1);
  45 +for i=2:size(FSD3,2)
  46 + if max(FSD3(:,i))==max(FSD3(:,i-1))
  47 +
  48 + else
  49 + a=a+1;
  50 + FSD4(:,a)=FSD3(:,i);
  51 +
  52 + end
  53 +end
  54 +
  55 +
  56 + fig=figure;
  57 +
  58 +fig.Units='inches';
  59 +fig.Position=[5.7396 7.3333 7.4479 2.0937];
  60 +fig.OuterPosition=[5.7396 7.3333 7.4479 3.0937];
  61 +
  62 +fig.PaperUnits = 'inches';
  63 +fig.PaperPosition = [0 0 7.4479 2.0937];
  64 +fig.PaperPositionMode = 'manual';
  65 +fig.PaperOrientation='landscape';
  66 +fig.PaperSize=[7.4479 2.0937];
  67 +
  68 +
  69 +cmap=jet(size(FSD4,2));
  70 +for i=1:size(FSD4,2)
  71 +
  72 + for j=1:size(FSD4,1)
  73 + CFSD(j,i)=sum(FSD4(j:end,i));
  74 + end
  75 +
  76 + subplot(1,2,1)
  77 + plot(Fsize,FSD4(:,i),'color',cmap(i,:))
  78 + hold on
  79 + xlabel('Floe size [m]','interpreter','latex')
  80 + ylabel('Area fraction','interpreter','latex')
  81 + axis([0 400 0 0.4])
  82 +
  83 + subplot(1,2,2)
  84 + plot(Fsize,CFSD(:,i),'color',cmap(i,:))
  85 + hold on
  86 + xlabel('Floe size [m]','interpreter','latex')
  87 + ylabel(' cumulative area fraction','interpreter','latex')
  88 +
  89 +end
  90 +c=colorbar;
  91 +colormap(jet)
  92 +caxis([0 size(FSD4,2)*t(2)])
  93 +ylabel(c,'Time [min]','interpreter','latex')
  94 +c.Position(1)=c.Position(1)+0.1;
  95 +c.Position(3)=c.Position(3)-0.02;
  96 +
  97 +
  98 +
  99 +%----------------------------------------------------------------------------
  100 +clear all
  101 +
  102 +dossier=['temp2'];
  103 +path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
  104 +
  105 +x=ncread(path,'x_axis');
  106 +t=ncread(path,'time');
  107 +om=ncread(path,'omega');
  108 +spectre=ncread(path,'Spectrum');
  109 +Dave=ncread(path,'Dave');
  110 +Dmax=ncread(path,'Dmax');
  111 +FSD=ncread(path,'Floe size distribution');
  112 +Fsize=ncread(path,'floe size');
  113 +thick=ncread(path,'Ice thickness');
  114 +conc=ncread(path,'Ice concentration');
  115 +Hs=ncread(path,'significant height');
  116 +IDT=ncread(path,'Ice Thickness Distribution');
  117 +hcat=ncread(path,'thickness categories');
  118 +
  119 +
  120 +
  121 +FSD1=reshape(FSD(:,10,:,:),size(FSD,1),size(FSD,3),size(FSD,4));
  122 +IDT1=IDT(25,:)';
  123 +
  124 +
  125 +
  126 +for i=1:length(hcat)
  127 + FSD1(:,:,i)=FSD1(:,:,i).*IDT1(i);
  128 +end
  129 +a=1;
  130 +for i=1:length(t)
  131 + FSD2(:,i)=sum(reshape(FSD1(i,:,:),size(FSD1,2),size(FSD1,3)),2);
  132 + FSD2(find(FSD2(:,i)<0.0001),i)=0;
  133 + if FSD2(end,i)<0.999
  134 + FSD3(:,a)=FSD2(:,i);
  135 + a=a+1;
  136 + end
40 137 end
41 138  
42 139  
... ... @@ -52,8 +149,47 @@ for i=2:size(FSD3,2)
52 149 end
53 150 end
54 151  
  152 +
  153 + fig2=figure(2);
  154 +
  155 +fig2.Units='inches';
  156 +fig2.Position=[5.7396 7.3333 7.4479 2.0937];
  157 +fig.OuterPosition=[5.7396 7.3333 7.4479 3.0937];
  158 +
  159 +fig2.PaperUnits = 'inches';
  160 +fig2.PaperPosition = [0 0 7.4479 2.0937];
  161 +fig2.PaperPositionMode = 'manual';
  162 +fig2.PaperOrientation='landscape';
  163 +fig2.PaperSize=[7.4479 2.0937];
  164 +
  165 +
55 166 cmap=jet(size(FSD4,2));
56 167 for i=1:size(FSD4,2)
57   -plot(Fsize,FSD4(:,i),'color',cmap(i,:))
  168 +
  169 + for j=1:size(FSD4,1)
  170 + CFSD(j,i)=sum(FSD4(j:end,i));
  171 + end
  172 +
  173 + subplot(1,2,1)
  174 + plot(Fsize,FSD4(:,i),'color',cmap(i,:))
  175 + hold on
  176 + xlabel('Floe size [m]','interpreter','latex')
  177 + ylabel('Area fraction','interpreter','latex')
  178 + axis([0 400 0 0.4])
  179 +
  180 + subplot(1,2,2)
  181 + plot(Fsize,CFSD(:,i),'color',cmap(i,:))
58 182 hold on
59   -end
60 183 \ No newline at end of file
  184 + xlabel('Floe size [m]','interpreter','latex')
  185 + ylabel(' cumulative area fraction','interpreter','latex')
  186 +
  187 +end
  188 +c=colorbar;
  189 +colormap(jet)
  190 +caxis([0 size(FSD4,2)*t(2)])
  191 +ylabel(c,'Time [min]','interpreter','latex')
  192 +c.Position(1)=c.Position(1)+0.1;
  193 +c.Position(3)=c.Position(3)-0.02;
  194 +
  195 +
  196 +
... ...
scripts_matlab/temp_results.m~ 0 → 100644
... ... @@ -0,0 +1,79 @@
  1 +clear all;
  2 +close all;
  3 +
  4 +
  5 +dossier=['Pc9'];
  6 +path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
  7 +
  8 +x=ncread(path,'x_axis');
  9 +t=ncread(path,'time');
  10 +om=ncread(path,'omega');
  11 +spectre=ncread(path,'Spectrum');
  12 +Dave=ncread(path,'Dave');
  13 +Dmax=ncread(path,'Dmax');
  14 +FSD=ncread(path,'Floe size distribution');
  15 +Fsize=ncread(path,'floe size');
  16 +thick=ncread(path,'Ice thickness');
  17 +conc=ncread(path,'Ice concentration');
  18 +Hs=ncread(path,'significant height');
  19 +IDT=ncread(path,'Ice Thickness Distribution');
  20 +hcat=ncread(path,'thickness categories');
  21 +
  22 +
  23 +
  24 +FSD1=reshape(FSD(:,10,:,:),size(FSD,1),size(FSD,3),size(FSD,4));
  25 +IDT1=IDT(25,:)';
  26 +
  27 +
  28 +
  29 +for i=1:length(hcat)
  30 + FSD1(:,:,i)=FSD1(:,:,i).*IDT1(i);
  31 +end
  32 +a=1;
  33 +for i=1:length(t)
  34 + FSD2(:,i)=sum(reshape(FSD1(i,:,:),size(FSD1,2),size(FSD1,3)),2);
  35 + FSD2(find(FSD2(:,i)<0.0001),i)=0;
  36 + if FSD2(end,i)<0.999
  37 + FSD3(:,a)=FSD2(:,i);
  38 + a=a+1;
  39 + end
  40 +end
  41 +
  42 +
  43 +a=1;
  44 +FSD4(:,a)=FSD3(:,1);
  45 +for i=2:size(FSD3,2)
  46 + if max(FSD3(:,i))==max(FSD3(:,i-1))
  47 +
  48 + else
  49 + a=a+1;
  50 + FSD4(:,a)=FSD3(:,i);
  51 +
  52 + end
  53 +end
  54 +
  55 +
  56 +
  57 +cmap=jet(size(FSD4,2));
  58 +for i=1:size(FSD4,2)
  59 +
  60 + for j=1:size(FSD4,1)
  61 + CFSD(j,i)=sum(FSD4(j:end,i))
  62 + end
  63 +
  64 + subplot(1,2,1)
  65 + plot(Fsize,FSD4(:,i),'color',cmap(i,:))
  66 + hold on
  67 + xlabel('Floe size [m]','interpreter','latex')
  68 + ylabel('Area fraction','interpreter','latex')
  69 +
  70 + subplot(1,2,2)
  71 + plot(Fsize,CFSD(:,i),'color',cmap(i,:))
  72 + hold on
  73 + xlabel('Floe size [m]','interpreter','latex')
  74 + ylabel(' cumulative area fraction','interpreter','latex')
  75 +
  76 +end
  77 +c=colorbar;
  78 +colormap(jet)
  79 +ylabel(c,'Time [min]')
... ...
scripts_matlab/untitled5.m 0 → 100644
... ... @@ -0,0 +1,130 @@
  1 + clear all
  2 + close all
  3 +
  4 + fig=figure;
  5 +
  6 +fig.Units='inches';
  7 +fig.Position=[7.0729 6.7396 4.2708 2.600];
  8 +fig.OuterPosition=[7.0729 6.7396 4.2708 3.600];
  9 +
  10 +fig.PaperUnits = 'inches';
  11 +fig.PaperPosition = [0 0 4.2708 2.600];
  12 +fig.PaperPositionMode = 'manual';
  13 +fig.PaperOrientation='landscape';
  14 +fig.PaperSize=[4.2708 2.600];
  15 +
  16 +
  17 + cmap=jet(10);
  18 + for j=1:10
  19 +
  20 +
  21 + dossier=['ec',num2str(j-1)];
  22 + path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
  23 + x=ncread(path,'x_axis');
  24 +t=ncread(path,'time');
  25 +om=ncread(path,'omega');
  26 +spectre=ncread(path,'Spectrum');
  27 +Dave=ncread(path,'Dave');
  28 +Dmax=ncread(path,'Dmax');
  29 +FSD=ncread(path,'Floe size distribution');
  30 +Fsize=ncread(path,'floe size');
  31 +thick=ncread(path,'Ice thickness');
  32 +conc=ncread(path,'Ice concentration');
  33 +Hs=ncread(path,'significant height');
  34 +IDT=ncread(path,'Ice Thickness Distribution');
  35 +hcat=ncread(path,'thickness categories');
  36 +
  37 +
  38 +
  39 + FSD1=reshape(FSD(10,10,:,:),length(Fsize),length(hcat));
  40 +
  41 +IDT1=IDT(10,:);
  42 +for i=1:length(hcat)
  43 + FSD1(:,i)=FSD1(:,i)*IDT1(i);
  44 + nfloe(:,i)=((FSD1(:,i)*(5000)^2)./Fsize.^2) ;
  45 +end
  46 + nfloe=nfloe/sum(sum(nfloe));
  47 +FSD2=sum(FSD1,2);
  48 +
  49 +nfloe2=((FSD2*5000^2)./Fsize.^2)/sum((FSD2*5000^2)./Fsize.^2);
  50 + plot((Fsize),nfloe2,'color',cmap(j,:))
  51 +
  52 + axis([0 250 0 0.2])
  53 + xlabel('Floe size [m]','interpreter','latex')
  54 + ylabel('Normalized number of floe','interpreter','latex')
  55 + hold on
  56 +
  57 + j
  58 + end
  59 +
  60 + legende=['$\varepsilon_c=3\times 10^{-5}$';'$\varepsilon_c=4\times 10^{-5}$';'$\varepsilon_c=5\times 10^{-5}$'...
  61 + ;'$\varepsilon_c=6\times 10^{-5}$';'$\varepsilon_c=7\times 10^{-5}$';'$\varepsilon_c=8\times 10^{-5}$'...
  62 + ;'$\varepsilon_c=9\times 10^{-5}$';'$\varepsilon_c=1\times 10^{-4}$';'$\varepsilon_c=2\times 10^{-4}$'...
  63 + ;'$\varepsilon_c=3\times 10^{-4}$'];
  64 +legende=cellstr(legende);
  65 + l=legend(char(legende));
  66 + set(l,'interpreter','latex','Box','off','location','eastoutside');
  67 +
  68 +
  69 +%
  70 +% figure
  71 +% cmap=jet(10);
  72 +% for j=1:10
  73 +%
  74 +%
  75 +% dossier=['Pc',num2str(j-1)];
  76 +% path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
  77 +% x=ncread(path,'x_axis');
  78 +% t=ncread(path,'time');
  79 +% om=ncread(path,'omega');
  80 +% spectre=ncread(path,'Spectrum');
  81 +% Dave=ncread(path,'Dave');
  82 +% Dmax=ncread(path,'Dmax');
  83 +% FSD=ncread(path,'Floe size distribution');
  84 +% Fsize=ncread(path,'floe size');
  85 +% thick=ncread(path,'Ice thickness');
  86 +% conc=ncread(path,'Ice concentration');
  87 +% Hs=ncread(path,'significant height');
  88 +% IDT=ncread(path,'Ice Thickness Distribution');
  89 +% hcat=ncread(path,'thickness categories');
  90 +%
  91 +%
  92 +%
  93 +% FSD1=reshape(FSD(10,10,:,:),length(Fsize),length(hcat));
  94 +%
  95 +% IDT1=IDT(10,:);
  96 +% for i=1:length(hcat)
  97 +% FSD1(:,i)=FSD1(:,i)*IDT1(i);
  98 +% nfloe(:,i)=((FSD1(:,i)*(5000)^2)./Fsize.^2) ;
  99 +% end
  100 +% nfloe=nfloe/sum(sum(nfloe));
  101 +% FSD2=sum(FSD1,2);
  102 +%
  103 +% nfloe2=((FSD2*5000^2)./Fsize.^2)/sum((FSD2*5000^2)./Fsize.^2);
  104 +% plot((Fsize),nfloe2,'color',cmap(j,:))
  105 +%
  106 +% axis([0 250 0 0.2])
  107 +% xlabel('Floe size [m]')
  108 +% ylabel('normalized number of floe')
  109 +% hold on
  110 +%
  111 +% j
  112 +% end
  113 +%
  114 +% legende=['$\varepsilon_c=3\times 10^{-5}$';'$\varepsilon_c=4\times 10^{-5}$';'$\varepsilon_c=5\times 10^{-5}$'...
  115 +% ;'$\varepsilon_c=6\times 10^{-5}$';'$\varepsilon_c=7\times 10^{-5}$';'$\varepsilon_c=8\times 10^{-5}$'...
  116 +% ;'$\varepsilon_c=9\times 10^{-5}$';'$\varepsilon_c=1\times 10^{-4}$';'$\varepsilon_c=2\times 10^{-4}$'...
  117 +% ;'$\varepsilon_c=3\times 10^{-4}$'];
  118 +% legende=cellstr(legende);
  119 +% l=legend(char(legende));
  120 +% set(l,'interpreter','latex','Box','off','location','eastoutside');
  121 +
  122 +
  123 +
  124 +
  125 +
  126 +
  127 +
  128 +
  129 +
  130 +
0 131 \ No newline at end of file
... ...
src/main.f90
... ... @@ -14,9 +14,18 @@
14 14 use parameters
15 15  
16 16  
  17 +
  18 +
  19 + call message(1)
  20 +
17 21 call read_namelist !read parameters from namelists
  22 + call message(2)
  23 +
18 24 call array_allocation ! allocate memory for arrays
  25 + call message(3)
  26 +
19 27 call initialization ! initialize the model
  28 + call message(4)
20 29  
21 30 dirout=trim(root)//trim(name_sim)
22 31 open(25,file='src/tmp.txt')
... ... @@ -27,7 +36,8 @@
27 36  
28 37 !________________________________________________________________________________
29 38 ! DO THE TIME LOOP
30   -
  39 +
  40 + call message(5)
31 41 do n=2,nsteps
32 42  
33 43 call progress(n,nsteps) !display progress bar
... ... @@ -46,7 +56,9 @@
46 56 end do
47 57 !______________________OUTPUTS_________________________________________________
48 58 namefile=trim(root)//trim(name_sim)//'/'//trim(name_sim)//'.nc'
  59 + call message(6)
49 60 call write_output ! Write outputs in NETCDF
  61 + call message(7)
50 62  
51 63  
52 64  
... ... @@ -56,15 +68,73 @@ contains
56 68 subroutine progress(j,jmax)
57 69 implicit none
58 70 integer::j,k,jmax
59   - character(len=15)::bar="processing ???%"
60   - write(unit=bar(12:14),fmt="(i3)")ceiling((real(j)/real(jmax))*100)
61   - write(unit=6,fmt="(a1,a17)",advance="no") char(13), bar
62   - if (ceiling((real(j)/real(jmax))*100).eq.100) then
63   - write(unit=6,fmt=*)
64   - write(*,*)'simulation completed!'
65   -
66   - endif
  71 + character(len=20)::bar=" processing ???%"
  72 + write(unit=bar(17:19),fmt="(i3)")ceiling((real(j)/real(jmax))*100)
  73 + write(unit=6,fmt="(a1,a22)",advance="no") char(13), bar
  74 + if (real(j)/real(jmax).eq.1) then
  75 + write(unit=6,fmt=*)
  76 + write(*,*)''
  77 + write(*,*)' simulation completed!'
  78 + write(*,*)''
  79 + write(*,*)' -------------------------------------------'
  80 + write(*,*)''
  81 + endif
67 82 end subroutine progress
68 83 !_______________________________________________________________________________
  84 +subroutine message(info)
  85 +
  86 + implicit none
  87 + integer,intent(in)::info
  88 +
  89 +
  90 + if(info.eq.1) then
  91 + write(*,*)' ___________________________________________'
  92 + write(*,*)' Welcome in WIM'
  93 + write(*,*)' ___________________________________________'
  94 + write(*,*)''
  95 + end if
  96 +
  97 +
  98 + if(info.eq.2) then
  99 + write(*,*)' Read parameters from namelists... Done!'
  100 + end if
  101 +
  102 + if(info.eq.3) then
  103 + write(*,*)' Allocate memory... Done!'
  104 + end if
  105 +
  106 + if(info.eq.4) then
  107 + write(*,*)' Initialize arrays and variables... Done!'
  108 + write(*,*)''
  109 + write(*,*)' --------------------------------------------'
  110 + write(*,*)''
  111 + end if
  112 +
  113 + if(info.eq.5) then
  114 + write(*,*)' Time loop starting...'
  115 + write(*,*)''
  116 + end if
  117 +
  118 + if(info.eq.6) then
  119 + write(*,*)' Writing NETCDF output file...'
  120 + write(*,*)''
  121 + end if
  122 +
  123 + if(info.eq.7) then
  124 + write(*,*)' Done!'
  125 + write(*,*)''
  126 + end if
  127 +
  128 +
  129 +
  130 +
  131 +
  132 +
  133 +
  134 +
  135 +
  136 +end subroutine message
  137 +!_______________________________________________________________________________
  138 +
69 139  
70 140 END PROGRAM WIM2
... ...
src/makefile
... ... @@ -14,22 +14,27 @@ MOD= *.mod
14 14  
15 15 EXEC= WIM
16 16  
  17 +MODIR=modules
  18 +OBJDIR=obj
17 19  
18   -
19   -WIM2: $(OBJ)
20   - $(COMPILER) $(OPTION) $(NETCDFinc) $(NETCDFMOD) -o $(EXEC) $(OBJ) $(NETCDFLIB)
  20 +WIM2: $(OBJDIR)/$(OBJ)
  21 + $(COMPILER) $(OPTION) $(NETCDFinc) $(NETCDFMOD) -o $(EXEC) $(OBJDIR)/$(OBJ) $(NETCDFLIB)
21 22 mv WIM ../
22 23  
23   -$(MOD): parameters.f90
24   - $(COMPILER) -c parameters.f90
  24 +$(MODIR)/$(MOD): parameters.f90
  25 + $(COMPILER) -c $<
  26 + mkdir -p $(MODIR)
  27 + mv $(MOD) $(MODIR)
25 28  
26   -$(OBJ): $(SRC) $(MOD)
27   - $(COMPILER) $(NETCDFinc) $(NETCDFMOD) -c $(SRC) $(NETCDFLIB) $(OBJ)
  29 +$(OBJDIR)/$(OBJ): $(SRC) $(MODIR)/$(MOD)
  30 + $(COMPILER) $(NETCDFinc) $(NETCDFMOD) -I./$(MODIR) -c $(SRC) $(NETCDFLIB)
  31 + mkdir -p $(OBJDIR)
  32 + mv $(OBJ) $(OBJDIR)
  33 + mv $(MOD) $(MODIR)
28 34  
29 35  
30 36 clean:
31   - rm -f *.o *.mod
  37 + rm -rf *.o *.mod $(OBJDIR) $(MODIR)
32 38  
33 39 mrproper:
34   -
35   - rm -f *.o *.mod ../WIM
  40 + rm -rf *.o *.mod ../WIM $(OBJDIR) $(MODIR)
... ...
src/modules/parameters.mod 0 → 100644
... ... @@ -0,0 +1,291 @@
  1 +GFORTRAN module version '0' created from parameters.f90 on Wed Apr 13 18:17:15 2016
  2 +MD5:eeebc973bf787fd3508c616338923c8a -- If you edit this, you'll get what you deserve.
  3 +
  4 +(() () () () () () () () () () () () () () () () () () () () () () () ()
  5 +() () ())
  6 +
  7 +()
  8 +
  9 +()
  10 +
  11 +()
  12 +
  13 +()
  14 +
  15 +(2 '__convert_i4_r8' '(intrinsic)' '__convert_i4_r8' 1 ((PROCEDURE
  16 +UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN UNKNOWN FUNCTION ELEMENTAL PURE) (
  17 +REAL 8 0 0 REAL ()) 0 0 () () 0 () () () 0 0)
  18 +3 '__convert_r4_r8' '(intrinsic)' '__convert_r4_r8' 1 ((PROCEDURE
  19 +UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN UNKNOWN FUNCTION ELEMENTAL PURE) (
  20 +REAL 8 0 0 REAL ()) 0 0 () () 0 () () () 0 0)
  21 +4 'alpha' 'parameters' 'alpha' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC