/[MITgcm]/MITgcm/pkg/mnc/mnc_cw_readwrite.template
ViewVC logotype

Diff of /MITgcm/pkg/mnc/mnc_cw_readwrite.template

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.24 by edhill, Fri Oct 22 21:30:31 2004 UTC revision 1.26 by edhill, Fri Dec 17 04:50:05 2004 UTC
# Line 207  C         Add the path to the file name Line 207  C         Add the path to the file name
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'
# Line 238  C           based on the byte count per Line 238  C           based on the byte count per
238                fsnu = (1.0 _d 0 + 1.0 _d 0 / DBLE(unlim_sz))                fsnu = (1.0 _d 0 + 1.0 _d 0 / DBLE(unlim_sz))
239       &             * DBLE(nbytes)       &             * DBLE(nbytes)
240                IF (fsnu .GT. mnc_max_fsize) THEN                IF (fsnu .GT. mnc_max_fsize) THEN
241    C               Delete the now-full fname from the lookup tables since
242    C               we are all done writing to it.
243                    CALL MNC_FILE_CLOSE(fname, myThid)
244                  iseq = iseq + 1                  iseq = iseq + 1
245                  indu = 1                  indu = 1
246                  mnc_cw_fgud(indfg) = 1                  mnc_cw_fgud(indfg) = 1
# Line 262  C         local copy of them Line 265  C         local copy of them
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
# Line 370  C         Check the offsets Line 378  C         Check the offsets
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,

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.26

  ViewVC Help
Powered by ViewVC 1.1.22