1 |
C |
2 |
C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_set_fname.F,v 1.7 2003/11/06 22:05:08 heimbach Exp $ |
3 |
C $Name: $ |
4 |
|
5 |
#include "CTRL_CPPOPTIONS.h" |
6 |
|
7 |
subroutine ctrl_set_fname( xx_fname, fname, mythid ) |
8 |
|
9 |
c ================================================================== |
10 |
c SUBROUTINE ctrl_set_fname |
11 |
c ================================================================== |
12 |
c |
13 |
c o get filename for control variable and adjoint thereof |
14 |
c o initialise adjoint field |
15 |
c |
16 |
c started: heimbach@mit.edu, 16-Aug-2001 |
17 |
c |
18 |
c ================================================================== |
19 |
|
20 |
implicit none |
21 |
|
22 |
c == global variables == |
23 |
|
24 |
#include "EEPARAMS.h" |
25 |
#include "SIZE.h" |
26 |
#include "PARAMS.h" |
27 |
#include "GRID.h" |
28 |
|
29 |
#include "ctrl.h" |
30 |
#include "optim.h" |
31 |
|
32 |
c == routine arguments == |
33 |
|
34 |
character*(MAX_LEN_FNAM) xx_fname |
35 |
character*( 80) fname(2) |
36 |
integer mythid |
37 |
|
38 |
c == local variables == |
39 |
|
40 |
integer ii |
41 |
integer il |
42 |
|
43 |
c == external == |
44 |
|
45 |
integer ilnblnk |
46 |
external ilnblnk |
47 |
|
48 |
c == end of interface == |
49 |
|
50 |
c-- Only the master thread will do I/O. |
51 |
_BEGIN_MASTER( mythid ) |
52 |
|
53 |
il=ilnblnk( xx_fname ) |
54 |
|
55 |
write(fname(1)(1:80),'(80a)') ' ' |
56 |
write(fname(2)(1:80),'(80a)') ' ' |
57 |
|
58 |
if ( il .GT. 0 .AND. il .LE. 80 ) then |
59 |
write(fname(1)(1:80),'(2a,i10.10)') |
60 |
& xx_fname(1:il) ,'.', optimcycle |
61 |
write(fname(2)(1:80),'(3a,i10.10)') |
62 |
& yadprefix, xx_fname(1:il), '.', optimcycle |
63 |
endif |
64 |
|
65 |
_END_MASTER( mythid ) |
66 |
|
67 |
end |