207 |
ENDIF |
ENDIF |
208 |
|
|
209 |
C Append to an existing or create a new file |
C Append to an existing or create a new file |
210 |
CALL MNC_CW_FILE_AORC(fname, indf, myThid) |
CALL MNC_CW_FILE_AORC(fname,indf, lbi,lbj,uniq_tnum, myThid) |
211 |
fid = mnc_f_info(indf,2) |
fid = mnc_f_info(indf,2) |
212 |
|
|
213 |
#ifdef HAVE_STAT |
#ifdef HAVE_STAT |
214 |
IF ((mnc_cw_fgig(indfg) .EQ. 1) |
IF ((mnc_cw_fgig(indfg) .EQ. 1) |
215 |
& .AND. (fs_isdone .EQ. 0)) THEN |
& .AND. (fs_isdone .EQ. 0)) THEN |
216 |
C Decide whether to append to the existing or create a new file |
C Decide whether to append to the existing or create a new |
217 |
C based on the byte count per unlimited dimension |
C file based on the byte count per unlimited dimension |
218 |
ncenc = 70 |
ncenc = 70 |
219 |
cenc(1:26) = 'abcdefghijklmnopqrstuvwxyz' |
cenc(1:26) = 'abcdefghijklmnopqrstuvwxyz' |
220 |
cenc(27:52) = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
cenc(27:52) = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
265 |
ENDIF |
ENDIF |
266 |
CALL MNC_DIM_INIT(fname, |
CALL MNC_DIM_INIT(fname, |
267 |
& mnc_cw_dn(i,igrid), dimnc(i), myThid) |
& mnc_cw_dn(i,igrid), dimnc(i), myThid) |
268 |
|
|
269 |
|
C Add the coordinate variables |
270 |
|
C CALL MNC_CW_ADD_CVAR(fname, mnc_cw_dn(i,igrid), |
271 |
|
C dimnc(i), myThid) |
272 |
|
|
273 |
ENDDO |
ENDDO |
274 |
|
|
275 |
C Ensure that the "grid" is defined |
C Ensure that the "grid" is defined |
378 |
ENDIF |
ENDIF |
379 |
ENDDO |
ENDDO |
380 |
|
|
|
C Add the global attributes |
|
|
CALL MNC_CW_SET_GATTR( fname, lbi,lbj, uniq_tnum, myThid) |
|
|
|
|
381 |
C Add the per-variable attributes |
C Add the per-variable attributes |
382 |
DO i = 1,mnc_cw_vnat(1,indv) |
DO i = 1,mnc_cw_vnat(1,indv) |
383 |
CALL MNC_VAR_ADD_ATTR_STR( fname, vtype, |
CALL MNC_VAR_ADD_ATTR_STR( fname, vtype, |