/[MITgcm]/MITgcm_contrib/ecco_utils/lbfgs_jpl_version/lsopt.2/dostore.F
ViewVC logotype

Contents of /MITgcm_contrib/ecco_utils/lbfgs_jpl_version/lsopt.2/dostore.F

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


Revision 1.1 - (show annotations) (download)
Wed Apr 3 23:36:07 2013 UTC (12 years, 4 months ago) by heimbach
Branch: MAIN
CVS Tags: HEAD
Add L-BFGS code adapted to ECCO Production by JPL

1 subroutine dostore( n, x, store, j )
2 c
3 c arguments
4 c
5 integer n, i, j
6 double precision x(n)
7 real*4 tmpx(n)
8 logical store
9
10 common /xxstore/ itape, ntape, isize
11 integer itape, ntape, isize
12 common /mpi_parm/myid,nprocs,mystart,myend
13 integer myid,nprocs,mystart,myend
14
15 cph(
16 cph print *, 'pathei in dostore ',
17 cph & store, n, ntape, j
18 cph)
19
20
21 if (store) then
22 do i = 1, n
23 tmpx(i) = x(i)
24 enddo
25 !bnc may need to fix this
26 open( ntape
27 $ , file = 'OPWARMD'
28 $ , status = 'unknown'
29 $ , form = 'unformatted'
30 $ , access = 'direct'
31 $ , recl = isize*n
32 $ )
33 write( ntape, rec=(j-1)*nprocs+myid+1) tmpx
34 close(ntape)
35 else
36 open( ntape
37 $ , file = 'OPWARMD'
38 $ , status = 'unknown'
39 $ , form = 'unformatted'
40 $ , access = 'direct'
41 $ , recl = isize*n
42 $ )
43 read( ntape, rec=(j-1)*nprocs+myid+1) tmpx
44 close(ntape)
45 do i = 1, n
46 x(i) = tmpx(i)
47 enddo
48 endif
49
50 return
51 end

  ViewVC Help
Powered by ViewVC 1.1.22