/[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.6 - (hide annotations) (download)
Thu Oct 30 19:09:05 2003 UTC (20 years, 11 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint51t_post, checkpoint51s_post, checkpoint51q_post, checkpoint51r_post
Branch point for: branch-nonh
Changes since 1.5: +8 -12 lines
ctrl package totally restructured
o pack/unpack now optional and decoupled from
  xx_/adxx_ I/O
o ctrl_pack/unpack cleaned
  (new routines ctrl_init_ctrlvar.F, pkg/ctrl/ctrl_init_wet.F)
o confined inclusion of AD_CONFIG.h to where necessary.

1 edhill 1.5 C
2 heimbach 1.6 C $Header: /u/gcmpack/MITgcm/pkg/ctrl/ctrl_set_fname.F,v 1.5 2003/10/23 04:41:40 edhill Exp $
3     C $Name: $
4 edhill 1.5
5 heimbach 1.2 #include "CTRL_CPPOPTIONS.h"
6    
7 heimbach 1.6 subroutine ctrl_set_fname( xx_fname, fname, mythid )
8 heimbach 1.2
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 heimbach 1.4 #include "ecco.h"
30 heimbach 1.2 #include "ctrl.h"
31     #include "cost.h"
32    
33     #ifdef ALLOW_ECCO_OPTIMIZATION
34     #include "optim.h"
35     #endif
36    
37     c == routine arguments ==
38    
39     character*(MAX_LEN_FNAM) xx_fname
40 heimbach 1.6 character*( 80) fname(2)
41 heimbach 1.2 integer mythid
42    
43     c == local variables ==
44    
45     #ifndef ALLOW_ECCO_OPTIMIZATION
46     integer optimcycle
47     #endif
48    
49     integer ii
50     integer il
51    
52     c == external ==
53    
54     integer ilnblnk
55     external ilnblnk
56    
57     c == end of interface ==
58    
59     #ifndef ALLOW_ECCO_OPTIMIZATION
60     optimcycle = 0
61     #endif
62    
63     c-- Only the master thread will do I/O.
64     _BEGIN_MASTER( mythid )
65    
66     il=ilnblnk( xx_fname )
67    
68 heimbach 1.6 write(fname(1)(1:80),'(80a)') ' '
69     write(fname(2)(1:80),'(80a)') ' '
70 heimbach 1.2
71 heimbach 1.3 if ( il .GT. 0 .AND. il .LE. 80 ) then
72 heimbach 1.6 write(fname(1)(1:80),'(2a,i10.10)')
73 heimbach 1.3 & xx_fname(1:il) ,'.', optimcycle
74 heimbach 1.6 write(fname(2)(1:80),'(3a,i10.10)')
75 heimbach 1.3 & yadprefix, xx_fname(1:il), '.', optimcycle
76     endif
77 heimbach 1.2
78     _END_MASTER( mythid )
79    
80     end

  ViewVC Help
Powered by ViewVC 1.1.22