Changeset 312 for XIOS/trunk/src/fortran/ifile.F90
- Timestamp:
- 02/14/12 15:36:14 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/fortran/ifile.F90
r300 r312 6 6 USE FILEGROUP_INTERFACE 7 7 8 TYPE XFileHandle9 INTEGER(kind = C_INTPTR_T) :: daddr10 END TYPE XFileHandle11 12 TYPE XFileGroupHandle13 INTEGER(kind = C_INTPTR_T) :: daddr14 END TYPE XFileGroupHandle15 16 8 TYPE txios(file) 17 9 INTEGER(kind = C_INTPTR_T) :: daddr … … 22 14 END TYPE txios(filegroup) 23 15 24 !----------------------------------------------------------------------------25 INTERFACE set_file_attributes26 MODULE PROCEDURE set_file_attributes_id,set_file_attributes_hdl27 END INTERFACE28 29 INTERFACE set_file_group_attributes30 MODULE PROCEDURE set_filegroup_attributes_id,set_filegroup_attributes_hdl31 END INTERFACE32 !----------------------------------------------------------------------------33 34 16 CONTAINS ! Fonctions disponibles pour les utilisateurs. 35 17 … … 180 162 181 163 182 183 164 SUBROUTINE xios(get_file_handle)( idt, ret) 184 165 IMPLICIT NONE … … 219 200 END FUNCTION xios(is_valid_filegroup) 220 201 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 !!!!!!!!!!!!!! Anciennes interfaces !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!237 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!238 239 SUBROUTINE set_file_attributes_id(file_id, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_)240 IMPLICIT NONE241 TYPE(XFileHandle) :: file_hdl242 CHARACTER(len = *) , INTENT(IN) :: file_id243 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_244 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_245 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_suffix_246 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_247 INTEGER , OPTIONAL, INTENT(IN) :: output_level_248 LOGICAL , OPTIONAL, INTENT(IN) :: enabled_249 250 CALL file_handle_create(file_hdl, file_id)251 CALL set_file_attributes_hdl(file_hdl, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_)252 253 END SUBROUTINE set_file_attributes_id254 255 SUBROUTINE set_file_attributes_hdl(file_hdl, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_)256 TYPE(XFileHandle) , INTENT(IN) :: file_hdl257 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_258 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_259 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_suffix_260 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_261 INTEGER , OPTIONAL, INTENT(IN) :: output_level_262 LOGICAL(kind = 1) :: enabled__263 LOGICAL , OPTIONAL, INTENT(IN) :: enabled_264 265 IF (PRESENT(name_)) THEN266 CALL cxios_set_file_name(file_hdl%daddr, name_, len(name_))267 END IF268 IF (PRESENT(description_)) THEN269 CALL cxios_set_file_description(file_hdl%daddr, description_, len(description_))270 END IF271 IF (PRESENT(name_suffix_)) THEN272 CALL cxios_set_file_name_suffix(file_hdl%daddr, name_suffix_, len(name_suffix_))273 END IF274 IF (PRESENT(output_freq_)) THEN275 CALL cxios_set_file_output_freq(file_hdl%daddr, output_freq_, len(output_freq_))276 END IF277 IF (PRESENT(output_level_)) THEN278 CALL cxios_set_file_output_level(file_hdl%daddr, output_level_)279 END IF280 IF (PRESENT(enabled_)) THEN281 enabled__ = enabled_282 CALL cxios_set_file_enabled(file_hdl%daddr, enabled__)283 END IF284 285 END SUBROUTINE set_file_attributes_hdl286 287 SUBROUTINE set_filegroup_attributes_id(filegroup_id, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_)288 IMPLICIT NONE289 TYPE(XFileGroupHandle) :: filegroup_hdl290 CHARACTER(len = *) , INTENT(IN) :: filegroup_id291 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_292 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_293 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_suffix_294 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_295 INTEGER , OPTIONAL, INTENT(IN) :: output_level_296 LOGICAL , OPTIONAL, INTENT(IN) :: enabled_297 298 CALL filegroup_handle_create(filegroup_hdl, filegroup_id)299 CALL set_filegroup_attributes_hdl(filegroup_hdl, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_)300 301 END SUBROUTINE set_filegroup_attributes_id302 303 SUBROUTINE set_filegroup_attributes_hdl(filegroup_hdl, name_ , description_, name_suffix_, output_freq_, output_level_, enabled_)304 IMPLICIT NONE305 TYPE(XFileGroupHandle) , INTENT(IN) :: filegroup_hdl306 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_307 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: description_308 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: name_suffix_309 CHARACTER(len = *), OPTIONAL, INTENT(IN) :: output_freq_310 INTEGER , OPTIONAL, INTENT(IN) :: output_level_311 LOGICAL(kind = 1) :: enabled__312 LOGICAL , OPTIONAL, INTENT(IN) :: enabled_313 314 IF (PRESENT(name_)) THEN315 CALL cxios_set_filegroup_name(filegroup_hdl%daddr, name_, len(name_))316 END IF317 IF (PRESENT(description_)) THEN318 CALL cxios_set_filegroup_description(filegroup_hdl%daddr, description_, len(description_))319 END IF320 IF (PRESENT(name_suffix_)) THEN321 CALL cxios_set_filegroup_name_suffix(filegroup_hdl%daddr, name_suffix_, len(name_suffix_))322 END IF323 IF (PRESENT(output_freq_)) THEN324 CALL cxios_set_filegroup_output_freq(filegroup_hdl%daddr, output_freq_, len(output_freq_))325 END IF326 IF (PRESENT(output_level_)) THEN327 CALL cxios_set_filegroup_output_level(filegroup_hdl%daddr, output_level_)328 END IF329 IF (PRESENT(enabled_)) THEN330 enabled__ = enabled_331 CALL cxios_set_filegroup_enabled(filegroup_hdl%daddr, enabled__)332 END IF333 334 END SUBROUTINE set_filegroup_attributes_hdl335 336 SUBROUTINE file_handle_create(ret, idt)337 IMPLICIT NONE338 TYPE(XFileHandle) , INTENT(OUT):: ret339 CHARACTER(len = *), INTENT(IN) :: idt340 CALL cxios_file_handle_create(ret%daddr, idt, len(idt))341 END SUBROUTINE file_handle_create342 343 SUBROUTINE filegroup_handle_create(ret, idt)344 IMPLICIT NONE345 TYPE(XFileGroupHandle), INTENT(OUT):: ret346 CHARACTER(len = *) , INTENT(IN) :: idt347 CALL cxios_filegroup_handle_create(ret%daddr, idt, len(idt))348 END SUBROUTINE filegroup_handle_create349 350 LOGICAL FUNCTION file_valid_id(idt)351 IMPLICIT NONE352 CHARACTER(len = *) , INTENT(IN) :: idt353 LOGICAL (kind = 1) :: val354 CALL cxios_file_valid_id(val, idt, len(idt));355 file_valid_id = val356 END FUNCTION file_valid_id357 358 LOGICAL FUNCTION filegroup_valid_id(idt)359 IMPLICIT NONE360 CHARACTER(len = *) , INTENT(IN) :: idt361 LOGICAL (kind = 1) :: val362 CALL cxios_filegroup_valid_id(val, idt, len(idt));363 filegroup_valid_id = val364 END FUNCTION filegroup_valid_id365 202 366 203 END MODULE IFILE
Note: See TracChangeset
for help on using the changeset viewer.