| 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 |
if ( il .GT. 0 .AND. il .LE. 80 ) then |
| 70 |
write(fname(1:80),'(2a,i10.10)') |
| 71 |
& xx_fname(1:il) ,'.', optimcycle |
| 72 |
write(adfname(1:80),'(3a,i10.10)') |
| 73 |
& yadprefix, xx_fname(1:il), '.', optimcycle |
| 74 |
endif |
| 75 |
|
| 76 |
_END_MASTER( mythid ) |
| 77 |
|
| 78 |
end |