/[MITgcm]/MITgcm/pkg/mnc/mnc_init.F
ViewVC logotype

Contents of /MITgcm/pkg/mnc/mnc_init.F

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


Revision 1.25 - (show annotations) (download)
Thu May 22 12:21:19 2008 UTC (15 years, 11 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint62, checkpoint59r, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.24: +2 -2 lines
replace mnc_common.h and mnc_id_header.h with corresponding upper case
versions

1 C $Header: /u/gcmpack/MITgcm/pkg/mnc/mnc_init.F,v 1.24 2008/05/22 08:29:06 mlosch Exp $
2 C $Name: $
3
4 #include "MNC_OPTIONS.h"
5
6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 CBOP 0
8 C !ROUTINE: MNC_INIT
9
10 C !INTERFACE:
11 SUBROUTINE MNC_INIT( myThid )
12
13 C !DESCRIPTION:
14 C Initialize (zero) the look-up tables. This routine should
15 C \textbf{always} be run before any other MNC subroutines to ensure
16 C that the lookup tables start in a well-defined state.
17
18 C !USES:
19 #include "SIZE.h"
20 #include "EEPARAMS.h"
21 #include "EESUPPORT.h"
22 #include "PARAMS.h"
23 #include "MNC_COMMON.h"
24 #include "MNC_PARAMS.h"
25
26 C !INPUT PARAMETERS:
27 integer myThid
28 CEOP
29
30 C !LOCAL VARIABLES:
31 integer i,j, g
32 character blank*(MNC_MAX_CHAR)
33 character bpath*(MNC_MAX_PATH)
34
35 C Write blanks or zeros to all the internal names and ID tables
36 DO i = 1,MNC_MAX_CHAR
37 blank(i:i) = ' '
38 ENDDO
39 DO i = 1,MNC_MAX_PATH
40 bpath(i:i) = ' '
41 ENDDO
42
43 mnc_blank_name(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
44 DO i = 1,MNC_MAX_FID
45 mnc_f_names(i)(1:MNC_MAX_PATH) = bpath(1:MNC_MAX_PATH)
46 DO j = 1,MNC_MAX_INFO
47 mnc_f_info(i,j) = 0
48 mnc_fv_ids(i,j) = 0
49 mnc_fd_ind(i,j) = 0
50 mnc_f_alld(i,j) = 0
51 ENDDO
52 ENDDO
53 DO i = 1,MNC_MAX_ID
54 mnc_d_size(i) = 0
55 mnc_d_ids(i) = 0
56 mnc_g_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
57 mnc_v_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
58 mnc_d_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
59 ENDDO
60
61 C Blank the CW tables
62 DO g = 1,MNC_MAX_ID
63 mnc_cw_gname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
64 mnc_cw_vname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
65 mnc_cw_vgind(g) = 0
66 mnc_cw_vfmv(g) = 0
67 mnc_cw_ndim(g) = 0
68 mnc_cw_fgnm(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
69 mnc_cw_fgud(g) = 0
70 mnc_cw_fgis(g) = 0
71 mnc_cw_fgci(g) = 1
72 C mnc_cw_cvnm(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
73 DO i = 1,MNC_CW_MAX_I
74 mnc_cw_dn(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
75 mnc_cw_vtnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
76 mnc_cw_vinm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
77 mnc_cw_vdnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
78 mnc_cw_vtat(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
79 mnc_cw_dims(i,g) = 0
80 mnc_cw_is(i,g) = 0
81 mnc_cw_ie(i,g) = 0
82 mnc_cw_viat(i,g) = 0
83 mnc_cw_vdat(i,g) = 0.0D0
84 ENDDO
85 DO i = 1,3
86 mnc_cw_vnat(i,g) = 0
87 ENDDO
88 DO i = 1,2
89 mnc_cw_vbij(i,g) = 0
90 mnc_cw_vmvi(i,g) = 0
91 mnc_cw_vmvr(i,g) = 0.0
92 mnc_cw_vmvd(i,g) = 0.0D0
93 C mnc_cw_cvse(i,g) = 0
94 ENDDO
95 ENDDO
96
97 DO i = 1,MNC_MAX_INFO
98 mnc_cw_cit(1,i) = 0
99 mnc_cw_cit(2,i) = 0
100 mnc_cw_cit(3,i) = -1
101 ENDDO
102
103 DO i = 1,2
104 mnc_def_imv(i) = UNSET_I
105 mnc_def_rmv(i) = UNSET_FLOAT4
106 mnc_def_dmv(i) = UNSET_FLOAT8
107 ENDDO
108
109 C The default for all file types is to add the iter to the name and
110 C grow them in "lock step" together
111 mnc_cw_cit(1,1) = 1
112 mnc_cw_cit(2,1) = nIter0
113
114 C Here, we do not add the iter to the file name
115 mnc_cw_cit(1,2) = -1
116 mnc_cw_cit(2,2) = -1
117
118 C For checkpoint files, we want to use the current iter but we do
119 C not (by default, anyway) want to update the current iter for
120 C everything else
121 mnc_cw_cit(1,3) = 3
122 mnc_cw_cit(2,3) = nIter0
123
124 C DO i = 1,MNC_CW_CVDAT
125 C mnc_cw_cvdt(i) = 0.0D0
126 C ENDDO
127
128 RETURN
129 END
130
131 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|

  ViewVC Help
Powered by ViewVC 1.1.22