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

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

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


Revision 1.5 - (hide annotations) (download)
Thu Oct 23 04:41:40 2003 UTC (20 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint51o_pre, checkpoint51n_post, checkpoint51n_pre, checkpoint51o_post, checkpoint51p_post
Branch point for: checkpoint51n_branch
Changes since 1.4: +5 -0 lines
 o added the [#include "AD_CONFIG.h"] statement to all files that need
   it for adjoint/tl #defines
 o re-worked the build logic in genmake2 to support AD_CONFIG.h
 o removed tools/genmake since it no longer works

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

  ViewVC Help
Powered by ViewVC 1.1.22