6 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
7 |
|
|
8 |
SUBROUTINE MNC_CW_RX_W_YY( |
SUBROUTINE MNC_CW_RX_W_YY( |
|
I myThid, |
|
9 |
I fbname, bi,bj, |
I fbname, bi,bj, |
10 |
I vtype, |
I vtype, |
11 |
I indu, |
I var, |
12 |
I var ) |
I myThid ) |
13 |
|
|
14 |
implicit none |
implicit none |
15 |
|
|
16 |
#include "netcdf.inc" |
#include "netcdf.inc" |
17 |
#include "mnc_common.h" |
#include "mnc_common.h" |
|
#include "EEPARAMS.h" |
|
18 |
#include "SIZE.h" |
#include "SIZE.h" |
19 |
|
#include "EEPARAMS.h" |
20 |
|
#include "PARAMS.h" |
21 |
|
|
22 |
#define mnc_rtype_YY |
#define mnc_rtype_YY |
23 |
|
|
35 |
integer ndim, indf, err, lbi,lbj, bidim,bjdim, unlim_sz, kr |
integer ndim, indf, err, lbi,lbj, bidim,bjdim, unlim_sz, kr |
36 |
integer p(9),s(9),e(9), dimnc(9), vstart(9),vcount(9), udo(9) |
integer p(9),s(9),e(9), dimnc(9), vstart(9),vcount(9), udo(9) |
37 |
integer j1,j2,j3,j4,j5,j6,j7, k1,k2,k3,k4,k5,k6,k7 |
integer j1,j2,j3,j4,j5,j6,j7, k1,k2,k3,k4,k5,k6,k7 |
38 |
|
integer indfg, fg1,fg2, npath |
39 |
character*(MAX_LEN_MBUF) msgbuf |
character*(MAX_LEN_MBUF) msgbuf |
40 |
character*(MNC_MAX_CHAR) fname |
character*(MNC_MAX_CHAR) fname |
41 |
|
character*(MNC_MAX_CHAR) path_fname |
42 |
|
|
43 |
C Temporary storage for the simultaneous type conversion and |
C Temporary storage for the simultaneous type conversion and |
44 |
C re-shaping before passing to NetCDF |
C re-shaping before passing to NetCDF |
55 |
C Only do I/O if I am the master thread |
C Only do I/O if I am the master thread |
56 |
_BEGIN_MASTER( myThid ) |
_BEGIN_MASTER( myThid ) |
57 |
|
|
58 |
|
C Get the current index for the unlimited dimension from the file |
59 |
|
C group (or base) name |
60 |
|
fg1 = IFNBLNK(fbname) |
61 |
|
fg2 = ILNBLNK(fbname) |
62 |
|
CALL MNC_GET_IND(MNC_MAX_ID, fbname, mnc_cw_fgnm, indfg, myThid) |
63 |
|
IF (indfg .LT. 1) THEN |
64 |
|
write(msgbuf,'(3a)') |
65 |
|
& 'MNC_CW_RX_W_YY ERROR: file group name ''', |
66 |
|
& fbname(fg1:fg2), ''' is not defined' |
67 |
|
CALL print_error(msgbuf, mythid) |
68 |
|
STOP 'ABNORMAL END: S/R MNC_CW_RX_W_YY' |
69 |
|
ENDIF |
70 |
|
indu = mnc_cw_fgud(indfg) |
71 |
|
|
72 |
C Check that the Variable Type exists |
C Check that the Variable Type exists |
73 |
nvf = IFNBLNK(vtype) |
nvf = IFNBLNK(vtype) |
74 |
nvl = ILNBLNK(vtype) |
nvl = ILNBLNK(vtype) |
75 |
CALL MNC_GET_IND(myThid, MNC_MAX_ID, vtype, mnc_cw_vname, indv) |
CALL MNC_GET_IND(MNC_MAX_ID, vtype, mnc_cw_vname, indv, myThid) |
76 |
IF (indv .LT. 1) THEN |
IF (indv .LT. 1) THEN |
77 |
write(msgbuf,'(3a)') 'MNC_CW_RX_W_YY ERROR: vtype ''', |
write(msgbuf,'(3a)') 'MNC_CW_RX_W_YY ERROR: vtype ''', |
78 |
& vtype(nvf:nvl), ''' is not defined' |
& vtype(nvf:nvl), ''' is not defined' |
99 |
DO lbi = bis,bie |
DO lbi = bis,bie |
100 |
|
|
101 |
C Create the file name |
C Create the file name |
102 |
CALL MNC_CW_GET_TILE_NUM(myThid, lbi,lbj, uniq_tnum) |
CALL MNC_CW_GET_TILE_NUM(lbi,lbj, uniq_tnum, myThid) |
103 |
fname(1:MNC_MAX_CHAR) = mnc_blank_name(1:MNC_MAX_CHAR) |
fname(1:MNC_MAX_CHAR) = mnc_blank_name(1:MNC_MAX_CHAR) |
104 |
n1 = IFNBLNK(fbname) |
n1 = IFNBLNK(fbname) |
105 |
n2 = ILNBLNK(fbname) |
n2 = ILNBLNK(fbname) |
110 |
write(fname((ntot+1):(ntot+9)),'(i6.6,a3)') uniq_tnum, '.nc' |
write(fname((ntot+1):(ntot+9)),'(i6.6,a3)') uniq_tnum, '.nc' |
111 |
nfname = ntot+9 |
nfname = ntot+9 |
112 |
|
|
113 |
|
C Add the path to the file name |
114 |
|
IF (mnc_use_outdir) THEN |
115 |
|
path_fname(1:MNC_MAX_CHAR) = mnc_blank_name(1:MNC_MAX_CHAR) |
116 |
|
npath = ILNBLNK(mnc_out_path) |
117 |
|
path_fname(1:npath) = mnc_out_path(1:npath) |
118 |
|
path_fname((npath+1):(npath+nfname)) = fname(1:nfname) |
119 |
|
fname(1:MNC_MAX_CHAR) = path_fname(1:MNC_MAX_CHAR) |
120 |
|
nfname = npath + nfname |
121 |
|
ENDIF |
122 |
|
|
123 |
C Append to an existing or create a new file |
C Append to an existing or create a new file |
124 |
CALL MNC_CW_FILE_AORC(myThid, fname, indf) |
CALL MNC_CW_FILE_AORC(fname, indf, myThid) |
125 |
fid = mnc_f_info(indf,2) |
fid = mnc_f_info(indf,2) |
126 |
|
|
127 |
C Ensure that all the NetCDF dimensions are defined and create a |
C Ensure that all the NetCDF dimensions are defined and create a |
135 |
ELSE |
ELSE |
136 |
dimnc(i) = mnc_cw_ie(i,igrid) - mnc_cw_is(i,igrid) + 1 |
dimnc(i) = mnc_cw_ie(i,igrid) - mnc_cw_is(i,igrid) + 1 |
137 |
ENDIF |
ENDIF |
138 |
CALL MNC_DIM_INIT(myThid,fname, |
CALL MNC_DIM_INIT(fname, |
139 |
& mnc_cw_dn(i,igrid), dimnc(i) ) |
& mnc_cw_dn(i,igrid), dimnc(i), myThid) |
140 |
ENDDO |
ENDDO |
141 |
|
|
142 |
C Ensure that the "grid" is defined |
C Ensure that the "grid" is defined |
143 |
CALL MNC_GRID_INIT(myThid,fname, mnc_cw_gname(igrid), |
CALL MNC_GRID_INIT(fname, mnc_cw_gname(igrid), |
144 |
& mnc_cw_ndim(igrid), mnc_cw_dn(1,igrid)) |
& mnc_cw_ndim(igrid), mnc_cw_dn(1,igrid), myThid) |
145 |
|
|
146 |
C Ensure that the variable is defined |
C Ensure that the variable is defined |
147 |
#ifdef mnc_rtype_D |
#ifdef mnc_rtype_D |
148 |
CALL MNC_VAR_INIT_DBL(myThid,fname,mnc_cw_gname(igrid),vtype) |
CALL MNC_VAR_INIT_DBL(fname,mnc_cw_gname(igrid),vtype, myThid) |
149 |
#endif |
#endif |
150 |
#ifdef mnc_rtype_R |
#ifdef mnc_rtype_R |
151 |
CALL MNC_VAR_INIT_REAL(myThid,fname,mnc_cw_gname(igrid),vtype) |
CALL MNC_VAR_INIT_REAL(fname,mnc_cw_gname(igrid),vtype, myThid) |
152 |
#endif |
#endif |
153 |
#ifdef mnc_rtype_I |
#ifdef mnc_rtype_I |
154 |
CALL MNC_VAR_INIT_INT(myThid,fname,mnc_cw_gname(igrid),vtype) |
CALL MNC_VAR_INIT_INT(fname,mnc_cw_gname(igrid),vtype, myThid) |
155 |
#endif |
#endif |
156 |
DO i = 1,mnc_fv_ids(indf,1) |
DO i = 1,mnc_fv_ids(indf,1) |
157 |
j = 2 + 3*(i - 1) |
j = 2 + 3*(i - 1) |
213 |
udo(i) = indu - 1 |
udo(i) = indu - 1 |
214 |
ELSEIF (indu .EQ. -1) THEN |
ELSEIF (indu .EQ. -1) THEN |
215 |
C Append one to the current unlimited dim size |
C Append one to the current unlimited dim size |
216 |
CALL MNC_DIM_UNLIM_SIZE(myThid, fname, unlim_sz) |
CALL MNC_DIM_UNLIM_SIZE( fname, unlim_sz, myThid) |
217 |
udo(i) = unlim_sz |
udo(i) = unlim_sz |
218 |
ELSE |
ELSE |
219 |
C Use the current unlimited dim size |
C Use the current unlimited dim size |
220 |
CALL MNC_DIM_UNLIM_SIZE(myThid, fname, unlim_sz) |
CALL MNC_DIM_UNLIM_SIZE( fname, unlim_sz, myThid) |
221 |
udo(i) = unlim_sz - 1 |
udo(i) = unlim_sz - 1 |
222 |
ENDIF |
ENDIF |
223 |
ENDIF |
ENDIF |
235 |
CEH3 ENDDO |
CEH3 ENDDO |
236 |
|
|
237 |
C Add the global attributes |
C Add the global attributes |
238 |
CALL MNC_CW_SET_GATTR(myThid, fname, lbi,lbj, uniq_tnum) |
CALL MNC_CW_SET_GATTR( fname, lbi,lbj, uniq_tnum, myThid) |
239 |
|
|
240 |
C Add the per-variable attributes |
C Add the per-variable attributes |
241 |
DO i = 1,mnc_cw_vnat(1,indv) |
DO i = 1,mnc_cw_vnat(1,indv) |
242 |
CALL MNC_VAR_ADD_ATTR_STR(myThid, fname, vtype, |
CALL MNC_VAR_ADD_ATTR_STR( fname, vtype, |
243 |
& mnc_cw_vtnm(i,indv), mnc_cw_vtat(i,indv)) |
& mnc_cw_vtnm(i,indv), mnc_cw_vtat(i,indv), myThid) |
244 |
ENDDO |
ENDDO |
245 |
DO i = 1,mnc_cw_vnat(2,indv) |
DO i = 1,mnc_cw_vnat(2,indv) |
246 |
CALL MNC_VAR_ADD_ATTR_INT(myThid, fname, vtype, |
CALL MNC_VAR_ADD_ATTR_INT( fname, vtype, |
247 |
& mnc_cw_vinm(i,indv), 1, mnc_cw_viat(i,indv)) |
& mnc_cw_vinm(i,indv), 1, mnc_cw_viat(i,indv), myThid) |
248 |
ENDDO |
ENDDO |
249 |
DO i = 1,mnc_cw_vnat(3,indv) |
DO i = 1,mnc_cw_vnat(3,indv) |
250 |
CALL MNC_VAR_ADD_ATTR_DBL(myThid, fname, vtype, |
CALL MNC_VAR_ADD_ATTR_DBL( fname, vtype, |
251 |
& mnc_cw_vdnm(i,indv), 1, mnc_cw_vdat(i,indv)) |
& mnc_cw_vdnm(i,indv), 1, mnc_cw_vdat(i,indv), myThid) |
252 |
ENDDO |
ENDDO |
253 |
|
|
254 |
CALL MNC_FILE_ENDDEF(myThid,fname) |
CALL MNC_FILE_ENDDEF(fname, myThid) |
255 |
|
|
256 |
write(msgbuf,'(5a)') 'writing variable type ''', |
write(msgbuf,'(5a)') 'writing variable type ''', |
257 |
& vtype(nvf:nvl), ''' within file ''', |
& vtype(nvf:nvl), ''' within file ''', |
303 |
err = NF_PUT_VARA_INT(fid, idv, vstart, vcount, resh) |
err = NF_PUT_VARA_INT(fid, idv, vstart, vcount, resh) |
304 |
#endif |
#endif |
305 |
|
|
306 |
CALL MNC_HANDLE_ERR(myThid, err, msgbuf) |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
307 |
|
|
308 |
ENDDO |
ENDDO |
309 |
ENDDO |
ENDDO |
316 |
err = NF_SYNC(fid) |
err = NF_SYNC(fid) |
317 |
write(msgbuf,'(3a)') 'sync for file ''', fname, |
write(msgbuf,'(3a)') 'sync for file ''', fname, |
318 |
& ''' in S/R MNC_CW_RX_W_YY' |
& ''' in S/R MNC_CW_RX_W_YY' |
319 |
CALL MNC_HANDLE_ERR(myThid, err, msgbuf) |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
320 |
|
|
321 |
ENDDO |
ENDDO |
322 |
ENDDO |
ENDDO |
331 |
|
|
332 |
|
|
333 |
SUBROUTINE MNC_CW_RX_R_YY( |
SUBROUTINE MNC_CW_RX_R_YY( |
|
I myThid, |
|
334 |
I fbname, bi,bj, |
I fbname, bi,bj, |
335 |
I vtype, |
I vtype, |
336 |
I indu, |
I var, |
337 |
I var ) |
I myThid ) |
338 |
|
|
339 |
implicit none |
implicit none |
340 |
|
|
341 |
#include "netcdf.inc" |
#include "netcdf.inc" |
342 |
#include "mnc_common.h" |
#include "mnc_common.h" |
|
#include "EEPARAMS.h" |
|
343 |
#include "SIZE.h" |
#include "SIZE.h" |
344 |
|
#include "EEPARAMS.h" |
345 |
|
#include "PARAMS.h" |
346 |
|
|
347 |
#define mnc_rtype_YY |
#define mnc_rtype_YY |
348 |
|
|
359 |
integer bis,bie, bjs,bje, uniq_tnum, nfname, fid, idv |
integer bis,bie, bjs,bje, uniq_tnum, nfname, fid, idv |
360 |
integer ndim, indf, err, lbi,lbj, bidim,bjdim, unlim_sz, kr |
integer ndim, indf, err, lbi,lbj, bidim,bjdim, unlim_sz, kr |
361 |
integer ind_fv_ids, ind_vt, ierr, atype, alen |
integer ind_fv_ids, ind_vt, ierr, atype, alen |
362 |
integer f_sNx,f_sNy, ires |
integer f_sNx,f_sNy, npath |
363 |
integer p(9),s(9),e(9), vstart(9),vcount(9), udo(9) |
integer p(9),s(9),e(9), vstart(9),vcount(9), udo(9) |
364 |
integer j1,j2,j3,j4,j5,j6,j7, k1,k2,k3,k4,k5,k6,k7 |
integer j1,j2,j3,j4,j5,j6,j7, k1,k2,k3,k4,k5,k6,k7 |
365 |
character*(MAX_LEN_MBUF) msgbuf |
character*(MAX_LEN_MBUF) msgbuf |
366 |
character*(MNC_MAX_CHAR) fname |
character*(MNC_MAX_CHAR) fname |
367 |
|
character*(MNC_MAX_CHAR) path_fname |
368 |
|
integer indfg, fg1,fg2 |
369 |
|
|
370 |
C Temporary storage for the simultaneous type conversion and |
C Temporary storage for the simultaneous type conversion and |
371 |
C re-shaping before passing to NetCDF |
C re-shaping before passing to NetCDF |
382 |
C Only do I/O if I am the master thread |
C Only do I/O if I am the master thread |
383 |
_BEGIN_MASTER( myThid ) |
_BEGIN_MASTER( myThid ) |
384 |
|
|
385 |
|
C Get the current index for the unlimited dimension from the file |
386 |
|
C group (or base) name |
387 |
|
fg1 = IFNBLNK(fbname) |
388 |
|
fg2 = ILNBLNK(fbname) |
389 |
|
CALL MNC_GET_IND(MNC_MAX_ID, fbname, mnc_cw_fgnm, indfg, myThid) |
390 |
|
IF (indfg .LT. 1) THEN |
391 |
|
write(msgbuf,'(3a)') |
392 |
|
& 'MNC_CW_RX_W_YY ERROR: file group name ''', |
393 |
|
& fbname(fg1:fg2), ''' is not defined' |
394 |
|
CALL print_error(msgbuf, mythid) |
395 |
|
STOP 'ABNORMAL END: S/R MNC_CW_RX_W_YY' |
396 |
|
ENDIF |
397 |
|
indu = mnc_cw_fgud(indfg) |
398 |
|
|
399 |
C Check that the Variable Type exists |
C Check that the Variable Type exists |
400 |
nvf = IFNBLNK(vtype) |
nvf = IFNBLNK(vtype) |
401 |
nvl = ILNBLNK(vtype) |
nvl = ILNBLNK(vtype) |
402 |
CALL MNC_GET_IND(myThid, MNC_MAX_ID, vtype, mnc_cw_vname, ind_vt) |
CALL MNC_GET_IND( MNC_MAX_ID, vtype, mnc_cw_vname, ind_vt, myThid) |
403 |
IF (ind_vt .LT. 1) THEN |
IF (ind_vt .LT. 1) THEN |
404 |
write(msgbuf,'(3a)') 'MNC_CW_RX_R_YY ERROR: vtype ''', |
write(msgbuf,'(3a)') 'MNC_CW_RX_R_YY ERROR: vtype ''', |
405 |
& vtype(nvf:nvl), ''' is not defined' |
& vtype(nvf:nvl), ''' is not defined' |
430 |
DO lbi = bis,bie |
DO lbi = bis,bie |
431 |
|
|
432 |
C Create the file name |
C Create the file name |
433 |
CALL MNC_CW_GET_TILE_NUM(myThid, lbi,lbj, uniq_tnum) |
CALL MNC_CW_GET_TILE_NUM( lbi,lbj, uniq_tnum, myThid) |
434 |
fname(1:MNC_MAX_CHAR) = mnc_blank_name(1:MNC_MAX_CHAR) |
fname(1:MNC_MAX_CHAR) = mnc_blank_name(1:MNC_MAX_CHAR) |
435 |
n1 = IFNBLNK(fbname) |
n1 = IFNBLNK(fbname) |
436 |
n2 = ILNBLNK(fbname) |
n2 = ILNBLNK(fbname) |
441 |
write(fname((ntot+1):(ntot+9)),'(i6.6,a3)') uniq_tnum, '.nc' |
write(fname((ntot+1):(ntot+9)),'(i6.6,a3)') uniq_tnum, '.nc' |
442 |
nfname = ntot+9 |
nfname = ntot+9 |
443 |
|
|
444 |
|
C Add the path to the file name |
445 |
|
IF (mnc_use_indir) THEN |
446 |
|
path_fname(1:MNC_MAX_CHAR) = mnc_blank_name(1:MNC_MAX_CHAR) |
447 |
|
npath = ILNBLNK(mnc_indir_str) |
448 |
|
path_fname(1:npath) = mnc_indir_str(1:npath) |
449 |
|
path_fname((npath+1):(npath+nfname)) = fname(1:nfname) |
450 |
|
fname(1:MNC_MAX_CHAR) = path_fname(1:MNC_MAX_CHAR) |
451 |
|
nfname = npath + nfname |
452 |
|
ENDIF |
453 |
|
|
454 |
C Open the existing file |
C Open the existing file |
455 |
CALL MNC_FILE_TRY_READ(myThid, fname, ierr, indf) |
CALL MNC_FILE_TRY_READ( fname, ierr, indf, myThid) |
456 |
|
|
457 |
C Check that the variable (VType) is defined within the file |
C Check that the variable (VType) is defined within the file |
458 |
CALL MNC_GET_FVINDS(myThid, fname, vtype, indf, ind_fv_ids) |
CALL MNC_GET_FVINDS( fname, vtype, indf, ind_fv_ids, myThid) |
459 |
IF ((indf .LT. 1) .OR. (ind_fv_ids .LT. 1)) THEN |
IF ((indf .LT. 1) .OR. (ind_fv_ids .LT. 1)) THEN |
460 |
write(msgbuf,'(4a)') 'MNC_CW_RX_R_YY ERROR: vtype ''', |
write(msgbuf,'(4a)') 'MNC_CW_RX_R_YY ERROR: vtype ''', |
461 |
& vtype(nvf:nvl), ''' is not defined within file ''', |
& vtype(nvf:nvl), ''' is not defined within file ''', |
473 |
err = NF_INQ_ATT(fid,NF_GLOBAL, 'sNx',atype,alen) |
err = NF_INQ_ATT(fid,NF_GLOBAL, 'sNx',atype,alen) |
474 |
IF ((err .EQ. NF_NOERR) .AND. (alen .EQ. 1)) THEN |
IF ((err .EQ. NF_NOERR) .AND. (alen .EQ. 1)) THEN |
475 |
err = NF_GET_ATT_INT(fid, NF_GLOBAL, 'sNx', f_sNx) |
err = NF_GET_ATT_INT(fid, NF_GLOBAL, 'sNx', f_sNx) |
476 |
CALL MNC_HANDLE_ERR(myThid, err, |
CALL MNC_HANDLE_ERR(err, |
477 |
& 'reading attribute ''sNx'' in S/R MNC_CW_RX_R_YY') |
& 'reading attribute ''sNx'' in S/R MNC_CW_RX_R_YY', |
478 |
|
& myThid) |
479 |
ENDIF |
ENDIF |
480 |
err = NF_INQ_ATT(fid,NF_GLOBAL, 'sNy',atype,alen) |
err = NF_INQ_ATT(fid,NF_GLOBAL, 'sNy',atype,alen) |
481 |
IF ((err .EQ. NF_NOERR) .AND. (alen .EQ. 1)) THEN |
IF ((err .EQ. NF_NOERR) .AND. (alen .EQ. 1)) THEN |
482 |
err = NF_GET_ATT_INT(fid, NF_GLOBAL, 'sNy', f_sNy) |
err = NF_GET_ATT_INT(fid, NF_GLOBAL, 'sNy', f_sNy) |
483 |
CALL MNC_HANDLE_ERR(myThid, err, |
CALL MNC_HANDLE_ERR(err, |
484 |
& 'reading attribute ''sNy'' in S/R MNC_CW_RX_R_YY') |
& 'reading attribute ''sNy'' in S/R MNC_CW_RX_R_YY', |
485 |
|
& myThid) |
486 |
ENDIF |
ENDIF |
487 |
IF ((f_sNx .NE. sNx) .OR. (f_sNy .NE. sNy)) THEN |
IF ((f_sNx .NE. sNx) .OR. (f_sNy .NE. sNy)) THEN |
488 |
write(msgbuf,'(5a)') 'MNC_CW_RX_R_YY WARNING: the ', |
write(msgbuf,'(5a)') 'MNC_CW_RX_R_YY WARNING: the ', |
495 |
C Check that the in-memory variable and the in-file variables |
C Check that the in-memory variable and the in-file variables |
496 |
C are of compatible sizes |
C are of compatible sizes |
497 |
C ires = 1 |
C ires = 1 |
498 |
C CALL MNC_CHK_VTYP_R_NCVAR(myThid, ind_vt, |
C CALL MNC_CHK_VTYP_R_NCVAR( ind_vt, |
499 |
C & indf, ind_fv_ids, indu, ires) |
C & indf, ind_fv_ids, indu, ires) |
500 |
C IF (ires .LT. 0) THEN |
C IF (ires .LT. 0) THEN |
501 |
C write(msgbuf,'(7a)') 'MNC_CW_RX_R_YY WARNING: the sizes ', |
C write(msgbuf,'(7a)') 'MNC_CW_RX_R_YY WARNING: the sizes ', |
551 |
udo(i) = indu - 1 |
udo(i) = indu - 1 |
552 |
ELSEIF (indu .EQ. -1) THEN |
ELSEIF (indu .EQ. -1) THEN |
553 |
C Append one to the current unlimited dim size |
C Append one to the current unlimited dim size |
554 |
CALL MNC_DIM_UNLIM_SIZE(myThid, fname, unlim_sz) |
CALL MNC_DIM_UNLIM_SIZE( fname, unlim_sz, myThid) |
555 |
udo(i) = unlim_sz |
udo(i) = unlim_sz |
556 |
ELSE |
ELSE |
557 |
C Use the current unlimited dim size |
C Use the current unlimited dim size |
558 |
CALL MNC_DIM_UNLIM_SIZE(myThid, fname, unlim_sz) |
CALL MNC_DIM_UNLIM_SIZE( fname, unlim_sz, myThid) |
559 |
udo(i) = unlim_sz - 1 |
udo(i) = unlim_sz - 1 |
560 |
ENDIF |
ENDIF |
561 |
ENDIF |
ENDIF |
573 |
C write(*,*) 'i,p(i),s(i),e(i) = ', i,': ',p(i),s(i),e(i) |
C write(*,*) 'i,p(i),s(i),e(i) = ', i,': ',p(i),s(i),e(i) |
574 |
C ENDDO |
C ENDDO |
575 |
|
|
576 |
CALL MNC_FILE_ENDDEF(myThid,fname) |
CALL MNC_FILE_ENDDEF(fname, myThid) |
577 |
|
|
578 |
write(msgbuf,'(5a)') 'reading variable type ''', |
write(msgbuf,'(5a)') 'reading variable type ''', |
579 |
& vtype(nvf:nvl), ''' within file ''', |
& vtype(nvf:nvl), ''' within file ''', |
618 |
err = NF_GET_VARA_INT(fid, idv, vstart, vcount, resh) |
err = NF_GET_VARA_INT(fid, idv, vstart, vcount, resh) |
619 |
#endif |
#endif |
620 |
|
|
621 |
CALL MNC_HANDLE_ERR(myThid, err, msgbuf) |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
622 |
|
|
623 |
kr = 0 |
kr = 0 |
624 |
DO j1 = s(1),e(1) |
DO j1 = s(1),e(1) |
636 |
ENDDO |
ENDDO |
637 |
|
|
638 |
C Close the file |
C Close the file |
639 |
CALL MNC_FILE_CLOSE(myThid, fname) |
CALL MNC_FILE_CLOSE(fname, myThid) |
640 |
|
|
641 |
C End the lbj,lbi loops |
C End the lbj,lbi loops |
642 |
ENDDO |
ENDDO |