- Timestamp:
- 2019-10-31T16:30:50+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11756_SI3restart_XIOS/src/ICE/icerst.F90
r11839 r11840 51 51 CHARACTER(len=50) :: clname ! ice output restart file name 52 52 CHARACTER(len=256) :: clpath ! full path to ice output restart file 53 CHARACTER(LEN=52) :: clpname ! ocean output restart file name including prefix for AGRIF 53 54 !!---------------------------------------------------------------------- 54 55 ! … … 80 81 ENDIF 81 82 ! 82 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl ) 83 IF(.NOT.lwxios) THEN 84 CALL iom_open( TRIM(clpath)//TRIM(clname), numriw, ldwrt = .TRUE., kdlev = jpl ) 85 ELSE 86 #if defined key_iomput 87 cwixios_context = "si3_rstw_"//TRIM(ADJUSTL(clkt)) 88 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 89 clpname = clname 90 ELSE 91 clpname = TRIM(Agrif_CFixed())//"_"//clname 92 ENDIF 93 CALL iom_init( cwixios_context, TRIM(clpath)//TRIM(clpname), .false. ) 94 CALL xios_update_calendar(nitrst) 95 CALL iom_swap( cxios_context ) 96 #else 97 clinfo = 'Can not use XIOS in rst_opn' 98 CALL ctl_stop(TRIM(clinfo)) 99 #endif 100 ENDIF 83 101 lrst_ice = .TRUE. 84 102 ENDIF … … 117 135 ! ------------------ 118 136 ! ! calendar control 119 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ) ) ! time-step 120 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp ) ) ! date 137 IF(lwxios) CALL iom_swap( cwixios_context ) 138 CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp ), ldxios = lwxios ) ! time-step 139 CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp ), ldxios = lwxios ) ! date 121 140 CALL iom_delay_rst( 'WRITE', 'ICE', numriw ) ! save only ice delayed global communication variables 122 141 123 142 ! Prognostic variables 124 CALL iom_rstput( iter, nitrst, numriw, 'v_i' , v_i )125 CALL iom_rstput( iter, nitrst, numriw, 'v_s' , v_s )126 CALL iom_rstput( iter, nitrst, numriw, 'sv_i' , sv_i )127 CALL iom_rstput( iter, nitrst, numriw, 'a_i' , a_i )128 CALL iom_rstput( iter, nitrst, numriw, 't_su' , t_su )129 CALL iom_rstput( iter, nitrst, numriw, 'u_ice', u_ice )130 CALL iom_rstput( iter, nitrst, numriw, 'v_ice', v_ice )131 CALL iom_rstput( iter, nitrst, numriw, 'oa_i' , oa_i )132 CALL iom_rstput( iter, nitrst, numriw, 'a_ip' , a_ip )133 CALL iom_rstput( iter, nitrst, numriw, 'v_ip' , v_ip )143 CALL iom_rstput( iter, nitrst, numriw, 'v_i' , v_i, ldxios = lwxios ) 144 CALL iom_rstput( iter, nitrst, numriw, 'v_s' , v_s, ldxios = lwxios ) 145 CALL iom_rstput( iter, nitrst, numriw, 'sv_i' , sv_i, ldxios = lwxios ) 146 CALL iom_rstput( iter, nitrst, numriw, 'a_i' , a_i, ldxios = lwxios ) 147 CALL iom_rstput( iter, nitrst, numriw, 't_su' , t_su, ldxios = lwxios ) 148 CALL iom_rstput( iter, nitrst, numriw, 'u_ice', u_ice, ldxios = lwxios ) 149 CALL iom_rstput( iter, nitrst, numriw, 'v_ice', v_ice, ldxios = lwxios ) 150 CALL iom_rstput( iter, nitrst, numriw, 'oa_i' , oa_i, ldxios = lwxios ) 151 CALL iom_rstput( iter, nitrst, numriw, 'a_ip' , a_ip, ldxios = lwxios ) 152 CALL iom_rstput( iter, nitrst, numriw, 'v_ip' , v_ip, ldxios = lwxios ) 134 153 ! Snow enthalpy 135 154 DO jk = 1, nlay_s … … 137 156 znam = 'e_s'//'_l'//zchar1 138 157 z3d(:,:,:) = e_s(:,:,jk,:) 139 CALL iom_rstput( iter, nitrst, numriw, znam , z3d )158 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 140 159 END DO 141 160 ! Ice enthalpy … … 144 163 znam = 'e_i'//'_l'//zchar1 145 164 z3d(:,:,:) = e_i(:,:,jk,:) 146 CALL iom_rstput( iter, nitrst, numriw, znam , z3d )165 CALL iom_rstput( iter, nitrst, numriw, znam , z3d, ldxios = lwxios ) 147 166 END DO 148 167 ! fields needed for Met Office (Jules) coupling 149 168 IF( ln_cpl ) THEN 150 CALL iom_rstput( iter, nitrst, numriw, 'cnd_ice', cnd_ice ) 151 CALL iom_rstput( iter, nitrst, numriw, 't1_ice' , t1_ice ) 152 ENDIF 169 CALL iom_rstput( iter, nitrst, numriw, 'cnd_ice', cnd_ice, ldxios = lwxios ) 170 CALL iom_rstput( iter, nitrst, numriw, 't1_ice' , t1_ice, ldxios = lwxios ) 171 ENDIF 172 IF(lwxios) CALL iom_swap( cxios_context ) 153 173 ! 154 174 … … 156 176 ! ------------------ 157 177 IF( iter == nitrst ) THEN 158 CALL iom_close( numriw ) 178 IF(lwxios) THEN 179 CALL iom_context_finalize( cwixios_context ) 180 ELSE 181 CALL iom_close( numriw ) 182 ENDIF 159 183 lrst_ice = .FALSE. 160 184 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.