Commit 68586e03 authored by Jérémy Baudry's avatar Jérémy Baudry

new release

parent a4dc26f5
File added
#!/bin/bash
strain="3e-5 4e-5 5e-5 6e-5 7e-5 8e-5 9e-5 1e-4 2e-4 3e-4"
pc="0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 0.55"
let "count=0"
for a in $strain
do
for b in $pc
do
name_exp=pc_ec$count
cat parameter.txt | sed \
-e "s/nmebatch/$name_exp/g" \
-e "s/probcritbatch/$b/g" \
-e "s/strainbatch/$a/g" \
-e "s/Hsbatch/1/g" \
-e "s/hbatch/3/g" \
-e "s/Tmbatch/8/g" \
> parameter.nml
mv parameter.nml ../nml/
qsub ./lanceur.sh
sleep 30s
let "count=count+1"
done
done
#!/bin/bash
name_exp=('hs1' 'hs2' 'hs3' 'hs4' 'hs5'
'hs6' 'hs7' 'hs8' 'hs9' 'hs10')
hs="0.5 1 1.5 2 2.5 3 3.5 4 4.5 5"
let "count=0"
for a in $hs
do
cat parameter.txt | sed \
-e "s/nmebatch/${name_exp[$count]}/g" \
-e "s/probcritbatch/0.15/g" \
-e "s/strainbatch/3e-5/g" \
-e "s/Hsbatch/$a/g" \
-e "s/hbatch/4/g" \
-e "s/Tmbatch/8/g" \
> parameter.nml
mv parameter.nml ../nml/
qsub ./lanceur.sh
sleep 5s
let "count=count+1"
done
#!/bin/bash
name_exp=('test1' 'test2' 'test3' 'test4')
prob="0.15 0.20 0.30 0.50"
let "count=0"
for a in $prob
do
cat parameter.txt | sed \
-e "s/nmebatch/${name_exp[$count]}/g" \
-e "s/probcritbatch/$a/g" \
-e "s/strainbatch/3e-5/g" \
> parameter.nml
mv parameter.nml ../nml/
qsub ./lanceur.sh
sleep 5s
let "count=count+1"
done
#!/bin/bash
name_exp=('tp1' 'tp2' 'tp3' 'tp4' 'tp5'
'tp6' 'tp7' 'tp8' 'tp9' 'tp10')
tp="6 7 8 9 10 11 12 13 14 15"
let "count=0"
for a in $tp
do
cat parameter.txt | sed \
-e "s/nmebatch/${name_exp[$count]}/g" \
-e "s/probcritbatch/0.15/g" \
-e "s/strainbatch/3e-5/g" \
-e "s/Hsbatch/1/g" \
-e "s/hbatch/4/g" \
-e "s/Tmbatch/$a/g" \
> parameter.nml
mv parameter.nml ../nml/
qsub ./lanceur.sh
sleep 5s
let "count=count+1"
done
#!/bin/bash
h="0.5 1 1.5 2 2.5 3 3.5 4 4.5 5"
hs="0.2 0.4 0.8 1 1.5 2 2.5 3 3.5 4"
tp="6 7 8 9 10 11 12 13 14 15"
let "count=0"
for a in $h
do
for b in $hs
do
for c in $tp
do
name_exp=thickhstp$count
cat parameter.txt | sed \
-e "s/nmebatch/$name_exp/g" \
-e "s/probcritbatch/0.37/g" \
-e "s/strainbatch/3e-5/g" \
-e "s/Hsbatch/$b/g" \
-e "s/hbatch/$a/g" \
-e "s/Tmbatch/$c/g" \
> parameter.nml
mv parameter.nml ../nml/
qsub ./lanceur.sh
sleep 30s
let "count=count+1"
done
done
done
#!/bin/bash
tp="6 7 8 9 10 11 12 13 14 15"
hs="0.2 0.4 0.8 1 1.5 2 2.5 3 3.5 4"
let "count=0"
for a in $tp
do
for b in $hs
do
name_exp=exp$count
cat parameter.txt | sed \
-e "s/nmebatch/$name_exp/g" \
-e "s/probcritbatch/0.15/g" \
-e "s/strainbatch/3e-5/g" \
-e "s/Hsbatch/$b/g" \
-e "s/hbatch/4/g" \
-e "s/Tmbatch/$a/g" \
> parameter.nml
mv parameter.nml ../nml/
qsub ./lanceur.sh
sleep 30s
let "count=count+1"
done
done
#!/bin/bash
#PBS -q default
#PBS -l walltime=15:00:00
#PBS -l nodes=1:ppn=20
#PBS -l nice=19
#PBS -j oe
#PBS -N WIM
module load dot
hostname
cd $PBS_O_WORKDIR
export NPROCS=$(wc -l $PBS_NODEFILE | gawk '//{print $1}')
cd ..
./WIM
!
! _______________________
! | |
! | WIM PARAMETERS |
! |_______________________|
!______________________________________________________________________________
! WAVES PARAMETERS:
!
! Tm -> Peak period [s]
! Hs -> Significant wave height [m]
! disp -> Allowing wave dispersion
! 0: Wave dispersion is not allowed,
! group speed is the same at all spectrum
! frequency (cg=max[cg(w)])
! 1: Wave dispersion is allowed
!------------------------------------------------------------------------------
&waves_parameters
Tm =Tmbatch
Hs =Hsbatch
disp =0
/
!______________________________________________________________________________
! MODEL PARAMETERS:
!
! nbin -> Number of grid bin
! dx -> Spatial resolution [m]
! Cfl -> Courant–Friedrichs–Lewy condition (0<Cfl<1)
! Only in the case where disp=0. The CFL condition
! is needed to calculate the time step.
! name_sim -> name of the output file
! root -> destination folder for the output file
!------------------------------------------------------------------------------
&model_parameter
nbin =100
dx =5000
Cfl =1
name_sim ='nmebatch'
root = 'output/'
/
!______________________________________________________________________________
! SPECTRUM PARAMETERS:
!
! init_spec -> method to build the wave spectrum
! 2: Swell
! 1: JONSWAP spectrum
! 0: Bretschneider spectrum
! nfreq -> number of frequency bin
! Tmin -> Minimum period [s]
! Tmax -> Maximum period [s]
! alpha_s -> parameter for jonswap spectrum (init_spec=1)
! beta_s -> parameter for jonswap spectrum (init_spec=1)
! gamma_s -> parameter for jonswap spectrum (init_spec=1)
! swell_T -> swell period (init_spec=2)
! swell_Hs -> swell significant height (init_spec=2)
!------------------------------------------------------------------------------
&spectrum_parameters
init_spec =0
nfreq =800
Tmin =2.5
Tmax =20
alpha_s =0.2044
beta_s =1.2500
gamma_s =3.3
swell_T =19
swell_Hs=0.09
/
!______________________________________________________________________________
! ICE PARAMETERS
!
! X_ice -> Distance of the ice edge [m]
! c_cice -> Ice concentration
! ice_thick -> method for compute the ice thickness
! 0: constant thickness
! 1: thickness is a function of distance
! from ice edge
! hice -> Ice thickness (if ice_thick=0) [m]
! hmax -> Maximum ice thickness (if ice_thick=1) [m]
! Xh -> distance where h=hmax/2 (if ice_thicl=1) [m]
! D0 -> initial floe size in the domain [m]
! gam ->
! Dmin -> Minimum floe size (if FSD_sheme=1) [m]
!------------------------------------------------------------------------------
&ice_parameters
X_ice =50000
cice =1
ice_thick =0
hice =hbatch
hmax =hbatch
Xh =200000
D0 =500
gam =1.5
Dmin =20
stress_crit =0.67e6
strain_crit =strainbatch
P_c =probcritbatch
/
!________________________________________________________________________________
! FSD PARAMETERS
! FSD_sheme -> method for compute <D>
! 0: dumont et al (2011)
! 1: power law
!
! minfloe -> minimum size floe to build the floe size categories [m]
! maxfloe -> maximum size floe to build the floe size categories [m]
! nbcat -> number of floe size categories
!--------------------------------------------------------------------------------
&fsd_parameters
FSD_scheme =1
minfloe =5
maxfloe =400
nbcat =60
/
!_________________________________________________________________________________
! IDT PARAMETERS
!IDT_scheme -> compute the ice thickness distribution
0: no distribution
1: distribution (rayleigh)
!mu_IDT -> parameter for the distribution
!mincat_h -> minimum ice thickness category
!maxcat_h -> maximum ice thickness category
!nbcat_h -> number of ice thickness categories
!---------------------------------------------------------------------------------
&idt_parameters
IDT_scheme =1
mu_IDT =0.5
mincat_h =0.1
maxcat_h =10
nbcat_h =50
/
!________________________________________________________________________________
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
!------------------------------------------------------------------------------ !------------------------------------------------------------------------------
&waves_parameters &waves_parameters
Tm =6 Tm =8
Hs =1 Hs =1
disp =0 disp =0
...@@ -31,24 +31,21 @@ disp =0 ...@@ -31,24 +31,21 @@ disp =0
! is needed to calculate the time step. ! is needed to calculate the time step.
! name_sim -> name of the output file ! name_sim -> name of the output file
! root -> destination folder for the output file ! root -> destination folder for the output file
! FSD_sheme -> method for compute <D>
! 0: dumont et al (2011)
! 1: power law
!------------------------------------------------------------------------------ !------------------------------------------------------------------------------
&model_parameter &model_parameter
nbin =50 nbin =100
dx =5000 dx =5000
Cfl =1 Cfl =1
name_sim ='simulation1' name_sim ='temp1'
root = 'output/' root = 'output/'
FSD_scheme =1
/ /
!______________________________________________________________________________ !______________________________________________________________________________
! SPECTRUM PARAMETERS: ! SPECTRUM PARAMETERS:
! !
! init_spec -> method to build the wave spectrum ! init_spec -> method to build the wave spectrum
! 2: Swell
! 1: JONSWAP spectrum ! 1: JONSWAP spectrum
! 0: Bretschneider spectrum ! 0: Bretschneider spectrum
! nfreq -> number of frequency bin ! nfreq -> number of frequency bin
...@@ -57,16 +54,20 @@ FSD_scheme =1 ...@@ -57,16 +54,20 @@ FSD_scheme =1
! alpha_s -> parameter for jonswap spectrum (init_spec=1) ! alpha_s -> parameter for jonswap spectrum (init_spec=1)
! beta_s -> parameter for jonswap spectrum (init_spec=1) ! beta_s -> parameter for jonswap spectrum (init_spec=1)
! gamma_s -> parameter for jonswap spectrum (init_spec=1) ! gamma_s -> parameter for jonswap spectrum (init_spec=1)
! swell_T -> swell period (init_spec=2)
! swell_Hs -> swell significant height (init_spec=2)
!------------------------------------------------------------------------------ !------------------------------------------------------------------------------
&spectrum_parameters &spectrum_parameters
init_spec =1 init_spec =0
nfreq =200 nfreq =800
Tmin =2.5 Tmin =2.5
Tmax =20 Tmax =20
alpha_s =0.2044 alpha_s =0.2044
beta_s =1.2500 beta_s =1.2500
gamma_s =3.3 gamma_s =3.3
swell_T =19
swell_Hs=0.09
/ /
!______________________________________________________________________________ !______________________________________________________________________________
...@@ -87,13 +88,63 @@ gamma_s =3.3 ...@@ -87,13 +88,63 @@ gamma_s =3.3
!------------------------------------------------------------------------------ !------------------------------------------------------------------------------
&ice_parameters &ice_parameters
X_ice =50000 X_ice =50000
cice =0.8 cice =1
ice_thick =1 ice_thick =0
hice =2 hice =2
hmax =4 hmax =3
Xh =100000 Xh =200000
D0 =500 D0 =500
gam =1.5 gam =1.5
Dmin =20 Dmin =20
stress_crit =0.67e6
strain_crit =3e-5
P_c =0.37
/
!________________________________________________________________________________
! FSD PARAMETERS
! FSD_sheme -> method for compute <D>
! 0: dumont et al (2011)
! 1: power law
!
! minfloe -> minimum size floe to build the floe size categories [m]
! maxfloe -> maximum size floe to build the floe size categories [m]
! nbcat -> number of floe size categories
!--------------------------------------------------------------------------------
&fsd_parameters
FSD_scheme =1
minfloe =5
maxfloe =400
nbcat =60
/
!_________________________________________________________________________________
! IDT PARAMETERS
!IDT_scheme -> compute the ice thickness distribution
0: no distribution
1: distribution (rayleigh)
!mu_IDT -> parameter for the distribution
!mincat_h -> minimum ice thickness category
!maxcat_h -> maximum ice thickness category
!nbcat_h -> number of ice thickness categories
!---------------------------------------------------------------------------------
&idt_parameters
IDT_scheme =1
mu_IDT =0.5
mincat_h =0.1
maxcat_h =10
nbcat_h =50
/ /
!________________________________________________________________________________ !________________________________________________________________________________
/share/work/bauj0001/output
\ No newline at end of file
clear all;
close all;
x=ncread('simulation1.nc','x_axis');
t=ncread('simulation1.nc','time');
om=ncread('simulation1.nc','omega');
spectre=ncread('simulation1.nc','Spectrum');
Dave=ncread('simulation1.nc','Dave');
Dmax=ncread('simulation1.nc','Dmax');
f=om/(2*pi);
E=reshape(spectre(end,end,:),length(om),1);
Ei=reshape(spectre(30,:,:),length(x),length(om));
E1=reshape(spectre(1,1,:),length(om),1);
figure(1)
cmap=rand(length(t),3);
w = waitforbuttonpress;
for i=1:length(t)
figure(1)
sp=reshape(spectre(i,:,:),length(x),length(om));
h=mesh(f,x,sp);
axis([min(f) max(f) min(x) max(x) 0 max(E1)])
xlabel('Frequency [s^{-1}]')
zlabel('Energy')
ylabel('x [km]')
pause(0.1)
end
for i=1:length(om)
EE(i)=sum(Ei(:,i));
end
figure
plot(E1)
hold on
plot(EE,'r')
for i=1:length(t)
E2=reshape(spectre(i,:,:),length(x),length(om));
m0(i)=sum(sum(E2))/sum(E1);
end
figure
plot(t,m0)
figure
plot(x,Dmax,'color','r')
hold on
plot(x,Dave,'--b')
grid on
xlabel('x [km]')
ylabel('Floe size [m]')
legend('Dmax','<D>')
\ No newline at end of file
clear all;
close all;
fig=figure;
% fig.Units='inches';
% fig.Position=[6 6 9 3.2];
% fig.OuterPosition=[6 6 9 3.2];
%
% fig.PaperUnits = 'inches';
% fig.PaperPosition = [0 0 9 3.2];
% fig.PaperPositionMode = 'manual';
% fig.PaperOrientation='landscape';
% fig.PaperSize=[9 3.2];
%
for n=3
titre1=['10^{-6}';'10^{-4}';'10^{-3}';'10^{-2}'];
titre2=cellstr(titre1);
dos1=['1e6 ';'1e4 ';'test ';'1e2 '];
dos2=cellstr(dos1);
dossier=[num2str(n),'mu1';num2str(n),'mu2';num2str(n),'mu3';dos2(n);num2str(n),'mu4'];
dossier=cellstr(dossier);
diffus=['1e-2_uniforme'];
mix=[1e-6 1e-4 1e-3 1e-2];
mu=[0.5 1 1.5 2 2.5]/86400;
col=['mo';'ro';'bo';'ko'];
col=cellstr(col);
for i=1:5
dos=char(dossier(i));
number(:,n)=sqrt(mu/mix(n));
lagbiomass=load(['~/projets/correction_memo/output/',dos,'/weight_',diffus,'.dat']);
eulbiomass=load(['~/projets/correction_memo/output/',dos,'/eulerian_',diffus,'.dat']);
biolag_tot=sum(lagbiomass,2)*0.5;
bioeul_tot=sum(eulbiomass,2)*0.5;
std=sqrt((biolag_tot-bioeul_tot).^2./bioeul_tot.^2)*100;
std(1:3)=0;
maxstd(i,n)=max(std);
maxbio(i,n)=max(biolag_tot);
plot(std)
hold on
end
end
clear all;
close all;
dossier=['temp1'];
path=['/home/bauj0001/projets/WIM/output/',dossier,'/',dossier,'.nc'];
x=ncread(path,'x_axis');
t=ncread(path,'time');
om=ncread(path,'omega');
spectre=ncread(path,'Spectrum');
Dave=ncread(path,'Dave');
Dmax=ncread(path,'Dmax');
FSD=ncread(path,'Floe size distribution');
Fsize=ncread(path,'floe size');
thick=ncread(path,'Ice thickness');
conc=ncread(path,'Ice concentration');
Hs=ncread(path,'significant height');
IDT=ncread(path,'Ice Thickness Distribution');
hcat=ncread(path,'thickness categories');
fig=figure(1);
u = fig.Units;
fig.Units = 'inches';
set(fig,'outerposition',[3 3 12 10])
cm=colormap('jet');
cm1(1,:)=[1 1 1];
for i=2:10
cm1(i,:)=[1-0.08*i 1-0.06*i 1];
end
cmap(1:10,:)=cm1;