Changeset 8014


Ignore:
Timestamp:
2017-05-10T13:47:08+02:00 (3 years ago)
Author:
andmirek
Message:

enable setting restat file name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_GO6_package_XIOS_read/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r8009 r8014  
    353353   SUBROUTINE set_rstr_active() 
    354354!sets enabled = .TRUE. for each field in restart file 
    355         CHARACTER(len=512) :: rst_file 
     355        CHARACTER(len=256) :: rst_file 
    356356        INTEGER :: i 
    357         TYPE(xios_file) :: file_hdl 
    358  
    359         rst_file = TRIM(cn_ocerst_outdir)//TRIM(cn_ocerst_out)//'.nc' 
    360 !set name of the restart file and enable processing 
    361 !       if(lwp) WRITE(numout,*) 'Setting restart filename for XIOS to: ',rst_file 
    362 !       CALL xios_get_handle("restart", file_hdl) 
    363 !       CALL xios_set_attr(file_hdl , name = trim(rst_file))  
    364 !       CALL xios_set_attr(file_hdl , enabled = .TRUE.) 
     357 
     358        rst_file = TRIM(cn_ocerst_indir)//TRIM(cn_ocerst_in) 
     359!set name of the restart file and enable available fields 
     360        if(lwp) WRITE(numout,*) 'Setting restart filename (for XIOS) to: ',rst_file 
     361        CALL xios_set_file_attr( "rrestart", enabled = .TRUE.) 
     362        CALL xios_set_file_attr( "rrestart", name=trim(rst_file)) 
    365363!eneble fields in restart file  
    366364        DO i = 1, max_rst_fields 
    367365         IF( TRIM(rst_fields(i)) /= "NO_NAME") THEN 
    368366           IF( iom_varid( numror, TRIM(rst_fields(i)), ldstop = .FALSE. ) > 0 ) THEN 
    369              IF ( xios_is_valid_field( TRIM(rst_fields(i)) ) ) & 
    370       &         CALL xios_set_field_attr ( TRIM(rst_fields(i)), enabled = .TRUE. )  
    371367             IF ( xios_is_valid_field( TRIM(rst_fields(i)) ) ) THEN 
    372               if(lwp) WRITE(numout,*) TRIM(rst_fields(i)), ' enabled' 
     368                CALL xios_set_field_attr ( TRIM(rst_fields(i)), enabled = .TRUE. )  
     369                if(lwp) WRITE(numout,*) TRIM(rst_fields(i)), ' enabled' 
    373370             ENDIF 
    374371           ENDIF 
Note: See TracChangeset for help on using the changeset viewer.