libsim Versione 7.2.1

◆ volgrid6d_alloc_vol()

subroutine, public volgrid6d_alloc_vol ( type(volgrid6d), intent(inout) this,
logical, intent(in), optional ini,
logical, intent(in), optional inivol,
logical, intent(in), optional decode )

Allocate the data array of the volgrid6d object.

This method allocates the main 6-dimensional data array thisvoldati and the 4-dimensional grid_id array thisgaid with a shape dictated by the previous call(s) to vol7d_alloc(). if any descriptor (except horizontal grid) has not been allocated yet, it is allocated here with a size of 1. This method should be explicitly used only in rare cases, it is usually called implicitly through the import interface.

Parametri
[in,out]thisobject whose decriptors should be allocated
[in]iniif provided and .TRUE., for each dimension descriptor not yet allocated and allocated here the constructor is called without extra parameters, thus initializing the element as missing value
[in]inivolif provided and .FALSE., the allocated volumes will not be initialized to missing values
[in]decodeif provided and .TRUE., the thisvoldati volume is allocated, otherwise only thisgaid will be allocated

Definizione alla linea 522 del file volgrid6d_class.F90.

523!! method may be called many times by a program, it is optimized for
524!! speed and it does not make any check about the matching size of the
525!! field and the array or about the allocation status of \a this, so
526!! it should be called only when everything has been checked to be in
527!! good shape.
528SUBROUTINE volgrid_set_vol_3d(this, itime, itimerange, ivar, voldati)
529TYPE(volgrid6d),INTENT(inout) :: this
530INTEGER,INTENT(in) :: itime
531INTEGER,INTENT(in) :: itimerange
532INTEGER,INTENT(in) :: ivar
533REAL,INTENT(in) :: voldati(:,:,:)
534
535INTEGER :: ilevel
536
537IF (ASSOCIATED(this%voldati)) THEN
538 RETURN
539ELSE
540 DO ilevel = 1, SIZE(this%level)
541 CALL grid_id_encode_data(this%gaid(ilevel,itime,itimerange,ivar), &
542 voldati(:,:,ilevel))
543 ENDDO
544ENDIF
545
546END SUBROUTINE volgrid_set_vol_3d
547
548
552SUBROUTINE volgrid6d_delete(this)
553TYPE(volgrid6d),INTENT(inout) :: this
554
555INTEGER :: i, ii, iii, iiii
556
557#ifdef DEBUG
558call l4f_category_log(this%category,l4f_debug,"delete")
559#endif
560
561if (associated(this%gaid))then
562
563 DO i=1 ,SIZE(this%gaid,1)
564 DO ii=1 ,SIZE(this%gaid,2)
565 DO iii=1 ,SIZE(this%gaid,3)
566 DO iiii=1 ,SIZE(this%gaid,4)
567 CALL delete(this%gaid(i,ii,iii,iiii))
568 ENDDO
569 ENDDO
570 ENDDO
571 ENDDO
572 DEALLOCATE(this%gaid)
573
574end if
575
576call delete(this%griddim)
577
578! call delete(this%time)
579! call delete(this%timerange)
580! call delete(this%level)
581! call delete(this%var)
582
583if (associated( this%time )) deallocate(this%time)
584if (associated( this%timerange )) deallocate(this%timerange)
585if (associated( this%level )) deallocate(this%level)
586if (associated( this%var )) deallocate(this%var)
587
588if (associated(this%voldati))deallocate(this%voldati)
589
590
591 !chiudo il logger
592call l4f_category_delete(this%category)
593
594END SUBROUTINE volgrid6d_delete
595
596

Generated with Doxygen.