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

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

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


Revision 1.20 - (hide annotations) (download)
Sat Sep 10 18:30:07 2005 UTC (18 years, 8 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint57v_post, checkpoint57s_post, checkpoint57y_post, checkpoint57y_pre, checkpoint58, checkpoint57x_post, checkpoint57w_post, checkpint57u_post, checkpoint58a_post, checkpoint57z_post
Changes since 1.19: +28 -2 lines
 o various changes to mnc including:
   - all files use the new "BASENAME[[.ITER].{t|f}NUM].nc" format
   - output can now be grouped so that all files within a group
       change the ITER portion of their names in lock-step together
   - can now read ("global") PER-FACE (in addition to PER-TILE) files
       and works with both EXCH1 and EXCH2 (but needs more testing)
   - writing works for all verification test cases w/ g77 on Linux

1 edhill 1.20 C $Header: /u/gcmpack/MITgcm/pkg/mnc/mnc_init.F,v 1.19 2004/12/17 21:28:26 edhill Exp $
2 edhill 1.1 C $Name: $
3    
4     #include "MNC_OPTIONS.h"
5    
6 edhill 1.6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 edhill 1.14 CBOP 0
8 edhill 1.13 C !ROUTINE: MNC_INIT
9 edhill 1.1
10 edhill 1.13 C !INTERFACE:
11 edhill 1.11 SUBROUTINE MNC_INIT( myThid )
12 edhill 1.1
13 edhill 1.13 C !DESCRIPTION:
14 edhill 1.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 edhill 1.13
18     C !USES:
19 edhill 1.1 #include "mnc_common.h"
20 edhill 1.20 #include "SIZE.h"
21     #include "EEPARAMS.h"
22     #include "EESUPPORT.h"
23     #include "PARAMS.h"
24 edhill 1.1
25 edhill 1.13 C !INPUT PARAMETERS:
26 edhill 1.11 integer myThid
27 edhill 1.14 CEOP
28 edhill 1.1
29 edhill 1.13 C !LOCAL VARIABLES:
30 edhill 1.8 integer i,j, g, v
31 edhill 1.1 character blank*(MNC_MAX_CHAR)
32    
33 edhill 1.8 C Write blanks or zeros to all the internal names and ID tables
34 edhill 1.10 DO i = 1,MNC_MAX_CHAR
35 edhill 1.17 blank(i:i) = ' '
36 edhill 1.1 ENDDO
37 edhill 1.2 mnc_blank_name(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
38 edhill 1.5 DO i = 1,MNC_MAX_ID
39     mnc_d_size(i) = 0
40     mnc_d_ids(i) = 0
41 edhill 1.1 mnc_f_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
42 edhill 1.2 mnc_g_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
43     mnc_v_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
44     mnc_d_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
45 edhill 1.3 DO j = 1,MNC_MAX_INFO
46     mnc_f_info(i,j) = 0
47     mnc_fv_ids(i,j) = 0
48     mnc_fd_ind(i,j) = 0
49 edhill 1.4 mnc_f_alld(i,j) = 0
50 edhill 1.3 ENDDO
51     ENDDO
52    
53 edhill 1.15 C Blank the CW tables
54 edhill 1.6 DO g = 1,MNC_MAX_ID
55 edhill 1.7 mnc_cw_gname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
56 edhill 1.8 mnc_cw_vname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
57     mnc_cw_vgind(g) = 0
58 edhill 1.6 mnc_cw_ndim(g) = 0
59 edhill 1.12 mnc_cw_fgnm(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
60     mnc_cw_fgud(g) = 0
61 edhill 1.16 mnc_cw_fgis(g) = 0
62 edhill 1.20 mnc_cw_fgci(g) = 1
63 edhill 1.19 C mnc_cw_cvnm(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
64 edhill 1.6 DO i = 1,MNC_CW_MAX_I
65     mnc_cw_dn(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
66 edhill 1.8 mnc_cw_vtnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
67     mnc_cw_vinm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
68     mnc_cw_vdnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
69     mnc_cw_vtat(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR)
70 edhill 1.6 mnc_cw_dims(i,g) = 0
71     mnc_cw_is(i,g) = 0
72     mnc_cw_ie(i,g) = 0
73 edhill 1.8 mnc_cw_viat(i,g) = 0
74     mnc_cw_vdat(i,g) = 0.0D0
75     ENDDO
76     DO i = 1,3
77     mnc_cw_vnat(i,g) = 0
78 edhill 1.10 ENDDO
79     DO i = 1,2
80     mnc_cw_vbij(i,g) = 0
81 edhill 1.19 C mnc_cw_cvse(i,g) = 0
82 edhill 1.6 ENDDO
83     ENDDO
84 edhill 1.20
85     DO i = 1,MNC_MAX_INFO
86     mnc_cw_cit(1,i) = 0
87     mnc_cw_cit(2,i) = 0
88     mnc_cw_cit(3,i) = -1
89     ENDDO
90    
91     C The default for all file types is to add the iter to the name and
92     C grow them in "lock step" together
93     mnc_cw_cit(1,1) = 1
94     mnc_cw_cit(2,1) = nIter0
95    
96     C Here, we do not add the iter to the file name
97     mnc_cw_cit(1,2) = -1
98     mnc_cw_cit(2,2) = -1
99    
100     C For checkpoint files, we want to use the current iter but we do
101     C not (by default, anyway) want to update the current iter for
102     C everything else
103     mnc_cw_cit(1,3) = 3
104     mnc_cw_cit(2,3) = nIter0
105    
106 edhill 1.19 C DO i = 1,MNC_CW_CVDAT
107     C mnc_cw_cvdt(i) = 0.0D0
108     C ENDDO
109 edhill 1.6
110 edhill 1.3 RETURN
111     END
112    
113 edhill 1.6 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|

  ViewVC Help
Powered by ViewVC 1.1.22