writestat_3D_nc Subroutine

public subroutine writestat_3D_nc(ncid, nvar, ncname, vars, nrec, dim1, dim2, dim3)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: ncid
integer, intent(in) :: nvar
character(len=*), intent(in), dimension(:,:) :: ncname
real, intent(in) :: vars(0:dim1-1,0:dim2-1,0:dim3-1,nvar)
integer, intent(in) :: nrec
integer, intent(in) :: dim1
integer, intent(in) :: dim2
integer, intent(in) :: dim3

Calls

proc~~writestat_3d_nc~~CallsGraph proc~writestat_3d_nc writestat_3D_nc nf90_inq_varid nf90_inq_varid proc~writestat_3d_nc->nf90_inq_varid nf90_put_var nf90_put_var proc~writestat_3d_nc->nf90_put_var nf90_sync nf90_sync proc~writestat_3d_nc->nf90_sync

Called by

proc~~writestat_3d_nc~~CalledByGraph proc~writestat_3d_nc writestat_3D_nc interface~writestat_nc writestat_nc interface~writestat_nc->proc~writestat_3d_nc proc~eb EB proc~eb->interface~writestat_nc proc~fielddump fielddump proc~fielddump->interface~writestat_nc proc~ibmwallfun ibmwallfun proc~ibmwallfun->interface~writestat_nc proc~statsdump statsdump proc~statsdump->interface~writestat_nc program~dalesurban DALESURBAN program~dalesurban->proc~eb program~dalesurban->proc~fielddump program~dalesurban->proc~ibmwallfun program~dalesurban->proc~statsdump

Source Code

  subroutine writestat_3D_nc(ncid,nvar,ncname,vars,nrec,dim1,dim2,dim3)
    implicit none
    integer, intent(in)                      :: ncid,nvar,dim1,dim2,dim3
    integer, intent(in)                      :: nrec
    !real,dimension(dim1,dim2,dim3,nvar),intent(in)       :: vars
    real,intent(in)       :: vars(0:dim1-1,0:dim2-1,0:dim3-1,nvar)
    character(*), dimension(:,:),intent(in)  :: ncname

    integer :: iret,n,varid
    !write(*,*) 'write 3Dnc'
    do n=1,nvar
      iret = nf90_inq_varid(ncid, ncname(n,1), VarID)
           !write(*,*) 'MYID,.', myid
           !write(*,*) "nth netcdf variable",n
           !write(*,*) 'ncid',ncid
           !write(*,*) "n",n
           !write(*,*) 'ncname(n,1)',ncname(n,1)
           !write(*,*) 'VarID',VarID
           !write(*,*) 'nrec',nrec
           !write(*,*) 'imax',dim1
           !write(*,*) 'jmax',dim2
           !write(*,*) 'kmax',dim3
           !write(*,*) 'shape(vars)',shape(vars)
      !iret = nf90_put_var(ncid, VarID, vars(1:dim1,1:dim2,1:dim3,n),(/1,1,1,nrec/),(/dim1,dim2,dim3,1/))
      iret = nf90_put_var(ncid, VarID, vars(:,:,:,n),(/1,1,1,nrec/),(/dim1,dim2,dim3,1/))

    end do
    iret = nf90_sync(ncid)

  end subroutine writestat_3D_nc