libsim Versione 7.2.6

◆ pack_distinct_network()

type(vol7d_network) function, dimension(dim) pack_distinct_network ( type(vol7d_network), dimension(:), intent(in) vect,
integer, intent(in) dim,
logical, dimension(:), intent(in), optional mask,
logical, intent(in), optional back )

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
677!> Classe per la gestione delle reti di stazioni per osservazioni meteo e affini.
678!! Questo modulo definisce una classe per identificare la rete
679!! a cui appartiene una stazione. Per rete si intende un insieme di stazioni
680!! omogenee per tipo di sensori, tipo di variabili osservate,
681!! frequenza delle osservazioni, formato dei dati.
682!! \ingroup vol7d
684USE kinds
687IMPLICIT NONE
688
689integer, parameter :: network_name_len=20
690
691!> Definisce la rete a cui appartiene una stazione.
692!! I membri di \a vol7d_network sono pubblici e quindi liberamente
693!! accessibili e scrivibili, ma è comunque consigliato assegnarli tramite
694!! il costruttore ::init.
695TYPE vol7d_network
696 character(len=network_name_len) :: name !< Mnemonic alias for type of report
697END TYPE vol7d_network
698
699!> Valore mancante per vol7d_network.
700TYPE(vol7d_network),PARAMETER :: vol7d_network_miss=vol7d_network(cmiss)
701
702!> Costruttore per la classe vol7d_network.
703!! Deve essere richiamato
704!! per tutti gli oggetti di questo tipo definiti in un programma.
705INTERFACE init
706 MODULE PROCEDURE vol7d_network_init
707END INTERFACE
708
709!> Distruttore per la classe vol7d_network.
710!! Distrugge l'oggetto in maniera pulita, assegnandogli un valore mancante.
711INTERFACE delete
712 MODULE PROCEDURE vol7d_network_delete
713END INTERFACE
714
715!> Logical equality operator for objects of \a vol7d_network class.
716!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
717!! of any shape.
718INTERFACE OPERATOR (==)
719 MODULE PROCEDURE vol7d_network_eq
720END INTERFACE
721
722!> Logical inequality operator for objects of \a vol7d_network class.
723!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
724!! of any shape.
725INTERFACE OPERATOR (/=)
726 MODULE PROCEDURE vol7d_network_ne
727END INTERFACE
728
729!> Logical greater-than operator for objects of \a vol7d_network class.
730!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
731!! of any shape.
732INTERFACE OPERATOR (>)
733 MODULE PROCEDURE vol7d_network_gt
734END INTERFACE
735
736!> Logical less-than operator for objects of \a vol7d_network class.
737!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
738!! of any shape.
739INTERFACE OPERATOR (<)
740 MODULE PROCEDURE vol7d_network_lt
741END INTERFACE
742
743!> Logical greater-equal operator for objects of \a vol7d_network class.
744!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
745!! of any shape.
746INTERFACE OPERATOR (>=)
747 MODULE PROCEDURE vol7d_network_ge
748END INTERFACE
749
750!> Logical less-equal operator for objects of \a vol7d_network class.
751!! It is defined as \a ELEMENTAL thus it works also with conformal arrays
752!! of any shape.
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
762!>Print object
763INTERFACE display
764 MODULE PROCEDURE display_network
765END INTERFACE
766
767!>Check object presence
768INTERFACE c_e
769 MODULE PROCEDURE c_e_network
770END INTERFACE
771
772!>return network object in a pretty string
773INTERFACE to_char
774 MODULE PROCEDURE to_char_network
775END INTERFACE
776
777CONTAINS
778
779!> Inizializza un oggetto \a vol7d_network con i parametri opzionali forniti.
780!! Questa è la versione \c FUNCTION, in stile F2003, del costruttore, da preferire
781!! rispetto alla versione \c SUBROUTINE \c init.
782!! Se non viene passato nessun parametro opzionale l'oggetto è
783!! inizializzato a valore mancante.
784FUNCTION vol7d_network_new(name) RESULT(this)
785CHARACTER(len=*),INTENT(in),OPTIONAL :: name !< Mnemonic alias for type of report
786
787TYPE(vol7d_network) :: this !< oggetto da inizializzare
788
789CALL init(this, name)
790
791END FUNCTION vol7d_network_new
792
793
794!> Inizializza un oggetto \a vol7d_network con i parametri opzionali forniti.
795!! Se non viene passato nessun parametro opzionale l'oggetto è
796!! inizializzato a valore mancante.
797SUBROUTINE vol7d_network_init(this, name)
798TYPE(vol7d_network),INTENT(INOUT) :: this !< oggetto da inizializzare
799CHARACTER(len=*),INTENT(in),OPTIONAL :: name !< Mnemonic alias for type of report
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
810!> Distrugge l'oggetto in maniera pulita, assegnandogli un valore mancante.
811SUBROUTINE vol7d_network_delete(this)
812TYPE(vol7d_network),INTENT(INOUT) :: this !< oggetto da distruggre
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
904END MODULE vol7d_network_class
Distruttore per la classe vol7d_network.
Costruttore per la classe vol7d_network.
return network object in a pretty string
Utilities for CHARACTER variables.
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.
Classe per la gestione delle reti di stazioni per osservazioni meteo e affini.
Definisce la rete a cui appartiene una stazione.

Generated with Doxygen.