libsim Versione 7.2.1
|
◆ volgrid_get_vol_3d()
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.
Definizione alla linea 652 del file volgrid6d_class.F90. 653if (present(filename))then
654 if (filename /= "")then
655 lfilename=filename
656 end if
657end if
658
659if (present(filename_auto))filename_auto=lfilename
660
661
662inquire(unit=lunit,opened=opened)
663if (.not. opened) then
664 inquire(file=lfilename,exist=exist)
665 if (exist) CALL raise_error('file exist; cannot open new file')
666 if (.not.exist) open (unit=lunit,file=lfilename,form="UNFORMATTED")
667 !print *, "opened: ",lfilename
668end if
669
670if (associated(this%time)) ntime=size(this%time)
671if (associated(this%timerange)) ntimerange=size(this%timerange)
672if (associated(this%level)) nlevel=size(this%level)
673if (associated(this%var)) nvar=size(this%var)
|