libsim Versione 7.2.0
|
◆ vol7d_network_init()
Inizializza un oggetto vol7d_network con i parametri opzionali forniti. Se non viene passato nessun parametro opzionale l'oggetto รจ inizializzato a valore mancante.
Definizione alla linea 383 del file vol7d_network_class.F90. 384! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
385! authors:
386! Davide Cesari <dcesari@arpa.emr.it>
387! Paolo Patruno <ppatruno@arpa.emr.it>
388
389! This program is free software; you can redistribute it and/or
390! modify it under the terms of the GNU General Public License as
391! published by the Free Software Foundation; either version 2 of
392! the License, or (at your option) any later version.
393
394! This program is distributed in the hope that it will be useful,
395! but WITHOUT ANY WARRANTY; without even the implied warranty of
396! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
397! GNU General Public License for more details.
398
399! You should have received a copy of the GNU General Public License
400! along with this program. If not, see <http://www.gnu.org/licenses/>.
401#include "config.h"
402
413IMPLICIT NONE
414
415integer, parameter :: network_name_len=20
416
422 character(len=network_name_len) :: name
424
427
432 MODULE PROCEDURE vol7d_network_init
433END INTERFACE
434
438 MODULE PROCEDURE vol7d_network_delete
439END INTERFACE
440
444INTERFACE OPERATOR (==)
445 MODULE PROCEDURE vol7d_network_eq
446END INTERFACE
447
451INTERFACE OPERATOR (/=)
452 MODULE PROCEDURE vol7d_network_ne
453END INTERFACE
454
458INTERFACE OPERATOR (>)
459 MODULE PROCEDURE vol7d_network_gt
460END INTERFACE
461
465INTERFACE OPERATOR (<)
466 MODULE PROCEDURE vol7d_network_lt
467END INTERFACE
468
472INTERFACE OPERATOR (>=)
473 MODULE PROCEDURE vol7d_network_ge
474END INTERFACE
475
479INTERFACE OPERATOR (<=)
480 MODULE PROCEDURE vol7d_network_le
481END INTERFACE
482
483#define VOL7D_POLY_TYPE TYPE(vol7d_network)
484#define VOL7D_POLY_TYPES _network
485#define ENABLE_SORT
486#include "array_utilities_pre.F90"
487
490 MODULE PROCEDURE display_network
491END INTERFACE
492
495 MODULE PROCEDURE c_e_network
496END INTERFACE
497
500 MODULE PROCEDURE to_char_network
501END INTERFACE
502
503CONTAINS
504
510FUNCTION vol7d_network_new(name) RESULT(this)
511CHARACTER(len=*),INTENT(in),OPTIONAL :: name
512
513TYPE(vol7d_network) :: this
514
516
517END FUNCTION vol7d_network_new
518
519
523SUBROUTINE vol7d_network_init(this, name)
524TYPE(vol7d_network),INTENT(INOUT) :: this
525CHARACTER(len=*),INTENT(in),OPTIONAL :: name
526
527IF (PRESENT(name)) THEN
528 this%name = lowercase(name)
529ELSE
530 this%name = cmiss
531END IF
532
533END SUBROUTINE vol7d_network_init
534
535
537SUBROUTINE vol7d_network_delete(this)
538TYPE(vol7d_network),INTENT(INOUT) :: this
539
540this%name = cmiss
541
542END SUBROUTINE vol7d_network_delete
543
544
545subroutine display_network(this)
546
547TYPE(vol7d_network),INTENT(in) :: this
548
549print*,to_char_network(this)
550
551end subroutine display_network
552
553
554elemental function c_e_network(this) result(res)
555
556TYPE(vol7d_network),INTENT(in) :: this
557logical :: res
558
559res = .not. this == vol7d_network_miss
560
561end function c_e_network
562
563
564elemental character(len=20) function to_char_network(this)
565
566TYPE(vol7d_network),INTENT(in) :: this
567
568to_char_network="Network: "//trim(this%name)
569
570return
571
572end function to_char_network
573
574
575ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
576TYPE(vol7d_network),INTENT(IN) :: this, that
577LOGICAL :: res
578
579res = (this%name == that%name)
580
581END FUNCTION vol7d_network_eq
582
583
584ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
585TYPE(vol7d_network),INTENT(IN) :: this, that
586LOGICAL :: res
587
588res = .NOT.(this == that)
589
590END FUNCTION vol7d_network_ne
591
592
593ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
594TYPE(vol7d_network),INTENT(IN) :: this, that
595LOGICAL :: res
596
597res = this%name > that%name
598
599END FUNCTION vol7d_network_gt
600
601ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
602TYPE(vol7d_network),INTENT(IN) :: this, that
603LOGICAL :: res
604
605res = this%name < that%name
606
607END FUNCTION vol7d_network_lt
608
609
610ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
611TYPE(vol7d_network),INTENT(IN) :: this, that
612LOGICAL :: res
613
614res = this%name >= that%name
615
616END FUNCTION vol7d_network_ge
617
618ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
619TYPE(vol7d_network),INTENT(IN) :: this, that
620LOGICAL :: res
621
622res = this%name <= that%name
623
624END FUNCTION vol7d_network_le
625
626
627#include "array_utilities_inc.F90"
628
629
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 |