119 |
CEOP |
CEOP |
120 |
|
|
121 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
122 |
integer i,j,k, n, indf,indv, fid, nd, ngrid, is,ie, err |
integer i,j,k, n, nf, indf,indv, fid, nd, ngrid, is,ie, err |
123 |
integer vid, nv, ind_g_finfo, needed, nvar |
integer vid, nv, ind_g_finfo, needed, nvar |
124 |
character*(MAX_LEN_MBUF) msgbuf |
character*(MAX_LEN_MBUF) msgbuf |
125 |
integer ids(20) |
integer ids(20) |
134 |
lenv = ILNBLNK(vname) |
lenv = ILNBLNK(vname) |
135 |
|
|
136 |
C Check that the file is open |
C Check that the file is open |
137 |
CALL MNC_GET_IND(MNC_MAX_ID, fname, mnc_f_names, indf, myThid) |
CALL MNC_GET_IND(MNC_MAX_FID, fname, mnc_f_names, indf, myThid) |
138 |
IF (indf .LT. 1) THEN |
IF (indf .LT. 1) THEN |
139 |
write(msgbuf,'(3a)') 'MNC ERROR: file ''', fname, |
nf = ILNBLNK( fname ) |
140 |
|
write(msgbuf,'(3a)') 'MNC ERROR: file ''', fname(1:nf), |
141 |
& ''' must be opened first' |
& ''' must be opened first' |
142 |
CALL print_error(msgbuf, mythid) |
CALL print_error(msgbuf, mythid) |
143 |
stop 'ABNORMAL END: S/R MNC_VAR_INIT_ANY' |
stop 'ABNORMAL END: S/R MNC_VAR_INIT_ANY' |
226 |
ENDIF |
ENDIF |
227 |
|
|
228 |
C Success, so save the variable info |
C Success, so save the variable info |
229 |
CALL MNC_GET_NEXT_EMPTY_IND(MNC_MAX_ID,mnc_v_names,indv, myThid) |
CALL MNC_GET_NEXT_EMPTY_IND(MNC_MAX_ID,mnc_v_names,'mnc_v_names', |
230 |
|
& indv, myThid) |
231 |
mnc_v_names(indv)(1:lenv) = vname(1:lenv) |
mnc_v_names(indv)(1:lenv) = vname(1:lenv) |
232 |
nv = mnc_fv_ids(indf,1) |
nv = mnc_fv_ids(indf,1) |
233 |
i = 2 + nv*3 |
i = 2 + nv*3 |