Changeset 9535
- Timestamp:
- 2018-05-01T13:22:33+02:00 (5 years ago)
- Location:
- branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/IOM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r9437 r9535 65 65 PRIVATE set_grid, set_grid_bounds, set_scalar, set_xmlatt, set_mooring, iom_update_file_name, iom_sdate 66 66 PRIVATE iom_set_rst_context, iom_set_rstw_active, iom_set_rstr_active 67 PUBLIC iom_set_rstw_var_active, iom_set_rst_vars68 67 # endif 68 PUBLIC iom_set_rstw_var_active, iom_set_rstw_core, iom_set_rst_vars 69 69 70 70 INTERFACE iom_get … … 245 245 INTEGER :: i 246 246 LOGICAL :: llis_set 247 247 CHARACTER(LEN=256) :: clinfo ! info character 248 249 #if defined key_iomput 248 250 llis_set = .FALSE. 249 251 … … 263 265 nstop = nstop + 1 264 266 ENDIF 267 #else 268 clinfo = 'key_iomput is needed to use XIOS restart read/write functionality' 269 CALL ctl_stop(TRIM(clinfo)) 270 #endif 265 271 266 272 END SUBROUTINE iom_set_rstw_var_active … … 276 282 !sets enabled = .TRUE. for each field in restart file 277 283 CHARACTER(len=256) :: rst_file 284 285 #if defined key_iomput 278 286 TYPE(xios_field) :: field_hdl 279 287 TYPE(xios_file) :: file_hdl … … 319 327 ENDIF 320 328 END DO 329 #endif 321 330 END SUBROUTINE iom_set_rstr_active 322 331 … … 328 337 !!--------------------------------------------------------------------- 329 338 CHARACTER (len=*), INTENT (IN) :: cdmdl ! model OPA or SAS 330 339 CHARACTER(LEN=256) :: clinfo ! info character 340 #if defined key_iomput 331 341 IF(cdmdl == "OPA") THEN 332 342 !from restart.F90 … … 362 372 CALL iom_set_rstw_var_active('sbc_sc_b') 363 373 ENDIF 374 #else 375 clinfo = 'key_iomput is needed to use XIOS restart read/write functionality' 376 CALL ctl_stop(TRIM(clinfo)) 377 #endif 364 378 END SUBROUTINE iom_set_rstw_core 365 379 366 380 SUBROUTINE iom_set_rst_vars(fields) 367 381 !!--------------------------------------------------------------------- 368 !! *** SUBROUTINE iom_set_rstr_active***382 !! *** SUBROUTINE iom_set_rst_vars *** 369 383 !! 370 384 !! ** Purpose : Fill array fields with the information about all … … 373 387 !!--------------------------------------------------------------------- 374 388 TYPE(RST_FIELD), INTENT(INOUT) :: fields(max_rst_fields) 375 376 389 INTEGER :: i 390 377 391 i = 0 378 392 i = i + 1; fields(i)%vname="rdt"; fields(i)%grid="grid_scalar" … … 480 494 nstop = nstop + 1 481 495 ENDIF 482 483 496 END SUBROUTINE iom_set_rst_vars 484 497 … … 486 499 SUBROUTINE iom_set_rstw_active(cdrst_file) 487 500 !!--------------------------------------------------------------------- 488 !! *** SUBROUTINE iom_set_rstr_active***501 !! *** SUBROUTINE iom_set_rstw_active *** 489 502 !! 490 503 !! ** Purpose : define file name in XIOS context for writing restart … … 539 552 SUBROUTINE iom_set_rst_context( ) 540 553 !!--------------------------------------------------------------------- 541 !! *** SUBROUTINE iom_set_rst r_active***554 !! *** SUBROUTINE iom_set_rst_context *** 542 555 !! 543 556 !! ** Purpose : Define domain, axis and grid for restart (read/write) … … 929 942 ENDIF 930 943 ELSE 944 #if defined key_iomput 931 945 IF(lwp) WRITE(numout,*) 'XIOS RST READ (0D): ', trim(cdvar) 932 946 CALL iom_swap( TRIM(crxios_context) ) 933 947 CALL xios_recv_field( trim(cdvar), pvar) 934 948 CALL iom_swap( TRIM(cxios_context) ) 949 #else 950 nstop = nstop + 1 951 clinfo = 'Can not use XIOS in iom_g0d, file: '//trim(clname)//', var:'//trim(cdvar) 952 #endif 935 953 ENDIF 936 954 END SUBROUTINE iom_g0d … … 1292 1310 CALL iom_swap( TRIM(crxios_context) ) 1293 1311 IF( PRESENT(pv_r3d) ) THEN 1312 pv_r3d(:, :, :) = 0. 1294 1313 if(lwp) write(numout,*) 'XIOS RST READ (3D): ',trim(cdvar) 1295 1314 CALL xios_recv_field( trim(cdvar), pv_r3d) … … 1298 1317 ENDIF 1299 1318 ELSEIF( PRESENT(pv_r2d) ) THEN 1319 pv_r2d(:, :) = 0. 1300 1320 if(lwp) write(numout,*) 'XIOS RST READ (2D): ', trim(cdvar) 1301 1321 CALL xios_recv_field( trim(cdvar), pv_r2d) … … 1304 1324 ENDIF 1305 1325 ELSEIF( PRESENT(pv_r1d) ) THEN 1326 pv_r1d(:) = 0. 1306 1327 if(lwp) write(numout,*) 'XIOS RST READ (1D): ', trim(cdvar) 1307 1328 CALL xios_recv_field( trim(cdvar), pv_r1d) -
branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r9367 r9535 62 62 CHARACTER(lc) :: clpath ! full path to ocean output restart file 63 63 CHARACTER(LEN=52) :: clpname ! ocean output restart file name including prefix for AGRIF 64 CHARACTER(LEN=256) :: clinfo ! info character 64 65 !!---------------------------------------------------------------------- 65 66 ! … … 110 111 CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib ) 111 112 ELSE 113 #if defined key_iomput 112 114 cwxios_context = "rstw_"//TRIM(ADJUSTL(clkt)) 113 115 IF( TRIM(Agrif_CFixed()) == '0' ) THEN … … 119 121 CALL xios_update_calendar(nitrst) 120 122 CALL iom_swap( cxios_context ) 123 #else 124 clinfo = 'Can not use XIOS in rst_opn' 125 CALL ctl_stop(TRIM(clinfo)) 126 #endif 121 127 ENDIF 122 128 lrst_oce = .TRUE.
Note: See TracChangeset
for help on using the changeset viewer.