Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ncid | |||
integer, | intent(in) | :: | nvar | |||
character(len=*), | intent(in), | dimension(:,:) | :: | ncname | ||
real, | intent(in), | dimension(:,:,:) | :: | vars | ||
integer, | intent(in) | :: | nrec | |||
integer, | intent(in) | :: | dim1 | |||
integer, | intent(in) | :: | dim2 |
subroutine writestat_2D_nc(ncid,nvar,ncname,vars,nrec,dim1,dim2) implicit none integer, intent(in) :: ncid,nvar,dim1,dim2 integer, intent(in) :: nrec real,dimension(:,:,:),intent(in) :: vars character(*), dimension(:,:),intent(in) :: ncname integer :: iret,n,varid do n=1,nvar iret = nf90_inq_varid(ncid, ncname(n,1), VarID) iret = nf90_put_var(ncid, VarID, vars(1:dim1,1:dim2,n),(/1,1,nrec/),(/dim1,dim2,1/)) end do iret = nf90_sync(ncid) end subroutine writestat_2D_nc