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

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

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


Revision 1.11 - (hide 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 mlosch 1.11 C $Header: /u/gcmpack/MITgcm/pkg/mnc/mnc_cw_udim.F,v 1.10 2007/08/27 15:53:05 dfer Exp $
2 edhill 1.1 C $Name: $
3    
4     #include "MNC_OPTIONS.h"
5    
6     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
7 edhill 1.4 CBOP 0
8 edhill 1.3 C !ROUTINE: MNC_CW_SET_UDIM
9 edhill 1.1
10 edhill 1.3 C !INTERFACE:
11 edhill 1.1 SUBROUTINE MNC_CW_SET_UDIM(
12     I fgname,
13     I nudim,
14     I myThid )
15    
16 edhill 1.3 C !DESCRIPTION:
17     C For a specified file group name, set the size of the NetCDF
18 edhill 1.4 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 edhill 1.3 C !USES:
31 edhill 1.1 implicit none
32 mlosch 1.11 #include "MNC_COMMON.h"
33 edhill 1.1 #include "EEPARAMS.h"
34    
35 edhill 1.3 C !INPUT PARAMETERS:
36 edhill 1.1 integer nudim, myThid
37     character*(*) fgname
38 edhill 1.4 CEOP
39 edhill 1.1
40 edhill 1.3 C !LOCAL VARIABLES:
41     integer fgf,fgl, indfg
42     character*(MAX_LEN_MBUF) msgbuf
43 edhill 1.4
44 edhill 1.1 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 edhill 1.2 IF (indfg .LT. 1) THEN
52     CALL MNC_GET_NEXT_EMPTY_IND(
53 edhill 1.9 & MNC_MAX_ID, mnc_cw_fgnm, 'mnc_cw_fgnm', indfg, myThid)
54 edhill 1.7 mnc_cw_fgnm(indfg)(1:(fgl-fgf+1)) = fgname(fgf:fgl)
55 edhill 1.5 mnc_cw_fgud(indfg) = 0
56 edhill 1.7 mnc_cw_fgig(indfg) = 0
57 edhill 1.1 ENDIF
58 edhill 1.5 IF (nudim .GT. 0) THEN
59 edhill 1.7 mnc_cw_fgig(indfg) = 0
60 edhill 1.5 mnc_cw_fgud(indfg) = nudim
61     RETURN
62     ENDIF
63 edhill 1.7 IF (nudim .EQ. 0) THEN
64     mnc_cw_fgig(indfg) = 0
65     RETURN
66     ENDIF
67 edhill 1.5 IF (nudim .EQ. -1) THEN
68 edhill 1.7 mnc_cw_fgig(indfg) = 1
69 edhill 1.5 mnc_cw_fgud(indfg) = mnc_cw_fgud(indfg) + 1
70     RETURN
71     ENDIF
72 dfer 1.10 write(msgbuf,'(3a,i10,a)')
73 edhill 1.5 & '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 edhill 1.1
79     RETURN
80     END
81    
82     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
83 edhill 1.4 CBOP 0
84 edhill 1.3 C !ROUTINE: MNC_CW_GET_UDIM
85 edhill 1.1
86 edhill 1.3 C !INTERFACE:
87 edhill 1.1 SUBROUTINE MNC_CW_GET_UDIM(
88     I fgname,
89     O nudim,
90     I myThid )
91    
92 edhill 1.3 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 edhill 1.1 implicit none
98 mlosch 1.11 #include "MNC_COMMON.h"
99 edhill 1.1 #include "EEPARAMS.h"
100    
101 edhill 1.3 C !INPUT PARAMETERS:
102 edhill 1.1 integer nudim, myThid
103     character*(*) fgname
104 edhill 1.4 CEOP
105 edhill 1.1
106 edhill 1.3 C !LOCAL VARIABLES:
107     integer fgf,fgl, indfg
108     character*(MAX_LEN_MBUF) msgbuf
109 edhill 1.4
110 edhill 1.1 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 edhill 1.5 & 'MNC_CW_GET_UDIM ERROR: file group name ''',
119 edhill 1.1 & fgname(fgf:fgl), ''' is not defined'
120     CALL print_error(msgbuf, mythid)
121 edhill 1.5 STOP 'ABNORMAL END: S/R MNC_CW_GET_UDIM'
122 edhill 1.1 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