Changeset 8630 for branches/2017
- Timestamp:
- 2017-10-17T14:31:49+02:00 (7 years ago)
- Location:
- branches/2017/dev_r8600_xios_write/NEMOGCM
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8600_xios_write/NEMOGCM/CONFIG/SHARED/namelist_ref
r8599 r8630 53 53 ln_clobber = .true. ! clobber (overwrite) an existing file 54 54 nn_chunksz = 0 ! chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) 55 nn_wxios = 0 ! use XIOS to write restart file 0 - no, 1 - single file output, 2 - multiple file output 55 56 / 56 57 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
r7753 r8630 32 32 USE timing ! preformance summary 33 33 USE wrk_nemo ! work arrays 34 USE iom_def, ONLY : lwxios 34 35 35 36 IMPLICIT NONE … … 308 309 IF(lwp) WRITE(numout,*) ' dia_hsb_rst at it= ', kt,' date= ', ndastp 309 310 IF(lwp) WRITE(numout,*) '~~~~~~~' 310 311 CALL iom_rstput( kt, nitrst, numrow, 'frc_v' , frc_v 312 CALL iom_rstput( kt, nitrst, numrow, 'frc_t' , frc_t 313 CALL iom_rstput( kt, nitrst, numrow, 'frc_s' , frc_s 311 IF( lwxios ) CALL iom_swap( wxios_context ) 312 CALL iom_rstput( kt, nitrst, numrow, 'frc_v' , frc_v, lxios = lwxios) 313 CALL iom_rstput( kt, nitrst, numrow, 'frc_t' , frc_t, lxios = lwxios) 314 CALL iom_rstput( kt, nitrst, numrow, 'frc_s' , frc_s, lxios = lwxios) 314 315 IF( ln_linssh ) THEN 315 CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t 316 CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s )316 CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t, lxios = lwxios) 317 CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s, lxios = lwxios ) 317 318 ENDIF 318 CALL iom_rstput( kt, nitrst, numrow, 'surf_ini', surf_ini ) ! ice sheet coupling319 CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini', ssh_ini(:,:) )320 CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini', e3t_ini(:,:,:) )321 CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini(:,:,:) )322 CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini(:,:,:) )319 CALL iom_rstput( kt, nitrst, numrow, 'surf_ini', surf_ini, lxios = lwxios ) ! ice sheet coupling 320 CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini', ssh_ini(:,:), lxios = lwxios ) 321 CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini', e3t_ini(:,:,:), lxios = lwxios ) 322 CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini(:,:,:), lxios = lwxios ) 323 CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini(:,:,:), lxios = lwxios ) 323 324 IF( ln_linssh ) THEN 324 CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:) )325 CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:) )325 CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:), lxios = lwxios ) 326 CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:), lxios = lwxios ) 326 327 ENDIF 327 328 ! 329 IF( lwxios ) CALL iom_swap( cxios_context ) 328 330 ENDIF 329 331 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r8329 r8630 33 33 USE timing ! Timing 34 34 USE restart ! restart 35 USE iom_def, ONLY : lwxios 35 36 36 37 IMPLICIT NONE … … 399 400 ENDIF 400 401 ! calendar control 401 CALL iom_rstput( kt, nitrst, numrow, 'kt' , REAL( kt , wp) ) ! time-step 402 CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) ) ! date 403 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj ) ! number of elapsed days since 402 IF( lwxios ) CALL iom_swap( wxios_context ) 403 CALL iom_rstput( kt, nitrst, numrow, 'kt' , REAL( kt , wp), lxios = lwxios ) ! time-step 404 CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp), lxios = lwxios ) ! date 405 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj, lxios = lwxios ) ! number of elapsed days since 404 406 ! ! the begining of the run [s] 405 CALL iom_rstput( kt, nitrst, numrow, 'ntime' , REAL( nn_time0, wp) ) ! time 407 CALL iom_rstput( kt, nitrst, numrow, 'ntime' , REAL( nn_time0, wp), lxios = lwxios ) ! time 408 IF( lwxios ) CALL iom_swap( cxios_context ) 406 409 ENDIF 407 410 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r7822 r8630 47 47 USE wrk_nemo ! Memory Allocation 48 48 USE timing ! Timing 49 49 USE iom_def, ONLY:lwxios, wxioso ! write restart flag and output type 50 50 IMPLICIT NONE 51 51 PRIVATE … … 285 285 & nn_it000, nn_itend , nn_date0 , nn_time0 , nn_leapy , nn_istate , & 286 286 & nn_stock, nn_write , ln_mskland , ln_clobber , nn_chunksz, nn_euler , & 287 & ln_cfmeta, ln_iscpl 287 & ln_cfmeta, ln_iscpl, nn_wxios 288 288 NAMELIST/namdom/ ln_linssh, nn_closea, nn_msh, rn_isfhmin, rn_rdt, rn_atfp, ln_crs 289 289 #if defined key_netcdf4 … … 293 293 !!---------------------------------------------------------------------- 294 294 ! 295 nn_wxios = 0 295 296 REWIND( numnam_ref ) ! Namelist namrun in reference namelist : Parameters of the run 296 297 READ ( numnam_ref, namrun, IOSTAT = ios, ERR = 901) … … 333 334 WRITE(numout,*) ' NetCDF chunksize (bytes) nn_chunksz = ', nn_chunksz 334 335 WRITE(numout,*) ' IS coupling at the restart step ln_iscpl = ', ln_iscpl 336 WRITE(numout,*) ' Write restart using XIOS nn_wxios = ', nn_wxios 337 IF( TRIM(Agrif_CFixed()) == '0' ) & 338 & WRITE(numout,*) ' Write restart using XIOS nn_wxios = ', nn_wxios 335 339 ENDIF 336 340 … … 413 417 rdt = rn_rdt 414 418 419 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 420 !set output file type for XIOS based on NEMO namelist 421 if (nn_wxios > 0) lwxios = .TRUE. 422 wxioso = nn_wxios 423 ELSE 424 IF(lwp) THEN 425 write(numout,*) 426 write(numout,*) "AGRIF: nn_wxios will be ingored. See setting for NEMO" 427 write(numout,*) 428 ENDIF 429 ENDIF 430 415 431 #if defined key_netcdf4 416 432 ! ! NetCDF 4 case ("key_netcdf4" defined) -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
r7753 r8630 931 931 ! ! all cases ! 932 932 ! ! --------- ! 933 CALL iom_rstput( kt, nitrst, numrow, 'e3t_b', e3t_b(:,:,:) )934 CALL iom_rstput( kt, nitrst, numrow, 'e3t_n', e3t_n(:,:,:) )933 CALL iom_rstput( kt, nitrst, numrow, 'e3t_b', e3t_b(:,:,:), lxios = lwxios ) 934 CALL iom_rstput( kt, nitrst, numrow, 'e3t_n', e3t_n(:,:,:), lxios = lwxios ) 935 935 ! ! ----------------------- ! 936 936 IF( ln_vvl_ztilde .OR. ln_vvl_layer ) THEN ! z_tilde and layer cases ! 937 937 ! ! ----------------------- ! 938 CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_b', tilde_e3t_b(:,:,:) 939 CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_n', tilde_e3t_n(:,:,:) 938 CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_b', tilde_e3t_b(:,:,:), lxios = lwxios) 939 CALL iom_rstput( kt, nitrst, numrow, 'tilde_e3t_n', tilde_e3t_n(:,:,:), lxios = lwxios) 940 940 END IF 941 941 ! ! -------------! 942 942 IF( ln_vvl_ztilde ) THEN ! z_tilde case ! 943 943 ! ! ------------ ! 944 CALL iom_rstput( kt, nitrst, numrow, 'hdiv_lf', hdiv_lf(:,:,:) 944 CALL iom_rstput( kt, nitrst, numrow, 'hdiv_lf', hdiv_lf(:,:,:), lxios = lwxios) 945 945 ENDIF 946 946 ! 947 IF( lwxios ) CALL iom_swap( cxios_context ) 947 948 ENDIF 948 949 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
r7831 r8630 56 56 USE asminc ! Assimilation increment 57 57 #endif 58 USE iom_def, ONLY : lwxios 58 59 59 60 … … 1217 1218 ! 1218 1219 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN 1219 CALL iom_rstput( kt, nitrst, numrow, 'ub2_b' , ub2_b (:,:) ) 1220 CALL iom_rstput( kt, nitrst, numrow, 'vb2_b' , vb2_b (:,:) ) 1220 IF( lwxios ) CALL iom_swap( wxios_context ) 1221 CALL iom_rstput( kt, nitrst, numrow, 'ub2_b' , ub2_b (:,:), lxios = lwxios ) 1222 CALL iom_rstput( kt, nitrst, numrow, 'vb2_b' , vb2_b (:,:), lxios = lwxios ) 1221 1223 ! 1222 1224 IF (.NOT.ln_bt_av) THEN 1223 CALL iom_rstput( kt, nitrst, numrow, 'sshbb_e' , sshbb_e(:,:) )1224 CALL iom_rstput( kt, nitrst, numrow, 'ubb_e' , ubb_e(:,:) )1225 CALL iom_rstput( kt, nitrst, numrow, 'vbb_e' , vbb_e(:,:) )1226 CALL iom_rstput( kt, nitrst, numrow, 'sshb_e' , sshb_e(:,:) )1227 CALL iom_rstput( kt, nitrst, numrow, 'ub_e' , ub_e(:,:) )1228 CALL iom_rstput( kt, nitrst, numrow, 'vb_e' , vb_e(:,:) )1225 CALL iom_rstput( kt, nitrst, numrow, 'sshbb_e' , sshbb_e(:,:), lxios = lwxios ) 1226 CALL iom_rstput( kt, nitrst, numrow, 'ubb_e' , ubb_e(:,:), lxios = lwxios ) 1227 CALL iom_rstput( kt, nitrst, numrow, 'vbb_e' , vbb_e(:,:), lxios = lwxios ) 1228 CALL iom_rstput( kt, nitrst, numrow, 'sshb_e' , sshb_e(:,:), lxios = lwxios ) 1229 CALL iom_rstput( kt, nitrst, numrow, 'ub_e' , ub_e(:,:), lxios = lwxios ) 1230 CALL iom_rstput( kt, nitrst, numrow, 'vb_e' , vb_e(:,:), lxios = lwxios ) 1229 1231 ENDIF 1230 1232 #if defined key_agrif 1231 1233 ! Save time integrated fluxes 1232 1234 IF ( .NOT.Agrif_Root() ) THEN 1233 CALL iom_rstput( kt, nitrst, numrow, 'ub2_i_b' , ub2_i_b(:,:) )1234 CALL iom_rstput( kt, nitrst, numrow, 'vb2_i_b' , vb2_i_b(:,:) )1235 CALL iom_rstput( kt, nitrst, numrow, 'ub2_i_b' , ub2_i_b(:,:), lxios = lwxios ) 1236 CALL iom_rstput( kt, nitrst, numrow, 'vb2_i_b' , vb2_i_b(:,:), lxios = lwxios ) 1235 1237 ENDIF 1236 1238 #endif 1239 IF( lwxios ) CALL iom_swap( cxios_context ) 1237 1240 ENDIF 1238 1241 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r7646 r8630 44 44 LOGICAL :: ln_clobber !: clobber (overwrite) an existing file 45 45 INTEGER :: nn_chunksz !: chunksize (bytes) for NetCDF file (works only with iom_nf90 routines) 46 46 INTEGER :: nn_wxios !: write resart using xios 0 - no, 1 - single, 2 - multiple file output 47 47 #if defined key_netcdf4 48 48 !!---------------------------------------------------------------------- … … 150 150 LOGICAL :: lsp_area = .TRUE. !: to make a control print over a specific area 151 151 CHARACTER(lc) :: cxios_context !: context name used in xios 152 CHARACTER(lc) :: wxios_context !: context name used in xios to write restart file 152 153 153 154 !!---------------------------------------------------------------------- -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r8573 r8630 41 41 USE dianam ! build name of file 42 42 USE xios 43 USE iom_def, ONLY : wxioso 43 44 # endif 44 45 USE ioipsl, ONLY : ju2ymds ! for calendar 45 46 USE crs ! Grid coarsening 47 USE sbc_oce, ONLY : lk_oasis, ln_coupled_iceshelf_fluxes, ln_apr_dyn, ln_rnf, nn_components, jp_iam_sas 48 USE diadct, ONLY : lk_diadct 46 49 47 50 IMPLICIT NONE 51 ! values needed to set correctlyfiles in reast file when using XIOS for writing 52 LOGICAL, PUBLIC :: lr_vvl_ztilde, lr_vvl_layer, lr_traadv_cen2 53 48 54 PUBLIC ! must be public to be able to access iom_def through iom 49 50 55 #if defined key_iomput 51 56 LOGICAL, PUBLIC, PARAMETER :: lk_iomput = .TRUE. !: iom_put flag … … 56 61 PUBLIC iom_getatt, iom_putatt, iom_gettime, iom_rstput, iom_put 57 62 PUBLIC iom_use, iom_context_finalize 58 59 63 PRIVATE iom_rp0d, iom_rp1d, iom_rp2d, iom_rp3d 60 64 PRIVATE iom_g0d, iom_g1d, iom_g2d, iom_g3d, iom_get_123d … … 63 67 PRIVATE iom_set_domain_attr, iom_set_axis_attr, iom_set_field_attr, iom_set_file_attr, iom_get_file_attr, iom_set_grid_attr 64 68 PRIVATE set_grid, set_grid_bounds, set_scalar, set_xmlatt, set_mooring, iom_update_file_name, iom_sdate 69 PRIVATE set_rstw_active 65 70 # endif 66 71 … … 124 129 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 125 130 END SELECT 126 127 131 ! horizontal grid definition 128 132 CALL set_scalar 129 133 130 IF( TRIM(cdname) == TRIM(cxios_context) 131 CALL set_grid( "T", glamt, gphit )132 CALL set_grid( "U", glamu, gphiu )133 CALL set_grid( "V", glamv, gphiv )134 CALL set_grid( "W", glamt, gphit )134 IF( TRIM(cdname) == TRIM(cxios_context)) THEN 135 CALL set_grid( "T", glamt, gphit, .TRUE. ) 136 CALL set_grid( "U", glamu, gphiu, .TRUE. ) 137 CALL set_grid( "V", glamv, gphiv, .TRUE. ) 138 CALL set_grid( "W", glamt, gphit, .TRUE. ) 135 139 CALL set_grid_znl( gphit ) 136 140 ! … … 150 154 CALL dom_grid_crs ! Save the parent grid information & Switch to coarse grid domain 151 155 ! 152 CALL set_grid( "T", glamt_crs, gphit_crs )153 CALL set_grid( "U", glamu_crs, gphiu_crs )154 CALL set_grid( "V", glamv_crs, gphiv_crs )155 CALL set_grid( "W", glamt_crs, gphit_crs )156 CALL set_grid( "T", glamt_crs, gphit_crs, ln_mskland ) 157 CALL set_grid( "U", glamu_crs, gphiu_crs, ln_mskland ) 158 CALL set_grid( "V", glamv_crs, gphiv_crs, ln_mskland ) 159 CALL set_grid( "W", glamt_crs, gphit_crs, ln_mskland ) 156 160 CALL set_grid_znl( gphit_crs ) 157 161 ! 158 162 CALL dom_grid_glo ! Return to parent grid domain 159 163 ! 160 IF( ln_cfmeta 164 IF( ln_cfmeta) THEN ! Add additional grid metadata 161 165 CALL iom_set_domain_attr("grid_T", area = e1e2t_crs(nldi:nlei, nldj:nlej)) 162 166 CALL iom_set_domain_attr("grid_U", area = e1u_crs(nldi:nlei, nldj:nlej) * e2u_crs(nldi:nlei, nldj:nlej)) … … 171 175 172 176 ! vertical grid definition 173 CALL iom_set_axis_attr( "deptht", gdept_1d )174 CALL iom_set_axis_attr( "depthu", gdept_1d )175 CALL iom_set_axis_attr( "depthv", gdept_1d )176 CALL iom_set_axis_attr( "depthw", gdepw_1d )177 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 178 CALL iom_set_axis_attr( "depthu", paxis = gdept_1d ) 179 CALL iom_set_axis_attr( "depthv", paxis = gdept_1d ) 180 CALL iom_set_axis_attr( "depthw", paxis = gdepw_1d ) 177 181 178 182 ! Add vertical grid bounds … … 200 204 CALL iom_set_axis_attr( "iax_28C", (/ REAL(28,wp) /) ) 201 205 202 ! automatic definitions of some of the xml attributs203 206 CALL set_xmlatt 204 207 … … 213 216 214 217 #endif 215 218 216 219 END SUBROUTINE iom_init 217 220 221 SUBROUTINE iom_rstw_init( cdname, filename ) 222 !!---------------------------------------------------------------------- 223 !! *** ROUTINE *** 224 !! 225 !! ** Purpose : 226 !! 227 !!---------------------------------------------------------------------- 228 CHARACTER(len=*), INTENT(in) :: cdname 229 #if defined key_iomput 230 #if defined key_xios2 231 TYPE(xios_duration) :: dtime = xios_duration(0, 0, 0, 0, 0, 0) 232 TYPE(xios_date) :: start_date 233 TYPE(xios_domaingroup) :: domaingroup_hdl 234 TYPE(xios_domain) :: domain_hdl 235 TYPE(xios_axisgroup) :: axisgroup_hdl 236 TYPE(xios_axis) :: axis_hdl 237 TYPE(xios_scalar) :: scalar_hdl 238 TYPE(xios_scalargroup) :: scalargroup_hdl 239 #endif 240 CHARACTER(len=128) :: clname 241 INTEGER :: ji 242 ! 243 CHARACTER(len=*), OPTIONAL, INTENT(in) :: filename 244 !!---------------------------------------------------------------------- 245 246 clname = cdname 247 IF( TRIM(Agrif_CFixed()) /= '0' ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(cdname) 248 CALL xios_context_initialize(TRIM(clname), mpi_comm_opa) 249 CALL iom_swap( cdname ) 250 ! calendar parameters 251 #if defined key_xios2 252 ! Calendar type is now defined in xml file 253 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL 254 CASE ( 1) ; CALL xios_define_calendar( TYPE = "Gregorian", time_origin = xios_date(1900,01,01,00,00,00), & 255 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 256 CASE ( 0) ; CALL xios_define_calendar( TYPE = "NoLeap" , time_origin = xios_date(1900,01,01,00,00,00), & 257 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 258 CASE (30) ; CALL xios_define_calendar( TYPE = "D360" , time_origin = xios_date(1900,01,01,00,00,00), & 259 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 260 END SELECT 261 262 #endif 263 CALL xios_get_handle("domain_definition",domaingroup_hdl) 264 CALL xios_add_child(domaingroup_hdl, domain_hdl, "grid_N") 265 CALL set_grid("N", glamt, gphit, .FALSE.) 266 267 CALL xios_get_handle("axis_definition",axisgroup_hdl) 268 CALL xios_add_child(axisgroup_hdl, axis_hdl, "deptht") 269 !if unit="m" is present AGRIF configuration fails to compile 270 CALL xios_set_axis_attr( "deptht", long_name="Vertical levels in meters", positive="down") 271 ! vertical grid definition 272 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 273 274 CALL xios_get_handle("scalar_definition",scalargroup_hdl) 275 CALL xios_add_child(scalargroup_hdl, scalar_hdl, "grid_scalar") 276 277 ! automatic definitions of some of the xml attributs 278 IF( TRIM(cdname) == TRIM(wxios_context)) THEN 279 !set which fields are to be read from restart file 280 CALL set_rstw_active(filename) 281 ENDIF 282 283 ! end file definition 284 dtime%second = rdt 285 CALL xios_set_timestep(dtime) 286 CALL xios_close_context_definition() 287 #endif 288 289 END SUBROUTINE iom_rstw_init 290 291 SUBROUTINE set_rstw_active(rst_file) 292 !sets enabled = .TRUE. for each field in restart file 293 CHARACTER(len=*) :: rst_file 294 TYPE(xios_file) :: file_hdl 295 TYPE(xios_filegroup) :: filegroup_hdl 296 297 !set then name of the restart file (OUTPUT!) and enable available fields 298 if(lwp) WRITE(numout,*) 'Setting (output) restart filename (for XIOS) to: ',TRIM(rst_file) 299 CALL xios_get_handle("file_definition", filegroup_hdl ) 300 CALL xios_add_child(filegroup_hdl, file_hdl, 'wrestart') 301 IF(wxioso.eq.1) THEN 302 CALL xios_set_file_attr( "wrestart", type="one_file", name = TRIM(rst_file), & 303 enabled=.TRUE., mode="write", output_freq=xios_timestep) 304 if(lwp) write(numout,*) 'OPEN ', trim(rst_file), ' in one_file mode' 305 ELSE 306 CALL xios_set_file_attr( "wrestart", type="multiple_file", name = TRIM(rst_file),& 307 enabled=.TRUE., mode="write", output_freq=xios_timestep) 308 if(lwp) write(numout,*) 'OPEN ', trim(rst_file), ' in multiple_file mode' 309 ENDIF 310 311 CALL xios_set_file_attr( "wrestart", name=trim(rst_file)) 312 CALL set_numro_active(file_hdl) 313 314 END SUBROUTINE set_rstw_active 315 316 SUBROUTINE set_numro_active(file_hdl) 317 TYPE(xios_field) :: field_hdl 318 TYPE(xios_file) :: file_hdl 319 320 CALL xios_add_child(file_hdl, field_hdl, "rdt") 321 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 322 scalar_ref = "grid_scalar", operation = "instant") 323 324 CALL xios_add_child(file_hdl, field_hdl, "rdttra1") 325 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 326 scalar_ref = "grid_scalar", operation = "instant") 327 328 CALL xios_add_child(file_hdl, field_hdl, "un") 329 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 330 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 331 332 CALL xios_add_child(file_hdl, field_hdl, "ub") 333 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 334 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 335 336 CALL xios_add_child(file_hdl, field_hdl, "vn") 337 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 338 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 339 340 CALL xios_add_child(file_hdl, field_hdl, "vb") 341 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 342 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 343 344 CALL xios_add_child(file_hdl, field_hdl, "tn") 345 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 346 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 347 348 CALL xios_add_child(file_hdl, field_hdl, "tb") 349 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 350 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 351 352 CALL xios_add_child(file_hdl, field_hdl, "sn") 353 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 354 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 355 356 CALL xios_add_child(file_hdl, field_hdl, "sb") 357 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 358 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 359 360 CALL xios_add_child(file_hdl, field_hdl, "sshn") 361 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 362 domain_ref = "grid_N", operation = "instant") 363 364 CALL xios_add_child(file_hdl, field_hdl, "sshb") 365 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 366 domain_ref = "grid_N", operation = "instant") 367 368 CALL xios_add_child(file_hdl, field_hdl, "hdivn") 369 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 370 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 371 372 CALL xios_add_child(file_hdl, field_hdl, "hdivb") 373 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 374 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 375 376 CALL xios_add_child(file_hdl, field_hdl, "rhop") 377 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 378 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 379 380 CALL xios_add_child(file_hdl, field_hdl, "rotn") 381 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 382 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 383 384 CALL xios_add_child(file_hdl, field_hdl, "rotb") 385 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 386 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 387 388 !in daymod.F90 389 CALL xios_add_child(file_hdl, field_hdl, "kt") 390 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 391 scalar_ref = "grid_scalar", operation = "instant") 392 393 CALL xios_add_child(file_hdl, field_hdl, "ndastp") 394 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 395 scalar_ref = "grid_scalar", operation = "instant") 396 397 CALL xios_add_child(file_hdl, field_hdl, "adatrj") 398 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 399 scalar_ref = "grid_scalar", operation = "instant") 400 !end daymod.F90 401 !sbcmod.F90 402 CALL xios_add_child(file_hdl, field_hdl, "utau_b") 403 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 404 domain_ref = "grid_N", operation = "instant") 405 406 CALL xios_add_child(file_hdl, field_hdl, "vtau_b") 407 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 408 domain_ref = "grid_N", operation = "instant") 409 410 CALL xios_add_child(file_hdl, field_hdl, "qns_b") 411 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 412 domain_ref = "grid_N", operation = "instant") 413 414 CALL xios_add_child(file_hdl, field_hdl, "emp_b") 415 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 416 domain_ref = "grid_N", operation = "instant") 417 418 CALL xios_add_child(file_hdl, field_hdl, "sfx_b") 419 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 420 domain_ref = "grid_N", operation = "instant") 421 !end sbcmod.F90 422 !ALL FIELDS ABOUVE ALWAYS 423 !zdftke.F90 424 #if defined key_zdftke || defined key_esopa 425 CALL xios_add_child(file_hdl, field_hdl, "en") 426 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 427 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 428 429 CALL xios_add_child(file_hdl, field_hdl, "avt") 430 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 431 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 432 433 CALL xios_add_child(file_hdl, field_hdl, "avm") 434 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 435 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 436 437 CALL xios_add_child(file_hdl, field_hdl, "avmu") 438 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 439 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 440 441 CALL xios_add_child(file_hdl, field_hdl, "avmv") 442 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 443 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 444 445 CALL xios_add_child(file_hdl, field_hdl, "dissl") 446 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 447 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 448 #endif 449 !end zdftke.F90 450 !traqsr.F90 451 CALL xios_add_child(file_hdl, field_hdl, "qsr_hc_b") 452 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 453 domain_ref="grid_N", axis_ref="deptht" , operation = "instant") 454 455 CALL xios_add_child(file_hdl, field_hdl, "fraqsr_1lev") 456 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 457 domain_ref = "grid_N", operation = "instant") 458 !END traqsr.F90 459 #if defined key_dynspg_flt || defined key_esopa 460 !dynspg_flt.F90 461 CALL xios_add_child(file_hdl, field_hdl, "gcx") 462 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 463 domain_ref = "grid_N", operation = "instant") 464 465 CALL xios_add_child(file_hdl, field_hdl, "gcxb") 466 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 467 domain_ref = "grid_N", operation = "instant") 468 !end dynspg_flt.F90 469 #endif 470 !trasbc.F90 START 471 CALL xios_add_child(file_hdl, field_hdl, "sbc_hc_b") 472 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 473 domain_ref = "grid_N", operation = "instant") 474 475 CALL xios_add_child(file_hdl, field_hdl, "sbc_sc_b") 476 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 477 domain_ref = "grid_N", operation = "instant") 478 479 CALL xios_add_child(file_hdl, field_hdl, "fwf_isf_b") 480 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 481 domain_ref = "grid_N", operation = "instant") 482 483 CALL xios_add_child(file_hdl, field_hdl, "isf_sc_b") 484 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 485 domain_ref = "grid_N", operation = "instant") 486 487 CALL xios_add_child(file_hdl, field_hdl, "isf_hc_b") 488 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 489 domain_ref = "grid_N", operation = "instant") 490 !trasbc.F90 END 491 IF( lk_oasis) THEN 492 ! ln_coupled_iceshelf_fluxes uninitialised unless lk_oasis=true 493 IF( ln_coupled_iceshelf_fluxes ) THEN 494 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_mass") 495 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 496 scalar_ref = "grid_scalar", operation = "instant") 497 498 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_timelapsed") 499 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 500 scalar_ref = "grid_scalar", operation = "instant") 501 502 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_mass_roc") 503 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 504 scalar_ref = "grid_scalar", operation = "instant") 505 506 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_mass") 507 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 508 scalar_ref = "grid_scalar", operation = "instant") 509 510 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_timelapsed") 511 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 512 scalar_ref = "grid_scalar", operation = "instant") 513 514 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_mass_roc") 515 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 516 scalar_ref = "grid_scalar", operation = "instant") 517 ENDIF 518 ENDIF 519 #if defined key_zdfkpp 520 CALL xios_add_child(file_hdl, field_hdl, "rhd") 521 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 522 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 523 #endif 524 !dia_hsb_rst 525 #if defined key_diadct 526 IF( lk_diadct ) THEN 527 CALL xios_add_child(file_hdl, field_hdl, "frc_v") 528 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 529 scalar_ref = "grid_scalar", operation = "instant") 530 531 CALL xios_add_child(file_hdl, field_hdl, "frc_t") 532 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 533 scalar_ref = "grid_scalar", operation = "instant") 534 535 CALL xios_add_child(file_hdl, field_hdl, "frc_s") 536 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 537 scalar_ref = "grid_scalar", operation = "instant") 538 539 CALL xios_add_child(file_hdl, field_hdl, "ssh_ini") 540 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 541 domain_ref = "grid_N", operation = "instant") 542 543 CALL xios_add_child(file_hdl, field_hdl, "e3t_ini") 544 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 545 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 546 547 CALL xios_add_child(file_hdl, field_hdl, "hc_loc_ini") 548 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 549 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 550 551 CALL xios_add_child(file_hdl, field_hdl, "sc_loc_ini") 552 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 553 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 554 555 556 IF( .NOT. lk_vvl ) THEN 557 CALL xios_add_child(file_hdl, field_hdl, "frc_wn_t") 558 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 559 scalar_ref = "grid_scalar", operation = "instant") 560 561 CALL xios_add_child(file_hdl, field_hdl, "frc_wn_s") 562 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 563 scalar_ref = "grid_scalar", operation = "instant") 564 565 CALL xios_add_child(file_hdl, field_hdl, "ssh_hc_loc_ini") 566 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 567 domain_ref = "grid_N", operation = "instant") 568 569 CALL xios_add_child(file_hdl, field_hdl, "ssh_sc_loc_ini") 570 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 571 domain_ref = "grid_N", operation = "instant") 572 573 574 ENDIF 575 ENDIF 576 #endif 577 !end dia_hsb_rst 578 !domvvl.F90 579 IF( lk_vvl ) THEN 580 CALL xios_add_child(file_hdl, field_hdl, "fse3t_b") 581 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 582 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 583 584 CALL xios_add_child(file_hdl, field_hdl, "fse3t_n") 585 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 586 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 587 588 IF( lr_vvl_ztilde .OR. lr_vvl_layer ) THEN ! z_tilde and layer cases ! 589 CALL xios_add_child(file_hdl, field_hdl, "tilde_e3t_b") 590 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 591 domain_ref = "grid_N", operation = "instant") 592 593 CALL xios_add_child(file_hdl, field_hdl, "tilde_e3t_n") 594 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 595 domain_ref = "grid_N", operation = "instant") 596 END IF 597 IF( lr_vvl_ztilde ) THEN ! z_tilde case ! 598 CALL xios_add_child(file_hdl, field_hdl, "hdiv_lf") 599 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 600 domain_ref = "grid_N", operation = "instant") 601 ENDIF 602 ENDIF 603 !end domvvl.F90 604 !dynspg_ts.F90 605 #if defined key_dynspg_ts || defined key_esopa 606 CALL xios_add_child(file_hdl, field_hdl, "ub2_b") 607 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 608 domain_ref = "grid_N", operation = "instant") 609 610 CALL xios_add_child(file_hdl, field_hdl, "vb2_b") 611 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 612 domain_ref = "grid_N", operation = "instant") 613 614 615 IF (.NOT.ln_bt_av) THEN 616 CALL xios_add_child(file_hdl, field_hdl, "sshbb_e") 617 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 618 domain_ref = "grid_N", operation = "instant") 619 620 CALL xios_add_child(file_hdl, field_hdl, "ubb_e") 621 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 622 domain_ref = "grid_N", operation = "instant") 623 624 CALL xios_add_child(file_hdl, field_hdl, "vbb_e") 625 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 626 domain_ref = "grid_N", operation = "instant") 627 628 CALL xios_add_child(file_hdl, field_hdl, "sshb_e") 629 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 630 domain_ref = "grid_N", operation = "instant") 631 632 CALL xios_add_child(file_hdl, field_hdl, "ub_e") 633 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 634 domain_ref = "grid_N", operation = "instant") 635 636 CALL xios_add_child(file_hdl, field_hdl, "vb_e") 637 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 638 domain_ref = "grid_N", operation = "instant") 639 ENDIF 640 #if defined key_agrif 641 ! Save time integrated fluxes 642 IF ( .NOT.Agrif_Root() ) THEN 643 CALL xios_add_child(file_hdl, field_hdl, "ub2_i_b") 644 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 645 domain_ref = "grid_N", operation = "instant") 646 647 CALL xios_add_child(file_hdl, field_hdl, "vb2_i_b") 648 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 649 domain_ref = "grid_N", operation = "instant") 650 ENDIF 651 #endif 652 #endif 653 !end dynspg_ts.F90 654 !sbcapr.F90 655 IF( ln_apr_dyn) THEN 656 CALL xios_add_child(file_hdl, field_hdl, "ssh_ibb") 657 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 658 domain_ref = "grid_N", operation = "instant") 659 ENDIF 660 !end sbcapr.F90 661 !sbcrnf.F90 662 IF( ln_rnf ) THEN 663 CALL xios_add_child(file_hdl, field_hdl, "rnf_b") 664 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 665 domain_ref = "grid_N", operation = "instant") 666 667 CALL xios_add_child(file_hdl, field_hdl, "rnf_hc_b") 668 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 669 domain_ref = "grid_N", operation = "instant") 670 671 CALL xios_add_child(file_hdl, field_hdl, "rnf_sc_b") 672 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 673 domain_ref = "grid_N", operation = "instant") 674 ENDIF 675 !end sbcrnf.F90 676 !sbcssm.F90 677 IF( nn_components /= jp_iam_sas .AND. nn_fsbc .NE. 1) THEN 678 CALL xios_add_child(file_hdl, field_hdl, "nn_fsbc") 679 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 680 scalar_ref = "grid_scalar", operation = "instant") 681 682 CALL xios_add_child(file_hdl, field_hdl, "ssu_m") 683 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 684 domain_ref = "grid_N", operation = "instant") 685 686 CALL xios_add_child(file_hdl, field_hdl, "ssv_m") 687 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 688 domain_ref = "grid_N", operation = "instant") 689 690 CALL xios_add_child(file_hdl, field_hdl, "sst_m") 691 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 692 domain_ref = "grid_N", operation = "instant") 693 694 CALL xios_add_child(file_hdl, field_hdl, "sss_m") 695 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 696 domain_ref = "grid_N", operation = "instant") 697 698 CALL xios_add_child(file_hdl, field_hdl, "ssh_m") 699 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 700 domain_ref = "grid_N", operation = "instant") 701 702 CALL xios_add_child(file_hdl, field_hdl, "frq_m") 703 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 704 domain_ref = "grid_N", operation = "instant") 705 706 IF( lk_vvl ) THEN 707 CALL xios_add_child(file_hdl, field_hdl, "e3t_m") 708 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 709 domain_ref = "grid_N", operation = "instant") 710 ENDIF 711 ENDIF 712 !end sbcssm.F90 713 IF( lr_traadv_cen2 ) THEN 714 CALL xios_add_child(file_hdl, field_hdl, "avmb") 715 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 716 axis_ref = "deptht", operation = "instant") 717 718 CALL xios_add_child(file_hdl, field_hdl, "avtb") 719 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 720 axis_ref = "deptht", operation = "instant") 721 ENDIF 722 723 END SUBROUTINE set_numro_active 218 724 219 725 SUBROUTINE iom_swap( cdname ) … … 905 1411 IF( zofs /= 0. ) pv_r1d(:) = pv_r1d(:) + zofs 906 1412 ELSEIF( PRESENT(pv_r2d) ) THEN 907 1413 IF( zscf /= 1.) pv_r2d(:,:) = pv_r2d(:,:) * zscf 908 1414 IF( zofs /= 0.) pv_r2d(:,:) = pv_r2d(:,:) + zofs 909 1415 ELSEIF( PRESENT(pv_r3d) ) THEN … … 1115 1621 !! INTERFACE iom_rstput 1116 1622 !!---------------------------------------------------------------------- 1117 SUBROUTINE iom_rp0d( kt, kwrite, kiomid, cdvar, pvar, ktype )1623 SUBROUTINE iom_rp0d( kt, kwrite, kiomid, cdvar, pvar, ktype, lxios ) 1118 1624 INTEGER , INTENT(in) :: kt ! ocean time-step 1119 1625 INTEGER , INTENT(in) :: kwrite ! writing time-step … … 1122 1628 REAL(wp) , INTENT(in) :: pvar ! written field 1123 1629 INTEGER , INTENT(in), OPTIONAL :: ktype ! variable external type 1630 LOGICAL, OPTIONAL :: lxios ! xios write flag 1631 LOGICAL :: lx ! local xios write flag 1124 1632 INTEGER :: ivid ! variable id 1125 IF( kiomid > 0 ) THEN 1126 IF( iom_file(kiomid)%nfid > 0 ) THEN 1127 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1128 SELECT CASE (iom_file(kiomid)%iolib) 1129 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar ) 1130 CASE DEFAULT 1131 CALL ctl_stop( 'iom_rp0d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1132 END SELECT 1633 lx = .FALSE. 1634 IF(PRESENT(lxios)) lx = lxios 1635 IF( lx ) THEN 1636 #ifdef key_iomput 1637 IF( kt == kwrite ) THEN 1638 IF(lwp) write(numout,*) 'RESTART: write (XIOS 0D) ',trim(cdvar) 1639 CALL xios_send_field(trim(cdvar), pvar) 1640 ENDIF 1641 #endif 1642 ELSE 1643 IF( kiomid > 0 ) THEN 1644 IF( iom_file(kiomid)%nfid > 0 ) THEN 1645 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1646 SELECT CASE (iom_file(kiomid)%iolib) 1647 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar ) 1648 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r0d = pvar ) 1649 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pvar ) 1650 CASE DEFAULT 1651 CALL ctl_stop( 'iom_rp0d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 1652 END SELECT 1653 ENDIF 1133 1654 ENDIF 1134 1655 ENDIF 1135 1656 END SUBROUTINE iom_rp0d 1136 1657 1137 SUBROUTINE iom_rp1d( kt, kwrite, kiomid, cdvar, pvar, ktype )1658 SUBROUTINE iom_rp1d( kt, kwrite, kiomid, cdvar, pvar, ktype, lxios ) 1138 1659 INTEGER , INTENT(in) :: kt ! ocean time-step 1139 1660 INTEGER , INTENT(in) :: kwrite ! writing time-step … … 1142 1663 REAL(wp) , INTENT(in), DIMENSION( :) :: pvar ! written field 1143 1664 INTEGER , INTENT(in), OPTIONAL :: ktype ! variable external type 1665 LOGICAL, OPTIONAL :: lxios ! xios write flag 1666 LOGICAL :: lx ! local xios write flag 1144 1667 INTEGER :: ivid ! variable id 1145 IF( kiomid > 0 ) THEN 1146 IF( iom_file(kiomid)%nfid > 0 ) THEN 1147 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1148 SELECT CASE (iom_file(kiomid)%iolib) 1149 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar ) 1150 CASE DEFAULT 1151 CALL ctl_stop( 'iom_rp1d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1152 END SELECT 1668 lx = .FALSE. 1669 IF(PRESENT(lxios)) lx = lxios 1670 IF( lx ) THEN 1671 #ifdef key_iomput 1672 IF( kt == kwrite ) THEN 1673 IF(lwp) write(numout,*) 'RESTART: write (XIOS 1D) ',trim(cdvar) 1674 CALL xios_send_field(trim(cdvar), pvar) 1675 ENDIF 1676 #endif 1677 ELSE 1678 IF( kiomid > 0 ) THEN 1679 IF( iom_file(kiomid)%nfid > 0 ) THEN 1680 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1681 SELECT CASE (iom_file(kiomid)%iolib) 1682 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar ) 1683 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r1d = pvar ) 1684 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r1d = pvar ) 1685 CASE DEFAULT 1686 CALL ctl_stop( 'iom_rp1d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 1687 END SELECT 1688 ENDIF 1153 1689 ENDIF 1154 1690 ENDIF 1155 1691 END SUBROUTINE iom_rp1d 1156 1692 1157 SUBROUTINE iom_rp2d( kt, kwrite, kiomid, cdvar, pvar, ktype )1693 SUBROUTINE iom_rp2d( kt, kwrite, kiomid, cdvar, pvar, ktype, lxios ) 1158 1694 INTEGER , INTENT(in) :: kt ! ocean time-step 1159 1695 INTEGER , INTENT(in) :: kwrite ! writing time-step … … 1162 1698 REAL(wp) , INTENT(in), DIMENSION(:, : ) :: pvar ! written field 1163 1699 INTEGER , INTENT(in), OPTIONAL :: ktype ! variable external type 1700 LOGICAL, OPTIONAL :: lxios ! xios write flag 1701 LOGICAL :: lx ! local xios write flag 1164 1702 INTEGER :: ivid ! variable id 1165 IF( kiomid > 0 ) THEN 1166 IF( iom_file(kiomid)%nfid > 0 ) THEN 1167 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1168 SELECT CASE (iom_file(kiomid)%iolib) 1169 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar ) 1170 CASE DEFAULT 1171 CALL ctl_stop( 'iom_rp2d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1172 END SELECT 1703 lx = .FALSE. 1704 IF(PRESENT(lxios)) lx = lxios 1705 IF( lx ) THEN 1706 #ifdef key_iomput 1707 IF( kt == kwrite ) THEN 1708 IF(lwp) write(numout,*) 'RESTART: write (XIOS 2D) ',trim(cdvar) 1709 CALL xios_send_field(trim(cdvar), pvar) 1710 ENDIF 1711 #endif 1712 ELSE 1713 IF( kiomid > 0 ) THEN 1714 IF( iom_file(kiomid)%nfid > 0 ) THEN 1715 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1716 SELECT CASE (iom_file(kiomid)%iolib) 1717 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar ) 1718 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r2d = pvar ) 1719 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r2d = pvar ) 1720 CASE DEFAULT 1721 CALL ctl_stop( 'iom_rp2d: accepted IO library are only jpioipsl, jpnf90 and jprstdimg' ) 1722 END SELECT 1723 ENDIF 1173 1724 ENDIF 1174 1725 ENDIF 1175 1726 END SUBROUTINE iom_rp2d 1176 1727 1177 SUBROUTINE iom_rp3d( kt, kwrite, kiomid, cdvar, pvar, ktype )1728 SUBROUTINE iom_rp3d( kt, kwrite, kiomid, cdvar, pvar, ktype, lxios ) 1178 1729 INTEGER , INTENT(in) :: kt ! ocean time-step 1179 1730 INTEGER , INTENT(in) :: kwrite ! writing time-step … … 1182 1733 REAL(wp) , INTENT(in), DIMENSION(:,:,:) :: pvar ! written field 1183 1734 INTEGER , INTENT(in), OPTIONAL :: ktype ! variable external type 1735 LOGICAL, OPTIONAL :: lxios ! xios write flag 1736 LOGICAL :: lx ! local xios write flag 1184 1737 INTEGER :: ivid ! variable id 1185 IF( kiomid > 0 ) THEN 1186 IF( iom_file(kiomid)%nfid > 0 ) THEN 1187 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1188 SELECT CASE (iom_file(kiomid)%iolib) 1189 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar ) 1190 CASE DEFAULT 1191 CALL ctl_stop( 'iom_rp3d: accepted IO library is only jpnf90 (jpioipsl option has been removed)' ) 1192 END SELECT 1738 lx = .FALSE. 1739 IF(PRESENT(lxios)) lx = lxios 1740 IF( lx ) THEN 1741 #ifdef key_iomput 1742 IF( kt == kwrite ) THEN 1743 IF(lwp) write(numout,*) 'RESTART: write (XIOS 3D) ',trim(cdvar) 1744 CALL xios_send_field(trim(cdvar), pvar) 1745 ENDIF 1746 #endif 1747 ELSE 1748 IF( kiomid > 0 ) THEN 1749 IF( iom_file(kiomid)%nfid > 0 ) THEN 1750 ivid = iom_varid( kiomid, cdvar, ldstop = .FALSE. ) 1751 SELECT CASE (iom_file(kiomid)%iolib) 1752 CASE (jpioipsl ) ; CALL iom_ioipsl_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar ) 1753 CASE (jpnf90 ) ; CALL iom_nf90_rstput( kt, kwrite, kiomid, cdvar, ivid, ktype, pv_r3d = pvar ) 1754 CASE (jprstdimg) ; IF( kt == kwrite ) CALL iom_rstdimg_rstput( kiomid, cdvar, ivid, pv_r3d = pvar ) 1755 CASE DEFAULT 1756 CALL ctl_stop( 'iom_rp3d: accepted IO library are only jpioipsl and jprstdimg' ) 1757 END SELECT 1758 ENDIF 1193 1759 ENDIF 1194 1760 ENDIF … … 1234 1800 SUBROUTINE iom_p3d( cdname, pfield3d ) 1235 1801 CHARACTER(LEN=*) , INTENT(in) :: cdname 1236 REAL(wp), DIMENSION(:,:,:), INTENT(in) :: pfield3d1237 1802 #if defined key_iomput 1238 1803 CALL xios_send_field(cdname, pfield3d) … … 1368 1933 SUBROUTINE iom_context_finalize( cdname ) 1369 1934 CHARACTER(LEN=*), INTENT(in) :: cdname 1370 ! 1371 IF( xios_is_valid_context(cdname) ) THEN 1935 CHARACTER(LEN=120) :: clname 1936 ! 1937 clname = cdname 1938 IF( TRIM(Agrif_CFixed()) .NE. '0' ) clname = TRIM(Agrif_CFixed())//"_"//clname 1939 1940 IF( xios_is_valid_context(clname) ) THEN 1372 1941 CALL iom_swap( cdname ) ! swap to cdname context 1373 1942 CALL xios_context_finalize() ! finalize the context … … 1378 1947 1379 1948 1380 SUBROUTINE set_grid( cdgrd, plon, plat )1949 SUBROUTINE set_grid( cdgrd, plon, plat, lxios ) 1381 1950 !!---------------------------------------------------------------------- 1382 1951 !! *** ROUTINE set_grid *** … … 1391 1960 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmask 1392 1961 INTEGER :: ni,nj 1962 LOGICAL :: lxios 1393 1963 1394 1964 ni=nlei-nldi+1 ; nj=nlej-nldj+1 … … 1396 1966 CALL iom_set_domain_attr("grid_"//cdgrd, ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-2, jbegin=njmpp+nldj-2, ni=ni, nj=nj) 1397 1967 CALL iom_set_domain_attr("grid_"//cdgrd, data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) 1398 CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = RESHAPE(plon(nldi:nlei, nldj:nlej),(/ ni*nj /)), &1968 if(.NOT.lxios) CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = RESHAPE(plon(nldi:nlei, nldj:nlej),(/ ni*nj /)), & 1399 1969 & latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /))) 1400 1970 1401 IF ( ln_mskland ) THEN1971 IF ( ln_mskland.AND.(.NOT.lxios) ) THEN 1402 1972 ! mask land points, keep values on coast line -> specific mask for U, V and W points 1403 1973 SELECT CASE ( cdgrd ) … … 1439 2009 ! Offset of coordinate representing bottom-left corner 1440 2010 SELECT CASE ( TRIM(cdgrd) ) 1441 CASE ('T', 'W' )2011 CASE ('T', 'W', 'N') 1442 2012 icnr = -1 ; jcnr = -1 1443 2013 CASE ('U') -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
r7646 r8630 46 46 !$AGRIF_DO_NOT_TREAT 47 47 INTEGER, PUBLIC :: iom_open_init = 0 !: used to initialize iom_file(:)%nfid to 0 48 !XIOS read restart 49 LOGICAL, PUBLIC :: lwxios !: read single file restart using XIOS 50 INTEGER, PUBLIC :: wxioso !: type of restart file when writing using XIOS 1 - single, 2 - multiple 51 52 48 53 49 54 TYPE, PUBLIC :: file_descriptor … … 67 72 TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC :: iom_file !: array containing the info for all opened files 68 73 !$AGRIF_END_DO_NOT_TREAT 69 70 74 !!===================================================================== 71 75 END MODULE iom_def -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r6140 r8630 28 28 USE iom ! I/O module 29 29 USE diurnal_bulk 30 30 USE iom_def, ONLY : lwxios 31 31 32 IMPLICIT NONE 32 33 PRIVATE … … 61 62 CHARACTER(LEN=50) :: clname ! ocean output restart file name 62 63 CHARACTER(lc) :: clpath ! full path to ocean output restart file 63 !!---------------------------------------------------------------------- 64 ! 64 CHARACTER(LEN=52) :: dlname ! ocean output restart file name including prefix for AGRIF 65 !!---------------------------------------------------------------------- 66 ! 67 65 68 IF( kt == nit000 ) THEN ! default definitions 66 69 lrst_oce = .FALSE. … … 82 85 ! we open and define the ocean restart file one time step before writing the data (-> at nitrst - 1) 83 86 ! except if we write ocean restart files every time step or if an ocean restart file was writen at nitend - 1 87 ! NO, because the data is written 2 times on nitrst - 1 and nitrst 84 88 IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 85 89 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN … … 94 98 IF(lwp) THEN 95 99 WRITE(numout,*) 96 SELECT CASE ( jprstlib ) 97 CASE DEFAULT ; WRITE(numout,*) & 98 ' open ocean restart NetCDF file: ',TRIM(clpath)//clname 99 END SELECT 100 IF ( snc4set%luse ) WRITE(numout,*) ' opened for NetCDF4 chunking and compression' 101 IF( kt == nitrst - 1 ) THEN ; WRITE(numout,*) ' kt = nitrst - 1 = ', kt 102 ELSE ; WRITE(numout,*) ' kt = ' , kt 100 IF(.NOT.lwxios) THEN 101 SELECT CASE ( jprstlib ) 102 CASE ( jprstdimg ) ; WRITE(numout,*) & 103 ' open ocean restart binary file: ',TRIM(clpath)//TRIM(clname) 104 CASE DEFAULT ; WRITE(numout,*) & 105 ' open ocean restart NetCDF file: ',TRIM(clpath)//TRIM(clname) 106 END SELECT 107 IF ( snc4set%luse ) WRITE(numout,*) ' opened for NetCDF4 chunking and compression' 108 IF( kt == nitrst - 1 ) THEN ; WRITE(numout,*) ' kt = nitrst - 1 = ', kt 109 ELSE ; WRITE(numout,*) ' kt = ' , kt 110 ENDIF 103 111 ENDIF 104 112 ENDIF 105 113 ! 106 CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib ) 114 IF(.NOT.lwxios) THEN 115 CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib ) 116 ELSE 117 wxios_context = "rstw_"//TRIM(ADJUSTL(clkt)) 118 IF( TRIM(Agrif_CFixed()) == '0' ) THEN 119 dlname = clname 120 ELSE 121 dlname = TRIM(Agrif_CFixed())//"_"//clname 122 ENDIF 123 CALL iom_rstw_init( wxios_context, TRIM(clpath)//TRIM(dlname)) 124 CALL xios_update_calendar(nitrst) 125 CALL iom_swap( cxios_context ) 126 ENDIF 107 127 lrst_oce = .TRUE. 108 128 ENDIF 109 129 ENDIF 130 110 131 ! 111 132 END SUBROUTINE rst_opn … … 123 144 INTEGER, INTENT(in) :: kt ! ocean time-step 124 145 !!---------------------------------------------------------------------- 125 146 IF(lwxios) CALL iom_swap( wxios_context ) 147 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rdt , lxios = lwxios) ! dynamics time step 148 CALL iom_rstput( kt, nitrst, numrow, 'rdttra1', rdttra(1) , lxios = lwxios) ! surface tracer time step 126 149 CALL iom_rstput( kt, nitrst, numrow, 'rdt' , rdt ) ! dynamics and tracer time step 127 150 128 151 IF ( .NOT. ln_diurnal_only ) THEN 129 CALL iom_rstput( kt, nitrst, numrow, 'ub' , ub ) ! before fields130 CALL iom_rstput( kt, nitrst, numrow, 'vb' , vb )131 CALL iom_rstput( kt, nitrst, numrow, 'tb' , tsb(:,:,:,jp_tem) )132 CALL iom_rstput( kt, nitrst, numrow, 'sb' , tsb(:,:,:,jp_sal) )133 CALL iom_rstput( kt, nitrst, numrow, 'sshb' , sshb )152 CALL iom_rstput( kt, nitrst, numrow, 'ub' , ub, lxios = lwxios) ) ! before fields 153 CALL iom_rstput( kt, nitrst, numrow, 'vb' , vb, lxios = lwxios) ) 154 CALL iom_rstput( kt, nitrst, numrow, 'tb' , tsb(:,:,:,jp_tem), lxios = lwxios) ) 155 CALL iom_rstput( kt, nitrst, numrow, 'sb' , tsb(:,:,:,jp_sal), lxios = lwxios) ) 156 CALL iom_rstput( kt, nitrst, numrow, 'sshb' , sshb, lxios = lwxios) ) 134 157 ! 135 CALL iom_rstput( kt, nitrst, numrow, 'un' , un ) ! now fields 136 CALL iom_rstput( kt, nitrst, numrow, 'vn' , vn ) 137 CALL iom_rstput( kt, nitrst, numrow, 'tn' , tsn(:,:,:,jp_tem) ) 138 CALL iom_rstput( kt, nitrst, numrow, 'sn' , tsn(:,:,:,jp_sal) ) 139 CALL iom_rstput( kt, nitrst, numrow, 'sshn' , sshn ) 140 CALL iom_rstput( kt, nitrst, numrow, 'rhop' , rhop ) 141 158 CALL iom_rstput( kt, nitrst, numrow, 'un' , un, lxios = lwxios ) ! now fields 159 CALL iom_rstput( kt, nitrst, numrow, 'vn' , vn, lxios = lwxios ) 160 CALL iom_rstput( kt, nitrst, numrow, 'tn' , tsn(:,:,:,jp_tem), lxios = lwxios ) 161 CALL iom_rstput( kt, nitrst, numrow, 'sn' , tsn(:,:,:,jp_sal), lxios = lwxios ) 162 CALL iom_rstput( kt, nitrst, numrow, 'sshn' , sshn, lxios = lwxios ) 163 CALL iom_rstput( kt, nitrst, numrow, 'rhop' , rhop, lxios = lwxios ) 142 164 ! extra variable needed for the ice sheet coupling 143 165 IF ( ln_iscpl ) THEN … … 156 178 157 179 IF( kt == nitrst ) THEN 158 CALL iom_close( numrow ) ! close the restart file (only at last time step) 180 IF(.NOT.lwxios) THEN 181 CALL iom_close( numrow ) ! close the restart file (only at last time step) 182 ELSE 183 CALL iom_context_finalize( wxios_context ) 184 ENDIF 159 185 !!gm IF( .NOT. lk_trdmld ) lrst_oce = .FALSE. 160 186 !!gm not sure what to do here ===>>> ask to Sebastian … … 164 190 nitrst = nstocklist( nrst_lst ) 165 191 ENDIF 166 lrst_oce = .FALSE.167 192 ENDIF 168 193 ! … … 267 292 ! 268 293 END SUBROUTINE rst_read 269 270 294 !!===================================================================== 271 295 END MODULE restart -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/SBC/fldread.F90
r7646 r8630 1343 1343 & ' data type: ' , sdf(jf)%cltype , & 1344 1344 & ' land/sea mask:' , TRIM( sdf(jf)%lsmname ) 1345 call flush(numout)1346 1345 END DO 1347 1346 ENDIF -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
r8524 r8630 19 19 USE iom ! IOM library 20 20 USE lib_mpp ! MPP library 21 USE iom_def, ONLY : lwxios 21 22 22 23 IMPLICIT NONE … … 165 166 IF(lwp) WRITE(numout,*) 'sbc_apr : ssh_ib written in ocean restart file at it= ', kt,' date= ', ndastp 166 167 IF(lwp) WRITE(numout,*) '~~~~' 167 CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib ) 168 IF( lwxios ) CALL iom_swap( wxios_context ) 169 CALL iom_rstput( kt, nitrst, numrow, 'ssh_ibb' , ssh_ib, lxios = lwxios ) 170 IF( lwxios ) CALL iom_swap( cxios_context ) 168 171 ENDIF 169 172 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
r8524 r8630 58 58 59 59 USE diurnal_bulk, ONLY: ln_diurnal_only ! diurnal SST diagnostic 60 USE iom_def, ONLY : lwxios 60 61 61 62 IMPLICIT NONE … … 485 486 & 'at it= ', kt,' date= ', ndastp 486 487 IF(lwp) WRITE(numout,*) '~~~~' 487 CALL iom_rstput( kt, nitrst, numrow, 'utau_b' , utau ) 488 CALL iom_rstput( kt, nitrst, numrow, 'vtau_b' , vtau ) 489 CALL iom_rstput( kt, nitrst, numrow, 'qns_b' , qns ) 488 IF( lwxios ) CALL iom_swap( wxios_context ) 489 CALL iom_rstput( kt, nitrst, numrow, 'utau_b' , utau, lxios = lwxios ) 490 CALL iom_rstput( kt, nitrst, numrow, 'vtau_b' , vtau, lxios = lwxios ) 491 CALL iom_rstput( kt, nitrst, numrow, 'qns_b' , qns, lxios = lwxios ) 490 492 ! The 3D heat content due to qsr forcing is treated in traqsr 491 493 ! CALL iom_rstput( kt, nitrst, numrow, 'qsr_b' , qsr ) 492 CALL iom_rstput( kt, nitrst, numrow, 'emp_b' , emp ) 493 CALL iom_rstput( kt, nitrst, numrow, 'sfx_b' , sfx ) 494 CALL iom_rstput( kt, nitrst, numrow, 'emp_b' , emp, lxios = lwxios ) 495 CALL iom_rstput( kt, nitrst, numrow, 'sfx_b' , sfx, lxios = lwxios ) 496 IF( lwxios ) CALL iom_swap( cxios_context ) 494 497 ENDIF 495 498 ! ! ---------------------------------------- ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
r7968 r8630 28 28 USE lib_mpp ! MPP library 29 29 USE wrk_nemo ! Memory allocation 30 USE iom_def, ONLY : lwxios 30 31 31 32 IMPLICIT NONE … … 164 165 & 'at it= ', kt,' date= ', ndastp 165 166 IF(lwp) WRITE(numout,*) '~~~~' 166 CALL iom_rstput( kt, nitrst, numrow, 'rnf_b' , rnf ) 167 CALL iom_rstput( kt, nitrst, numrow, 'rnf_hc_b', rnf_tsc(:,:,jp_tem) ) 168 CALL iom_rstput( kt, nitrst, numrow, 'rnf_sc_b', rnf_tsc(:,:,jp_sal) ) 167 IF( lwxios ) CALL iom_swap( wxios_context ) 168 CALL iom_rstput( kt, nitrst, numrow, 'rnf_b' , rnf, lxios = lwxios ) 169 CALL iom_rstput( kt, nitrst, numrow, 'rnf_hc_b', rnf_tsc(:,:,jp_tem), lxios = lwxios ) 170 CALL iom_rstput( kt, nitrst, numrow, 'rnf_sc_b', rnf_tsc(:,:,jp_sal), lxios = lwxios ) 171 IF( lwxios ) CALL iom_swap( cxios_context ) 169 172 ENDIF 170 173 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
r7753 r8630 22 22 USE prtctl ! Print control 23 23 USE iom ! IOM library 24 USE iom_def, ONLY : lwxios 24 25 25 26 IMPLICIT NONE … … 155 156 IF(lwp) WRITE(numout,*) '~~~~~~~' 156 157 zf_sbc = REAL( nn_fsbc, wp ) 157 CALL iom_rstput( kt, nitrst, numrow, 'nn_fsbc', zf_sbc ) ! sbc frequency 158 CALL iom_rstput( kt, nitrst, numrow, 'ssu_m' , ssu_m ) ! sea surface mean fields 159 CALL iom_rstput( kt, nitrst, numrow, 'ssv_m' , ssv_m ) 160 CALL iom_rstput( kt, nitrst, numrow, 'sst_m' , sst_m ) 161 CALL iom_rstput( kt, nitrst, numrow, 'sss_m' , sss_m ) 162 CALL iom_rstput( kt, nitrst, numrow, 'ssh_m' , ssh_m ) 163 CALL iom_rstput( kt, nitrst, numrow, 'e3t_m' , e3t_m ) 164 CALL iom_rstput( kt, nitrst, numrow, 'frq_m' , frq_m ) 165 ! 158 IF( lwxios ) CALL iom_swap( wxios_context ) 159 CALL iom_rstput( kt, nitrst, numrow, 'nn_fsbc', zf_sbc, lxios = lwxios ) ! sbc frequency 160 CALL iom_rstput( kt, nitrst, numrow, 'ssu_m' , ssu_m, lxios = lwxios ) ! sea surface mean fields 161 CALL iom_rstput( kt, nitrst, numrow, 'ssv_m' , ssv_m, lxios = lwxios ) 162 CALL iom_rstput( kt, nitrst, numrow, 'sst_m' , sst_m, lxios = lwxios ) 163 CALL iom_rstput( kt, nitrst, numrow, 'sss_m' , sss_m, lxios = lwxios ) 164 CALL iom_rstput( kt, nitrst, numrow, 'ssh_m' , ssh_m, lxios = lwxios ) 165 CALL iom_rstput( kt, nitrst, numrow, 'e3t_m' , e3t_m, lxios = lwxios ) 166 CALL iom_rstput( kt, nitrst, numrow, 'frq_m' , frq_m, lxios = lwxios ) 167 ! 168 IF( lwxios ) CALL iom_swap( cxios_context ) 166 169 ENDIF 167 170 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
r7753 r8630 45 45 PUBLIC tra_adv ! routine called by step module 46 46 PUBLIC tra_adv_init ! routine called by opa module 47 48 47 ! !!* Namelist namtra_adv * 49 48 LOGICAL :: ln_traadv_cen ! centered scheme flag … … 300 299 ! 301 300 CALL tra_adv_mle_init !== initialisation of the Mixed Layer Eddy parametrisation (MLE) ==! 301 lr_traadv_cen2 = ln_traadv_cen2 302 302 ! 303 303 END SUBROUTINE tra_adv_init -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
r7753 r8630 36 36 USE wrk_nemo ! Memory Allocation 37 37 USE timing ! Timing 38 USE iom_def, ONLY : lwxios 38 39 39 40 IMPLICIT NONE … … 294 295 ! 295 296 IF( lrst_oce ) THEN ! write in the ocean restart file 296 CALL iom_rstput( kt, nitrst, numrow, 'qsr_hc_b' , qsr_hc ) 297 CALL iom_rstput( kt, nitrst, numrow, 'fraqsr_1lev', fraqsr_1lev ) 297 IF( lwxios ) CALL iom_swap( wxios_context ) 298 CALL iom_rstput( kt, nitrst, numrow, 'qsr_hc_b' , qsr_hc, lxios = lwxios ) 299 CALL iom_rstput( kt, nitrst, numrow, 'fraqsr_1lev', fraqsr_1lev, lxios = lwxios ) 300 IF( lwxios ) CALL iom_swap( cxios_context ) 298 301 ENDIF 299 302 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/TRA/trasbc.F90
r7788 r8630 34 34 USE wrk_nemo ! Memory Allocation 35 35 USE timing ! Timing 36 USE iom_def, ONLY : lwxios 36 37 37 38 IMPLICIT NONE … … 146 147 ! 147 148 IF( lrst_oce ) THEN !== write sbc_tsc in the ocean restart file ==! 148 CALL iom_rstput( kt, nitrst, numrow, 'sbc_hc_b', sbc_tsc(:,:,jp_tem) ) 149 CALL iom_rstput( kt, nitrst, numrow, 'sbc_sc_b', sbc_tsc(:,:,jp_sal) ) 149 IF( lwxios ) CALL iom_swap( wxios_context ) 150 CALL iom_rstput( kt, nitrst, numrow, 'sbc_hc_b', sbc_tsc(:,:,jp_tem), lxios = lwxios ) 151 CALL iom_rstput( kt, nitrst, numrow, 'sbc_sc_b', sbc_tsc(:,:,jp_sal), lxios = lwxios ) 152 IF( lwxios ) CALL iom_swap( cxios_context ) 150 153 ENDIF 151 154 ! -
branches/2017/dev_r8600_xios_write/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
r7813 r8630 53 53 USE timing ! Timing 54 54 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 55 USE iom_def, ONLY : lwxios 55 56 #if defined key_agrif 56 57 USE agrif_opa_interp … … 880 881 ! ! ------------------- 881 882 IF(lwp) WRITE(numout,*) '---- tke-rst ----' 882 CALL iom_rstput( kt, nitrst, numrow, 'en' , en ) 883 CALL iom_rstput( kt, nitrst, numrow, 'avt' , avt_k ) 884 CALL iom_rstput( kt, nitrst, numrow, 'avm' , avm_k ) 885 CALL iom_rstput( kt, nitrst, numrow, 'avmu' , avmu_k ) 886 CALL iom_rstput( kt, nitrst, numrow, 'avmv' , avmv_k ) 887 CALL iom_rstput( kt, nitrst, numrow, 'dissl', dissl ) 883 IF( lwxios ) CALL iom_swap( wxios_context ) 884 CALL iom_rstput( kt, nitrst, numrow, 'en' , en , lxios = lwxios ) 885 CALL iom_rstput( kt, nitrst, numrow, 'avt' , avt_k , lxios = lwxios ) 886 CALL iom_rstput( kt, nitrst, numrow, 'avm' , avm_k , lxios = lwxios ) 887 CALL iom_rstput( kt, nitrst, numrow, 'avmu' , avmu_k, lxios = lwxios ) 888 CALL iom_rstput( kt, nitrst, numrow, 'avmv' , avmv_k, lxios = lwxios ) 889 CALL iom_rstput( kt, nitrst, numrow, 'dissl', dissl , lxios = lwxios ) 890 IF( lwxios ) CALL iom_swap( cxios_context ) 888 891 ! 889 892 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.