libsim Versione 7.1.11
|
◆ count_distinct_network()
conta gli elementi distinti in vect Definizione alla linea 552 del file vol7d_network_class.F90. 553! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
554! authors:
555! Davide Cesari <dcesari@arpa.emr.it>
556! Paolo Patruno <ppatruno@arpa.emr.it>
557
558! This program is free software; you can redistribute it and/or
559! modify it under the terms of the GNU General Public License as
560! published by the Free Software Foundation; either version 2 of
561! the License, or (at your option) any later version.
562
563! This program is distributed in the hope that it will be useful,
564! but WITHOUT ANY WARRANTY; without even the implied warranty of
565! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
566! GNU General Public License for more details.
567
568! You should have received a copy of the GNU General Public License
569! along with this program. If not, see <http://www.gnu.org/licenses/>.
570#include "config.h"
571
582IMPLICIT NONE
583
584integer, parameter :: network_name_len=20
585
591 character(len=network_name_len) :: name
593
596
601 MODULE PROCEDURE vol7d_network_init
602END INTERFACE
603
607 MODULE PROCEDURE vol7d_network_delete
608END INTERFACE
609
613INTERFACE OPERATOR (==)
614 MODULE PROCEDURE vol7d_network_eq
615END INTERFACE
616
620INTERFACE OPERATOR (/=)
621 MODULE PROCEDURE vol7d_network_ne
622END INTERFACE
623
627INTERFACE OPERATOR (>)
628 MODULE PROCEDURE vol7d_network_gt
629END INTERFACE
630
634INTERFACE OPERATOR (<)
635 MODULE PROCEDURE vol7d_network_lt
636END INTERFACE
637
641INTERFACE OPERATOR (>=)
642 MODULE PROCEDURE vol7d_network_ge
643END INTERFACE
644
648INTERFACE OPERATOR (<=)
649 MODULE PROCEDURE vol7d_network_le
650END INTERFACE
651
652#define VOL7D_POLY_TYPE TYPE(vol7d_network)
653#define VOL7D_POLY_TYPES _network
654#define ENABLE_SORT
655#include "array_utilities_pre.F90"
656
659 MODULE PROCEDURE display_network
660END INTERFACE
661
664 MODULE PROCEDURE c_e_network
665END INTERFACE
666
669 MODULE PROCEDURE to_char_network
670END INTERFACE
671
672CONTAINS
673
679FUNCTION vol7d_network_new(name) RESULT(this)
680CHARACTER(len=*),INTENT(in),OPTIONAL :: name
681
682TYPE(vol7d_network) :: this
683
685
686END FUNCTION vol7d_network_new
687
688
692SUBROUTINE vol7d_network_init(this, name)
693TYPE(vol7d_network),INTENT(INOUT) :: this
694CHARACTER(len=*),INTENT(in),OPTIONAL :: name
695
696IF (PRESENT(name)) THEN
697 this%name = lowercase(name)
698ELSE
699 this%name = cmiss
700END IF
701
702END SUBROUTINE vol7d_network_init
703
704
706SUBROUTINE vol7d_network_delete(this)
707TYPE(vol7d_network),INTENT(INOUT) :: this
708
709this%name = cmiss
710
711END SUBROUTINE vol7d_network_delete
712
713
714subroutine display_network(this)
715
716TYPE(vol7d_network),INTENT(in) :: this
717
718print*,to_char_network(this)
719
720end subroutine display_network
721
722
723elemental function c_e_network(this) result(res)
724
725TYPE(vol7d_network),INTENT(in) :: this
726logical :: res
727
728res = .not. this == vol7d_network_miss
729
730end function c_e_network
731
732
733elemental character(len=20) function to_char_network(this)
734
735TYPE(vol7d_network),INTENT(in) :: this
736
737to_char_network="Network: "//trim(this%name)
738
739return
740
741end function to_char_network
742
743
744ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
745TYPE(vol7d_network),INTENT(IN) :: this, that
746LOGICAL :: res
747
748res = (this%name == that%name)
749
750END FUNCTION vol7d_network_eq
751
752
753ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
754TYPE(vol7d_network),INTENT(IN) :: this, that
755LOGICAL :: res
756
757res = .NOT.(this == that)
758
759END FUNCTION vol7d_network_ne
760
761
762ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
763TYPE(vol7d_network),INTENT(IN) :: this, that
764LOGICAL :: res
765
766res = this%name > that%name
767
768END FUNCTION vol7d_network_gt
769
770ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
771TYPE(vol7d_network),INTENT(IN) :: this, that
772LOGICAL :: res
773
774res = this%name < that%name
775
776END FUNCTION vol7d_network_lt
777
778
779ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
780TYPE(vol7d_network),INTENT(IN) :: this, that
781LOGICAL :: res
782
783res = this%name >= that%name
784
785END FUNCTION vol7d_network_ge
786
787ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
788TYPE(vol7d_network),INTENT(IN) :: this, that
789LOGICAL :: res
790
791res = this%name <= that%name
792
793END FUNCTION vol7d_network_le
794
795
796#include "array_utilities_inc.F90"
797
798
Distruttore per la classe vol7d_network. Definition: vol7d_network_class.F90:248 Costruttore per la classe vol7d_network. Definition: vol7d_network_class.F90:242 return network object in a pretty string Definition: vol7d_network_class.F90:365 Definition of constants to be used for declaring variables of a desired type. Definition: kinds.F90:251 Definitions of constants and functions for working with missing values. Definition: missing_values.f90:50 Classe per la gestione delle reti di stazioni per osservazioni meteo e affini. Definition: vol7d_network_class.F90:220 Definisce la rete a cui appartiene una stazione. Definition: vol7d_network_class.F90:232 |