4 |
#include "MNC_OPTIONS.h" |
#include "MNC_OPTIONS.h" |
5 |
|
|
6 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
7 |
|
CBOP |
8 |
|
C !ROUTINE: MNC_CW_RX_W |
9 |
|
|
10 |
SUBROUTINE MNC_CW_RX_W_YY( |
C !INTERFACE: |
11 |
|
SUBROUTINE MNC_CW_RX_W( |
12 |
|
I stype, |
13 |
I fbname, bi,bj, |
I fbname, bi,bj, |
14 |
I vtype, |
I vtype, |
15 |
I var, |
I var, |
16 |
I myThid ) |
I myThid ) |
17 |
|
|
18 |
|
C !DESCRIPTION: |
19 |
|
C This subroutine writes one variable to a file or a file group, |
20 |
|
C depending upon the tile indicies. |
21 |
|
|
22 |
|
C !USES: |
23 |
implicit none |
implicit none |
|
|
|
24 |
#include "netcdf.inc" |
#include "netcdf.inc" |
25 |
#include "mnc_common.h" |
#include "mnc_common.h" |
26 |
#include "SIZE.h" |
#include "SIZE.h" |
27 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
28 |
#include "PARAMS.h" |
#include "PARAMS.h" |
29 |
|
|
30 |
#define mnc_rtype_YY |
C !INPUT PARAMETERS: |
|
|
|
|
C Arguments |
|
31 |
integer myThid, bi,bj, indu |
integer myThid, bi,bj, indu |
32 |
character*(*) fbname, vtype |
character*(*) stype, fbname, vtype |
33 |
__V var(*) |
__V var(*) |
34 |
|
|
35 |
C Functions |
C !LOCAL VARIABLES: |
|
integer IFNBLNK, ILNBLNK |
|
|
|
|
|
C Local Variables |
|
36 |
integer i,j,k, indv,nvf,nvl, n1,n2, igrid, ntot |
integer i,j,k, indv,nvf,nvl, n1,n2, igrid, ntot |
37 |
integer bis,bie, bjs,bje, uniq_tnum, nfname, fid, idv, indvids |
integer bis,bie, bjs,bje, uniq_tnum, nfname |
38 |
integer ndim, indf, err, lbi,lbj, bidim,bjdim, unlim_sz, kr |
integer fid, idv, indvids, ndim, indf, err, |
39 |
integer p(9),s(9),e(9), dimnc(9), vstart(9),vcount(9), udo(9) |
integer lbi,lbj, bidim,bjdim, unlim_sz, kr |
40 |
|
integer p(9),s(9),e(9), dimnc(9) |
41 |
|
integer vstart(9),vcount(9), udo(9) |
42 |
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 |
43 |
integer indfg, fg1,fg2, npath |
integer indfg, fg1,fg2, npath |
44 |
character*(MAX_LEN_MBUF) msgbuf |
character*(MAX_LEN_MBUF) msgbuf |
45 |
character*(MNC_MAX_CHAR) fname |
character*(MNC_MAX_CHAR) fname |
46 |
character*(MNC_MAX_CHAR) path_fname |
character*(MNC_MAX_CHAR) path_fname |
47 |
|
REAL*8 resh_d( sNx + 2*OLx + sNy + 2*OLy ) |
48 |
C Temporary storage for the simultaneous type conversion and |
REAL*4 resh_r( sNx + 2*OLx + sNy + 2*OLy ) |
49 |
C re-shaping before passing to NetCDF |
INTEGER resh_i( sNx + 2*OLx + sNy + 2*OLy ) |
50 |
#ifdef mnc_rtype_D |
CEOP |
51 |
REAL*8 resh( sNx + 2*OLx + sNy + 2*OLy ) |
C Functions |
52 |
#endif |
integer IFNBLNK, ILNBLNK |
|
#ifdef mnc_rtype_R |
|
|
REAL*4 resh( sNx + 2*OLx + sNy + 2*OLy ) |
|
|
#endif |
|
|
#ifdef mnc_rtype_I |
|
|
INTEGER resh( sNx + 2*OLx + sNy + 2*OLy ) |
|
|
#endif |
|
53 |
|
|
54 |
C Only do I/O if I am the master thread |
C Only do I/O if I am the master thread |
55 |
_BEGIN_MASTER( myThid ) |
_BEGIN_MASTER( myThid ) |
61 |
CALL MNC_GET_IND(MNC_MAX_ID, fbname, mnc_cw_fgnm, indfg, myThid) |
CALL MNC_GET_IND(MNC_MAX_ID, fbname, mnc_cw_fgnm, indfg, myThid) |
62 |
IF (indfg .LT. 1) THEN |
IF (indfg .LT. 1) THEN |
63 |
write(msgbuf,'(3a)') |
write(msgbuf,'(3a)') |
64 |
& 'MNC_CW_RX_W_YY ERROR: file group name ''', |
& 'MNC_CW_RX_W ERROR: file group name ''', |
65 |
& fbname(fg1:fg2), ''' is not defined' |
& fbname(fg1:fg2), ''' is not defined' |
66 |
CALL print_error(msgbuf, mythid) |
CALL print_error(msgbuf, mythid) |
67 |
STOP 'ABNORMAL END: S/R MNC_CW_RX_W_YY' |
STOP 'ABNORMAL END: S/R MNC_CW_RX_W' |
68 |
ENDIF |
ENDIF |
69 |
indu = mnc_cw_fgud(indfg) |
indu = mnc_cw_fgud(indfg) |
70 |
|
|
73 |
nvl = ILNBLNK(vtype) |
nvl = ILNBLNK(vtype) |
74 |
CALL MNC_GET_IND(MNC_MAX_ID, vtype, mnc_cw_vname, indv, myThid) |
CALL MNC_GET_IND(MNC_MAX_ID, vtype, mnc_cw_vname, indv, myThid) |
75 |
IF (indv .LT. 1) THEN |
IF (indv .LT. 1) THEN |
76 |
write(msgbuf,'(3a)') 'MNC_CW_RX_W_YY ERROR: vtype ''', |
write(msgbuf,'(3a)') 'MNC_CW_RX_W ERROR: vtype ''', |
77 |
& vtype(nvf:nvl), ''' is not defined' |
& vtype(nvf:nvl), ''' is not defined' |
78 |
CALL print_error(msgbuf, mythid) |
CALL print_error(msgbuf, mythid) |
79 |
STOP 'ABNORMAL END: S/R MNC_CW_RX_W_YY' |
STOP 'ABNORMAL END: S/R MNC_CW_RX_W' |
80 |
ENDIF |
ENDIF |
81 |
igrid = mnc_cw_vgind(indv) |
igrid = mnc_cw_vgind(indv) |
82 |
|
|
143 |
& mnc_cw_ndim(igrid), mnc_cw_dn(1,igrid), myThid) |
& mnc_cw_ndim(igrid), mnc_cw_dn(1,igrid), myThid) |
144 |
|
|
145 |
C Ensure that the variable is defined |
C Ensure that the variable is defined |
146 |
#ifdef mnc_rtype_D |
IF (stype(1:1) .EQ. 'D') |
147 |
CALL MNC_VAR_INIT_DBL(fname,mnc_cw_gname(igrid),vtype, myThid) |
& CALL MNC_VAR_INIT_DBL( |
148 |
#endif |
& fname, mnc_cw_gname(igrid), vtype, myThid) |
149 |
#ifdef mnc_rtype_R |
IF (stype(1:1) .EQ. 'R') |
150 |
CALL MNC_VAR_INIT_REAL(fname,mnc_cw_gname(igrid),vtype, myThid) |
& CALL MNC_VAR_INIT_REAL( |
151 |
#endif |
& fname, mnc_cw_gname(igrid), vtype, myThid) |
152 |
#ifdef mnc_rtype_I |
IF (stype(1:1) .EQ. 'I') |
153 |
CALL MNC_VAR_INIT_INT(fname,mnc_cw_gname(igrid),vtype, myThid) |
& CALL MNC_VAR_INIT_INT( |
154 |
#endif |
& fname, mnc_cw_gname(igrid), vtype, myThid) |
155 |
|
|
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) |
158 |
IF (mnc_v_names(mnc_fv_ids(indf,j)) .EQ. vtype) THEN |
IF (mnc_v_names(mnc_fv_ids(indf,j)) .EQ. vtype) THEN |
162 |
GOTO 10 |
GOTO 10 |
163 |
ENDIF |
ENDIF |
164 |
ENDDO |
ENDDO |
165 |
write(msgbuf,'(4a)') 'MNC_MNC_CW_RX_W_YY ERROR: ', |
write(msgbuf,'(4a)') 'MNC_MNC_CW_RX_W ERROR: ', |
166 |
& 'cannot reference variable ''', vtype, '''' |
& 'cannot reference variable ''', vtype, '''' |
167 |
CALL print_error(msgbuf, mythid) |
CALL print_error(msgbuf, mythid) |
168 |
STOP 'ABNORMAL END: package MNC' |
STOP 'ABNORMAL END: package MNC' |
284 |
vcount(2) = 1 |
vcount(2) = 1 |
285 |
|
|
286 |
kr = 0 |
kr = 0 |
|
DO j1 = s(1),e(1) |
|
|
k1 = k2 + j1 |
|
|
kr = kr + 1 |
|
|
resh(kr) = var(k1) |
|
|
ENDDO |
|
|
|
|
287 |
vstart(1) = udo(1) + 1 |
vstart(1) = udo(1) + 1 |
288 |
vcount(1) = e(1) - s(1) + 1 |
vcount(1) = e(1) - s(1) + 1 |
289 |
|
|
290 |
#ifdef mnc_rtype_D |
IF (stype(1:1) .EQ. 'D') THEN |
291 |
err = NF_PUT_VARA_DOUBLE(fid, idv, vstart, vcount, resh) |
DO j1 = s(1),e(1) |
292 |
#endif |
k1 = k2 + j1 |
293 |
#ifdef mnc_rtype_R |
kr = kr + 1 |
294 |
err = NF_PUT_VARA_REAL(fid, idv, vstart, vcount, resh) |
resh_d(kr) = var(k1) |
295 |
#endif |
ENDDO |
296 |
#ifdef mnc_rtype_I |
err = NF_PUT_VARA_DOUBLE(fid, idv, vstart, vcount, resh_d) |
297 |
err = NF_PUT_VARA_INT(fid, idv, vstart, vcount, resh) |
ENDIF |
298 |
#endif |
IF (stype(1:1) .EQ. 'R') THEN |
299 |
|
DO j1 = s(1),e(1) |
300 |
|
k1 = k2 + j1 |
301 |
|
kr = kr + 1 |
302 |
|
resh_r(kr) = var(k1) |
303 |
|
ENDDO |
304 |
|
err = NF_PUT_VARA_REAL(fid, idv, vstart, vcount, resh_r) |
305 |
|
ENDIF |
306 |
|
IF (stype(1:1) .EQ. 'I') THEN |
307 |
|
DO j1 = s(1),e(1) |
308 |
|
k1 = k2 + j1 |
309 |
|
kr = kr + 1 |
310 |
|
resh_i(kr) = var(k1) |
311 |
|
ENDDO |
312 |
|
err = NF_PUT_VARA_INT(fid, idv, vstart, vcount, resh_i) |
313 |
|
ENDIF |
314 |
|
|
315 |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
316 |
|
|
324 |
C Sync the file |
C Sync the file |
325 |
err = NF_SYNC(fid) |
err = NF_SYNC(fid) |
326 |
write(msgbuf,'(3a)') 'sync for file ''', fname, |
write(msgbuf,'(3a)') 'sync for file ''', fname, |
327 |
& ''' in S/R MNC_CW_RX_W_YY' |
& ''' in S/R MNC_CW_RX_W' |
328 |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
329 |
|
|
330 |
ENDDO |
ENDDO |
337 |
|
|
338 |
|
|
339 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
340 |
|
CBOP |
341 |
|
C !ROUTINE: MNC_CW_RX_R |
342 |
|
|
343 |
|
C !INTERFACE: |
344 |
SUBROUTINE MNC_CW_RX_R_YY( |
SUBROUTINE MNC_CW_RX_R( |
345 |
|
I stype, |
346 |
I fbname, bi,bj, |
I fbname, bi,bj, |
347 |
I vtype, |
I vtype, |
348 |
I var, |
I var, |
350 |
|
|
351 |
implicit none |
implicit none |
352 |
|
|
353 |
|
C !DESCRIPTION: |
354 |
|
C This subroutine reads one variable from a file or a file group, |
355 |
|
C depending upon the tile indicies. |
356 |
|
|
357 |
|
C !USES: |
358 |
#include "netcdf.inc" |
#include "netcdf.inc" |
359 |
#include "mnc_common.h" |
#include "mnc_common.h" |
360 |
#include "SIZE.h" |
#include "SIZE.h" |
361 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
362 |
#include "PARAMS.h" |
#include "PARAMS.h" |
363 |
|
|
364 |
#define mnc_rtype_YY |
C !INPUT PARAMETERS: |
|
|
|
|
C Arguments |
|
365 |
integer myThid, bi,bj, indu |
integer myThid, bi,bj, indu |
366 |
character*(*) fbname, vtype |
character*(*) stype, fbname, vtype |
367 |
__V var(*) |
__V var(*) |
368 |
|
|
369 |
C Functions |
C !LOCAL VARIABLES: |
|
integer IFNBLNK, ILNBLNK |
|
|
|
|
|
C Local Variables |
|
370 |
integer i,k, nvf,nvl, n1,n2, igrid, ntot |
integer i,k, nvf,nvl, n1,n2, igrid, ntot |
371 |
integer bis,bie, bjs,bje, uniq_tnum, nfname, fid, idv |
integer bis,bie, bjs,bje, uniq_tnum, nfname, fid, idv |
372 |
integer ndim, indf, err, lbi,lbj, bidim,bjdim, unlim_sz, kr |
integer ndim, indf, err, lbi,lbj, bidim,bjdim, unlim_sz, kr |
378 |
character*(MNC_MAX_CHAR) fname |
character*(MNC_MAX_CHAR) fname |
379 |
character*(MNC_MAX_CHAR) path_fname |
character*(MNC_MAX_CHAR) path_fname |
380 |
integer indfg, fg1,fg2 |
integer indfg, fg1,fg2 |
381 |
|
REAL*8 resh_d( sNx + 2*OLx + sNy + 2*OLy ) |
382 |
C Temporary storage for the simultaneous type conversion and |
REAL*4 resh_r( sNx + 2*OLx + sNy + 2*OLy ) |
383 |
C re-shaping before passing to NetCDF |
INTEGER resh_i( sNx + 2*OLx + sNy + 2*OLy ) |
384 |
#ifdef mnc_rtype_D |
CEOP |
385 |
REAL*8 resh( sNx + 2*OLx + sNy + 2*OLy ) |
C Functions |
386 |
#endif |
integer IFNBLNK, ILNBLNK |
|
#ifdef mnc_rtype_R |
|
|
REAL*4 resh( sNx + 2*OLx + sNy + 2*OLy ) |
|
|
#endif |
|
|
#ifdef mnc_rtype_I |
|
|
INTEGER resh( sNx + 2*OLx + sNy + 2*OLy ) |
|
|
#endif |
|
387 |
|
|
388 |
C Only do I/O if I am the master thread |
C Only do I/O if I am the master thread |
389 |
_BEGIN_MASTER( myThid ) |
_BEGIN_MASTER( myThid ) |
395 |
CALL MNC_GET_IND(MNC_MAX_ID, fbname, mnc_cw_fgnm, indfg, myThid) |
CALL MNC_GET_IND(MNC_MAX_ID, fbname, mnc_cw_fgnm, indfg, myThid) |
396 |
IF (indfg .LT. 1) THEN |
IF (indfg .LT. 1) THEN |
397 |
write(msgbuf,'(3a)') |
write(msgbuf,'(3a)') |
398 |
& 'MNC_CW_RX_W_YY ERROR: file group name ''', |
& 'MNC_CW_RX_W ERROR: file group name ''', |
399 |
& fbname(fg1:fg2), ''' is not defined' |
& fbname(fg1:fg2), ''' is not defined' |
400 |
CALL print_error(msgbuf, mythid) |
CALL print_error(msgbuf, mythid) |
401 |
STOP 'ABNORMAL END: S/R MNC_CW_RX_W_YY' |
STOP 'ABNORMAL END: S/R MNC_CW_RX_W' |
402 |
ENDIF |
ENDIF |
403 |
indu = mnc_cw_fgud(indfg) |
indu = mnc_cw_fgud(indfg) |
404 |
|
|
407 |
nvl = ILNBLNK(vtype) |
nvl = ILNBLNK(vtype) |
408 |
CALL MNC_GET_IND( MNC_MAX_ID, vtype, mnc_cw_vname, ind_vt, myThid) |
CALL MNC_GET_IND( MNC_MAX_ID, vtype, mnc_cw_vname, ind_vt, myThid) |
409 |
IF (ind_vt .LT. 1) THEN |
IF (ind_vt .LT. 1) THEN |
410 |
write(msgbuf,'(3a)') 'MNC_CW_RX_R_YY ERROR: vtype ''', |
write(msgbuf,'(3a)') 'MNC_CW_RX_R ERROR: vtype ''', |
411 |
& vtype(nvf:nvl), ''' is not defined' |
& vtype(nvf:nvl), ''' is not defined' |
412 |
CALL print_error(msgbuf, mythid) |
CALL print_error(msgbuf, mythid) |
413 |
STOP 'ABNORMAL END: S/R MNC_CW_RX_R_YY' |
STOP 'ABNORMAL END: S/R MNC_CW_RX_R' |
414 |
ENDIF |
ENDIF |
415 |
igrid = mnc_cw_vgind(ind_vt) |
igrid = mnc_cw_vgind(ind_vt) |
416 |
|
|
463 |
C Check that the variable (VType) is defined within the file |
C Check that the variable (VType) is defined within the file |
464 |
CALL MNC_GET_FVINDS( fname, vtype, indf, ind_fv_ids, myThid) |
CALL MNC_GET_FVINDS( fname, vtype, indf, ind_fv_ids, myThid) |
465 |
IF ((indf .LT. 1) .OR. (ind_fv_ids .LT. 1)) THEN |
IF ((indf .LT. 1) .OR. (ind_fv_ids .LT. 1)) THEN |
466 |
write(msgbuf,'(4a)') 'MNC_CW_RX_R_YY ERROR: vtype ''', |
write(msgbuf,'(4a)') 'MNC_CW_RX_R ERROR: vtype ''', |
467 |
& vtype(nvf:nvl), ''' is not defined within file ''', |
& vtype(nvf:nvl), ''' is not defined within file ''', |
468 |
& fname(1:nfname) |
& fname(1:nfname) |
469 |
CALL print_error(msgbuf, mythid) |
CALL print_error(msgbuf, mythid) |
470 |
STOP 'ABNORMAL END: S/R MNC_CW_RX_R_YY' |
STOP 'ABNORMAL END: S/R MNC_CW_RX_R' |
471 |
ENDIF |
ENDIF |
472 |
fid = mnc_f_info(indf,2) |
fid = mnc_f_info(indf,2) |
473 |
idv = mnc_fv_ids(indf,ind_fv_ids+1) |
idv = mnc_fv_ids(indf,ind_fv_ids+1) |
480 |
IF ((err .EQ. NF_NOERR) .AND. (alen .EQ. 1)) THEN |
IF ((err .EQ. NF_NOERR) .AND. (alen .EQ. 1)) THEN |
481 |
err = NF_GET_ATT_INT(fid, NF_GLOBAL, 'sNx', f_sNx) |
err = NF_GET_ATT_INT(fid, NF_GLOBAL, 'sNx', f_sNx) |
482 |
CALL MNC_HANDLE_ERR(err, |
CALL MNC_HANDLE_ERR(err, |
483 |
& 'reading attribute ''sNx'' in S/R MNC_CW_RX_R_YY', |
& 'reading attribute ''sNx'' in S/R MNC_CW_RX_R', |
484 |
& myThid) |
& myThid) |
485 |
ENDIF |
ENDIF |
486 |
err = NF_INQ_ATT(fid,NF_GLOBAL, 'sNy',atype,alen) |
err = NF_INQ_ATT(fid,NF_GLOBAL, 'sNy',atype,alen) |
487 |
IF ((err .EQ. NF_NOERR) .AND. (alen .EQ. 1)) THEN |
IF ((err .EQ. NF_NOERR) .AND. (alen .EQ. 1)) THEN |
488 |
err = NF_GET_ATT_INT(fid, NF_GLOBAL, 'sNy', f_sNy) |
err = NF_GET_ATT_INT(fid, NF_GLOBAL, 'sNy', f_sNy) |
489 |
CALL MNC_HANDLE_ERR(err, |
CALL MNC_HANDLE_ERR(err, |
490 |
& 'reading attribute ''sNy'' in S/R MNC_CW_RX_R_YY', |
& 'reading attribute ''sNy'' in S/R MNC_CW_RX_R', |
491 |
& myThid) |
& myThid) |
492 |
ENDIF |
ENDIF |
493 |
IF ((f_sNx .NE. sNx) .OR. (f_sNy .NE. sNy)) THEN |
IF ((f_sNx .NE. sNx) .OR. (f_sNy .NE. sNy)) THEN |
494 |
write(msgbuf,'(5a)') 'MNC_CW_RX_R_YY WARNING: the ', |
write(msgbuf,'(5a)') 'MNC_CW_RX_R WARNING: the ', |
495 |
& 'attributes ''sNx'' and ''sNy'' within the file ''', |
& 'attributes ''sNx'' and ''sNy'' within the file ''', |
496 |
& fname(1:nfname), ''' do not exist or do not match ', |
& fname(1:nfname), ''' do not exist or do not match ', |
497 |
& 'the current sizes within the model' |
& 'the current sizes within the model' |
504 |
C CALL MNC_CHK_VTYP_R_NCVAR( ind_vt, |
C CALL MNC_CHK_VTYP_R_NCVAR( ind_vt, |
505 |
C & indf, ind_fv_ids, indu, ires) |
C & indf, ind_fv_ids, indu, ires) |
506 |
C IF (ires .LT. 0) THEN |
C IF (ires .LT. 0) THEN |
507 |
C write(msgbuf,'(7a)') 'MNC_CW_RX_R_YY WARNING: the sizes ', |
C write(msgbuf,'(7a)') 'MNC_CW_RX_R WARNING: the sizes ', |
508 |
C & 'of the in-program variable ''', vtype(nvf:nvl), |
C & 'of the in-program variable ''', vtype(nvf:nvl), |
509 |
C & ''' and the corresponding variable within file ''', |
C & ''' and the corresponding variable within file ''', |
510 |
C & fname(1:nfname), ''' are not compatible -- please ', |
C & fname(1:nfname), ''' are not compatible -- please ', |
511 |
C & 'check the sizes' |
C & 'check the sizes' |
512 |
C CALL print_error(msgbuf, mythid) |
C CALL print_error(msgbuf, mythid) |
513 |
C STOP 'ABNORMAL END: S/R MNC_CW_RX_R_YY' |
C STOP 'ABNORMAL END: S/R MNC_CW_RX_R' |
514 |
C ENDIF |
C ENDIF |
515 |
|
|
516 |
C Check for bi,bj indicies |
C Check for bi,bj indicies |
611 |
vstart(2) = udo(2) + j2 - s(2) + 1 |
vstart(2) = udo(2) + j2 - s(2) + 1 |
612 |
vcount(2) = 1 |
vcount(2) = 1 |
613 |
|
|
614 |
|
kr = 0 |
615 |
vstart(1) = udo(1) + 1 |
vstart(1) = udo(1) + 1 |
616 |
vcount(1) = e(1) - s(1) + 1 |
vcount(1) = e(1) - s(1) + 1 |
617 |
|
|
618 |
#ifdef mnc_rtype_D |
IF (stype(1:1) .EQ. 'D') THEN |
619 |
err = NF_GET_VARA_DOUBLE(fid, idv, vstart, vcount, resh) |
err = NF_GET_VARA_DOUBLE(fid, idv, vstart, vcount, resh_d) |
620 |
#endif |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
621 |
#ifdef mnc_rtype_R |
DO j1 = s(1),e(1) |
622 |
err = NF_GET_VARA_REAL(fid, idv, vstart, vcount, resh) |
k1 = k2 + j1 |
623 |
#endif |
kr = kr + 1 |
624 |
#ifdef mnc_rtype_I |
var(k1) = resh_d(kr) |
625 |
err = NF_GET_VARA_INT(fid, idv, vstart, vcount, resh) |
ENDDO |
626 |
#endif |
ENDIF |
627 |
|
IF (stype(1:1) .EQ. 'R') THEN |
628 |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
err = NF_GET_VARA_REAL(fid, idv, vstart, vcount, resh_r) |
629 |
|
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
630 |
|
DO j1 = s(1),e(1) |
631 |
|
k1 = k2 + j1 |
632 |
|
kr = kr + 1 |
633 |
|
var(k1) = resh_r(kr) |
634 |
|
ENDDO |
635 |
|
ENDIF |
636 |
|
IF (stype(1:1) .EQ. 'I') THEN |
637 |
|
err = NF_GET_VARA_INT(fid, idv, vstart, vcount, resh_i) |
638 |
|
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
639 |
|
DO j1 = s(1),e(1) |
640 |
|
k1 = k2 + j1 |
641 |
|
kr = kr + 1 |
642 |
|
var(k1) = resh_i(kr) |
643 |
|
ENDDO |
644 |
|
ENDIF |
645 |
|
|
|
kr = 0 |
|
|
DO j1 = s(1),e(1) |
|
|
k1 = k2 + j1 |
|
|
kr = kr + 1 |
|
|
var(k1) = resh(kr) |
|
|
ENDDO |
|
646 |
|
|
647 |
|
|
648 |
ENDDO |
ENDDO |