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

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

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


Revision 1.2 - (show annotations) (download) (as text)
Tue Jan 6 23:19:27 2004 UTC (20 years, 5 months ago) by edhill
Branch: MAIN
Changes since 1.1: +43 -3 lines
File MIME type: application/x-troff
 o some initial functionality

1 C $Header: /u/u3/gcmpack/MITgcm/pkg/mnc/mnc_test_001.T,v 1.1 2004/01/05 21:38:27 edhill Exp $
2 C $Name: $
3
4 C Simple test program for MNC
5
6 PROGRAM mnc_test_001
7
8 implicit none
9 #include "MNC_OPTIONS.h"
10 #include "EEPARAMS.h"
11
12 C Functions
13 integer ILNBLNK
14
15 C Local Variables
16 integer MAX_STR, MAX_NAMES
17 PARAMETER ( MAX_STR = 100 )
18 PARAMETER ( MAX_NAMES = 10 )
19 integer myThid, i, n, ind, fid
20 character*(MAX_LEN_MBUF) msgbuf
21 character*(MAX_STR) blank, fname, gname
22 character*(MAX_STR) names(MAX_NAMES)
23
24 print*, '=== Starting Program: mnc_test_001 ==='
25 DO i = 1,MAX_STR
26 blank(i:i) = ' '
27 ENDDO
28 DO i = 1,MAX_NAMES
29 names(i)(1:MAX_STR) = blank(1:MAX_STR)
30 ENDDO
31 fname(1:MAX_STR) = blank(1:MAX_STR)
32 gname(1:MAX_STR) = blank(1:MAX_STR)
33 fname(1:12) = 'test_001.nc '
34
35 myThid = 1
36 print*, ' Calling MNC_INIT() ...'
37 CALL MNC_INIT(myThid)
38
39 print*, ' Calling MNC_DIM_INIT() ...'
40 CALL MNC_DIM_INIT(myThid, 'X ', 'X ', 11)
41 print*, ' ... created 1 dimension'
42 CALL MNC_DIM_INIT(myThid, 'Y ', 'Y ', 21)
43 print*, ' ... created 2 dimensions'
44
45 print*, ' Calling MNC_FILE_CREATE() ...'
46 CALL MNC_FILE_CREATE(myThid, fname)
47
48 print*, ' Calling MNC_GRID_INIT() ...'
49 gname(1:8) = 'XY_Grid '
50 n = 2
51 names(1)(1:2) = 'X '
52 names(2)(1:2) = 'Y '
53 CALL MNC_GRID_INIT(myThid, fname, gname, n, names)
54
55 print*, ' Calling MNC_FILE_CLOSE() ...'
56 CALL MNC_FILE_CLOSE(myThid, fname)
57
58 print*, '=== Ending Program: mnc_test_001 ==='
59
60 END
61
62 CEH3 ;;; Local Variables: ***
63 CEH3 ;;; mode:fortran ***
64 CEH3 ;;; End: ***

  ViewVC Help
Powered by ViewVC 1.1.22