Skip to content

Commit

Permalink
Bug Fix for FVCOM Processing to Allow Adding NetCDF Variables on Hera
Browse files Browse the repository at this point in the history
Small bug fix to ./sorc/fvcom_tools.fd that allows for the addition 
of new variables on Hera.
  • Loading branch information
dmwright526 authored Oct 7, 2020
1 parent 61c25ed commit b69f9d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sorc/fvcom_tools.fd/module_ncio.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2339,6 +2339,9 @@ subroutine add_new_var_3d(this,varname,dname1,dname2,dname3,lname,units)
,lname,units
integer :: status, ncid, dim1id, dim2id, dim3id, varid

status = nf90_redef(this%ncid) !Enter Define Mode
if (status /= nf90_noerr) call this%handle_err(status)

status = nf90_inq_dimid(this%ncid, dname1, dim1id)
if (status /= nf90_noerr) call this%handle_err(status)
status = nf90_inq_dimid(this%ncid, dname2, dim2id)
Expand All @@ -2355,6 +2358,10 @@ subroutine add_new_var_3d(this,varname,dname1,dname2,dname3,lname,units)
status = nf90_put_att(this%ncid, varid, 'units', units)
if (status /= nf90_noerr) call this%handle_err(status)

status = nf90_enddef(this%ncid) !Exit Define Mode and
! return to Data Mode
if (status /= nf90_noerr) call this%handle_err(status)

end subroutine add_new_var_3d

end module module_ncio

0 comments on commit b69f9d1

Please sign in to comment.