libsim  Versione6.3.0

◆ volgrid6d_alloc()

subroutine, public volgrid6d_class::volgrid6d_alloc ( type(volgrid6d), intent(inout)  this,
type(grid_dim), intent(in), optional  dim,
integer, intent(in), optional  ntime,
integer, intent(in), optional  nlevel,
integer, intent(in), optional  ntimerange,
integer, intent(in), optional  nvar,
logical, intent(in), optional  ini 
)

Allocate the dimension descriptors of the volgrid6d object.

This method allocates the horizontal grid descriptor and the one dimensional arrays of the dimensions

  • time
  • vertical level
  • timerange
  • physical variable

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]dimhorizontal grid size X, Y
[in]ntimenumber of time levels
[in]nlevelnumber of vertical levels
[in]ntimerangenumber of different timeranges
[in]nvarnumber of physical variables
[in]iniif provided and .TRUE., for each allocated dimension descriptor the constructor is called without extra parameters, thus initializing everything as missing value

Definizione alla linea 439 del file volgrid6d_class.F90.

439 REAL,POINTER :: voldati(:,:)
440 
441 IF (ASSOCIATED(this%voldati)) THEN
442  voldati => this%voldati(:,:,ilevel,itime,itimerange,ivar)
443  RETURN
444 ELSE
445  IF (.NOT.ASSOCIATED(voldati)) THEN
446  ALLOCATE(voldati(this%griddim%dim%nx,this%griddim%dim%ny))
447  ENDIF
448  CALL grid_id_decode_data(this%gaid(ilevel,itime,itimerange,ivar), voldati)
449 ENDIF
450 
451 END SUBROUTINE volgrid_get_vol_2d
452 
453 
467 SUBROUTINE volgrid_get_vol_3d(this, itime, itimerange, ivar, voldati)
468 TYPE(volgrid6d),INTENT(in) :: this
469 INTEGER,INTENT(in) :: itime
470 INTEGER,INTENT(in) :: itimerange
471 INTEGER,INTENT(in) :: ivar
472 REAL,POINTER :: voldati(:,:,:)
473 
474 INTEGER :: ilevel
475 
476 IF (ASSOCIATED(this%voldati)) THEN
477  voldati => this%voldati(:,:,:,itime,itimerange,ivar)
478  RETURN
479 ELSE
480  IF (.NOT.ASSOCIATED(voldati)) THEN
481  ALLOCATE(voldati(this%griddim%dim%nx,this%griddim%dim%ny,SIZE(this%level)))
482  ENDIF
483  DO ilevel = 1, SIZE(this%level)
484  CALL grid_id_decode_data(this%gaid(ilevel,itime,itimerange,ivar), &
485  voldati(:,:,ilevel))
486  ENDDO
487 ENDIF
488 
489 END SUBROUTINE volgrid_get_vol_3d
490 
491 
503 SUBROUTINE volgrid_set_vol_2d(this, ilevel, itime, itimerange, ivar, voldati)
504 TYPE(volgrid6d),INTENT(inout) :: this
505 INTEGER,INTENT(in) :: ilevel
506 INTEGER,INTENT(in) :: itime
507 INTEGER,INTENT(in) :: itimerange
508 INTEGER,INTENT(in) :: ivar
509 REAL,INTENT(in) :: voldati(:,:)
510 
511 IF (ASSOCIATED(this%voldati)) THEN
512  RETURN
513 ELSE
514  CALL grid_id_encode_data(this%gaid(ilevel,itime,itimerange,ivar), voldati)
515 ENDIF
516 
517 END SUBROUTINE volgrid_set_vol_2d
518 
519 
531 SUBROUTINE volgrid_set_vol_3d(this, itime, itimerange, ivar, voldati)
532 TYPE(volgrid6d),INTENT(inout) :: this
533 INTEGER,INTENT(in) :: itime
534 INTEGER,INTENT(in) :: itimerange
535 INTEGER,INTENT(in) :: ivar
536 REAL,INTENT(in) :: voldati(:,:,:)
537 
538 INTEGER :: ilevel

Generated with Doxygen.