libsim  Versione6.3.0

◆ count_distinct_var6d()

integer function volgrid6d_var_class::count_distinct_var6d ( type(volgrid6d_var), dimension(:), intent(in)  vect,
logical, dimension(:), intent(in), optional  mask,
logical, intent(in), optional  back 
)
private

conta gli elementi distinti in vect

Definizione alla linea 600 del file volgrid6d_var_class.F90.

600 IF (stallo /= 0) THEN
601  CALL l4f_log(l4f_fatal,"allocating memory")
602  CALL raise_fatal_error()
603 end if
604 
605 conv_bwd(:) = vg6d_v7d_var_conv_miss
606 CALL import_var_conv(un, conv_bwd)
607 DO i = 1, n
608  conv_bwd(i)%c_func%a = 1./conv_bwd(i)%c_func%a
609  conv_bwd(i)%c_func%b = - conv_bwd(i)%c_func%b
610 ENDDO
611 CLOSE(un)
612 
613 CONTAINS
614 
615 SUBROUTINE import_var_conv(un, conv_type)
616 INTEGER, INTENT(in) :: un
617 TYPE(vg6d_v7d_var_conv), INTENT(out) :: conv_type(:)
618 
619 INTEGER :: i
620 TYPE(csv_record) :: csv
621 CHARACTER(len=1024) :: line
622 CHARACTER(len=10) :: btable
623 INTEGER :: centre, category, number, discipline
624 
625 DO i = 1, SIZE(conv_type)
626  READ(un,'(A)',end=200)line
627  CALL init(csv, line)
628  CALL csv_record_getfield(csv, btable)
629  CALL csv_record_getfield(csv) ! skip fields for description and unit,
630  CALL csv_record_getfield(csv) ! they correspond to grib information, not bufr Btable
631  CALL init(conv_type(i)%v7d_var, btable=btable)
632 
633  CALL csv_record_getfield(csv, centre)
634  CALL csv_record_getfield(csv, category)
635  CALL csv_record_getfield(csv, number)
636  CALL csv_record_getfield(csv, discipline)
637  CALL init(conv_type(i)%vg6d_var, centre=centre, category=category, &
638  number=number, discipline=discipline) ! controllare l'ordine
639 
640  CALL csv_record_getfield(csv, conv_type(i)%c_func%a)
641  CALL csv_record_getfield(csv, conv_type(i)%c_func%b)
642  CALL delete(csv)
643 ENDDO
644 
645 200 CONTINUE
646 
647 END SUBROUTINE import_var_conv
648 
649 END SUBROUTINE vg6d_v7d_var_conv_setup
650 
651 
652 ELEMENTAL FUNCTION conv_func_eq(this, that) RESULT(res)
653 TYPE(conv_func),INTENT(IN) :: this, that
654 LOGICAL :: res
655 
656 res = this%a == that%a .AND. this%b == that%b
657 
658 END FUNCTION conv_func_eq
659 
660 
661 ELEMENTAL FUNCTION conv_func_ne(this, that) RESULT(res)
662 TYPE(conv_func),INTENT(IN) :: this, that
663 LOGICAL :: res
664 
665 res = .NOT.(this == that)
666 
667 END FUNCTION conv_func_ne
668 
Distruttori per le 2 classi.
Costruttori per le classi datetime e timedelta.

Generated with Doxygen.