Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cd10kfsu committed Jan 2, 2023
0 parents commit ddde129
Show file tree
Hide file tree
Showing 36 changed files with 5,346 additions and 0 deletions.
3 changes: 3 additions & 0 deletions B33.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1.27818813225592 1.79061943262541 9.426122236519022E-003
1.79061943262541 4.00305073156255 6.929886930598249E-002
9.426122236519022E-003 6.929886930598250E-002 5.27273373485547
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Data assimilation Project: Experiments with Lorenz-63 Model

Binary file added Solutions_chapter5_project.pdf
Binary file not shown.
Binary file added chapter5_project.pdf
Binary file not shown.
74 changes: 74 additions & 0 deletions compare_outloops.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
clear; close all;
prefix = '3dvar'; %['4dvar_out2_obs2']; %ensrf_m3_infl08_oberr5 letkf_m3_infl08_oberr5
%xlim = [12000 16000];
xlim = [3000 4000];
ylim = [0 25];

xa = load([prefix '.10040']);
xt = load([prefix '.10020']);
dat = xa - xt;
rmsea = sqrt( sum(dat'.^2)/3 );
tmp = rmsea;
nsmooth = 20;
for i = 1+nsmooth:length(tmp)-nsmooth
rmsea(i) = sum(tmp(i-nsmooth:i+nsmooth))/(2*nsmooth+1);
end

prefix = ['4dvar_out3_obs2']; %ensrf_m3_infl08_oberr5 letkf_m3_infl08_oberr5
xa = load([prefix '.10040']);
xt = load([prefix '.10020']);
dat = xa - xt;
rmsea2 = sqrt( sum(dat'.^2)/3 );
tmp = rmsea2;
for i = 1+nsmooth:length(tmp)-nsmooth
rmsea2(i) = sum(tmp(i-nsmooth:i+nsmooth))/(2*nsmooth+1);
end

prefix = ['4dvar_out3_obs3']; %ensrf_m3_infl08_oberr5 letkf_m3_infl08_oberr5
xa = load([prefix '.10040']);
xt = load([prefix '.10020']);
dat = xa - xt;
rmsea3 = sqrt( sum(dat'.^2)/3 );

tmp = rmsea3;
for i = 1+nsmooth:length(tmp)-nsmooth
rmsea3(i) = sum(tmp(i-nsmooth:i+nsmooth))/(2*nsmooth+1);
end

prefix = ['4dvar_out3_obs4']; %ensrf_m3_infl08_oberr5 letkf_m3_infl08_oberr5
xa = load([prefix '.10040']);
xt = load([prefix '.10020']);
dat = xa - xt;
rmsea4 = sqrt( sum(dat'.^2)/3 );

tmp = rmsea4;
for i = 1+nsmooth:length(tmp)-nsmooth
rmsea4(i) = sum(tmp(i-nsmooth:i+nsmooth))/(2*nsmooth+1);
end





figure;
hold on;
%et(gca,'xlim',[1000 1500]);
plot(rmsea,'k','linestyle','-','marker','.','linewidth',2);
plot(rmsea2,'color',[ 1 0 0],'linestyle','-','marker','.','linewidth',2);
plot(rmsea3,'color',[ 0.7 0 0],'linestyle','-','marker','.','linewidth',2);
plot(rmsea4,'color',[ 0 1 0],'linestyle','-','marker','.','linewidth',2);

set(gca,'box','on','fontsize',20);
title('RMSE');
%set(gca,'ylim',[0 20]);

mean(rmsea(3000:end))
mean(rmsea2(3000:end))
mean(rmsea3(3000:end))
mean(rmsea4(3000:end))


% LETKF: 0.3469
% 3DVAR: 0.7833
% hybrid:

4 changes: 4 additions & 0 deletions compile_3dvar.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

rm -f *.mod
ifort -O0 -mkl=sequential -check bounds -traceback mod_type.f90 mod_rnorm.f90 mod_math.f90 lbfgs.f mod_optimization.f90 mod_lorenz63_fwd.f90 mod_lorenz63_3dvar.f90 test_3dvar.f90 -o 3dvar.exe
9 changes: 9 additions & 0 deletions compile_all.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash -xe

bash compile_fwd.bsh
bash compile_oi.bsh
bash compile_3dvar.bsh
bash compile_inc4dvar.bsh
bash compile_enda.bsh
#bash compile_hg.bsh

7 changes: 7 additions & 0 deletions compile_enda.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

rm -f *.mod
ifort -O0 -mkl=sequential mod_type.f90 mod_rnorm.f90 mod_math.f90 \
mod_lorenz63_fwd.f90 mod_lorenz63_letkf.f90 mod_lorenz63_enkf.f90 \
mod_inflation.f90 test_enda.f90 -o enda.exe

5 changes: 5 additions & 0 deletions compile_fwd.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

rm -f *.mod
ifort -O0 -mkl=sequential -check bounds -traceback mod_type.f90 \
mod_lorenz63_fwd.f90 test_fwd.f90 -o fwd.exe
8 changes: 8 additions & 0 deletions compile_hg.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

rm -f *.mod
ifort -O0 -mkl=sequential mod_type.f90 mod_rnorm.f90 mod_math.f90 \
mod_lorenz63_fwd.f90 mod_lorenz63_letkf.f90 mod_lorenz63_enkf.f90 \
mod_inflation.f90 lbfgs.f mod_optimization.f90 mod_lorenz63_3dvar.f90 \
mod_lorenz63_inc4dvar.f90 test_hg.f90 -o hg.exe

4 changes: 4 additions & 0 deletions compile_inc4dvar.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

rm -f *.mod
ifort -O0 -mkl=sequential -check bounds -traceback mod_type.f90 mod_rnorm.f90 mod_math.f90 lbfgs.f mod_optimization.f90 mod_lorenz63_fwd.f90 mod_lorenz63_inc4dvar.f90 test_inc4dvar.f90 -o inc4dvar.exe
4 changes: 4 additions & 0 deletions compile_lv.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -xe

rm -f *.mod
ifort -r8 -O0 -fp-model strict -mkl=sequential -check bounds -traceback mod_type.f90 mod_rnorm.f90 mod_math.f90 mod_lorenz63_fwd.f90 mod_lorenz63_lv.f90 test_lv.f90 -o lv.exe
4 changes: 4 additions & 0 deletions compile_oi.bsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

rm -f *.mod
ifort -O0 -mkl=sequential mod_type.f90 mod_rnorm.f90 mod_math.f90 mod_lorenz63_fwd.f90 mod_lorenz63_oi.f90 test_oi.f90 -o oi.exe
3 changes: 3 additions & 0 deletions fort.1040
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
1.27818813225592 1.79061943262541 9.426122236519022E-003
1.79061943262541 4.00305073156255 6.929886930598249E-002
9.426122236519022E-003 6.929886930598250E-002 5.27273373485547
Loading

0 comments on commit ddde129

Please sign in to comment.