libsim Versione 7.2.1
|
◆ pack_distinct_sorted_network()
compatta gli elementi distinti di vect in un sorted array Definizione alla linea 623 del file vol7d_network_class.F90. 625! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
626! authors:
627! Davide Cesari <dcesari@arpa.emr.it>
628! Paolo Patruno <ppatruno@arpa.emr.it>
629
630! This program is free software; you can redistribute it and/or
631! modify it under the terms of the GNU General Public License as
632! published by the Free Software Foundation; either version 2 of
633! the License, or (at your option) any later version.
634
635! This program is distributed in the hope that it will be useful,
636! but WITHOUT ANY WARRANTY; without even the implied warranty of
637! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
638! GNU General Public License for more details.
639
640! You should have received a copy of the GNU General Public License
641! along with this program. If not, see <http://www.gnu.org/licenses/>.
642#include "config.h"
643
654IMPLICIT NONE
655
656integer, parameter :: network_name_len=20
657
663 character(len=network_name_len) :: name
665
668
673 MODULE PROCEDURE vol7d_network_init
674END INTERFACE
675
679 MODULE PROCEDURE vol7d_network_delete
680END INTERFACE
681
685INTERFACE OPERATOR (==)
686 MODULE PROCEDURE vol7d_network_eq
687END INTERFACE
688
692INTERFACE OPERATOR (/=)
693 MODULE PROCEDURE vol7d_network_ne
694END INTERFACE
695
699INTERFACE OPERATOR (>)
700 MODULE PROCEDURE vol7d_network_gt
701END INTERFACE
702
706INTERFACE OPERATOR (<)
707 MODULE PROCEDURE vol7d_network_lt
708END INTERFACE
709
713INTERFACE OPERATOR (>=)
714 MODULE PROCEDURE vol7d_network_ge
715END INTERFACE
716
720INTERFACE OPERATOR (<=)
721 MODULE PROCEDURE vol7d_network_le
722END INTERFACE
723
724#define VOL7D_POLY_TYPE TYPE(vol7d_network)
725#define VOL7D_POLY_TYPES _network
726#define ENABLE_SORT
727#include "array_utilities_pre.F90"
728
731 MODULE PROCEDURE display_network
732END INTERFACE
733
736 MODULE PROCEDURE c_e_network
737END INTERFACE
738
741 MODULE PROCEDURE to_char_network
742END INTERFACE
743
744CONTAINS
745
751FUNCTION vol7d_network_new(name) RESULT(this)
752CHARACTER(len=*),INTENT(in),OPTIONAL :: name
753
754TYPE(vol7d_network) :: this
755
757
758END FUNCTION vol7d_network_new
759
760
764SUBROUTINE vol7d_network_init(this, name)
765TYPE(vol7d_network),INTENT(INOUT) :: this
766CHARACTER(len=*),INTENT(in),OPTIONAL :: name
767
768IF (PRESENT(name)) THEN
769 this%name = lowercase(name)
770ELSE
771 this%name = cmiss
772END IF
773
774END SUBROUTINE vol7d_network_init
775
776
778SUBROUTINE vol7d_network_delete(this)
779TYPE(vol7d_network),INTENT(INOUT) :: this
780
781this%name = cmiss
782
783END SUBROUTINE vol7d_network_delete
784
785
786subroutine display_network(this)
787
788TYPE(vol7d_network),INTENT(in) :: this
789
790print*,to_char_network(this)
791
792end subroutine display_network
793
794
795elemental function c_e_network(this) result(res)
796
797TYPE(vol7d_network),INTENT(in) :: this
798logical :: res
799
800res = .not. this == vol7d_network_miss
801
802end function c_e_network
803
804
805elemental character(len=20) function to_char_network(this)
806
807TYPE(vol7d_network),INTENT(in) :: this
808
809to_char_network="Network: "//trim(this%name)
810
811return
812
813end function to_char_network
814
815
816ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
817TYPE(vol7d_network),INTENT(IN) :: this, that
818LOGICAL :: res
819
820res = (this%name == that%name)
821
822END FUNCTION vol7d_network_eq
823
824
825ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
826TYPE(vol7d_network),INTENT(IN) :: this, that
827LOGICAL :: res
828
829res = .NOT.(this == that)
830
831END FUNCTION vol7d_network_ne
832
833
834ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
835TYPE(vol7d_network),INTENT(IN) :: this, that
836LOGICAL :: res
837
838res = this%name > that%name
839
840END FUNCTION vol7d_network_gt
841
842ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
843TYPE(vol7d_network),INTENT(IN) :: this, that
844LOGICAL :: res
845
846res = this%name < that%name
847
848END FUNCTION vol7d_network_lt
849
850
851ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
852TYPE(vol7d_network),INTENT(IN) :: this, that
853LOGICAL :: res
854
855res = this%name >= that%name
856
857END FUNCTION vol7d_network_ge
858
859ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
860TYPE(vol7d_network),INTENT(IN) :: this, that
861LOGICAL :: res
862
863res = this%name <= that%name
864
865END FUNCTION vol7d_network_le
866
867
868#include "array_utilities_inc.F90"
869
870
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 |