/[MITgcm]/MITgcm/pkg/ctrl/ctrl_set_fname.F
ViewVC logotype

Diff of /MITgcm/pkg/ctrl/ctrl_set_fname.F

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

revision 1.1 by heimbach, Tue Feb 5 20:23:58 2002 UTC revision 1.2 by heimbach, Sat Jul 13 02:47:32 2002 UTC
# Line 0  Line 1 
1    #include "CTRL_CPPOPTIONS.h"
2    
3    
4          subroutine ctrl_set_fname(
5         I     xx_fname,fname, adfname, mythid )
6    
7    c     ==================================================================
8    c     SUBROUTINE ctrl_set_fname
9    c     ==================================================================
10    c
11    c     o get filename for control variable and adjoint thereof
12    c     o initialise adjoint field
13    c
14    c     started: heimbach@mit.edu, 16-Aug-2001
15    c
16    c     ==================================================================
17    
18          implicit none
19    
20    c     == global variables ==
21    
22    #include "EEPARAMS.h"
23    #include "SIZE.h"
24    #include "PARAMS.h"
25    #include "GRID.h"
26    
27    #include "ctrl.h"
28    #include "cost.h"
29    
30    #ifdef ALLOW_ECCO_OPTIMIZATION
31    #include "optim.h"
32    #endif
33    
34    c     == routine arguments ==
35    
36          character*(MAX_LEN_FNAM) xx_fname
37          character*( 80)   fname
38          character*( 80) adfname
39          integer mythid
40    
41    c     == local variables ==
42    
43    #ifndef ALLOW_ECCO_OPTIMIZATION
44          integer optimcycle
45    #endif
46    
47          integer ii
48          integer il
49    
50    c     == external ==
51    
52          integer  ilnblnk
53          external ilnblnk
54    
55    c     == end of interface ==
56    
57    #ifndef ALLOW_ECCO_OPTIMIZATION
58          optimcycle = 0
59    #endif
60    
61    c--   Only the master thread will do I/O.
62          _BEGIN_MASTER( mythid )
63    
64          il=ilnblnk( xx_fname )
65    
66          write(  fname(1:80),'(80a)') ' '
67          write(adfname(1:80),'(80a)') ' '
68    
69          write(fname(1:80),'(2a,i10.10)')
70         &     xx_fname(1:il) ,'.', optimcycle
71          write(adfname(1:80),'(3a,i10.10)')
72         &     yadprefix, xx_fname(1:il), '.', optimcycle
73    
74          _END_MASTER( mythid )
75    
76          end

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

  ViewVC Help
Powered by ViewVC 1.1.22