- Timestamp:
- 2017-11-28T15:45:20+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r8812 r8836 41 41 USE dianam ! build name of file 42 42 USE xios 43 USE iom_def, ONLY : max_rst_fields, rst_rfields, rst_wfields, RST_FIELD44 43 # endif 45 44 USE ioipsl, ONLY : ju2ymds ! for calendar … … 211 210 IF( TRIM(cdname) == TRIM(crxios_context) ) THEN 212 211 !set names of the fields in restart file IF using XIOS to read data 213 CALL iom_set_rst_context()214 CALL iom_set_rst_vars(rst_rfields)212 CALL iom_set_rst_context() 213 CALL iom_set_rst_vars(rst_rfields) 215 214 !set which fields are to be read from restart file 216 CALL iom_set_rstr_active()215 CALL iom_set_rstr_active() 217 216 ELSE IF( TRIM(cdname) == TRIM(cwxios_context) ) THEN 218 217 !set names of the fields in restart file IF using XIOS to write data 219 CALL iom_set_rst_context()220 CALL iom_set_rst_vars(rst_wfields)218 CALL iom_set_rst_context() 219 CALL iom_set_rst_vars(rst_wfields) 221 220 !set which fields are to be read from restart file 222 CALL iom_set_rstw_active(fname)221 CALL iom_set_rstw_active(fname) 223 222 ELSE 224 CALL set_xmlatt223 CALL set_xmlatt 225 224 ENDIF 226 225 … … 239 238 240 239 SUBROUTINE iom_set_rstw_var_active(field) 240 !!--------------------------------------------------------------------- 241 !! *** SUBROUTINE iom_set_rstw_var_active *** 242 !! 243 !! ** Purpose : enable variable in restart file when writing with XIOS 244 !!--------------------------------------------------------------------- 241 245 CHARACTER(len = *), INTENT(IN) :: field 242 246 INTEGER :: i … … 264 268 265 269 SUBROUTINE iom_set_rstr_active() 270 !!--------------------------------------------------------------------- 271 !! *** SUBROUTINE iom_set_rstr_active *** 272 !! 273 !! ** Purpose : define file name in XIOS context for reading restart file, 274 !! enable variables present in restart file for reading with XIOS 275 !!--------------------------------------------------------------------- 276 266 277 !sets enabled = .TRUE. for each field in restart file 267 278 CHARACTER(len=256) :: rst_file … … 286 297 par_access="collective", enabled=.TRUE., mode="read", & 287 298 output_freq=xios_timestep) 288 !defin files for restart context299 !define variables for restart context 289 300 DO i = 1, max_rst_fields 290 301 IF( TRIM(rst_rfields(i)%vname) /= "NO_NAME") THEN … … 312 323 313 324 SUBROUTINE iom_set_rstw_core(cdmdl) 314 CHARACTER (len=*), INTENT (IN) :: cdmdl 325 !!--------------------------------------------------------------------- 326 !! *** SUBROUTINE iom_set_rstw_core *** 327 !! 328 !! ** Purpose : set variables which are always in restart file 329 !!--------------------------------------------------------------------- 330 CHARACTER (len=*), INTENT (IN) :: cdmdl ! model OPA or SAS 315 331 316 332 IF(cdmdl == "OPA") THEN … … 350 366 351 367 SUBROUTINE iom_set_rst_vars(fields) 352 !set names for variables in restart file 368 !!--------------------------------------------------------------------- 369 !! *** SUBROUTINE iom_set_rstr_active *** 370 !! 371 !! ** Purpose : Fill array fields with the information about all 372 !! possible variables and corresponding grids definition 373 !! for reading/writing restart with XIOS 374 !!--------------------------------------------------------------------- 353 375 TYPE(RST_FIELD), INTENT(INOUT) :: fields(max_rst_fields) 376 354 377 INTEGER :: i 355 378 i = 0 … … 460 483 461 484 SUBROUTINE iom_set_rstw_active(cdrst_file) 485 !!--------------------------------------------------------------------- 486 !! *** SUBROUTINE iom_set_rstr_active *** 487 !! 488 !! ** Purpose : define file name in XIOS context for writing restart 489 !! enable variables present in restart file for writing 490 !!--------------------------------------------------------------------- 462 491 !sets enabled = .TRUE. for each field in restart file 463 492 CHARACTER(len=*) :: cdrst_file … … 507 536 508 537 SUBROUTINE iom_set_rst_context( ) 538 !!--------------------------------------------------------------------- 539 !! *** SUBROUTINE iom_set_rstr_active *** 540 !! 541 !! ** Purpose : Define domain, axis and grid for restart (read/write) 542 !! context 543 !! 544 !!--------------------------------------------------------------------- 509 545 #if defined key_iomput 510 546 TYPE(xios_domaingroup) :: domaingroup_hdl
Note: See TracChangeset
for help on using the changeset viewer.