/[MITgcm]/MITgcm_contrib/osse/EnKF/rwObsState3.F
ViewVC logotype

Diff of /MITgcm_contrib/osse/EnKF/rwObsState3.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by afe, Tue May 4 18:19:35 2004 UTC revision 1.2 by afe, Thu May 13 23:45:43 2004 UTC
# Line 1  Line 1 
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    
# Line 11  c***  Reads  iobsloc Line 25  c***  Reads  iobsloc
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)
# Line 22  c***    Call Model Kludge Line 38  c***    Call Model Kludge
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                    
# Line 38  c***    Reads a pickup file... Line 54  c***    Reads a pickup file...
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    
# Line 95  ccc     Read theta Line 112  ccc     Read theta
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,
# Line 112  c         enddo Line 131  c         enddo
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
# Line 201  ccc     Now close the file Line 221  ccc     Now close the file
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,
# Line 230  ccc     Write out other fields Line 251  ccc     Write out other fields
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

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22