1 |
|
c*** Generates observations from truth |
2 |
|
subroutine GenObs(eps, mobs,iobsloc,n,ytrue,yobs) |
3 |
|
|
4 |
|
implicit none |
5 |
|
|
6 |
|
integer, intent(in) :: eps, mobs, iobsloc(mobs), n |
7 |
|
real*8, intent(in) :: ytrue(n) |
8 |
|
real*8, intent(out) :: yobs(mobs) |
9 |
|
integer i, indxa |
10 |
|
real*8 pert(mobs) |
11 |
|
|
12 |
|
|
13 |
|
end subroutine GenObs |
14 |
|
|
15 |
c*** Reads iobsloc |
c*** Reads iobsloc |
16 |
subroutine ReadObs(obsnum,mobs,iobsloc) |
subroutine ReadObsLoc(obsnum,mobs,iobsloc) |
17 |
|
|
18 |
implicit none |
implicit none |
19 |
|
|
25 |
write(*,*) fn |
write(*,*) fn |
26 |
|
|
27 |
open(unit=3,file=fn,status='old') |
open(unit=3,file=fn,status='old') |
28 |
|
write(*,*) 'reading...' |
29 |
read(unit=3,'(1I7)') iobsloc |
read(unit=3,'(1I7)') iobsloc |
30 |
|
|
31 |
close(unit=3) |
close(unit=3) |
32 |
call flush() |
call flush() |
33 |
end subroutine ReadObs |
end subroutine ReadObsLoc |
34 |
|
|
35 |
c*** Call Model Kludge |
c*** Call Model Kludge |
36 |
subroutine Model(mem) |
subroutine Model(mem) |
38 |
integer, intent(in) :: mem |
integer, intent(in) :: mem |
39 |
character*(1000) fn |
character*(1000) fn |
40 |
write(fn,'(A,I2.2,A)') |
write(fn,'(A,I2.2,A)') |
41 |
& 'cd ../',mem,'/assimilate;./mitgcmuv>& LOG' |
& 'cd ../',mem,'/assimilate;../../cylrun/mitgcmuv>& LOG' |
42 |
call system(fn) |
call system(fn) |
43 |
end subroutine Model |
end subroutine Model |
44 |
|
|
54 |
integer i, irec,j,k |
integer i, irec,j,k |
55 |
character*(1024) fn |
character*(1024) fn |
56 |
write(fn,'(A,I2.2,A)') '../',mem,'/assimilate/pickup.in' |
write(fn,'(A,I2.2,A)') '../',mem,'/assimilate/pickup.in' |
57 |
|
c write(fn,'(A,I2.2,A)') '../',mem,'/pickup.in' |
58 |
open(unit=3,file=fn,status='old', |
open(unit=3,file=fn,status='old', |
59 |
& access='direct',recl=nx*8) |
& access='direct',recl=nx*8) |
60 |
|
|
112 |
|
|
113 |
ccc Now close the file |
ccc Now close the file |
114 |
close(unit=3) |
close(unit=3) |
115 |
|
|
116 |
|
#ifdef NONHYDRO |
117 |
ccc Open Non-Hydrostatic |
ccc Open Non-Hydrostatic |
118 |
c write(fn,'(A,I2.2,A)') '../',mem,'/assimilate/pickup_nh.in' |
c write(fn,'(A,I2.2,A)') '../',mem,'/assimilate/pickup_nh.in' |
119 |
c open(unit=3,file=fn, |
c open(unit=3,file=fn, |
131 |
c enddo |
c enddo |
132 |
|
|
133 |
c close(unit=3) |
c close(unit=3) |
134 |
|
#endif |
135 |
ccc Done Reading State |
ccc Done Reading State |
136 |
call flush() |
call flush() |
137 |
end subroutine ReadPickup |
end subroutine ReadPickup |
221 |
close(unit=3) |
close(unit=3) |
222 |
close(unit=4) |
close(unit=4) |
223 |
|
|
224 |
|
#ifdef NONHYDRO |
225 |
ccc Open Non-Hydrostatic |
ccc Open Non-Hydrostatic |
226 |
write(fni,'(A,I2.2,A)') '../',mem,'/assimilate/pickup_nh.in' |
write(fni,'(A,I2.2,A)') '../',mem,'/assimilate/pickup_nh.in' |
227 |
open(unit=3,file=fni, |
open(unit=3,file=fni, |
251 |
|
|
252 |
c close(unit=3) |
c close(unit=3) |
253 |
c close(unit=4) |
c close(unit=4) |
254 |
|
#endif |
255 |
ccc Done Reading State |
ccc Done Reading State |
256 |
call flush() |
call flush() |
257 |
end subroutine WritePickup |
end subroutine WritePickup |