4 |
#include "MNC_OPTIONS.h" |
#include "MNC_OPTIONS.h" |
5 |
|
|
6 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
7 |
|
CBOP 0 |
8 |
|
C !ROUTINE: MNC_INIT |
9 |
|
|
10 |
SUBROUTINE MNC_INIT() |
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 "mnc_common.h" |
#include "mnc_common.h" |
20 |
|
#include "SIZE.h" |
21 |
|
#include "EEPARAMS.h" |
22 |
|
#include "EESUPPORT.h" |
23 |
|
#include "PARAMS.h" |
24 |
|
|
25 |
|
C !INPUT PARAMETERS: |
26 |
|
integer myThid |
27 |
|
CEOP |
28 |
|
|
29 |
C Arguments |
C !LOCAL VARIABLES: |
30 |
|
integer i,j, g |
|
C Local Variables |
|
|
integer i,j, g, v |
|
31 |
character blank*(MNC_MAX_CHAR) |
character blank*(MNC_MAX_CHAR) |
32 |
|
character bpath*(MNC_MAX_PATH) |
33 |
|
|
34 |
C Write blanks or zeros to all the internal names and ID tables |
C Write blanks or zeros to all the internal names and ID tables |
35 |
DO i = 1,mnc_max_char |
DO i = 1,MNC_MAX_CHAR |
36 |
blank(i:i) = ' '; |
blank(i:i) = ' ' |
37 |
ENDDO |
ENDDO |
38 |
|
DO i = 1,MNC_MAX_PATH |
39 |
|
bpath(i:i) = ' ' |
40 |
|
ENDDO |
41 |
|
|
42 |
mnc_blank_name(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
mnc_blank_name(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
43 |
DO i = 1,MNC_MAX_ID |
DO i = 1,MNC_MAX_ID |
44 |
mnc_d_size(i) = 0 |
mnc_d_size(i) = 0 |
45 |
mnc_d_ids(i) = 0 |
mnc_d_ids(i) = 0 |
46 |
mnc_f_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
C |
47 |
|
mnc_f_names(i)(1:MNC_MAX_PATH) = bpath(1:MNC_MAX_PATH) |
48 |
|
C |
49 |
mnc_g_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
mnc_g_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
50 |
mnc_v_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
mnc_v_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
51 |
mnc_d_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
mnc_d_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
57 |
ENDDO |
ENDDO |
58 |
ENDDO |
ENDDO |
59 |
|
|
60 |
C The outer tables |
C Blank the CW tables |
61 |
DO g = 1,MNC_MAX_ID |
DO g = 1,MNC_MAX_ID |
62 |
mnc_cw_gname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
mnc_cw_gname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
63 |
mnc_cw_vname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
mnc_cw_vname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
64 |
mnc_cw_vgind(g) = 0 |
mnc_cw_vgind(g) = 0 |
65 |
|
mnc_cw_vfmv(g) = 0 |
66 |
mnc_cw_ndim(g) = 0 |
mnc_cw_ndim(g) = 0 |
67 |
|
mnc_cw_fgnm(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
68 |
|
mnc_cw_fgud(g) = 0 |
69 |
|
mnc_cw_fgis(g) = 0 |
70 |
|
mnc_cw_fgci(g) = 1 |
71 |
|
C mnc_cw_cvnm(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
72 |
DO i = 1,MNC_CW_MAX_I |
DO i = 1,MNC_CW_MAX_I |
73 |
mnc_cw_dn(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
mnc_cw_dn(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
74 |
mnc_cw_vtnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
mnc_cw_vtnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) |
84 |
DO i = 1,3 |
DO i = 1,3 |
85 |
mnc_cw_vnat(i,g) = 0 |
mnc_cw_vnat(i,g) = 0 |
86 |
ENDDO |
ENDDO |
87 |
|
DO i = 1,2 |
88 |
|
mnc_cw_vbij(i,g) = 0 |
89 |
|
mnc_cw_vmvi(i,g) = 0 |
90 |
|
mnc_cw_vmvr(i,g) = 0.0 |
91 |
|
mnc_cw_vmvd(i,g) = 0.0D0 |
92 |
|
C mnc_cw_cvse(i,g) = 0 |
93 |
|
ENDDO |
94 |
ENDDO |
ENDDO |
95 |
|
|
96 |
RETURN |
DO i = 1,MNC_MAX_INFO |
97 |
END |
mnc_cw_cit(1,i) = 0 |
98 |
|
mnc_cw_cit(2,i) = 0 |
99 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
mnc_cw_cit(3,i) = -1 |
100 |
|
ENDDO |
101 |
SUBROUTINE MNC_DUMP() |
|
102 |
CALL MNC_DUMP_ALL(5, 20) |
C The default for all file types is to add the iter to the name and |
103 |
RETURN |
C grow them in "lock step" together |
104 |
END |
mnc_cw_cit(1,1) = 1 |
105 |
|
mnc_cw_cit(2,1) = nIter0 |
106 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
|
107 |
|
C Here, we do not add the iter to the file name |
108 |
SUBROUTINE MNC_DUMP_ALL( n_id, n_items ) |
mnc_cw_cit(1,2) = -1 |
109 |
|
mnc_cw_cit(2,2) = -1 |
110 |
#include "mnc_common.h" |
|
111 |
|
C For checkpoint files, we want to use the current iter but we do |
112 |
C Arguments |
C not (by default, anyway) want to update the current iter for |
113 |
integer n_id, n_items |
C everything else |
114 |
|
mnc_cw_cit(1,3) = 3 |
115 |
C Local Variables |
mnc_cw_cit(2,3) = nIter0 |
116 |
integer i,j |
|
117 |
|
C DO i = 1,MNC_CW_CVDAT |
118 |
C n_id = mnc_max_id |
C mnc_cw_cvdt(i) = 0.0D0 |
119 |
|
C ENDDO |
|
write(*,*) 'mnc_f_names :' |
|
|
DO i = 1,n_id |
|
|
write(*,'(i3,a,a40)') i,':', mnc_f_names(i) |
|
|
ENDDO |
|
|
write(*,*) 'mnc_g_names :' |
|
|
DO i = 1,n_id |
|
|
write(*,'(i3,a,a40)') i,':', mnc_g_names(i) |
|
|
ENDDO |
|
|
write(*,*) 'mnc_v_names :' |
|
|
DO i = 1,n_id |
|
|
write(*,'(i3,a,a40)') i,':', mnc_v_names(i) |
|
|
ENDDO |
|
|
write(*,*) 'mnc_d_names :' |
|
|
DO i = 1,n_id |
|
|
write(*,'(i3,a,a40)') i,':', mnc_d_names(i) |
|
|
ENDDO |
|
|
|
|
|
write(*,*) 'mnc_d_ids, mnc_d_size :' |
|
|
DO i = 1,n_id |
|
|
write(*,*) i,': ',mnc_d_ids(i), mnc_d_size(i) |
|
|
ENDDO |
|
|
|
|
|
write(*,*) 'mnc_f_info :' |
|
|
DO i = 1,n_id |
|
|
write(*,*) i,': ',(mnc_f_info(i,j), j=1,n_items) |
|
|
ENDDO |
|
|
write(*,*) 'mnc_fd_ind :' |
|
|
DO i = 1,n_id |
|
|
write(*,*) i,': ',(mnc_fd_ind(i,j), j=1,n_items) |
|
|
ENDDO |
|
|
write(*,*) 'mnc_fv_ids :' |
|
|
DO i = 1,n_id |
|
|
write(*,*) i,': ',(mnc_fv_ids(i,j), j=1,n_items) |
|
|
ENDDO |
|
|
write(*,*) 'mnc_f_alld :' |
|
|
DO i = 1,n_id |
|
|
write(*,*) i,': ',(mnc_f_alld(i,j), j=1,n_items) |
|
|
ENDDO |
|
120 |
|
|
121 |
RETURN |
RETURN |
122 |
END |
END |