Changeset 11870
- Timestamp:
- 2019-11-07T12:27:28+01:00 (5 years ago)
- Location:
- NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icedia.F90
r11840 r11870 277 277 ! Write in numriw (if iter == nitrst) 278 278 ! ------------------ 279 IF(lwxios) CALL iom_swap( cw ixios_context )279 IF(lwxios) CALL iom_swap( cwxios_context ) 280 280 CALL iom_rstput( iter, nitrst, numriw, 'frc_voltop' , frc_voltop, ldxios = lwxios ) 281 281 CALL iom_rstput( iter, nitrst, numriw, 'frc_volbot' , frc_volbot, ldxios = lwxios ) -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icedyn_adv_pra.F90
r11840 r11870 893 893 ! 894 894 ! ! ice thickness 895 IF(lwxios) CALL iom_swap( TRIM(cw ixios_context) )895 IF(lwxios) CALL iom_swap( TRIM(cwxios_context) ) 896 896 CALL iom_rstput( iter, nitrst, numriw, 'sxice' , sxice, ldxios = lwxios ) 897 897 CALL iom_rstput( iter, nitrst, numriw, 'syice' , syice, ldxios = lwxios ) -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icedyn_rhg_evp.F90
r11840 r11870 870 870 !!---------------------------------------------------------------------- 871 871 ! 872 IF(lwxios) THEN 873 CALL iom_set_rstw_var_active(rsti_wfields, 'stress1_i' ) 874 CALL iom_set_rstw_var_active(rsti_wfields, 'stress2_i' ) 875 CALL iom_set_rstw_var_active(rsti_wfields, 'stress12_i') 876 ENDIF 877 872 878 IF( TRIM(cdrw) == 'READ' ) THEN ! Read/initialize 873 879 ! ! --------------- 874 IF(lwxios) THEN875 CALL iom_set_rstw_var_active(rsti_wfields, 'stress1_i' )876 CALL iom_set_rstw_var_active(rsti_wfields, 'stress2_i' )877 CALL iom_set_rstw_var_active(rsti_wfields, 'stress12_i')878 ENDIF879 !880 880 IF( ln_rstart ) THEN !* Read the restart file 881 881 ! … … 910 910 iter = kt + nn_fsbc - 1 ! ice restarts are written at kt == nitrst - nn_fsbc + 1 911 911 ! 912 IF(lwxios) CALL iom_swap( TRIM(cw ixios_context) )912 IF(lwxios) CALL iom_swap( TRIM(cwxios_context) ) 913 913 CALL iom_rstput( iter, nitrst, numriw, 'stress1_i' , stress1_i, ldxios = lwxios ) 914 914 CALL iom_rstput( iter, nitrst, numriw, 'stress2_i' , stress2_i, ldxios = lwxios ) -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icerst.F90
r11840 r11870 81 81 ENDIF 82 82 ! 83 IF(.NOT.lwxios) THEN 83 IF(lwxios) THEN 84 CALL iom_setkt( nitrst, cwxios_context ) 85 ELSE 84 86 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl ) 85 ELSE86 #if defined key_iomput87 cwixios_context = "si3_rstw_"//TRIM(ADJUSTL(clkt))88 IF( TRIM(Agrif_CFixed()) == '0' ) THEN89 clpname = clname90 ELSE91 clpname = TRIM(Agrif_CFixed())//"_"//clname92 ENDIF93 CALL iom_init( cwixios_context, TRIM(clpath)//TRIM(clpname), .false. )94 CALL xios_update_calendar(nitrst)95 CALL iom_swap( cxios_context )96 #else97 clinfo = 'Can not use XIOS in rst_opn'98 CALL ctl_stop(TRIM(clinfo))99 #endif100 87 ENDIF 101 88 lrst_ice = .TRUE. … … 135 122 ! ------------------ 136 123 ! ! calendar control 137 IF(lwxios) CALL iom_swap( cw ixios_context )138 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc ', REAL( nn_fsbc, wp ), ldxios = lwxios ) ! time-step124 IF(lwxios) CALL iom_swap( cwxios_context ) 125 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc_ice', REAL( nn_fsbc, wp ), ldxios = lwxios ) ! time-step 139 126 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp ), ldxios = lwxios ) ! date 140 127 CALL iom_delay_rst( 'WRITE', 'ICE', numriw ) ! save only ice delayed global communication variables … … 176 163 ! ------------------ 177 164 IF( iter == nitrst ) THEN 178 IF(lwxios) THEN 179 CALL iom_context_finalize( cwixios_context ) 180 ELSE 165 IF(.NOT. lwxios) THEN 181 166 CALL iom_close( numriw ) 182 167 ENDIF … … 235 220 236 221 ! Time info 237 CALL iom_get( numrir, 'nn_fsbc ', zfice, ldxios = lrxios )222 CALL iom_get( numrir, 'nn_fsbc_ice', zfice, ldxios = lrxios ) 238 223 CALL iom_get( numrir, 'kt_ice' , ziter, ldxios = lrxios ) 239 224 IF(lwp) WRITE(numout,*) ' read ice restart file at time step : ', ziter … … 246 231 & ' control of time parameter nrstdt' ) 247 232 IF( NINT(zfice) /= nn_fsbc .AND. ABS( nrstdt ) == 1 ) & 248 &CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nn_fsbc in ice restart', &233 CALL ctl_stop( 'ice_rst_read ===>>>> : problem with nn_fsbc in ice restart', & 249 234 & ' verify the file or rerun with the value 0 for the', & 250 235 & ' control of time parameter nrstdt' ) -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/iceupdate.F90
r11840 r11870 448 448 iter = kt + nn_fsbc - 1 ! ice restarts are written at kt == nitrst - nn_fsbc + 1 449 449 ! 450 IF(lwxios) CALL iom_swap( cw ixios_context )450 IF(lwxios) CALL iom_swap( cwxios_context ) 451 451 CALL iom_rstput( iter, nitrst, numriw, 'snwice_mass' , snwice_mass, ldxios = lwxios ) 452 452 CALL iom_rstput( iter, nitrst, numriw, 'snwice_mass_b', snwice_mass_b, ldxios = lwxios ) -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/OCE/IOM/in_out_manager.F90
r11840 r11870 171 171 CHARACTER(lc) :: cwxios_context !: context name used in xios to write NEMO restart file 172 172 CHARACTER(lc) :: crixios_context !: context name used in xios to read SI3 restart 173 CHARACTER(lc) :: cwixios_context !: context name used in xios to write SI3 restart174 173 LOGICAL :: lrsi3_nemo !: is SI3 irestart in nemo format 175 174 -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/OCE/IOM/iom.F90
r11840 r11870 48 48 USE diurnal_bulk, ONLY : ln_diurnal_only, ln_diurnal 49 49 #if defined key_si3 50 USE ice, ONLY: nlay_i, nlay_s 50 USE ice, ONLY: nlay_i, nlay_s, cn_icerst_outdir, cn_icerst_out 51 51 #endif 52 52 … … 72 72 PRIVATE iom_set_rst_context, iom_set_rstw_active, iom_set_rstr_active 73 73 # endif 74 PRIVATE iom_define_restartw, iom_set_rstw_validate 74 75 PUBLIC iom_set_rstw_var_active, iom_set_rstw_core, iom_set_rst_vars 75 76 PRIVATE iom_add 76 INTEGER, PRIVATE :: numrst 77 INTEGER, PRIVATE :: numrst 78 CHARACTER(len=12), PRIVATE :: snr 79 77 80 78 81 INTERFACE iom_get … … 241 244 !set which fields are to be read from restart file 242 245 CALL iom_set_rstr_active(fname) 243 ELSE IF( TRIM(cdname) == TRIM(cwxios_context) ) THEN 246 ELSE IF( TRIM(cdname) == TRIM(cwxios_context)) THEN 247 !validate output for issues 248 CALL iom_set_rstw_validate() 244 249 !set names of the fields in restart file IF using XIOS to write data 245 CALL iom_set_rst_context(.FALSE.) 250 CALL iom_set_rst_context(.FALSE.) ! grid definition 246 251 !set which fields are to be written to a restart file 247 CALL iom_set_rstw_active(rst_wfields, fname) 248 ELSE IF( TRIM(cdname) == TRIM(cwixios_context) ) THEN 249 !set names of the fields in restart file IF using XIOS to write data 250 CALL iom_set_rst_context(.FALSE.) 251 !set which fields are to be written to a restart file 252 CALL iom_set_rstw_active(rsti_wfields, fname) 252 CALL iom_define_restartw() ! fields and files definition 253 253 ELSE 254 254 CALL set_xmlatt … … 270 270 ! 271 271 END SUBROUTINE iom_init 272 273 SUBROUTINE iom_define_restartw() 274 !!--------------------------------------------------------------------- 275 !! *** SUBROUTINE iom_define_restatw *** 276 !! 277 !! ** Purpose : Add files in nemo context to write restart (one and si3) 278 !!--------------------------------------------------------------------- 279 INTEGER :: kt 280 CHARACTER(LEN=50) :: clname ! ocean output restart file name 281 CHARACTER(lc) :: clpath ! full path to ocean output restart file 282 CHARACTER(LEN=52) :: clpname ! ocean output restart file name including prefix for AGRIF 283 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 284 INTEGER :: iterx, nitrstx, nrst_lstx 285 LOGICAL :: lrst_icex, lrst_ocex 286 #if defined key_iomput 287 288 IF( ln_rst_list ) THEN 289 nrst_lstx = 1 290 nitrstx = nn_stocklist( nrst_lst ) 291 ELSE 292 nitrstx = nitend 293 ENDIF 294 295 IF( .NOT. ln_rst_list .AND. nn_stock == -1 ) RETURN ! we will never do any restart 296 297 DO kt = nit000, nitend 298 IF( .NOT. ln_rst_list .AND. MOD( kt - 1, nn_stock ) == 0 ) THEN 299 ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 300 nitrstx = kt + nn_stock - 1 ! define the next value of nitrst for restart writing 301 IF( nitrstx > nitend ) nitrstx = nitend ! make sure we write a restart at the end of the run 302 ENDIF 303 IF( kt == nitrstx .OR. nn_stock == 1 .OR. kt == nitend ) THEN 304 IF( nitrstx <= nitend .AND. nitrstx > 0 ) THEN 305 306 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrstx 307 ELSE ; WRITE(clkt, '(i8.8)') nitrstx 308 ENDIF 309 ! create the file 310 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out) 311 clpath = TRIM(cn_ocerst_outdir) 312 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath) // '/' 313 IF(lwp) THEN 314 write(numout, *) 'Create restart file at the step: ', kt 315 ENDIF 316 CALL iom_set_rstw_active(rst_wfields, TRIM(clpath)//TRIM(clname), nitrstx) 317 ENDIF 318 ENDIF 319 #if defined key_si3 320 IF( kt == nitrstx - 2*nn_fsbc + 1 .OR. nn_stock == nn_fsbc & 321 & .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_icex ) ) THEN 322 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 323 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 324 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrstx 325 ELSE ; WRITE(clkt, '(i8.8)') nitrstx 326 ENDIF 327 ! create the file 328 clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_icerst_out) 329 clpath = TRIM(cn_icerst_outdir) 330 IF( clpath(LEN_TRIM(clpath):) /= '/' ) clpath = TRIM(clpath)//'/' 331 IF(lwp) THEN 332 WRITE(numout,*) 333 WRITE(numout,*) ' Create ice restart NetCDF file: ',TRIM(clpath)//clname 334 IF( kt == nitrstx - 2*nn_fsbc + 1 ) THEN 335 WRITE(numout,*) ' kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp 336 ELSE 337 WRITE(numout,*) ' kt = ' , kt,' date= ', ndastp 338 ENDIF 339 ENDIF 340 lrst_icex = .TRUE. 341 CALL iom_set_rstw_active(rsti_wfields, TRIM(clpath)//TRIM(clname), nitrstx) 342 ENDIF 343 ENDIF 344 iterx = kt + nn_fsbc - 1 345 IF( iterx == nitrstx ) THEN 346 lrst_icex = .FALSE. 347 lrst_ocex = .FALSE. 348 ENDIF 349 #endif 350 IF( ln_rst_list .AND. kt == nitrst) THEN 351 nrst_lstx = MIN(nrst_lst + 1, SIZE(nn_stocklist,1)) 352 nitrstx = nn_stocklist( nrst_lst ) 353 ENDIF 354 ENDDO 355 #endif 356 END SUBROUTINE iom_define_restartw 357 358 SUBROUTINE iom_set_rstw_validate() 359 !!--------------------------------------------------------------------- 360 !! *** SUBROUTINE iom_set_rst_validate *** 361 !! 362 !! ** Purpose : validate restart files. This routine is only used if 363 !! restart is written with XIOS. It will check if the same variable 364 !! is written into more than 1 file. Currently with XIOS 365 !! the same variable can't be written into 2 different files. Print 366 !! warning if it's a case. 367 !!--------------------------------------------------------------------- 368 INTEGER :: ik, jk 369 CHARACTER(LEN=256) :: clinfo ! info character 370 371 #if defined key_si3 372 DO ik =1, max_rst_fields 373 IF(rst_wfields(ik)%active) THEN 374 DO jk = 1, max_rst_fields 375 IF(rsti_wfields(jk)%active .AND. (TRIM(rsti_wfields(jk)%vname) == TRIM(rst_wfields(ik)%vname))) THEN 376 clinfo = 'Varaible '//TRIM(rsti_wfields(jk)%vname)//' will be written in NEMO and SI3 restart file!' 377 CALL ctl_warn( 'From iom_set_rstw_validate: ', & 378 trim(clinfo), 'This will cause problems with XIOS; use iom interface instead or rename', & 379 & 'in one of the restart files') 380 ENDIF 381 ENDDO 382 ENDIF 383 ENDDO 384 #endif 385 386 END SUBROUTINE iom_set_rstw_validate 272 387 273 388 SUBROUTINE iom_set_rstw_var_active(drst_wfields, field) … … 411 526 CALL iom_set_rstw_var_active(drst_wfields, 'sbc_sc_b') 412 527 ELSE IF(cdmdl == "SI3") THEN 413 CALL iom_set_rstw_var_active(drst_wfields, 'nn_fsbc ')528 CALL iom_set_rstw_var_active(drst_wfields, 'nn_fsbc_ice') 414 529 CALL iom_set_rstw_var_active(drst_wfields, 'kt_ice') 415 530 CALL iom_set_rstw_var_active(drst_wfields, 'v_i') … … 524 639 i = iom_add(i); fields(i)%vname="rnf_hc_b"; fields(i)%grid="grid_N" 525 640 i = iom_add(i); fields(i)%vname="rnf_sc_b"; fields(i)%grid="grid_N" 526 i = iom_add(i); fields(i)%vname="nn_fsbc"; fields(i)%grid="grid_scalar"527 641 i = iom_add(i); fields(i)%vname="ssu_m"; fields(i)%grid="grid_N" 528 642 i = iom_add(i); fields(i)%vname="ssv_m"; fields(i)%grid="grid_N" … … 554 668 i = iom_add(i); fields(i)%vname="hbli"; fields(i)%grid="grid_N" 555 669 i = iom_add(i); fields(i)%vname="wn"; fields(i)%grid="grid_N_3D" 670 i = iom_add(i); fields(i)%vname="nn_fsbc"; fields(i)%grid="grid_scalar" 556 671 #ifdef key_si3 557 672 !ICE/icedia.F90 … … 648 763 i = iom_add(i); fields(i)%vname="stress2_i"; fields(i)%grid="grid_N" 649 764 i = iom_add(i); fields(i)%vname="stress12_i"; fields(i)%grid="grid_N" 650 i = iom_add(i); fields(i)%vname="nn_fsbc ";fields(i)%grid="grid_scalar"765 i = iom_add(i); fields(i)%vname="nn_fsbc_ice"; fields(i)%grid="grid_scalar" 651 766 i = iom_add(i); fields(i)%vname="kt_ice"; fields(i)%grid="grid_scalar" 652 767 i = iom_add(i); fields(i)%vname="v_i"; fields(i)%grid="grid_Ni_3D" … … 685 800 686 801 687 SUBROUTINE iom_set_rstw_active(drst_wfields, cdrst_file )802 SUBROUTINE iom_set_rstw_active(drst_wfields, cdrst_file, kdstep) 688 803 !!--------------------------------------------------------------------- 689 804 !! *** SUBROUTINE iom_set_rstw_active *** … … 695 810 CHARACTER(len=*), INTENT(IN) :: cdrst_file 696 811 TYPE(RST_FIELD), INTENT(IN) :: drst_wfields(max_rst_fields) 812 INTEGER , INTENT(IN) :: kdstep 697 813 #if defined key_iomput 698 TYPE(xios_field) :: field_hdl699 TYPE(xios_file) :: file_hdl814 TYPE(xios_field) :: field_hdl 815 TYPE(xios_file) :: file_hdl 700 816 TYPE(xios_filegroup) :: filegroup_hdl 701 INTEGER :: i 702 CHARACTER(lc) :: clpath 703 817 TYPE(XIOS_DURATION) :: freq 818 INTEGER :: i 819 CHARACTER(lc) :: clpath 820 821 write(snr, *) kdstep 704 822 !set name of the restart file and enable available fields 705 823 IF(lwp) WRITE(numout,*) 'Setting restart filename (for XIOS write) to: ',cdrst_file 706 824 CALL xios_get_handle("file_definition", filegroup_hdl ) 707 CALL xios_add_child(filegroup_hdl, file_hdl , 'wrestart')825 CALL xios_add_child(filegroup_hdl, file_hdl) 708 826 IF(nxioso.eq.1) THEN 709 CALL xios_set_file_attr( "wrestart", type="one_file", enabled=.TRUE.,& 827 CALL xios_set_attr( file_hdl, type="one_file", enabled=.TRUE.,& 828 mode="write", output_freq=kdstep*xios_timestep) 829 if(lwp) write(numout,*) 'Define ', trim(cdrst_file), ' in one_file mode' 830 ELSE 831 CALL xios_set_attr( file_hdl, type="multiple_file", enabled=.TRUE.,& 710 832 mode="write", output_freq=xios_timestep) 711 if(lwp) write(numout,*) 'OPEN ', trim(cdrst_file), ' in one_file mode' 712 ELSE 713 CALL xios_set_file_attr( "wrestart", type="multiple_file", enabled=.TRUE.,& 714 mode="write", output_freq=xios_timestep) 715 if(lwp) write(numout,*) 'OPEN ', trim(cdrst_file), ' in multiple_file mode' 833 if(lwp) write(numout,*) 'Define ', trim(cdrst_file), ' in multiple_file mode' 716 834 ENDIF 717 CALL xios_set_ file_attr( "wrestart", name=trim(cdrst_file))835 CALL xios_set_attr( file_hdl, name=trim(cdrst_file)) 718 836 !define fields for restart context 719 837 DO i = 1, max_rst_fields 720 838 IF( drst_wfields(i)%active ) THEN 721 CALL xios_add_child(file_hdl, field_hdl, TRIM(drst_wfields(i)%vname) )839 CALL xios_add_child(file_hdl, field_hdl, TRIM(drst_wfields(i)%vname)//"_"//TRIM(ADJUSTL(snr))) 722 840 SELECT CASE (TRIM(drst_wfields(i)%grid)) 723 841 CASE ("grid_Ni_3D") 724 842 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 725 domain_ref="grid_N", axis_ref="numcat", prec = 8, operation = "instant") 843 domain_ref="grid_N", axis_ref="numcat", prec = 8, operation = "once", & 844 freq_offset=(kdstep -1) * xios_timestep) 726 845 CASE ("grid_N_3D") 727 846 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 728 domain_ref="grid_N", axis_ref="nav_lev", prec = 8, operation = "instant") 847 domain_ref="grid_N", axis_ref="nav_lev", prec = 8, operation = "once", & 848 freq_offset=(kdstep -1) * xios_timestep) 729 849 CASE ("grid_N") 730 850 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 731 domain_ref="grid_N", prec = 8, operation = "instant") 851 domain_ref="grid_N", prec = 8, operation = "once", & 852 freq_offset=(kdstep -1) * xios_timestep) 732 853 CASE ("grid_vector") 733 854 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 734 axis_ref="nav_lev", prec = 8, operation = "instant") 855 axis_ref="nav_lev", prec = 8, operation = "once", & 856 freq_offset=(kdstep -1) * xios_timestep) 735 857 CASE ("grid_scalar") 736 858 CALL xios_set_attr (field_hdl, enabled = .TRUE., name = TRIM(drst_wfields(i)%vname), & 737 scalar_ref = "grid_scalar", prec = 8, operation = "instant") 859 scalar_ref = "grid_scalar", prec = 8, operation = "once", & 860 freq_offset=(kdstep -1) * xios_timestep) 738 861 END SELECT 739 862 ENDIF … … 1723 1846 IF( kt == kwrite ) THEN 1724 1847 IF(lwp) write(numout,*) 'RESTART: write (XIOS 0D) ',trim(cdvar) 1725 CALL xios_send_field(trim(cdvar), pvar) 1848 write(snr, *) nitrst 1849 CALL xios_send_field(trim(cdvar)//"_"//TRIM(ADJUSTL(snr)), pvar) 1726 1850 ENDIF 1727 1851 #endif … … 1753 1877 IF( kt == kwrite ) THEN 1754 1878 IF(lwp) write(numout,*) 'RESTART: write (XIOS 1D) ',trim(cdvar) 1755 CALL xios_send_field(trim(cdvar), pvar) 1879 write(snr, *) nitrst 1880 CALL xios_send_field(trim(cdvar)//"_"//TRIM(ADJUSTL(snr)), pvar) 1756 1881 ENDIF 1757 1882 #endif … … 1783 1908 IF( kt == kwrite ) THEN 1784 1909 IF(lwp) write(numout,*) 'RESTART: write (XIOS 2D) ',trim(cdvar) 1785 CALL xios_send_field(trim(cdvar), pvar) 1910 write(snr, *) nitrst 1911 CALL xios_send_field(trim(cdvar)//"_"//TRIM(ADJUSTL(snr)), pvar) 1786 1912 ENDIF 1787 1913 #endif … … 1813 1939 IF( kt == kwrite ) THEN 1814 1940 IF(lwp) write(numout,*) 'RESTART: write (XIOS 3D) ',trim(cdvar) 1815 CALL xios_send_field(trim(cdvar), pvar) 1941 write(snr, *) nitrst 1942 CALL xios_send_field(trim(cdvar)//"_"//TRIM(ADJUSTL(snr)), pvar) 1816 1943 ENDIF 1817 1944 #endif … … 1842 1969 !!--------------------------------------------------------------------- 1843 1970 ! 1971 !return for now. When XIOS is used to write restart it also should be used to write this attribute 1972 IF(lwxios) return 1844 1973 ! =================================== 1845 1974 IF( TRIM(cdaction) == 'READ' ) THEN ! read restart related to mpp_delay ! -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/OCE/IOM/restart.F90
r11837 r11870 108 108 ENDIF 109 109 ! 110 IF(.NOT.lwxios) THEN 110 IF(lwxios) THEN 111 CALL iom_setkt( nitrst, cwxios_context ) 112 ELSE 111 113 CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE. ) 112 ELSE113 #if defined key_iomput114 cwxios_context = "rstw_"//TRIM(ADJUSTL(clkt))115 IF( TRIM(Agrif_CFixed()) == '0' ) THEN116 clpname = clname117 ELSE118 clpname = TRIM(Agrif_CFixed())//"_"//clname119 ENDIF120 CALL iom_init( cwxios_context, TRIM(clpath)//TRIM(clpname), .false. )121 CALL xios_update_calendar(nitrst)122 CALL iom_swap( cxios_context )123 #else124 clinfo = 'Can not use XIOS in rst_opn'125 CALL ctl_stop(TRIM(clinfo))126 #endif127 114 ENDIF 128 115 lrst_oce = .TRUE. … … 179 166 IF(.NOT.lwxios) THEN 180 167 CALL iom_close( numrow ) ! close the restart file (only at last time step) 181 ELSE182 CALL iom_context_finalize( cwxios_context )183 168 ENDIF 184 169 !!gm IF( .NOT. lk_trdmld ) lrst_oce = .FALSE. -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/OCE/nemogcm.F90
r11536 r11870 269 269 !!---------------------------------------------------------------------- 270 270 ! 271 cxios_context = 'nemo' 271 cxios_context = 'nemo' 272 cwxios_context = 'nemo_rstw' 272 273 ! 273 274 ! !-------------------------------------------------! -
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/OCE/step.F90
r11837 r11870 102 102 CALL iom_init( cxios_context ) ! for model grid (including passible AGRIF zoom) 103 103 IF( ln_crs ) CALL iom_init( TRIM(cxios_context)//"_crs" ) ! for coarse grid 104 IF( lwxios ) CALL iom_init( cwxios_context ) ! restart write context 104 105 ENDIF 105 106 IF( kstp /= nit000 ) CALL day( kstp ) ! Calendar (day was already called at nit000 in day_init)
Note: See TracChangeset
for help on using the changeset viewer.