/[MITgcm]/MITgcm/pkg/mnc/mnc_test_001.T
ViewVC logotype

Annotation of /MITgcm/pkg/mnc/mnc_test_001.T

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


Revision 1.11 - (hide annotations) (download) (as text)
Fri Mar 19 03:28:37 2004 UTC (20 years, 2 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint58l_post, checkpoint64z, checkpoint57t_post, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint57o_post, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint58e_post, checkpoint57v_post, checkpoint52n_post, checkpoint53d_post, checkpoint58u_post, checkpoint58w_post, checkpoint54a_pre, checkpoint57m_post, checkpoint55c_post, checkpoint54e_post, checkpoint57s_post, checkpoint54a_post, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint53c_post, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint57b_post, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint57e_post, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint55h_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint58t_post, checkpoint58h_post, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint54d_post, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint56c_post, checkpoint52m_post, checkpoint57y_pre, checkpoint55, checkpoint53a_post, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint58q_post, checkpoint54f_post, checkpoint53b_post, checkpoint59q, checkpoint59p, checkpoint55g_post, checkpoint59r, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, checkpoint53, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint53g_post, checkpoint57x_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint57f_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58g_post, checkpoint58o_post, checkpoint57z_post, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint57c_post, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint58y_post, checkpoint55e_post, checkpoint58k_post, checkpoint58v_post, checkpoint53f_post, checkpoint55a_post, checkpoint53d_pre, checkpoint54c_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint57j_post, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint57h_post, checkpoint56a_post, checkpoint55d_post, HEAD
Changes since 1.10: +16 -16 lines
File MIME type: application/x-troff
 o edit all MNC subroutines so that myThid is the _last_ argument

1 edhill 1.11 C $Header: /u/u3/gcmpack/MITgcm/pkg/mnc/mnc_test_001.T,v 1.10 2004/02/04 05:45:09 edhill Exp $
2 edhill 1.1 C $Name: $
3    
4     C Simple test program for MNC
5    
6     PROGRAM mnc_test_001
7    
8     implicit none
9 edhill 1.2 #include "MNC_OPTIONS.h"
10 edhill 1.1 #include "EEPARAMS.h"
11    
12     C Functions
13     integer ILNBLNK
14    
15     C Local Variables
16 edhill 1.4 integer MAX_STR, MAX_NAMES, MAX_DIM, MAX_STOR
17     PARAMETER ( MAX_STR = 100 )
18     PARAMETER ( MAX_NAMES = 10 )
19     PARAMETER ( MAX_DIM = 10 )
20     PARAMETER ( MAX_STOR = 1000 )
21     integer ndim, dims(MAX_DIM)
22     integer myThid, i,j,k,l,ii, n, ind, fid
23 edhill 1.1 character*(MAX_LEN_MBUF) msgbuf
24 edhill 1.5 character*(MAX_STR) blank, fname, gname1,gname2, vname1,vname2
25     character*(MAX_STR) atname, atval, units
26 edhill 1.4 character*(MAX_STR) dnames(MAX_NAMES)
27 edhill 1.3 REAL*8 fillval
28 edhill 1.5 REAL*8 var(MAX_STOR), tvar(MAX_STOR)
29 edhill 1.1
30 edhill 1.2 print*, '=== Starting Program: mnc_test_001 ==='
31 edhill 1.4
32     print*, ' Initalizing variables ...'
33 edhill 1.2 DO i = 1,MAX_STR
34     blank(i:i) = ' '
35     ENDDO
36     DO i = 1,MAX_NAMES
37 edhill 1.4 dnames(i)(1:MAX_STR) = blank(1:MAX_STR)
38 edhill 1.2 ENDDO
39     fname(1:MAX_STR) = blank(1:MAX_STR)
40 edhill 1.5 gname1(1:MAX_STR) = blank(1:MAX_STR)
41     gname2(1:MAX_STR) = blank(1:MAX_STR)
42     vname1(1:MAX_STR) = blank(1:MAX_STR)
43     vname2(1:MAX_STR) = blank(1:MAX_STR)
44 edhill 1.3 units(1:MAX_STR) = blank(1:MAX_STR)
45     atname(1:MAX_STR) = blank(1:MAX_STR)
46     atval(1:MAX_STR) = blank(1:MAX_STR)
47 edhill 1.2 fname(1:12) = 'test_001.nc '
48 edhill 1.4 ndim = 4
49     dims(1) = 7
50     dims(2) = 4
51     dims(3) = 2
52 edhill 1.8 dims(4) = -1
53 edhill 1.4 dnames(1)(1:1) = 'X'
54     dnames(2)(1:1) = 'Y'
55     dnames(3)(1:1) = 'Z'
56 edhill 1.8 dnames(4)(1:1) = 'T'
57 edhill 1.4 myThid = 1
58     C In FORTRAN, the first variable cycles most quickly
59     DO ii = 1,MAX_STOR
60     var(ii) = 0.21
61 edhill 1.5 tvar(ii) = 0.23
62 edhill 1.4 ENDDO
63     ii = 0
64     DO l = 1,dims(3)
65     DO k = 1,dims(3)
66     DO j = 1,dims(2)
67     DO i = 1,dims(1)
68     ii = ii + 1
69     var(ii) = ((i*100 + j)*100 + k)*100 + l
70     ENDDO
71     ENDDO
72     ENDDO
73     ENDDO
74 edhill 1.2
75     print*, ' Calling MNC_INIT() ...'
76     CALL MNC_INIT(myThid)
77    
78 edhill 1.7 print*, ' Calling MNC_FILE_CREATE() ...'
79 edhill 1.11 CALL MNC_FILE_CREATE(fname, myThid)
80 edhill 1.7
81 edhill 1.2 print*, ' Calling MNC_DIM_INIT() ...'
82 edhill 1.4 DO i = 1,ndim
83 edhill 1.11 CALL MNC_DIM_INIT(fname, dnames(i),dims(i), myThid)
84 edhill 1.7 ii = ILNBLNK(dnames(i))
85     print*, ' ... created dimension: ', dnames(i)(1:ii)
86 edhill 1.4 ENDDO
87 edhill 1.2
88     print*, ' Calling MNC_GRID_INIT() ...'
89 edhill 1.5 gname1(1:10) = 'xyzt '
90 edhill 1.11 CALL MNC_GRID_INIT(fname, gname1, ndim, dnames, myThid)
91 edhill 1.5 gname2(1:10) = 't '
92 edhill 1.11 CALL MNC_GRID_INIT(fname, gname2, 1, dnames(4), myThid)
93 edhill 1.3
94     print*, ' Calling MNC_VAR_INIT_DBL() ...'
95 edhill 1.5 vname1(1:4) = 'time'
96     units(1:19) = 'days since 1970-1-1'
97 edhill 1.11 CALL MNC_VAR_INIT_DBL(fname, gname2, vname1, myThid)
98 edhill 1.5 vname2(1:4) = 'temp'
99 edhill 1.6 units(1:19) = 'deg C '
100 edhill 1.11 CALL MNC_VAR_INIT_DBL(fname, gname1, vname2, myThid)
101 edhill 1.3
102     print*, ' Calling MNC_VAR_ADD_ATTR_STR() ...'
103 edhill 1.6 atname(1:9) = 'grid_type'
104 edhill 1.11 CALL MNC_VAR_ADD_ATTR_INT(fname,vname1, atname, 1, 1, myThid)
105 edhill 1.5 atname(1:11) = 'valid_range'
106     tvar(1) = -23.5
107     tvar(2) = 176.75
108 edhill 1.11 CALL MNC_VAR_ADD_ATTR_DBL(fname,vname2, atname, 2, tvar, myThid)
109 edhill 1.4
110     print*, ' Calling MNC_VAR_WRITE_DBL() ...'
111 edhill 1.11 CALL MNC_VAR_WRITE_DBL(fname, vname1, var, myThid)
112 edhill 1.4 print*, ' Calling MNC_VAR_WRITE_DBL() ...'
113 edhill 1.11 CALL MNC_VAR_WRITE_DBL(fname, vname2, var, myThid)
114 edhill 1.5
115 edhill 1.11 CALL MNC_DUMP(myThid)
116 edhill 1.2
117     print*, ' Calling MNC_FILE_CLOSE() ...'
118 edhill 1.11 CALL MNC_FILE_CLOSE(fname, myThid)
119 edhill 1.9
120 edhill 1.11 CALL MNC_DUMP(myThid)
121 edhill 1.9
122     print*, '=========================================='
123    
124     print*, ' Calling MNC_FILE_READALL() ...'
125 edhill 1.11 CALL MNC_FILE_READALL(fname, myThid)
126 edhill 1.9
127 edhill 1.11 CALL MNC_DUMP(myThid)
128 edhill 1.2
129     print*, '=== Ending Program: mnc_test_001 ==='
130 edhill 1.1
131     END
132    
133     CEH3 ;;; Local Variables: ***
134     CEH3 ;;; mode:fortran ***
135     CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22