[Dart-dev] DART/branches Revision: 12238
dart at ucar.edu
dart at ucar.edu
Fri Dec 22 09:47:35 MST 2017
nancy at ucar.edu
2017-12-22 09:47:33 -0700 (Fri, 22 Dec 2017)
40
use the longer netcdf utilities names.
Modified: DART/branches/recam/assimilation_code/modules/io/dart_time_io_mod.f90
===================================================================
--- DART/branches/recam/assimilation_code/modules/io/dart_time_io_mod.f90 2017-12-22 15:54:57 UTC (rev 12237)
+++ DART/branches/recam/assimilation_code/modules/io/dart_time_io_mod.f90 2017-12-22 16:47:33 UTC (rev 12238)
@@ -18,7 +18,7 @@
operator(+)
use utilities_mod, only : E_MSG, E_ERR, error_handler, to_upper
-use netcdf_utilities_mod, only : nc_check
+use netcdf_utilities_mod, only : nc_check, nc_open_file_readonly, nc_close_file
use typeSizes
use netcdf
@@ -53,6 +53,7 @@
integer :: year, month, day, hour, minute, second
type(time_type) :: base_time, delta_time
+character(len=*), parameter :: routine = 'read_model_time'
real(digits12) :: model_time, time_array(1)
integer, dimension(NF90_MAX_VAR_DIMS) :: dimIDs
@@ -64,8 +65,7 @@
write(string3,*)'You may need to supply a model-specific "read_model_time()" to read the time.'
-call nc_check( nf90_open(filename, NF90_NOWRITE, ncid), &
- 'read_model_time', 'opening : "'//trim(filename)//'"')
+ncid = nc_open_file_readonly(filename, routine)
ios = nf90_inq_varid(ncid, "time", VarID)
if (ios /= NF90_NOERR) then
@@ -187,7 +187,7 @@
! make print_date() return without error if calendar is no_calendar,
! and then add a call to print_date() here. (also vote no.)
-call nc_check( nf90_close(ncid) , 'read_model_time closing : ', filename)
+call nc_close_file(ncid, routine)
end function read_model_time
More information about the Dart-dev
mailing list