Changeset 8836
- Timestamp:
- 2017-11-28T15:45:20+01:00 (7 years ago)
- Location:
- branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
r8831 r8836 258 258 CALL iom_get( numror, 'frc_t', frc_t, ldxios = lrxios ) 259 259 CALL iom_get( numror, 'frc_s', frc_s, ldxios = lrxios ) 260 IF( ln_linssh ) THEN261 CALL iom_get( numror, 'frc_wn_t', frc_wn_t, ldxios = lrxios )262 CALL iom_get( numror, 'frc_wn_s', frc_wn_s, ldxios = lrxios )263 ENDIF264 260 CALL iom_get( numror, jpdom_autoglo, 'surf_ini', surf_ini, ldxios = lrxios ) ! ice sheet coupling 265 261 CALL iom_get( numror, jpdom_autoglo, 'ssh_ini', ssh_ini(:,:), ldxios = lrxios ) … … 270 266 CALL iom_get( numror, jpdom_autoglo, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:), ldxios = lrxios ) 271 267 CALL iom_get( numror, jpdom_autoglo, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:), ldxios = lrxios ) 268 CALL iom_get( numror, 'frc_wn_t', frc_wn_t, ldxios = lrxios ) 269 CALL iom_get( numror, 'frc_wn_s', frc_wn_s, ldxios = lrxios ) 272 270 ENDIF 273 271 ELSE … … 312 310 CALL iom_rstput( kt, nitrst, numrow, 'frc_t' , frc_t, ldxios = lwxios) 313 311 CALL iom_rstput( kt, nitrst, numrow, 'frc_s' , frc_s, ldxios = lwxios) 314 IF( ln_linssh ) THEN315 CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t, ldxios = lwxios)316 CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s, ldxios = lwxios )317 ENDIF318 312 CALL iom_rstput( kt, nitrst, numrow, 'surf_ini', surf_ini, ldxios = lwxios ) ! ice sheet coupling 319 313 CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini', ssh_ini(:,:), ldxios = lwxios ) … … 324 318 CALL iom_rstput( kt, nitrst, numrow, 'ssh_hc_loc_ini', ssh_hc_loc_ini(:,:), ldxios = lwxios ) 325 319 CALL iom_rstput( kt, nitrst, numrow, 'ssh_sc_loc_ini', ssh_sc_loc_ini(:,:), ldxios = lwxios ) 320 CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_t', frc_wn_t, ldxios = lwxios) 321 CALL iom_rstput( kt, nitrst, numrow, 'frc_wn_s', frc_wn_s, ldxios = lwxios ) 326 322 ENDIF 327 323 ! … … 373 369 CALL iom_set_rstw_var_active('frc_t') 374 370 CALL iom_set_rstw_var_active('frc_s') 375 IF( ln_linssh ) THEN376 CALL iom_set_rstw_var_active('frc_wn_t')377 CALL iom_set_rstw_var_active('frc_wn_s')378 ENDIF379 371 CALL iom_set_rstw_var_active('surf_ini') 380 372 CALL iom_set_rstw_var_active('ssh_ini') … … 385 377 CALL iom_set_rstw_var_active('ssh_hc_loc_ini') 386 378 CALL iom_set_rstw_var_active('ssh_sc_loc_ini') 379 CALL iom_set_rstw_var_active('frc_wn_t') 380 CALL iom_set_rstw_var_active('frc_wn_s') 387 381 ENDIF 388 382 ENDIF -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r8831 r8836 347 347 CALL iom_get( numror, 'ndastp', zndastp, ldxios = lrxios ) 348 348 ndastp = NINT( zndastp ) 349 CALL iom_get( numror, 'adatrj', adatrj , ldxios = lrxios )350 CALL iom_get( numror, 'ntime' , ktime, ldxios = lrxios )349 CALL iom_get( numror, 'adatrj', adatrj , ldxios = lrxios ) 350 CALL iom_get( numror, 'ntime' , ktime , ldxios = lrxios ) 351 351 nn_time0=INT(ktime) 352 352 ! calculate start time in hours and minutes … … 408 408 ! calendar control 409 409 IF( lwxios ) CALL iom_swap( cwxios_context ) 410 CALL iom_rstput( kt, nitrst, numrow, 'kt' , REAL( kt , wp) , ldxios = lwxios ) ! time-step411 CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) , ldxios = lwxios ) ! date412 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj , ldxios = lwxios ) ! number of elapsed days since413 ! ! the begining of the run [s]410 CALL iom_rstput( kt, nitrst, numrow, 'kt' , REAL( kt , wp) , ldxios = lwxios ) ! time-step 411 CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) , ldxios = lwxios ) ! date 412 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj , ldxios = lwxios ) ! number of elapsed days since 413 ! ! the begining of the run [s] 414 414 CALL iom_rstput( kt, nitrst, numrow, 'ntime' , REAL( nn_time0, wp), ldxios = lwxios ) ! time 415 415 IF( lwxios ) CALL iom_swap( cxios_context ) -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
r8831 r8836 79 79 INTEGER :: iconf = 0 ! local integers 80 80 CHARACTER (len=64) :: cform = "(A12, 3(A13, I7))" 81 CHARACTER (len=*), INTENT(IN) :: cdstr ! model 81 CHARACTER (len=*), INTENT(IN) :: cdstr ! model: NEMO or SAS. Determines core restart variables 82 82 INTEGER , DIMENSION(jpi,jpj) :: ik_top , ik_bot ! top and bottom ocean level 83 83 REAL(wp), DIMENSION(jpi,jpj) :: z1_hu_0, z1_hv_0 -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r8812 r8836 41 41 USE dianam ! build name of file 42 42 USE xios 43 USE iom_def, ONLY : max_rst_fields, rst_rfields, rst_wfields, RST_FIELD44 43 # endif 45 44 USE ioipsl, ONLY : ju2ymds ! for calendar … … 211 210 IF( TRIM(cdname) == TRIM(crxios_context) ) THEN 212 211 !set names of the fields in restart file IF using XIOS to read data 213 CALL iom_set_rst_context()214 CALL iom_set_rst_vars(rst_rfields)212 CALL iom_set_rst_context() 213 CALL iom_set_rst_vars(rst_rfields) 215 214 !set which fields are to be read from restart file 216 CALL iom_set_rstr_active()215 CALL iom_set_rstr_active() 217 216 ELSE IF( TRIM(cdname) == TRIM(cwxios_context) ) THEN 218 217 !set names of the fields in restart file IF using XIOS to write data 219 CALL iom_set_rst_context()220 CALL iom_set_rst_vars(rst_wfields)218 CALL iom_set_rst_context() 219 CALL iom_set_rst_vars(rst_wfields) 221 220 !set which fields are to be read from restart file 222 CALL iom_set_rstw_active(fname)221 CALL iom_set_rstw_active(fname) 223 222 ELSE 224 CALL set_xmlatt223 CALL set_xmlatt 225 224 ENDIF 226 225 … … 239 238 240 239 SUBROUTINE iom_set_rstw_var_active(field) 240 !!--------------------------------------------------------------------- 241 !! *** SUBROUTINE iom_set_rstw_var_active *** 242 !! 243 !! ** Purpose : enable variable in restart file when writing with XIOS 244 !!--------------------------------------------------------------------- 241 245 CHARACTER(len = *), INTENT(IN) :: field 242 246 INTEGER :: i … … 264 268 265 269 SUBROUTINE iom_set_rstr_active() 270 !!--------------------------------------------------------------------- 271 !! *** SUBROUTINE iom_set_rstr_active *** 272 !! 273 !! ** Purpose : define file name in XIOS context for reading restart file, 274 !! enable variables present in restart file for reading with XIOS 275 !!--------------------------------------------------------------------- 276 266 277 !sets enabled = .TRUE. for each field in restart file 267 278 CHARACTER(len=256) :: rst_file … … 286 297 par_access="collective", enabled=.TRUE., mode="read", & 287 298 output_freq=xios_timestep) 288 !defin files for restart context299 !define variables for restart context 289 300 DO i = 1, max_rst_fields 290 301 IF( TRIM(rst_rfields(i)%vname) /= "NO_NAME") THEN … … 312 323 313 324 SUBROUTINE iom_set_rstw_core(cdmdl) 314 CHARACTER (len=*), INTENT (IN) :: cdmdl 325 !!--------------------------------------------------------------------- 326 !! *** SUBROUTINE iom_set_rstw_core *** 327 !! 328 !! ** Purpose : set variables which are always in restart file 329 !!--------------------------------------------------------------------- 330 CHARACTER (len=*), INTENT (IN) :: cdmdl ! model OPA or SAS 315 331 316 332 IF(cdmdl == "OPA") THEN … … 350 366 351 367 SUBROUTINE iom_set_rst_vars(fields) 352 !set names for variables in restart file 368 !!--------------------------------------------------------------------- 369 !! *** SUBROUTINE iom_set_rstr_active *** 370 !! 371 !! ** Purpose : Fill array fields with the information about all 372 !! possible variables and corresponding grids definition 373 !! for reading/writing restart with XIOS 374 !!--------------------------------------------------------------------- 353 375 TYPE(RST_FIELD), INTENT(INOUT) :: fields(max_rst_fields) 376 354 377 INTEGER :: i 355 378 i = 0 … … 460 483 461 484 SUBROUTINE iom_set_rstw_active(cdrst_file) 485 !!--------------------------------------------------------------------- 486 !! *** SUBROUTINE iom_set_rstr_active *** 487 !! 488 !! ** Purpose : define file name in XIOS context for writing restart 489 !! enable variables present in restart file for writing 490 !!--------------------------------------------------------------------- 462 491 !sets enabled = .TRUE. for each field in restart file 463 492 CHARACTER(len=*) :: cdrst_file … … 507 536 508 537 SUBROUTINE iom_set_rst_context( ) 538 !!--------------------------------------------------------------------- 539 !! *** SUBROUTINE iom_set_rstr_active *** 540 !! 541 !! ** Purpose : Define domain, axis and grid for restart (read/write) 542 !! context 543 !! 544 !!--------------------------------------------------------------------- 509 545 #if defined key_iomput 510 546 TYPE(xios_domaingroup) :: domaingroup_hdl -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
r8801 r8836 76 76 END TYPE file_descriptor 77 77 TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC :: iom_file !: array containing the info for all opened files 78 INTEGER, PARAMETER, PUBLIC :: max_rst_fields = 95 78 INTEGER, PARAMETER, PUBLIC :: max_rst_fields = 95 !: maximum number of restart variables defined in iom_set_rst_vars 79 79 TYPE, PUBLIC :: RST_FIELD 80 80 CHARACTER(len=30) :: vname = "NO_NAME" ! names of variables in restart file -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r8831 r8836 219 219 IF(.NOT.lxios_set) lrxios = lrxios.AND.lxios_sini 220 220 IF( lrxios) THEN 221 crxios_context = 'nemo_rst' 222 if(.NOT.lxios_set) then 223 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS' 221 crxios_context = 'nemo_rst' 222 IF( .NOT.lxios_set ) THEN 223 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS' 224 CALL iom_init( crxios_context ) 225 lxios_set = .TRUE. 226 ENDIF 227 ENDIF 228 IF( TRIM(Agrif_CFixed()) /= '0' .AND. lrxios) THEN 224 229 CALL iom_init( crxios_context ) 230 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for AGRIF' 225 231 lxios_set = .TRUE. 226 endif227 ENDIF228 IF( TRIM(Agrif_CFixed()) /= '0' .AND. lrxios) THEN229 CALL iom_init( crxios_context )230 IF(lwp) WRITE(numout,*) 'Enable restart reading by XIOS for AGRIF'231 lxios_set = .TRUE.232 232 ENDIF 233 233 ENDIF … … 246 246 REAL(wp) :: zrdt 247 247 INTEGER :: jk 248 TYPE(xios_duration):: dtime 249 integer::ni,nj,nk 250 REAL(wp), DIMENSION(jpi, jpj, jpk) :: w3d 248 REAL(wp), DIMENSION(jpi, jpj, jpk) :: w3d 251 249 !!---------------------------------------------------------------------- 252 250 -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
r8831 r8836 65 65 CHARACTER(len=100) :: cn_dir ! Root directory for location of ssr files 66 66 TYPE(FLD_N) :: sn_apr ! informations about the fields to be read 67 LOGICAL :: lrxios ! read restart using XIOS?67 LOGICAL :: lrxios ! read restart using XIOS? 68 68 !! 69 69 NAMELIST/namsbc_apr/ cn_dir, sn_apr, ln_ref_apr, rn_pref, ln_apr_obc -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcisf.F90
r8831 r8836 233 233 IF(lwp) WRITE(numout,*) '~~~~' 234 234 IF( lwxios ) CALL iom_swap( cwxios_context ) 235 CALL iom_rstput( kt, nitrst, numrow, 'fwf_isf_b', fwfisf(:,:), ldxios = lwxios )236 CALL iom_rstput( kt, nitrst, numrow, 'isf_hc_b' , risf_tsc(:,:,jp_tem), ldxios = lwxios )237 CALL iom_rstput( kt, nitrst, numrow, 'isf_sc_b' , risf_tsc(:,:,jp_sal), ldxios = lwxios )235 CALL iom_rstput( kt, nitrst, numrow, 'fwf_isf_b', fwfisf(:,:), ldxios = lwxios ) 236 CALL iom_rstput( kt, nitrst, numrow, 'isf_hc_b' , risf_tsc(:,:,jp_tem), ldxios = lwxios ) 237 CALL iom_rstput( kt, nitrst, numrow, 'isf_sc_b' , risf_tsc(:,:,jp_sal), ldxios = lwxios ) 238 238 IF( lwxios ) CALL iom_swap( cxios_context ) 239 239 ENDIF -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssm.F90
r8831 r8836 215 215 CALL iom_get( numror, jpdom_autoglo, 'ssh_m' , ssh_m, ldxios = lrxios ) ! " " height (T-point) 216 216 CALL iom_get( numror, jpdom_autoglo, 'e3t_m' , e3t_m, ldxios = lrxios ) ! 1st level thickness (T-point) 217 CALL iom_get( numror, jpdom_autoglo, 'e3t_m', e3t_m, ldxios = lrxios )218 217 ! fraction of solar net radiation absorbed in 1st T level 219 218 IF( iom_varid( numror, 'frq_m', ldstop = .FALSE. ) > 0 ) THEN -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl_rst.F90
r8800 r8836 150 150 IF( ln_trdmxl_instant ) THEN 151 151 !-- Temperature 152 CALL iom_get( inum, jpdom_autoglo, 'tmlbb' , tmlbb )153 CALL iom_get( inum, jpdom_autoglo, 'tmlbn' , tmlbn )154 CALL iom_get( inum, jpdom_autoglo, 'tmlatfb' , tmlatfb )152 CALL iom_get( inum, jpdom_autoglo, 'tmlbb' , tmlbb ) 153 CALL iom_get( inum, jpdom_autoglo, 'tmlbn' , tmlbn ) 154 CALL iom_get( inum, jpdom_autoglo, 'tmlatfb' , tmlatfb ) 155 155 ! 156 156 !-- Salinity 157 CALL iom_get( inum, jpdom_autoglo, 'smlbb' , smlbb )158 CALL iom_get( inum, jpdom_autoglo, 'smlbn' , smlbn )159 CALL iom_get( inum, jpdom_autoglo, 'smlatfb' , smlatfb )157 CALL iom_get( inum, jpdom_autoglo, 'smlbb' , smlbb ) 158 CALL iom_get( inum, jpdom_autoglo, 'smlbn' , smlbn ) 159 CALL iom_get( inum, jpdom_autoglo, 'smlatfb' , smlatfb ) 160 160 ELSE 161 CALL iom_get( inum, jpdom_autoglo, 'hmxlbn' , hmxlbn ) ! needed for hmxl_sum161 CALL iom_get( inum, jpdom_autoglo, 'hmxlbn' , hmxlbn ) ! needed for hmxl_sum 162 162 ! 163 163 !-- Temperature 164 CALL iom_get( inum, jpdom_autoglo, 'tmlbn' , tmlbn ) ! needed for tml_sum165 CALL iom_get( inum, jpdom_autoglo, 'tml_sumb' , tml_sumb )164 CALL iom_get( inum, jpdom_autoglo, 'tmlbn' , tmlbn ) ! needed for tml_sum 165 CALL iom_get( inum, jpdom_autoglo, 'tml_sumb' , tml_sumb ) 166 166 DO jk = 1, jpltrd 167 167 IF( jk < 10 ) THEN ; WRITE(charout,FMT="('tmltrd_csum_ub_', I1)") jk … … 173 173 ! 174 174 !-- Salinity 175 CALL iom_get( inum, jpdom_autoglo, 'smlbn' , smlbn ) ! needed for sml_sum176 CALL iom_get( inum, jpdom_autoglo, 'sml_sumb' , sml_sumb )175 CALL iom_get( inum, jpdom_autoglo, 'smlbn' , smlbn ) ! needed for sml_sum 176 CALL iom_get( inum, jpdom_autoglo, 'sml_sumb' , sml_sumb ) 177 177 DO jk = 1, jpltrd 178 178 IF( jk < 10 ) THEN ; WRITE(charout,FMT="('smltrd_csum_ub_', I1)") jk -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
r8831 r8836 815 815 ! 816 816 IF( lwxios ) THEN 817 CALL iom_set_rstw_var_active('en')818 CALL iom_set_rstw_var_active('avt')819 CALL iom_set_rstw_var_active('avm')820 CALL iom_set_rstw_var_active('avmu')821 CALL iom_set_rstw_var_active('avmv')822 CALL iom_set_rstw_var_active('dissl')817 CALL iom_set_rstw_var_active('en') 818 CALL iom_set_rstw_var_active('avt') 819 CALL iom_set_rstw_var_active('avm') 820 CALL iom_set_rstw_var_active('avmu') 821 CALL iom_set_rstw_var_active('avmv') 822 CALL iom_set_rstw_var_active('dissl') 823 823 ENDIF 824 824 -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/SAS_SRC/daymod.F90
r8831 r8836 30 30 USE in_out_manager ! I/O manager 31 31 USE prtctl ! Print control 32 USE iom ! 32 USE iom ! I/O manager 33 33 USE timing ! Timing 34 34 USE restart ! restart … … 345 345 CALL iom_get( numror, 'ndastp', zndastp, ldxios = lrxios ) 346 346 ndastp = NINT( zndastp ) 347 CALL iom_get( numror, 'adatrj', adatrj , ldxios = lrxios )348 CALL iom_get( numror, 'ntime' , ktime, ldxios = lrxios )347 CALL iom_get( numror, 'adatrj', adatrj , ldxios = lrxios ) 348 CALL iom_get( numror, 'ntime' , ktime , ldxios = lrxios ) 349 349 nn_time0=INT(ktime) 350 350 ! calculate start time in hours and minutes … … 406 406 ! calendar control 407 407 IF( lwxios ) CALL iom_swap( cwxios_context ) 408 CALL iom_rstput( kt, nitrst, numrow, 'kt' , REAL( kt , wp) , ldxios = lwxios ) ! time-step409 CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) , ldxios = lwxios ) ! date410 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj , ldxios = lwxios) ! number of elapsed days since408 CALL iom_rstput( kt, nitrst, numrow, 'kt' , REAL( kt , wp) , ldxios = lwxios ) ! time-step 409 CALL iom_rstput( kt, nitrst, numrow, 'ndastp' , REAL( ndastp, wp) , ldxios = lwxios ) ! date 410 CALL iom_rstput( kt, nitrst, numrow, 'adatrj' , adatrj , ldxios = lwxios ) ! number of elapsed days since 411 411 ! ! the begining of the run [s] 412 412 CALL iom_rstput( kt, nitrst, numrow, 'ntime' , REAL( nn_time0, wp), ldxios = lwxios ) ! time -
branches/2017/dev_r8600_xios_read_write_v2/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
r8812 r8836 41 41 USE xios ! xIOserver 42 42 #endif 43 USE in_out_manager, ONLY : ln_xios_read, nn_wxios44 43 45 44 IMPLICIT NONE
Note: See TracChangeset
for help on using the changeset viewer.