Changeset 410


Ignore:
Timestamp:
Nov 22, 2011, 5:07:44 PM (14 years ago)
Author:
acolaitis
Message:

Modified NCDF norm of our files from classic to 64bit offset to support variables indices of more than integer*4 maximum length. This is a priori retrocompatible with classic format. I have tested it, it works for all file outputs, newstart (on classic or 64-bit offset files). One can check the format of his .nc with ncdump -k file.nc

Location:
trunk/LMDZ.MARS
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/dyn3d/anl_mcdstats.F

    r38 r410  
    412412 
    413413          ierr = NF_CREATE(trim(adjustl(nomfich))//"_P.nc",
    414      &                     NF_CLOBBER, nout)
     414     &                     IOR(NF_CLOBBER,NF_64BIT_OFFSET), nout)
    415415          if (ierr.NE.NF_NOERR) THEN
    416416            write(*,*)' Pb d''ouverture du fichier '
     
    431431
    432432          ierr = NF_CREATE(trim(adjustl(nomfich))//"_Z.nc",
    433      &                     NF_CLOBBER, nout)
     433     &                     IOR(NF_CLOBBER,NF_64BIT_OFFSET), nout)
    434434          IF(ierr.NE.NF_NOERR) THEN
    435435            write(*,*)' Pb d''ouverture du fichier '
  • trunk/LMDZ.MARS/libf/dyn3d/anl_stats-diag.F

    r38 r410  
    403403 
    404404          ierr = NF_CREATE(trim(adjustl(nomfich))//"_P.nc",
    405      &                     NF_CLOBBER, nout)
     405     &                     IOR(NF_CLOBBER,NF_64BIT_OFFSET), nout)
    406406          if (ierr.NE.NF_NOERR) THEN
    407407            write(*,*)' Pb d''ouverture du fichier '
     
    422422
    423423          ierr = NF_CREATE(trim(adjustl(nomfich))//"_Z.nc",
    424      &                     NF_CLOBBER, nout)
     424     &                     IOR(NF_CLOBBER,NF_64BIT_OFFSET), nout)
    425425          IF(ierr.NE.NF_NOERR) THEN
    426426            write(*,*)' Pb d''ouverture du fichier '
  • trunk/LMDZ.MARS/libf/dyn3d/dynredem.F

    r38 r410  
    111111c Creation du fichier:
    112112c
    113       ierr = NF_CREATE(fichnom, NF_CLOBBER, nid)
     113      ierr = NF_CREATE(fichnom, IOR(NF_CLOBBER,NF_64BIT_OFFSET), nid)
    114114      IF (ierr.NE.NF_NOERR) THEN
    115115         WRITE(6,*)" Failed creating file "//fichnom
  • trunk/LMDZ.MARS/libf/dyn3d/iniav.F

    r38 r410  
    3939      time0_av=pfrac0
    4040c
    41       ierr = NF_CREATE(fichnom, NF_CLOBBER, nid)
     41      ierr = NF_CREATE(fichnom, IOR(NF_CLOBBER,NF_64BIT_OFFSET), nid)
    4242      IF (ierr.NE.NF_NOERR) THEN
    4343         WRITE(6,*)" Pb d ouverture du fichier "//fichnom
  • trunk/LMDZ.MARS/libf/dyn3d/start2archive.F

    r38 r410  
    281281         write(*,*)'OK, Could not open file "start_archive.nc"'
    282282         write(*,*)'So let s create a new "start_archive"'
    283          ierr = NF_CREATE('start_archive.nc', NF_CLOBBER, nid)
     283         ierr = NF_CREATE('start_archive.nc',
     284     &  IOR(NF_CLOBBER,NF_64BIT_OFFSET), nid)
    284285         call ini_archive(nid,day_ini,phis,ithS,tab_cntrl_fi)
    285286      endif
  • trunk/LMDZ.MARS/libf/dyn3d/writediagdyn.F90

    r38 r410  
    6363 
    6464  ! Create output NetCDF file
    65   ierr=NF_CREATE(filename,NF_CLOBBER,nid)
     65  ierr=NF_CREATE(filename,IOR(NF_CLOBBER,NF_64BIT_OFFSET),nid)
    6666  if (ierr.ne.NF_NOERR) then
    6767    write(*,*)'writediagdyn: Error, failed creating file '//trim(filename)
  • trunk/LMDZ.MARS/libf/phymars/inistats.F

    r38 r410  
    4343      enddo
    4444
    45       ierr = NF_CREATE("stats.nc",NF_CLOBBER,nid)
     45      ierr = NF_CREATE("stats.nc",IOR(NF_CLOBBER,NF_64BIT_OFFSET),nid)
    4646      if (ierr.ne.NF_NOERR) then
    4747         write (*,*) NF_STRERROR(ierr)
  • trunk/LMDZ.MARS/libf/phymars/physdem1.F

    r224 r410  
    9494c  things to store in the physics start file:
    9595c
    96       ierr = NF_CREATE(adjustl(filename),NF_CLOBBER, nid)
     96      ierr = NF_CREATE(adjustl(filename), 
     97     &      IOR(NF_CLOBBER,NF_64BIT_OFFSET), nid)
    9798      IF (ierr.NE.NF_NOERR) THEN
    9899        WRITE(6,*)'physdem1: Problem creating file ',adjustl(filename)
  • trunk/LMDZ.MARS/libf/phymars/writediagfi.F

    r320 r410  
    164164
    165165         ! Create the NetCDF file
    166          ierr = NF_CREATE(fichnom, NF_CLOBBER, nid)
     166         ierr = NF_CREATE(fichnom, IOR(NF_CLOBBER,NF_64BIT_OFFSET), nid)
    167167         ! Define the 'Time' dimension
    168168         ierr = nf_def_dim(nid,"Time",NF_UNLIMITED,idim)
  • trunk/LMDZ.MARS/libf/phymars/writediagsoil.F90

    r38 r410  
    7373 
    7474  ! Create output NetCDF file
    75   ierr=NF_CREATE(filename,NF_CLOBBER,nid)
     75  ierr=NF_CREATE(filename,IOR(NF_CLOBBER,NF_64BIT_OFFSET),nid)
    7676  if (ierr.ne.NF_NOERR) then
    7777    write(*,*)'writediagsoil: Error, failed creating file '//trim(filename)
  • trunk/LMDZ.MARS/util/concatnc.F90

    r397 r410  
    2424include "netcdf.inc" ! NetCDF definitions
    2525
    26 character (len=50), dimension(1000) :: file
     26character (len=80), dimension(1000) :: file
    2727! file(): input file(s) names(s)
    2828character (len=30), dimension(15) :: notconcat
     
    626626!==============================================================================
    627627write(*,*) "creating "//trim(adjustl(filename))//'...'
    628 ierr = NF_CREATE(filename,NF_CLOBBER,nout)
     628ierr = NF_CREATE(filename,IOR(NF_CLOBBER,NF_64BIT_OFFSET),nout)
    629629! NB: setting NF_CLOBBER mode means that it's OK to overwrite an existing file
    630630if (ierr.NE.NF_NOERR) then
  • trunk/LMDZ.MARS/util/hrecast.F90

    r137 r410  
    509509
    510510! Create output file
    511 ierr=NF_CREATE(outfile,NF_CLOBBER,outfid)
     511ierr=NF_CREATE(outfile,IOR(NF_CLOBBER,NF_64BIT_OFFSET),outfid)
    512512if (ierr.ne.NF_NOERR) then
    513513  write(*,*)"Error: could not create file ",outfile
  • trunk/LMDZ.MARS/util/localtime.F90

    r137 r410  
    611611!==============================================================================
    612612write(*,*) "creating "//trim(adjustl(filename))//'...'
    613 ierr = NF_CREATE(filename,NF_CLOBBER,nout)
     613ierr = NF_CREATE(filename,IOR(NF_CLOBBER,NF_64BIT_OFFSET),nout)
    614614! NB: setting NF_CLOBBER mode means that it's OK to overwrite an existing file
    615615if (ierr.NE.NF_NOERR) then
  • trunk/LMDZ.MARS/util/lslin.F90

    r137 r410  
    615615!==============================================================================
    616616write(*,*) "creating "//trim(adjustl(filename))//'...'
    617 ierr = NF_CREATE(filename,NF_CLOBBER,nout)
     617ierr = NF_CREATE(filename,IOR(NF_CLOBBER,NF_64BIT_OFFSET),nout)
    618618! NB: setting NF_CLOBBER mode means that it's OK to overwrite an existing file
    619619if (ierr.NE.NF_NOERR) then
  • trunk/LMDZ.MARS/util/zrecast.F90

    r360 r410  
    943943
    944944! Create output file
    945 ierr=NF_CREATE(outfile,NF_CLOBBER,outfid)
     945ierr=NF_CREATE(outfile,IOR(NF_CLOBBER,NF_64BIT_OFFSET),outfid)
    946946if (ierr.ne.NF_NOERR) then
    947947  write(*,*)"Error: could not create file ",outfile
Note: See TracChangeset for help on using the changeset viewer.