00001
00002
00003
00004
00005
00006 SUBROUTINE get_grids_details ( id_XML_doc, &
00007 id_nb_grids, &
00008 sda_smioc_grids, &
00009 id_error )
00010
00011
00012
00013
00014
00015
00016
00017 USE PSMILe_smioc
00018 IMPLICIT NONE
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 INTEGER, INTENT(In) :: id_XML_doc
00036
00037
00038 INTEGER, INTENT(In) :: id_nb_grids
00039
00040
00041 TYPE (smioc_grid), DIMENSION(id_nb_grids), INTENT(Out) :: sda_smioc_grids
00042
00043
00044 INTEGER, INTENT(Out) :: id_error
00045
00046 INTEGER :: sasa_c_convert_char2int
00047 INTEGER :: sasa_c_get_attri_2nd_level, sasa_c_get_attri_3rd_level
00048 INTEGER :: sasa_c_get_attri_4th_level, sasa_c_get_attri_5th_level
00049 INTEGER :: sasa_c_get_element_5th_level_i
00050 INTEGER :: sasa_c_get_element_5th_level_d
00051 INTEGER :: sasa_c_get_number_3rd_level
00052
00053 CHARACTER(LEN=max_name) :: cla_char
00054 INTEGER :: ib, ib_bis, ib_ind, il_index
00055
00056 INTEGER :: il_length
00057
00058
00059
00060 DO ib =1, id_nb_grids
00061
00062
00063 id_error = &
00064 sasa_c_get_attri_2nd_level (id_XML_doc, &
00065 'component', 0, 'grid', ib, 'local_name', &
00066 sda_smioc_grids(ib)%cg_grid_name, il_length)
00067
00068
00069 id_error = &
00070 sasa_c_get_number_3rd_level(id_XML_doc, &
00071 'component', 0, 'grid', ib, 'indexing_dimension',&
00072 ib_ind)
00073
00074 IF (ib_ind > 0) THEN
00075 DO ib_bis = 1, ib_ind
00076 id_error = &
00077 sasa_c_get_attri_3rd_level (id_XML_doc, &
00078 'component', 0, 'grid', ib, 'indexing_dimension', &
00079 ib_bis, 'index', cla_char, il_length)
00080
00081 IF (id_error .EQ. 0) THEN
00082 READ (cla_char, *) il_index
00083 ELSE
00084 PRINT *, '****************************************************'
00085 PRINT *, 'Problem in reading index in indexing_dimension '
00086 PRINT *, '****************************************************'
00087 CALL PSMILe_Flushstd
00088 CALL MPI_Abort(MPI_COMM_WORLD, 1, id_error)
00089 ENDIF
00090
00091 id_error = &
00092 sasa_c_get_attri_3rd_level (id_XML_doc, &
00093 'component', 0, 'grid', ib, 'indexing_dimension', &
00094 ib_bis, 'periodic', cla_char, il_length)
00095 IF (id_error .EQ. 0) THEN
00096 sda_smioc_grids(ib)%iga_periodic(il_index) = &
00097 sasa_c_convert_char2int(cla_char(1:il_length))
00098 ENDIF
00099
00100 END DO
00101 ENDIF
00102 END DO
00103
00104 END SUBROUTINE get_grids_details
00105
00106
00107