|
libsim Versione 8.0.0
|
◆ arrayof_gridinfo_remove()
Method for removing elements of the array at a desired position. If necessary, the array is reallocated to reduce space.
Definizione alla linea 511 del file gridinfo_class.F90. 516!$OMP END CRITICAL
517!$OMP END TASK
518 ENDDO
519!$OMP END MASTER
520!$OMP END PARALLEL
521! close file
522 CALL delete(output_file)
523 ELSE
524 CALL l4f_category_log(category,l4f_error,"opening file "//trim(filename))
525 CALL raise_error()
526 ENDIF
527ELSE ! no valid grid_id has been found
528 CALL l4f_category_log(category,l4f_error, &
529 "gridinfo object of size "//t2c(this%arraysize))
530 CALL l4f_category_log(category,l4f_error, &
531 "no valid grid id found when exporting to file "//trim(filename))
532 CALL raise_error()
533ENDIF
534
535!chiudo il logger
536CALL l4f_category_delete(category)
537
538END SUBROUTINE gridinfo_export_to_file
539
540
541!> Decode and return the data array from a grid_id object associated
542!! to a gridinfo object. This method returns a 2-d array of proper
543!! size extracted from the grid_id object associated to a gridinfo
544!! object. This can work if the gridinfo object has been correctly
545!! initialised and associated to a grid from an on-disk dataset
546!! (e.g. grib_api or gdal file). The result is an array of size \a
547!! this%griddim%dim%nx X \a this%griddim%dim%ny so it must have been
548!! properly allocated by the caller.
549FUNCTION gridinfo_decode_data(this) RESULT(field)
550TYPE(gridinfo_def),INTENT(in) :: this !< gridinfo object
551REAL :: field(this%griddim%dim%nx, this%griddim%dim%ny) ! array of decoded values
552
553CALL grid_id_decode_data(this%gaid, field)
554
555END FUNCTION gridinfo_decode_data
556
557
558!> Encode a data array into a grid_id object associated to a gridinfo object.
559!! This method encodes a 2-d array of proper size into the grid_id
560!! object associated to a gridinfo object. This can work if the
561!! gridinfo object has been correctly initialised and associated to a
562!! grid_id from an on-disk (template) dataset (grib_api or gdal
563!! file). The shape of the array must be conformal to the size of the
564!! grid previously set in the gridinfo object descriptors.
565SUBROUTINE gridinfo_encode_data(this, field)
566TYPE(gridinfo_def),INTENT(inout) :: this !< gridinfo object
567REAL,intent(in) :: field(:,:) !< data array to be encoded
|