libsim  Versione6.3.0

◆ arrayof_gridinfo_remove()

subroutine arrayof_gridinfo_remove ( type(arrayof_gridinfo this,
integer, intent(in), optional  nelem,
integer, intent(in), optional  pos,
logical, intent(in), optional  nodestroy 
)

Method for removing elements of the array at a desired position.

If necessary, the array is reallocated to reduce space.

Parametri
thisarray object in which an element has to be removed
[in]nelemnumber of elements to remove, if not provided, a single element is removed
[in]posposition of the element to be removed, if it is out of range, it is clipped, if it is not provided, objects are removed at the end
[in]posif provided and .TRUE. , the destructor possibily defined for the TYPE(gridinfo_def) is not called for every deleted object, may be useful if the objects to be deleted have been copied to another instance of arrayof_gridinfo and continue their life there

Definizione alla linea 542 del file gridinfo_class.F90.

542 
549 SUBROUTINE gridinfo_encode_data(this, field)
550 TYPE(gridinfo_def),INTENT(inout) :: this
551 REAL,intent(in) :: field(:,:)
552 
553 IF (SIZE(field,1) /= this%griddim%dim%nx &
554  .OR. SIZE(field,2) /= this%griddim%dim%ny) THEN
555  CALL l4f_category_log(this%category,l4f_error, &
556  'gridinfo_encode: field and gridinfo object non conformal, field: ' &
557  //trim(to_char(SIZE(field,1)))//'X'//trim(to_char(SIZE(field,2)))//', nx,ny:' &
558  //trim(to_char(this%griddim%dim%nx))//'X'//trim(to_char(this%griddim%dim%ny)))
559  CALL raise_error()
560  RETURN
561 ENDIF
562 
563 CALL grid_id_encode_data(this%gaid, field)
564 
565 END SUBROUTINE gridinfo_encode_data
566 
567 
568 ! =========================================
569 ! grib_api driver specific code
570 ! could this be moved to a separate module?
571 ! =========================================
572 #ifdef HAVE_LIBGRIBAPI
573 SUBROUTINE gridinfo_import_gribapi(this, gaid)
574 TYPE(gridinfo_def),INTENT(inout) :: this ! gridinfo object
575 INTEGER, INTENT(in) :: gaid ! grib_api id of the grib loaded in memory to import
576 
577 call time_import_gribapi(this%time, gaid)
578 call timerange_import_gribapi(this%timerange,gaid)
579 call level_import_gribapi(this%level, gaid)
580 call var_import_gribapi(this%var, gaid)
581 
582 call normalize_gridinfo(this)
583 
584 END SUBROUTINE gridinfo_import_gribapi
585 
586 
587 ! grib_api driver
588 SUBROUTINE gridinfo_export_gribapi(this, gaid)
589 TYPE(gridinfo_def),INTENT(inout) :: this ! gridinfo object
590 INTEGER, INTENT(in) :: gaid ! grib_api id of the grib loaded in memory to export
591 
592 TYPE(conv_func) :: c_func
593 REAL,ALLOCATABLE :: tmparr(:,:)
Restituiscono il valore dell'oggetto in forma di stringa stampabile.

Generated with Doxygen.