Commit 9137d29a authored by kbk's avatar kbk
Browse files

do not try and save to un-opened NetCDF files

parent b00cf52c
!$Id: ncdf_close.F90,v 1.3 2003-04-23 11:54:03 kbk Exp $
!$Id: ncdf_close.F90,v 1.4 2006-02-02 17:51:37 kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -27,7 +27,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: ncdf_close.F90,v $
! Revision 1.3 2003-04-23 11:54:03 kbk
! Revision 1.4 2006-02-02 17:51:37 kbk
! do not try and save to un-opened NetCDF files
!
! Revision 1.3 2003/04/23 11:54:03 kbk
! cleaned code + TABS to spaces
!
! Revision 1.2 2003/04/07 12:46:06 kbk
......@@ -44,6 +47,7 @@
!
! !LOCAL VARIABLES:
integer :: err
REALTYPE :: dummy=-_ONE_
!EOP
!-----------------------------------------------------------------------
!BOC
......@@ -55,7 +59,9 @@
#endif
if (nc2d .ge. 0) then
call save_2d_ncdf(dummy)
err = nf_close(nc2d)
call save_2d_ncdf(dummy)
if (err .NE. NF_NOERR) go to 10
end if
#ifndef NO_3D
......
!$Id: output.F90,v 1.12 2005-09-23 11:27:11 kbk Exp $
!$Id: output.F90,v 1.13 2006-02-02 17:51:36 kbk Exp $
#include "cppdefs.h"
!-----------------------------------------------------------------------
!BOP
......@@ -55,7 +55,10 @@
! Original author(s): Karsten Bolding & Hans Burchard
!
! $Log: output.F90,v $
! Revision 1.12 2005-09-23 11:27:11 kbk
! Revision 1.13 2006-02-02 17:51:36 kbk
! do not try and save to un-opened NetCDF files
!
! Revision 1.12 2005/09/23 11:27:11 kbk
! support for biology via GOTMs biology modules
!
! Revision 1.11 2005/05/04 11:45:30 kbk
......@@ -574,8 +577,6 @@
select case (out_fmt)
case (NETCDF)
dummy = -_ONE_*1.
call save_2d_ncdf(dummy)
call ncdf_close()
case DEFAULT
STDERR 'Fatal error: A non valid input format has been chosen'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment