libsim  Versione8.0.0

◆ volgrid_get_vol_3d()

subroutine, public volgrid6d_class::volgrid_get_vol_3d ( type(volgrid6d), intent(in)  this,
integer, intent(in)  itime,
integer, intent(in)  itimerange,
integer, intent(in)  ivar,
real, dimension(:,:,:), pointer  voldati,
logical, dimension(:), intent(out), optional, allocatable  zlist 
)

Return a 3-d pointer to a x-y-z slice of a volume.

This method works both with volumes having allocated and non-allocated thisvoldati array, and it returns a pointer to a 3-d slice either from the allocated thisvoldati array or from the grid_id object on file or in memory. In the second case the pointer should be either ALLOCATE'd to the expected size or NULLIFY'ed, and if NULLIFY'ed, it is allocated within the method, thus it will have to be deallocated by the caller when not in use anymore. Since this method may be called many times by a program, it is optimized for speed and it does not make any check about the matching size of the pointer and the array or about the allocation status of this, so it should be called only when everything has been checked to be in good shape.

Parametri
[in]thisobject from which the slice has to be retrieved
[in]itimeindex of time level of the slice
[in]itimerangeindex of timerange of the slice
[in]ivarindex of physical variable of the slice
voldatipointer to the data, if thisvoldati is already allocated, it will just point to the requested slice, otherwise it will be allocated if and only if it is nullified on entry
[out]zlistlist of vertical level present in the data

Definizione alla linea 661 del file volgrid6d_class.F90.

661  unit=lunit
662  else
663  lunit=unit
664  end if
665 end if
666 
667 lfilename=trim(arg)//".vg6d"
668 if (index(arg,'/',back=.true.) > 0) lfilename=lfilename(index(arg,'/',back=.true.)+1 : )
669 
670 if (present(filename))then
671  if (filename /= "")then
672  lfilename=filename
673  end if
674 end if
675 
676 if (present(filename_auto))filename_auto=lfilename
677 
678 
679 inquire(unit=lunit,opened=opened)
680 if (.not. opened) then
681  inquire(file=lfilename,exist=exist)
682  if (exist) CALL raise_error('file exist; cannot open new file')
683  if (.not.exist) open (unit=lunit,file=lfilename,form="UNFORMATTED")
684  !print *, "opened: ",lfilename
685 end if
686 
687 if (associated(this%time)) ntime=size(this%time)
688 if (associated(this%timerange)) ntimerange=size(this%timerange)
689 if (associated(this%level)) nlevel=size(this%level)
690 if (associated(this%var)) nvar=size(this%var)
691 
692 
693 write(unit=lunit)ldescription
694 write(unit=lunit)tarray
Index method.

Generated with Doxygen.