New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 13871 for NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/restart.F90 – NEMO

Ignore:
Timestamp:
2020-11-25T12:51:29+01:00 (3 years ago)
Author:
andmirek
Message:

Ticket #2462: Addressing reviewr comments stage 1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_12905_xios_restart/src/OCE/IOM/restart.F90

    r13750 r13871  
    110110            ELSE 
    111111#if defined key_iomput 
    112                cwxios_context = "rstw_"//TRIM(ADJUSTL(clkt)) 
     112               cw_ocerst_cxt = "rstw_"//TRIM(ADJUSTL(clkt)) 
    113113               IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
    114114                  clpname = clname 
     
    116116                  clpname = TRIM(Agrif_CFixed())//"_"//clname    
    117117               ENDIF 
    118                CALL iom_init( cwxios_context, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .false. ) 
     118               CALL iom_init( cw_ocerst_cxt, fname = TRIM(clpath)//TRIM(clpname), ld_closedef = .false. ) 
    119119               CALL iom_swap(      cxios_context          ) 
    120120#else 
     
    142142      INTEGER, INTENT(in) ::   Kbb, Kmm   ! ocean time level indices 
    143143      !!---------------------------------------------------------------------- 
    144                      IF(lwxios) CALL iom_swap(      cwxios_context          ) 
     144                     IF(lwxios) CALL iom_swap(      cw_ocerst_cxt          ) 
    145145                     CALL iom_rstput( kt, nitrst, numrow, 'rdt'    , rn_Dt       , ldxios = lwxios)   ! dynamics time step 
    146146                     CALL iom_delay_rst( 'WRITE', 'OCE', numrow )   ! save only ocean delayed global communication variables 
     
    167167            CALL iom_close( numrow )     ! close the restart file (only at last time step) 
    168168         ELSE 
    169             CALL iom_context_finalize(      cwxios_context          ) 
     169            CALL iom_context_finalize(      cw_ocerst_cxt          ) 
    170170         ENDIF 
    171171!!gm         IF( .NOT. lk_trdmld )   lrst_oce = .FALSE. 
     
    209209! can handle checking if variable is in the restart file (there will be no need to open 
    210210! restart) 
    211          lroxios = lrxios.AND.lxios_sini 
    212  
    213          IF( lroxios) THEN 
    214              crxios_context = 'oce_rst' 
     211         lrxios = lrxios.AND.lxios_sini 
     212 
     213         IF( lrxios) THEN 
     214             cr_ocerst_cxt = 'oce_rst' 
    215215             IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS' 
    216216             IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
     
    219219                clpname = TRIM(Agrif_CFixed())//"_"//cn_ocerst_in    
    220220             ENDIF 
    221              CALL iom_init( crxios_context, fname = TRIM(clpath)//TRIM(clpname), & 
     221             CALL iom_init( cr_ocerst_cxt, fname = TRIM(clpath)//TRIM(clpname), & 
    222222                              idfp = iom_file(numror)%nfid, ld_closedef = .TRUE. ) 
    223223         ENDIF 
     
    245245 
    246246      ! Check dynamics and tracer time-step consistency and force Euler restart if changed 
    247       IF( lroxios ) CALL iom_swap( TRIM(crxios_context) ) 
     247      IF( lrxios ) CALL iom_swap( cr_ocerst_cxt ) 
    248248      IF( iom_varid( numror, 'rdt', ldstop = .FALSE. ) > 0 )   THEN 
    249          CALL iom_get( numror, 'rdt', zrdt, ldxios = lroxios ) 
     249         CALL iom_get( numror, 'rdt', zrdt, ldxios = lrxios ) 
    250250         IF( zrdt /= rn_Dt ) THEN 
    251251            IF(lwp) WRITE( numout,*) 
     
    260260       
    261261      ! Diurnal DSST  
    262       IF( ln_diurnal ) CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst, ldxios = lroxios )  
     262      IF( ln_diurnal ) CALL iom_get( numror, jpdom_auto, 'Dsst' , x_dsst, ldxios = lrxios )  
    263263      IF ( ln_diurnal_only ) THEN  
    264264         IF(lwp) WRITE( numout, * ) & 
    265265         &   "rst_read:- ln_diurnal_only set, setting rhop=rho0"  
    266266         rhop = rho0 
    267          CALL iom_get( numror, jpdom_auto, 'tn'     , w3d, ldxios = lroxios )  
     267         CALL iom_get( numror, jpdom_auto, 'tn'     , w3d, ldxios = lrxios )  
    268268         ts(:,:,1,jp_tem,Kmm) = w3d(:,:,1) 
    269269         RETURN  
     
    288288      CALL iom_get( numror, jpdom_auto, 'sshn'   ,ssh(:,:         ,Kmm), ldxios = lrxios ) 
    289289      IF( iom_varid( numror, 'rhop', ldstop = .FALSE. ) > 0 ) THEN 
    290          CALL iom_get( numror, jpdom_auto, 'rhop'   , rhop, ldxios = lroxios )   ! now    potential density 
     290         CALL iom_get( numror, jpdom_auto, 'rhop'   , rhop, ldxios = lrxios )   ! now    potential density 
    291291      ELSE 
    292292         CALL eos( ts(:,:,:,:,Kmm), rhd, rhop, gdept(:,:,:,Kmm) )    
    293293      ENDIF 
    294       IF( lroxios ) CALL iom_swap( TRIM(cxios_context) ) 
     294      IF( lrxios ) CALL iom_swap( cxios_context ) 
    295295      ! 
    296296      IF( l_1st_euler ) THEN                                  ! Euler restart  
Note: See TracChangeset for help on using the changeset viewer.