Changeset 8310
- Timestamp:
- 2017-07-10T15:46:25+02:00 (7 years ago)
- Location:
- branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r8079 r8310 195 195 WRITE(numout,*) ' overwrite an existing file ln_clobber = ', ln_clobber 196 196 WRITE(numout,*) ' NetCDF chunksize (bytes) nn_chunksz = ', nn_chunksz 197 WRITE(numout,*) ' Write restart using XIOS nn_wxios = ', nn_wxios 197 IF( TRIM(Agrif_CFixed()) == '0' ) & 198 & WRITE(numout,*) ' Write restart using XIOS nn_wxios = ', nn_wxios 198 199 ENDIF 199 200 … … 308 309 rdtmax = rn_rdtmin 309 310 rdth = rn_rdth 310 if (nn_wxios > 0) lwxios = .TRUE. 311 wxioso = nn_wxios 311 312 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 313 !set output file type for XIOS based on NEMO namelist 314 if (nn_wxios > 0) lwxios = .TRUE. 315 wxioso = nn_wxios 316 ELSE 317 IF(lwp) THEN 318 write(numout,*) 319 write(numout,*) "AGRIF: nn_wxios will be ingored. See setting for NEMO" 320 write(numout,*) 321 ENDIF 322 ENDIF 312 323 313 324 REWIND( numnam_ref ) ! Namelist namcla in reference namelist : Cross land advection -
branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r8301 r8310 251 251 END SUBROUTINE iom_init 252 252 253 SUBROUTINE iom_rstw_init( cdname, filename , it)253 SUBROUTINE iom_rstw_init( cdname, filename ) 254 254 !!---------------------------------------------------------------------- 255 255 !! *** ROUTINE *** … … 274 274 ! 275 275 CHARACTER(len=*), OPTIONAL, INTENT(in) :: filename 276 INTEGER, OPTIONAL :: it ! timestep when subroutine was called277 276 !!---------------------------------------------------------------------- 278 277 279 278 clname = cdname 280 if(lwp) write(numout,*) 'initialize CONTEXT:', TRIM(cdname)281 279 IF( TRIM(Agrif_CFixed()) /= '0' ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(cdname) 282 280 CALL xios_context_initialize(TRIM(clname), mpi_comm_opa) … … 298 296 CALL xios_add_child(domaingroup_hdl, domain_hdl, "grid_N") 299 297 CALL set_grid("N", glamt, gphit, .FALSE.) 300 298 301 299 CALL xios_get_handle("axis_definition",axisgroup_hdl) 302 300 CALL xios_add_child(axisgroup_hdl, axis_hdl, "deptht") 303 CALL xios_set_axis_attr( "deptht", long_name="Vertical levels", unit="m", positive="down") 301 !if unit="m" is present AGRIF configuration fails to compile 302 CALL xios_set_axis_attr( "deptht", long_name="Vertical levels in meters", positive="down") 304 303 ! vertical grid definition 305 304 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 306 305 307 CALL XIOS_GET_HANDLE("scalar_definition",scalargroup_hdl)306 CALL xios_get_handle("scalar_definition",scalargroup_hdl) 308 307 CALL xios_add_child(scalargroup_hdl, scalar_hdl, "grid_scalar") 309 308 … … 311 310 IF( TRIM(cdname) == TRIM(wxios_context)) THEN 312 311 !set which fields are to be read from restart file 313 CALL set_rstw_active(filename , it)312 CALL set_rstw_active(filename) 314 313 ENDIF 315 314 … … 318 317 CALL xios_set_timestep(dtime) 319 318 CALL xios_close_context_definition() 320 321 319 #endif 322 320 323 321 END SUBROUTINE iom_rstw_init 324 322 325 SUBROUTINE set_rstw_active(rst_file , it)323 SUBROUTINE set_rstw_active(rst_file) 326 324 !sets enabled = .TRUE. for each field in restart file 327 325 CHARACTER(len=*) :: rst_file 328 INTEGER, INTENT(in) :: it ! timestep when iom_init was called329 326 TYPE(xios_file) :: file_hdl 330 327 TYPE(xios_filegroup) :: filegroup_hdl … … 346 343 CALL xios_set_file_attr( "wrestart", name=trim(rst_file)) 347 344 CALL set_numro_active(file_hdl) 348 345 349 346 END SUBROUTINE set_rstw_active 350 347 … … 768 765 TYPE(xios_context) :: nemo_hdl 769 766 770 if(lwp) write(numout,*) 'iom_swap to: ',trim(cdname)771 767 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 772 768 CALL xios_get_handle(TRIM(cdname),nemo_hdl) … … 1927 1923 SUBROUTINE iom_context_finalize( cdname ) 1928 1924 CHARACTER(LEN=*), INTENT(in) :: cdname 1929 ! 1930 IF( xios_is_valid_context(cdname) ) THEN 1925 CHARACTER(LEN=120) :: clname 1926 ! 1927 clname = cdname 1928 IF( TRIM(Agrif_CFixed()) .NE. '0' ) clname = TRIM(Agrif_CFixed())//"_"//clname 1929 1930 IF( xios_is_valid_context(clname) ) THEN 1931 1931 CALL iom_swap( cdname ) ! swap to cdname context 1932 1932 CALL xios_context_finalize() ! finalize the context -
branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r8299 r8310 63 63 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 64 64 CHARACTER(LEN=50) :: clname ! ocean output restart file name 65 CHARACTER(LEN=52) :: dlname ! ocean output restart file name includinf prefix for AGRIF 65 66 CHARACTER(LEN=150) :: clpath ! full path to ocean output restart file 66 67 !!---------------------------------------------------------------------- … … 106 107 IF(lwp) THEN 107 108 WRITE(numout,*) 108 IF(lwxios) THEN 109 WRITE(numout,*) & 110 ' XIOS open ocean restart NetCDF file: ',TRIM(clpath)//TRIM(clname) 111 ELSE 109 IF(.NOT.lwxios) THEN 112 110 SELECT CASE ( jprstlib ) 113 111 CASE ( jprstdimg ) ; WRITE(numout,*) & … … 127 125 ELSE 128 126 wxios_context = "rstw_"//TRIM(ADJUSTL(clkt)) 129 CALL iom_rstw_init( wxios_context, TRIM(clpath)//TRIM(clname) ) 127 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 128 dlname = clname 129 ELSE 130 dlname = TRIM(Agrif_CFixed())//"_"//clname 131 ENDIF 132 CALL iom_rstw_init( wxios_context, TRIM(clpath)//TRIM(dlname)) 130 133 CALL xios_update_calendar(nitrst) 131 134 CALL iom_swap( cxios_context ) … … 196 199 ELSE 197 200 CALL iom_context_finalize( wxios_context ) 198 CALL iom_swap( cxios_context )199 201 ENDIF 200 202 !!gm IF( .NOT. lk_trdmld ) lrst_oce = .FALSE. -
branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
r6487 r8310 941 941 & ' data type: ' , sdf(jf)%cltype , & 942 942 & ' land/sea mask:' , TRIM( sdf(jf)%lsmname ) 943 call flush(numout)944 943 END DO 945 944 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.