libsim Versione 7.2.4
|
◆ vol7d_network_new()
Inizializza un oggetto vol7d_network con i parametri opzionali forniti. Questa è la versione
Definizione alla linea 370 del file vol7d_network_class.F90. 371! Copyright (C) 2010 ARPA-SIM <urpsim@smr.arpa.emr.it>
372! authors:
373! Davide Cesari <dcesari@arpa.emr.it>
374! Paolo Patruno <ppatruno@arpa.emr.it>
375
376! This program is free software; you can redistribute it and/or
377! modify it under the terms of the GNU General Public License as
378! published by the Free Software Foundation; either version 2 of
379! the License, or (at your option) any later version.
380
381! This program is distributed in the hope that it will be useful,
382! but WITHOUT ANY WARRANTY; without even the implied warranty of
383! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
384! GNU General Public License for more details.
385
386! You should have received a copy of the GNU General Public License
387! along with this program. If not, see <http://www.gnu.org/licenses/>.
388#include "config.h"
389
400IMPLICIT NONE
401
402integer, parameter :: network_name_len=20
403
409 character(len=network_name_len) :: name
411
414
419 MODULE PROCEDURE vol7d_network_init
420END INTERFACE
421
425 MODULE PROCEDURE vol7d_network_delete
426END INTERFACE
427
431INTERFACE OPERATOR (==)
432 MODULE PROCEDURE vol7d_network_eq
433END INTERFACE
434
438INTERFACE OPERATOR (/=)
439 MODULE PROCEDURE vol7d_network_ne
440END INTERFACE
441
445INTERFACE OPERATOR (>)
446 MODULE PROCEDURE vol7d_network_gt
447END INTERFACE
448
452INTERFACE OPERATOR (<)
453 MODULE PROCEDURE vol7d_network_lt
454END INTERFACE
455
459INTERFACE OPERATOR (>=)
460 MODULE PROCEDURE vol7d_network_ge
461END INTERFACE
462
466INTERFACE OPERATOR (<=)
467 MODULE PROCEDURE vol7d_network_le
468END INTERFACE
469
470#define VOL7D_POLY_TYPE TYPE(vol7d_network)
471#define VOL7D_POLY_TYPES _network
472#define ENABLE_SORT
473#include "array_utilities_pre.F90"
474
477 MODULE PROCEDURE display_network
478END INTERFACE
479
482 MODULE PROCEDURE c_e_network
483END INTERFACE
484
487 MODULE PROCEDURE to_char_network
488END INTERFACE
489
490CONTAINS
491
497FUNCTION vol7d_network_new(name) RESULT(this)
498CHARACTER(len=*),INTENT(in),OPTIONAL :: name
499
500TYPE(vol7d_network) :: this
501
503
504END FUNCTION vol7d_network_new
505
506
510SUBROUTINE vol7d_network_init(this, name)
511TYPE(vol7d_network),INTENT(INOUT) :: this
512CHARACTER(len=*),INTENT(in),OPTIONAL :: name
513
514IF (PRESENT(name)) THEN
515 this%name = lowercase(name)
516ELSE
517 this%name = cmiss
518END IF
519
520END SUBROUTINE vol7d_network_init
521
522
524SUBROUTINE vol7d_network_delete(this)
525TYPE(vol7d_network),INTENT(INOUT) :: this
526
527this%name = cmiss
528
529END SUBROUTINE vol7d_network_delete
530
531
532subroutine display_network(this)
533
534TYPE(vol7d_network),INTENT(in) :: this
535
536print*,to_char_network(this)
537
538end subroutine display_network
539
540
541elemental function c_e_network(this) result(res)
542
543TYPE(vol7d_network),INTENT(in) :: this
544logical :: res
545
546res = .not. this == vol7d_network_miss
547
548end function c_e_network
549
550
551elemental character(len=20) function to_char_network(this)
552
553TYPE(vol7d_network),INTENT(in) :: this
554
555to_char_network="Network: "//trim(this%name)
556
557return
558
559end function to_char_network
560
561
562ELEMENTAL FUNCTION vol7d_network_eq(this, that) RESULT(res)
563TYPE(vol7d_network),INTENT(IN) :: this, that
564LOGICAL :: res
565
566res = (this%name == that%name)
567
568END FUNCTION vol7d_network_eq
569
570
571ELEMENTAL FUNCTION vol7d_network_ne(this, that) RESULT(res)
572TYPE(vol7d_network),INTENT(IN) :: this, that
573LOGICAL :: res
574
575res = .NOT.(this == that)
576
577END FUNCTION vol7d_network_ne
578
579
580ELEMENTAL FUNCTION vol7d_network_gt(this, that) RESULT(res)
581TYPE(vol7d_network),INTENT(IN) :: this, that
582LOGICAL :: res
583
584res = this%name > that%name
585
586END FUNCTION vol7d_network_gt
587
588ELEMENTAL FUNCTION vol7d_network_lt(this, that) RESULT(res)
589TYPE(vol7d_network),INTENT(IN) :: this, that
590LOGICAL :: res
591
592res = this%name < that%name
593
594END FUNCTION vol7d_network_lt
595
596
597ELEMENTAL FUNCTION vol7d_network_ge(this, that) RESULT(res)
598TYPE(vol7d_network),INTENT(IN) :: this, that
599LOGICAL :: res
600
601res = this%name >= that%name
602
603END FUNCTION vol7d_network_ge
604
605ELEMENTAL FUNCTION vol7d_network_le(this, that) RESULT(res)
606TYPE(vol7d_network),INTENT(IN) :: this, that
607LOGICAL :: res
608
609res = this%name <= that%name
610
611END FUNCTION vol7d_network_le
612
613
614#include "array_utilities_inc.F90"
615
616
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 |