libsim Versione 7.1.11

◆ vol7d_network_init()

subroutine vol7d_network_init ( type(vol7d_network), intent(inout)  this,
character(len=*), intent(in), optional  name 
)

Inizializza un oggetto vol7d_network con i parametri opzionali forniti.

Se non viene passato nessun parametro opzionale l'oggetto รจ inizializzato a valore mancante.

Parametri
[in,out]thisoggetto da inizializzare
[in]nameMnemonic alias for type of report

Definizione alla linea 389 del file vol7d_network_class.F90.

390! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
391! authors:
392! Davide Cesari <dcesari@arpa.emr.it>
393! Paolo Patruno <ppatruno@arpa.emr.it>
394
395! This program is free software; you can redistribute it and/or
396! modify it under the terms of the GNU General Public License as
397! published by the Free Software Foundation; either version 2 of
398! the License, or (at your option) any later version.
399
400! This program is distributed in the hope that it will be useful,
401! but WITHOUT ANY WARRANTY; without even the implied warranty of
402! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
403! GNU General Public License for more details.
404
405! You should have received a copy of the GNU General Public License
406! along with this program. If not, see <http://www.gnu.org/licenses/>.
407#include "config.h"
408
416USE kinds
419IMPLICIT NONE
420
421integer, parameter :: network_name_len=20
422
427TYPE vol7d_network
428 character(len=network_name_len) :: name
429END TYPE vol7d_network
430
432TYPE(vol7d_network),PARAMETER :: vol7d_network_miss=vol7d_network(cmiss)
433
437INTERFACE init
438 MODULE PROCEDURE vol7d_network_init
439END INTERFACE
440
443INTERFACE delete
444 MODULE PROCEDURE vol7d_network_delete
445END INTERFACE
446
450INTERFACE OPERATOR (==)
451 MODULE PROCEDURE vol7d_network_eq
452END INTERFACE
453
457INTERFACE OPERATOR (/=)
458 MODULE PROCEDURE vol7d_network_ne
459END INTERFACE
460
464INTERFACE OPERATOR (>)
465 MODULE PROCEDURE vol7d_network_gt
466END INTERFACE
467
471INTERFACE OPERATOR (<)
472 MODULE PROCEDURE vol7d_network_lt
473END INTERFACE
474
478INTERFACE OPERATOR (>=)
479 MODULE PROCEDURE vol7d_network_ge
480END INTERFACE
481
485INTERFACE OPERATOR (<=)
486 MODULE PROCEDURE vol7d_network_le
487END INTERFACE
488
489#define VOL7D_POLY_TYPE TYPE(vol7d_network)
490#define VOL7D_POLY_TYPES _network
491#define ENABLE_SORT
492#include "array_utilities_pre.F90"
493
495INTERFACE display
496 MODULE PROCEDURE display_network
497END INTERFACE
498
500INTERFACE c_e
501 MODULE PROCEDURE c_e_network
502END INTERFACE
503
505INTERFACE to_char
506 MODULE PROCEDURE to_char_network
507END INTERFACE
508
509CONTAINS
510
516FUNCTION vol7d_network_new(name) RESULT(this)
517CHARACTER(len=*),INTENT(in),OPTIONAL :: name
518
519TYPE(vol7d_network) :: this
520
521CALL init(this, name)
522
523END FUNCTION vol7d_network_new
524
525
529SUBROUTINE vol7d_network_init(this, name)
530TYPE(vol7d_network),INTENT(INOUT) :: this
531CHARACTER(len=*),INTENT(in),OPTIONAL :: name
532
533IF (PRESENT(name)) THEN
534 this%name = lowercase(name)
535ELSE
536 this%name = cmiss
537END IF
538
539END SUBROUTINE vol7d_network_init
540
541
543SUBROUTINE vol7d_network_delete(this)
544TYPE(vol7d_network),INTENT(INOUT) :: this
545
546this%name = cmiss
547
548END SUBROUTINE vol7d_network_delete
549
550
551subroutine display_network(this)
552
553TYPE(vol7d_network),INTENT(in) :: this
554
555print*,to_char_network(this)
556
557end subroutine display_network
558
559
560elemental function c_e_network(this) result(res)
561
562TYPE(vol7d_network),INTENT(in) :: this
563logical :: res
564
565res = .not. this == vol7d_network_miss
566
567end function c_e_network
568
569
570elemental character(len=20) function to_char_network(this)
571
572TYPE(vol7d_network),INTENT(in) :: this
573
574to_char_network="Network: "//trim(this%name)
575
576return
577
578end function to_char_network
579
580
581ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
582TYPE(vol7d_network),INTENT(IN) :: this, that
583LOGICAL :: res
584
585res = (this%name == that%name)
586
587END FUNCTION vol7d_network_eq
588
589
590ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
591TYPE(vol7d_network),INTENT(IN) :: this, that
592LOGICAL :: res
593
594res = .NOT.(this == that)
595
596END FUNCTION vol7d_network_ne
597
598
599ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
600TYPE(vol7d_network),INTENT(IN) :: this, that
601LOGICAL :: res
602
603res = this%name > that%name
604
605END FUNCTION vol7d_network_gt
606
607ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
608TYPE(vol7d_network),INTENT(IN) :: this, that
609LOGICAL :: res
610
611res = this%name < that%name
612
613END FUNCTION vol7d_network_lt
614
615
616ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
617TYPE(vol7d_network),INTENT(IN) :: this, that
618LOGICAL :: res
619
620res = this%name >= that%name
621
622END FUNCTION vol7d_network_ge
623
624ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
625TYPE(vol7d_network),INTENT(IN) :: this, that
626LOGICAL :: res
627
628res = this%name <= that%name
629
630END FUNCTION vol7d_network_le
631
632
633#include "array_utilities_inc.F90"
634
635
636END MODULE vol7d_network_class
Check object presence.
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:251
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.