Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Streamlined output by not reporting the contents of param.in on start…
Browse files Browse the repository at this point in the history
…up, as we can do that on the python side now. Also added a better error message for when a NetCDF file can't be found
  • Loading branch information
David A Minton committed Nov 16, 2022
1 parent fdfd6d6 commit 0b3db9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/io/io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ module subroutine io_param_reader(self, unit, iotype, v_list, iostat, iomsg)
iostat = 0

! Print the contents of the parameter file to standard output
call param%writer(unit = OUTPUT_UNIT, iotype = "none", v_list = [0], iostat = iostat, iomsg = iomsg)
! call param%writer(unit = OUTPUT_UNIT, iotype = "none", v_list = [0], iostat = iostat, iomsg = iomsg)

end associate

Expand Down
4 changes: 3 additions & 1 deletion src/netcdf/netcdf.f90
Original file line number Diff line number Diff line change
Expand Up @@ -351,13 +351,15 @@ module subroutine netcdf_open(self, param, readonly)
! Internals
integer(I4B) :: mode, status
character(len=NF90_MAX_NAME) :: str_dim_name
character(len=STRMAX) :: errmsg

mode = NF90_WRITE
if (present(readonly)) then
if (readonly) mode = NF90_NOWRITE
end if

call check( nf90_open(param%outfile, mode, self%ncid), "netcdf_open nf90_open" )
write(errmsg,*) "netcdf_open nf90_open ",trim(adjustl(param%outfile))
call check( nf90_open(param%outfile, mode, self%ncid), errmsg)

call check( nf90_inq_dimid(self%ncid, TIME_DIMNAME, self%time_dimid), "netcdf_open nf90_inq_dimid time_dimid" )
call check( nf90_inq_dimid(self%ncid, ID_DIMNAME, self%id_dimid), "netcdf_open nf90_inq_dimid id_dimid" )
Expand Down

0 comments on commit 0b3db9f

Please sign in to comment.