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

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

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


Revision 1.9 - (show annotations) (download)
Fri Dec 2 18:43:03 2011 UTC (12 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint63g, checkpoint63p, checkpoint63q, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k
Changes since 1.8: +5 -2 lines
Minor tweaks to adjoint.

1 C
2 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_set_fname.F,v 1.8 2004/11/16 05:42:12 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(3)
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 write(fname(3)(1:80),'(80a)') ' '
58
59 if ( il .GT. 0 .AND. il .LE. 80 ) then
60 write(fname(1)(1:80),'(2a,i10.10)')
61 & xx_fname(1:il) ,'.', optimcycle
62 write(fname(2)(1:80),'(3a,i10.10)')
63 & yadprefix, xx_fname(1:il), '.', optimcycle
64 write(fname(3)(1:80),'(3a,i10.10)')
65 & 'hn', xx_fname(1:il), '.', optimcycle
66 endif
67
68 _END_MASTER( mythid )
69
70 end

  ViewVC Help
Powered by ViewVC 1.1.22