diff --git a/diag_manager/diag_manager.F90 b/diag_manager/diag_manager.F90 index 8bf0e4dcf..3885490a5 100644 --- a/diag_manager/diag_manager.F90 +++ b/diag_manager/diag_manager.F90 @@ -3733,6 +3733,7 @@ SUBROUTINE closing_file(file, time) IF ( mpp_pe() .EQ. mpp_root_pe() ) & & CALL error_mesg('diag_manager_mod::closing_file', 'module/output_field ' //& & TRIM(message)//', skip one time level, maybe send_data never called', WARNING) + status = writing_field(i, .TRUE.,message,time) ELSE status = writing_field(i, .TRUE., message, time) END IF diff --git a/diag_manager/diag_output.F90 b/diag_manager/diag_output.F90 index 7fe6bb3a7..e90bfef89 100644 --- a/diag_manager/diag_output.F90 +++ b/diag_manager/diag_output.F90 @@ -194,6 +194,19 @@ SUBROUTINE diag_output_init(file_name, FORMAT, file_title, file_unit,& else fname_no_tile = trim(file_name) endif +!> If there is a .nc suffix on the file name, remove the .nc + if (len(trim(fname_no_tile)) > 3 ) then + checkNC: do i = 3,len_file_name + if (fname_no_tile(i-2:i) == ".nc") then + fname_no_tile(i-2:i) = " " + exit checkNC + endif + enddo checkNC + endif +! trim(fname_no_tile)(len_file_name-3:len_file_name) == ".nc") write (6,*)trim(fname_no_tile) +! trim(fname_no_tile)(len(trim(fname_no_tile))-3:len(trim(fname_no_tile))) == ".nc") & +! trim(fname_no_tile)(len(trim(fname_no_tile))-3:len(trim(fname_no_tile))) = " " + !> Check to make sure that only domain2D or domainUG is used. If both are not null, then FATAL if (domain .NE. NULL_DOMAIN2D .AND. domainU .NE. NULL_DOMAINUG)& & CALL error_mesg('diag_output_init', "Domain2D and DomainUG can not be used at the same time in "//& diff --git a/diag_manager/diag_util.F90 b/diag_manager/diag_util.F90 index 7d0aa20e7..262d05dbe 100644 --- a/diag_manager/diag_util.F90 +++ b/diag_manager/diag_util.F90 @@ -2542,11 +2542,9 @@ SUBROUTINE diag_data_out(file, field, dat, time, final_call_in, static_write_in) else call error_mesg("diag_util_mod::diag_data_out","Error opening the file "//files(file)%name,fatal) endif -! call diag_field_write ("time", dif, file_num=file, fileobjU=fileobjU, & -! fileobj=fileobj, fileobjND=fileobjND, fnum_for_domain=fnum_for_domain(file), time_in=files(file)%time_index) elseif (dif < files(file)%rtime_current .and. .not.(static_write) ) then call error_mesg("diag_util_mod::diag_data_out","The time for the file "//trim(files(file)%name)//& - " has gone backwards.",FATAL) + " has gone backwards. There may be missing values for some of the variables",NOTE) endif !> Write data call diag_field_write (output_fields(field)%output_name, dat, static=static_write, file_num=file, fileobjU=fileobjU, &