The error message I get is:
The error occurs at the end of the first outer loop, while trying to close the associated fwd-file (the "001" fwd-file). I only get this error message because I use a biological model, I assume this message will not appear if no biological model is used.NETCDF_CLOSE - error while writing global attribute: bio_file
file: wc12_fwd_36524_001.nc
call from: w4dpsas_ocean.h, ROMS_run
Looking a bit deeper, the source of the error is code in w4dpsas_ocean.h which attempts to close the file associated with the the fwd-file netCDF ID (FWD(ng)%ncid):
Code: Select all
!
! Close current forward NetCDF file.
!
DO ng=1,Ngrids
CALL netcdf_close (ng, iNLM, FWD(ng)%ncid)
IF (exit_flag.ne.NoError) RETURN
END DO
Code: Select all
!
! Set forward basic state NetCDF ID to nonlinear model trajectory to
! avoid the inquiring stage.
!
DO ng=1,Ngrids
FWD(ng)%ncid=HIS(ng)%ncid
END DO
FIX: I have not done a lot of investigating on this but an additional update of FWD(ng)%ncid (see code above), right below the code closing the fwd-file (w4dpsas_ocean.h, line 1639) eliminates the error. I am not sure if there are unwanted consequences.