115 |
path_fname(1:MNC_MAX_CHAR) = mnc_blank_name(1:MNC_MAX_CHAR) |
path_fname(1:MNC_MAX_CHAR) = mnc_blank_name(1:MNC_MAX_CHAR) |
116 |
npath = ILNBLNK(mnc_out_path) |
npath = ILNBLNK(mnc_out_path) |
117 |
path_fname(1:npath) = mnc_out_path(1:npath) |
path_fname(1:npath) = mnc_out_path(1:npath) |
118 |
path_fname((npath+1):(npath+1+nfname)) = fname(1:nfname) |
path_fname((npath+1):(npath+nfname)) = fname(1:nfname) |
119 |
fname(1:MNC_MAX_CHAR) = path_fname(1:MNC_MAX_CHAR) |
fname(1:MNC_MAX_CHAR) = path_fname(1:MNC_MAX_CHAR) |
120 |
nfname = npath + 1 + nfname |
nfname = npath + nfname |
121 |
ENDIF |
ENDIF |
122 |
|
|
123 |
C Append to an existing or create a new file |
C Append to an existing or create a new file |
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 |
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 |
integer indfg, fg1,fg2 |
369 |
|
|
370 |
C Temporary storage for the simultaneous type conversion and |
C Temporary storage for the simultaneous type conversion and |
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( fname, ierr, indf, myThid) |
CALL MNC_FILE_TRY_READ( fname, ierr, indf, myThid) |
456 |
|
|