libsim Versione 7.2.0
|
◆ pack_distinct_network()
compatta gli elementi distinti di vect in un array Definizione alla linea 656 del file vol7d_network_class.F90. 658! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
659! authors:
660! Davide Cesari <dcesari@arpa.emr.it>
661! Paolo Patruno <ppatruno@arpa.emr.it>
662
663! This program is free software; you can redistribute it and/or
664! modify it under the terms of the GNU General Public License as
665! published by the Free Software Foundation; either version 2 of
666! the License, or (at your option) any later version.
667
668! This program is distributed in the hope that it will be useful,
669! but WITHOUT ANY WARRANTY; without even the implied warranty of
670! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
671! GNU General Public License for more details.
672
673! You should have received a copy of the GNU General Public License
674! along with this program. If not, see <http://www.gnu.org/licenses/>.
675#include "config.h"
676
687IMPLICIT NONE
688
689integer, parameter :: network_name_len=20
690
696 character(len=network_name_len) :: name
698
701
706 MODULE PROCEDURE vol7d_network_init
707END INTERFACE
708
712 MODULE PROCEDURE vol7d_network_delete
713END INTERFACE
714
718INTERFACE OPERATOR (==)
719 MODULE PROCEDURE vol7d_network_eq
720END INTERFACE
721
725INTERFACE OPERATOR (/=)
726 MODULE PROCEDURE vol7d_network_ne
727END INTERFACE
728
732INTERFACE OPERATOR (>)
733 MODULE PROCEDURE vol7d_network_gt
734END INTERFACE
735
739INTERFACE OPERATOR (<)
740 MODULE PROCEDURE vol7d_network_lt
741END INTERFACE
742
746INTERFACE OPERATOR (>=)
747 MODULE PROCEDURE vol7d_network_ge
748END INTERFACE
749
753INTERFACE OPERATOR (<=)
754 MODULE PROCEDURE vol7d_network_le
755END INTERFACE
756
757#define VOL7D_POLY_TYPE TYPE(vol7d_network)
758#define VOL7D_POLY_TYPES _network
759#define ENABLE_SORT
760#include "array_utilities_pre.F90"
761
764 MODULE PROCEDURE display_network
765END INTERFACE
766
769 MODULE PROCEDURE c_e_network
770END INTERFACE
771
774 MODULE PROCEDURE to_char_network
775END INTERFACE
776
777CONTAINS
778
784FUNCTION vol7d_network_new(name) RESULT(this)
785CHARACTER(len=*),INTENT(in),OPTIONAL :: name
786
787TYPE(vol7d_network) :: this
788
790
791END FUNCTION vol7d_network_new
792
793
797SUBROUTINE vol7d_network_init(this, name)
798TYPE(vol7d_network),INTENT(INOUT) :: this
799CHARACTER(len=*),INTENT(in),OPTIONAL :: name
800
801IF (PRESENT(name)) THEN
802 this%name = lowercase(name)
803ELSE
804 this%name = cmiss
805END IF
806
807END SUBROUTINE vol7d_network_init
808
809
811SUBROUTINE vol7d_network_delete(this)
812TYPE(vol7d_network),INTENT(INOUT) :: this
813
814this%name = cmiss
815
816END SUBROUTINE vol7d_network_delete
817
818
819subroutine display_network(this)
820
821TYPE(vol7d_network),INTENT(in) :: this
822
823print*,to_char_network(this)
824
825end subroutine display_network
826
827
828elemental function c_e_network(this) result(res)
829
830TYPE(vol7d_network),INTENT(in) :: this
831logical :: res
832
833res = .not. this == vol7d_network_miss
834
835end function c_e_network
836
837
838elemental character(len=20) function to_char_network(this)
839
840TYPE(vol7d_network),INTENT(in) :: this
841
842to_char_network="Network: "//trim(this%name)
843
844return
845
846end function to_char_network
847
848
849ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
850TYPE(vol7d_network),INTENT(IN) :: this, that
851LOGICAL :: res
852
853res = (this%name == that%name)
854
855END FUNCTION vol7d_network_eq
856
857
858ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
859TYPE(vol7d_network),INTENT(IN) :: this, that
860LOGICAL :: res
861
862res = .NOT.(this == that)
863
864END FUNCTION vol7d_network_ne
865
866
867ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
868TYPE(vol7d_network),INTENT(IN) :: this, that
869LOGICAL :: res
870
871res = this%name > that%name
872
873END FUNCTION vol7d_network_gt
874
875ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
876TYPE(vol7d_network),INTENT(IN) :: this, that
877LOGICAL :: res
878
879res = this%name < that%name
880
881END FUNCTION vol7d_network_lt
882
883
884ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
885TYPE(vol7d_network),INTENT(IN) :: this, that
886LOGICAL :: res
887
888res = this%name >= that%name
889
890END FUNCTION vol7d_network_ge
891
892ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
893TYPE(vol7d_network),INTENT(IN) :: this, that
894LOGICAL :: res
895
896res = this%name <= that%name
897
898END FUNCTION vol7d_network_le
899
900
901#include "array_utilities_inc.F90"
902
903
Distruttore per la classe vol7d_network. Definition: vol7d_network_class.F90:242 Costruttore per la classe vol7d_network. Definition: vol7d_network_class.F90:236 return network object in a pretty string Definition: vol7d_network_class.F90:359 Definition of constants to be used for declaring variables of a desired type. Definition: kinds.F90:245 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:214 Definisce la rete a cui appartiene una stazione. Definition: vol7d_network_class.F90:226 |