[Dart-dev] DART/branches Revision: 11492

dart at ucar.edu dart at ucar.edu
Fri Apr 14 10:46:35 MDT 2017


hendric at ucar.edu
2017-04-14 10:46:34 -0600 (Fri, 14 Apr 2017)
244
sync netcdf file at the end of write_singlefile in order to ensure
that all of the variable information gets written out if filter happens
crash in the middle of a run.

removing unnecessarry sync's in writting attributes for single file io.





Modified: DART/branches/rma_output_files/assimilation_code/modules/io/single_file_io_mod.f90
===================================================================
--- DART/branches/rma_output_files/assimilation_code/modules/io/single_file_io_mod.f90	2017-04-14 16:38:47 UTC (rev 11491)
+++ DART/branches/rma_output_files/assimilation_code/modules/io/single_file_io_mod.f90	2017-04-14 16:46:34 UTC (rev 11492)
@@ -652,6 +652,11 @@
    endif
 enddo
 
+!>@ todo FIXME : This sync is not necessary but ensures that all of the variable
+!>  information gets written out if filter happens to crash in the middle of a
+!> run. This may slow down the code for longer runs.
+call nc_check(nf90_sync(my_ncid), 'write_single_file', 'nf90_sync')
+
 call set_netcdf_file_type(file_info, ncFileID)
    
 deallocate(temp_ens)
@@ -871,13 +876,11 @@
 !-----------------------------------------------------------
 !>
 
-! FIXME : do not need time index here
-subroutine write_extra_attributes(ncFileID, time_dimId, copyname, timeindex)
+subroutine write_extra_attributes(ncFileID, time_dimId, copyname)
 
 type(netcdf_file_type), intent(inout) :: ncFileID
 integer,           intent(in) :: time_dimId
 character(len=*),  intent(in) :: copyname
-integer, optional, intent(in) :: timeindex
 
 integer :: ivar, jdim, ndims, domain
 integer :: ret, my_ncid, new_varid, my_dimid, my_xtype
@@ -888,7 +891,6 @@
 ! make sure ncFileID refers to an open netCDF file 
 !--------------------------------------------------------------------
 
-call nc_check(nf90_sync(ncFileID%ncid),  'write_extra_attributes', 'nf90_sync ')               
 call nc_check(nf90_Redef(ncFileID%ncid), 'write_extra_attributes', 'nf90_Redef')
 
 my_ncid  = ncFileID%ncid
@@ -963,7 +965,6 @@
 integer :: new_varid
 character(len=metadatalength) :: dimname, varname
 
-call nc_check(nf90_sync(ncFileID%ncid),  'write_model_attributes', 'nf90_sync ')               
 call nc_check(nf90_Redef(ncFileID%ncid), 'write_model_attributes', 'nf90_Redef')
 
 ncFileID%diag_id = create_diagnostic_structure()


More information about the Dart-dev mailing list