--- trunk/IOIPSL/Histcom/histsync.f 2014/03/05 14:57:53 82 +++ trunk/Sources/IOIPSL/Histcom/histsync.f 2017/01/12 12:31:31 212 @@ -11,12 +11,13 @@ ! file: optional argument for fileid - USE histcom_var, ONLY: nb_files, ncdf_ids - USE netcdf, ONLY: nf90_sync + use histbeg_totreg_m, ONLY: nb_files + USE histcom_var, ONLY: ncdf_ids + USE netcdf95, ONLY: nf95_sync INTEGER, INTENT(IN), OPTIONAL:: file - INTEGER:: ifile, ncid, iret + INTEGER:: ifile, ncid LOGICAL:: file_exists !--------------------------------------------------------------------- @@ -24,7 +25,6 @@ ! 1.The loop on files to synchronise DO ifile = 1, nb_files - IF (present(file)) THEN file_exists = (ifile==file) ELSE @@ -33,9 +33,8 @@ IF (file_exists) THEN ncid = ncdf_ids(ifile) - iret = nf90_sync(ncid) + call nf95_sync(ncid) END IF - END DO END SUBROUTINE histsync