get_persis_details.F90

Go to the documentation of this file.
00001 !------------------------------------------------------------------------
00002 ! Copyright 2006-2010, CERFACS, Toulouse, France.
00003 ! All rights reserved. Use is subject to license terms.
00004 !------------------------------------------------------------------------
00005 !BOP
00006 !
00007 !======================================================================
00008 !
00009   SUBROUTINE get_persis_details ( id_XML_doc,        &
00010                                   id_nb_persis,      &
00011                                   sda_smioc_persis,  &
00012                                   id_error )     
00013     
00014 ! !DESCRIPTION
00015 ! This routine extracts the informations about the persis of one smioc
00016 !
00017 !----------------------------------------------------------------------
00018 !
00019 ! !REVISED HISTORY
00020 !   Date        Programmer     Description
00021 ! ----------    ----------     -----------
00022 ! 20/10/2003    S. Valcke      Creation
00023 ! 30/12/2003    D. Declat      Implemented as a module
00024 !
00025     USE PSMILe_smioc
00026     IMPLICIT NONE
00027 !
00028 !EOP
00029 !----------------------------------------------------------------------
00030 ! $Id: psmile_smioc.F90 1793 2008-11-25 14:58:31Z valcke $
00031 ! $Author: valcke $
00032 !----------------------------------------------------------------------
00033 !
00034 ! 0. Declaration
00035 !
00036 ! handle of XML content of the smioc file
00037     INTEGER, INTENT(In) :: id_XML_doc
00038 
00039 ! number of persis variables
00040     INTEGER,INTENT(In):: id_nb_persis
00041 
00042 ! persis structure
00043     TYPE(persistent),DIMENSION(id_nb_persis),INTENT (Out):: 
00044        sda_smioc_persis 
00045 
00046 ! returned error code
00047     INTEGER,INTENT(Out):: id_error 
00048 
00049 !
00050     INTEGER :: sasa_c_convert_char2int
00051     INTEGER :: sasa_c_get_attri_1st_level, sasa_c_get_attri_2nd_level
00052     INTEGER :: sasa_c_get_attri_3rd_level
00053     INTEGER :: sasa_c_get_element_3rd_level_c 
00054     INTEGER :: sasa_c_get_element_2nd_level_c, sasa_c_get_element_2nd_level_i
00055 !
00056     CHARACTER(LEN=max_name) :: cla_char
00057     INTEGER :: ib
00058 !
00059     INTEGER :: il_test, il_length
00060 !
00061 !----------------------------------------------------------------------
00062 !
00063     DO ib = 1, id_nb_persis
00064 
00065       id_error = &
00066          sasa_c_get_attri_2nd_level (id_XML_doc,                     &
00067          'component', 0, 'persistent', ib,                      &
00068          'local_name', sda_smioc_persis(ib)%cg_local_name, il_length)
00069 
00070       id_error = &
00071          sasa_c_get_attri_2nd_level (id_XML_doc,                     &
00072          'component', 0, 'persistent', ib,                      &
00073          'long_name', sda_smioc_persis(ib)%cg_long_name, il_length)
00074 
00075       id_error = &
00076          sasa_c_get_attri_1st_level (id_XML_doc,                   &
00077          'component', 0, 'local_name',                        &
00078          sda_smioc_persis(ib)%cg_comp_name, il_length)
00079 
00080       id_error = &
00081          sasa_c_get_attri_2nd_level (id_XML_doc,                     &
00082          'component', 0, 'persistent', ib, 'persist_type',      &
00083          cla_char, il_length)
00084       sda_smioc_persis(ib)%ig_persis_type =                     &
00085          sasa_c_convert_char2int(cla_char(1:il_length))
00086 
00087       id_error = &
00088          sasa_c_get_element_2nd_level_c (id_XML_doc,                           &
00089          'component', 0, 'persistent', ib, 'persistent_standard_name', 0, &
00090          sda_smioc_persis(ib)%cg_stand_name, il_length)
00091 
00092       id_error = &
00093          sasa_c_get_element_3rd_level_c (id_XML_doc,                     &
00094          'component', 0, 'persistent', ib, 'persist_physics', 0,    &
00095          'physical_units', 0, sda_smioc_persis(ib)%cg_units, il_length)
00096 
00097       id_error = &
00098          sasa_c_get_attri_3rd_level (id_XML_doc,                       &
00099          'component', 0, 'persistent', ib, 'persistent_value', 0, &
00100          'type', cla_char, il_length)
00101       sda_smioc_persis(ib)%ig_datatype =                          &
00102          sasa_c_convert_char2int(cla_char(1:il_length))
00103 
00104       id_error = &
00105          sasa_c_get_element_2nd_level_i (id_XML_doc,                   &
00106          'component', 0, 'persistent', ib, 'persistent_value', 0, &
00107          il_test)
00108       sda_smioc_persis(ib)%rg_persis = il_test
00109 
00110     END DO
00111 
00112   END SUBROUTINE get_persis_details
00113 
00114 !
00115 !-----------------------------------------------------------------------

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1