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

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

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


Revision 1.11 - (show annotations) (download)
Thu May 22 12:21:19 2008 UTC (15 years, 11 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint59r, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, 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, HEAD
Changes since 1.10: +3 -3 lines
replace mnc_common.h and mnc_id_header.h with corresponding upper case
versions

1 C $Header: /u/gcmpack/MITgcm/pkg/mnc/mnc_cw_udim.F,v 1.10 2007/08/27 15:53:05 dfer 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_CW_SET_UDIM
9
10 C !INTERFACE:
11 SUBROUTINE MNC_CW_SET_UDIM(
12 I fgname,
13 I nudim,
14 I myThid )
15
16 C !DESCRIPTION:
17 C For a specified file group name, set the size of the NetCDF
18 C unlimited (or record) dimension. The options are:
19 C \begin{equation}
20 C \label{eq:yo}
21 C \mbox{\bf nudim} = \left\{
22 C \begin{array}[htb]{cl}
23 C >0, & \mbox{\small use the specified value} \\
24 C 0, & \mbox{\small use the largest currently defined value} \\
25 C -1, & \mbox{\small increment the largest value and then use it} \\
26 C \end{array}
27 C \right.
28 C \end{equation}
29
30 C !USES:
31 implicit none
32 #include "MNC_COMMON.h"
33 #include "EEPARAMS.h"
34
35 C !INPUT PARAMETERS:
36 integer nudim, myThid
37 character*(*) fgname
38 CEOP
39
40 C !LOCAL VARIABLES:
41 integer fgf,fgl, indfg
42 character*(MAX_LEN_MBUF) msgbuf
43
44 C Functions
45 integer IFNBLNK, ILNBLNK
46
47 C Check that this name is not already defined
48 fgf = IFNBLNK(fgname)
49 fgl = ILNBLNK(fgname)
50 CALL MNC_GET_IND(MNC_MAX_ID, fgname, mnc_cw_fgnm, indfg, myThid)
51 IF (indfg .LT. 1) THEN
52 CALL MNC_GET_NEXT_EMPTY_IND(
53 & MNC_MAX_ID, mnc_cw_fgnm, 'mnc_cw_fgnm', indfg, myThid)
54 mnc_cw_fgnm(indfg)(1:(fgl-fgf+1)) = fgname(fgf:fgl)
55 mnc_cw_fgud(indfg) = 0
56 mnc_cw_fgig(indfg) = 0
57 ENDIF
58 IF (nudim .GT. 0) THEN
59 mnc_cw_fgig(indfg) = 0
60 mnc_cw_fgud(indfg) = nudim
61 RETURN
62 ENDIF
63 IF (nudim .EQ. 0) THEN
64 mnc_cw_fgig(indfg) = 0
65 RETURN
66 ENDIF
67 IF (nudim .EQ. -1) THEN
68 mnc_cw_fgig(indfg) = 1
69 mnc_cw_fgud(indfg) = mnc_cw_fgud(indfg) + 1
70 RETURN
71 ENDIF
72 write(msgbuf,'(3a,i10,a)')
73 & 'MNC_CW_SET_UDIM ERROR: for file group name ''',
74 & fgname(fgf:fgl), ''' the unlim dim ''', nudim,
75 & ''' is not allowed'
76 CALL print_error(msgbuf, mythid)
77 STOP 'ABNORMAL END: S/R MNC_CW_SET_UDIM'
78
79 RETURN
80 END
81
82 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
83 CBOP 0
84 C !ROUTINE: MNC_CW_GET_UDIM
85
86 C !INTERFACE:
87 SUBROUTINE MNC_CW_GET_UDIM(
88 I fgname,
89 O nudim,
90 I myThid )
91
92 C !DESCRIPTION:
93 C For a specified file group name, get the size of the NetCDF
94 C unlimited (or record) dimension.
95
96 C !USES:
97 implicit none
98 #include "MNC_COMMON.h"
99 #include "EEPARAMS.h"
100
101 C !INPUT PARAMETERS:
102 integer nudim, myThid
103 character*(*) fgname
104 CEOP
105
106 C !LOCAL VARIABLES:
107 integer fgf,fgl, indfg
108 character*(MAX_LEN_MBUF) msgbuf
109
110 C Functions
111 integer IFNBLNK, ILNBLNK
112
113 fgf = IFNBLNK(fgname)
114 fgl = ILNBLNK(fgname)
115 CALL MNC_GET_IND(MNC_MAX_ID, fgname, mnc_cw_fgnm, indfg, myThid)
116 IF (indfg .LT. 1) THEN
117 write(msgbuf,'(3a)')
118 & 'MNC_CW_GET_UDIM ERROR: file group name ''',
119 & fgname(fgf:fgl), ''' is not defined'
120 CALL print_error(msgbuf, mythid)
121 STOP 'ABNORMAL END: S/R MNC_CW_GET_UDIM'
122 ENDIF
123 nudim = mnc_cw_fgud(indfg)
124
125 RETURN
126 END
127
128 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|

  ViewVC Help
Powered by ViewVC 1.1.22