Changeset 8297
- Timestamp:
- 2017-07-07T12:13:34+02:00 (7 years ago)
- Location:
- branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r8227 r8297 41 41 USE dianam ! build name of file 42 42 USE xios 43 USE iom_def, ONLY : max_rst_fields, rst_fields,wxioso43 USE iom_def, ONLY : wxioso 44 44 # endif 45 45 USE ioipsl, ONLY : ju2ymds ! for calendar … … 68 68 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 69 69 PRIVATE set_grid, set_grid_bounds, set_scalar, set_xmlatt, set_mooring, iom_update_file_name, iom_sdate 70 PRIVATE set_rst _vars, set_rstw_active70 PRIVATE set_rstw_active 71 71 # endif 72 72 … … 241 241 ! automatic definitions of some of the xml attributs 242 242 IF( TRIM(cdname) == TRIM(wxios_context)) THEN 243 !set names of the fields in restart file IF using XIOS to read/write data244 CALL set_rst_vars()245 243 !set which fields are to be read from restart file 246 244 CALL set_rstw_active(filename, it) … … 263 261 264 262 END SUBROUTINE iom_init 265 266 267 SUBROUTINE set_rst_vars()268 !set names for variables in restart file269 270 rst_fields(:)%vname="NO_NAME"; rst_fields(:)%grid="NO_GRID"271 272 rst_fields(1)%vname="rdt"; rst_fields(1)% grid="grid_scalar"273 rst_fields(2)%vname="rdttra1"; rst_fields(2)% grid="grid_scalar"274 rst_fields(3)%vname="un"; rst_fields(3)% grid="grid_N_3D"275 rst_fields(4)%vname="ub"; rst_fields(4)% grid="grid_N_3D"276 rst_fields(5)%vname="vn"; rst_fields(5)% grid="grid_N_3D"277 rst_fields(6)%vname="vb"; rst_fields(6)% grid="grid_N_3D"278 rst_fields(7)%vname="tn"; rst_fields(7)% grid="grid_N_3D"279 rst_fields(8)%vname="tb"; rst_fields(8)% grid="grid_N_3D"280 rst_fields(9)%vname="sn"; rst_fields(9)% grid="grid_N_3D"281 rst_fields(10)%vname="sb"; rst_fields(10)%grid="grid_N_3D"282 rst_fields(11)%vname="sshn"; rst_fields(11)%grid="grid_N"283 rst_fields(12)%vname="sshb"; rst_fields(12)%grid="grid_N"284 rst_fields(13)%vname="hdivn"; rst_fields(13)%grid="grid_N_3D"285 rst_fields(14)%vname="hdivb"; rst_fields(14)%grid="grid_N_3D"286 rst_fields(15)%vname="rhop"; rst_fields(15)%grid="grid_N_3D"287 rst_fields(16)%vname="rotn"; rst_fields(16)%grid="grid_N_3D"288 rst_fields(17)%vname="rotb"; rst_fields(17)%grid="grid_N_3D"289 rst_fields(18)%vname="kt"; rst_fields(18)%grid="grid_scalar"290 rst_fields(19)%vname="ndastp"; rst_fields(19)%grid="grid_scalar"291 rst_fields(20)%vname="adatrj"; rst_fields(20)%grid="grid_scalar"292 rst_fields(21)%vname="utau_b"; rst_fields(21)%grid="grid_N"293 rst_fields(22)%vname="vtau_b"; rst_fields(22)%grid="grid_N"294 rst_fields(23)%vname="qns_b"; rst_fields(23)%grid="grid_N"295 rst_fields(24)%vname="emp_b"; rst_fields(24)%grid="grid_N"296 rst_fields(25)%vname="sfx_b"; rst_fields(25)%grid="grid_N"297 rst_fields(26)%vname="en" ; rst_fields(26)%grid="grid_N_3D"298 rst_fields(27)%vname="avt"; rst_fields(27)%grid="grid_N_3D"299 rst_fields(28)%vname="avm"; rst_fields(28)%grid="grid_N_3D"300 rst_fields(29)%vname="avmu"; rst_fields(29)%grid="grid_N_3D"301 rst_fields(30)%vname="avmv"; rst_fields(30)%grid="grid_N_3D"302 rst_fields(31)%vname="dissl"; rst_fields(31)%grid="grid_N_3D"303 rst_fields(32)%vname="sbc_hc_b"; rst_fields(32)%grid="grid_N"304 rst_fields(33)%vname="sbc_sc_b"; rst_fields(33)%grid="grid_N"305 rst_fields(34)%vname="qsr_hc_b"; rst_fields(34)%grid="grid_N_3D"306 rst_fields(35)%vname="gcx"; rst_fields(35)%grid="grid_N"307 rst_fields(36)%vname="gcxb"; rst_fields(36)%grid="grid_N"308 rst_fields(37)%vname="fraqsr_1lev"; rst_fields(37)%grid="grid_N"309 rst_fields(38)%vname="greenland_icesheet_mass"310 rst_fields(38)%grid="grid_scalar"311 rst_fields(39)%vname="greenland_icesheet_timelapsed"312 rst_fields(39)%grid="grid_scalar"313 rst_fields(40)%vname="greenland_icesheet_mass_roc"314 rst_fields(40)%grid="grid_scalar"315 rst_fields(41)%vname="antarctica_icesheet_mass"316 rst_fields(41)%grid="grid_scalar"317 rst_fields(42)%vname="antarctica_icesheet_timelapsed"318 rst_fields(42)%grid="grid_scalar"319 rst_fields(43)%vname="antarctica_icesheet_mass_roc"320 rst_fields(43)%grid="grid_scalar"321 rst_fields(44)%vname="rhd"; rst_fields(44)%grid="grid_N_3D"322 rst_fields(45)%vname="frc_v"; rst_fields(45)%grid="grid_scalar"323 rst_fields(46)%vname="frc_t"; rst_fields(46)%grid="grid_scalar"324 rst_fields(47)%vname="frc_s"; rst_fields(47)%grid="grid_scalar"325 rst_fields(48)%vname="frc_wn_t"; rst_fields(48)%grid="grid_scalar"326 rst_fields(49)%vname="frc_wn_s"; rst_fields(49)%grid="grid_scalar"327 rst_fields(50)%vname="ssh_ini"; rst_fields(50)%grid="grid_N"328 rst_fields(51)%vname="e3t_ini"; rst_fields(51)%grid="grid_N_3D"329 rst_fields(52)%vname="hc_loc_ini"; rst_fields(52)%grid="grid_N_3D"330 rst_fields(53)%vname="sc_loc_ini"; rst_fields(53)%grid="grid_N_3D"331 rst_fields(54)%vname="ssh_hc_loc_ini"; rst_fields(54)%grid="grid_N"332 rst_fields(55)%vname="ssh_sc_loc_ini"; rst_fields(55)%grid="grid_N"333 rst_fields(56)%vname="fse3t_b"; rst_fields(56)%grid="grid_N_3D"334 rst_fields(57)%vname="fse3t_n"; rst_fields(57)%grid="grid_N_3D"335 rst_fields(58)%vname="tilde_e3t_b"; rst_fields(58)%grid="grid_N"336 rst_fields(59)%vname="tilde_e3t_n"; rst_fields(59)%grid="grid_N"337 rst_fields(60)%vname="hdiv_lf"; rst_fields(60)%grid="grid_N"338 rst_fields(61)%vname="ub2_b"; rst_fields(61)%grid="grid_N"339 rst_fields(62)%vname="vb2_b"; rst_fields(62)%grid="grid_N"340 rst_fields(63)%vname="sshbb_e"; rst_fields(63)%grid="grid_N"341 rst_fields(64)%vname="ubb_e"; rst_fields(64)%grid="grid_N"342 rst_fields(65)%vname="vbb_e"; rst_fields(65)%grid="grid_N"343 rst_fields(66)%vname="sshb_e"; rst_fields(66)%grid="grid_N"344 rst_fields(67)%vname="ub_e"; rst_fields(67)%grid="grid_N"345 rst_fields(68)%vname="vb_e"; rst_fields(68)%grid="grid_N"346 rst_fields(69)%vname="fwf_isf_b"; rst_fields(69)%grid="grid_N"347 rst_fields(70)%vname="isf_sc_b"; rst_fields(70)%grid="grid_N"348 rst_fields(71)%vname="isf_hc_b"; rst_fields(71)%grid="grid_N"349 rst_fields(72)%vname="ssh_ibb"; rst_fields(72)%grid="grid_N"350 rst_fields(73)%vname="rnf_b"; rst_fields(73)%grid="grid_N"351 rst_fields(74)%vname="rnf_hc_b"; rst_fields(74)%grid="grid_N"352 rst_fields(75)%vname="rnf_sc_b"; rst_fields(75)%grid="grid_N"353 rst_fields(76)%vname="nn_fsbc"; rst_fields(76)%grid="grid_scalar"354 rst_fields(77)%vname="ssu_m"; rst_fields(77)%grid="grid_N"355 rst_fields(78)%vname="ssv_m"; rst_fields(78)%grid="grid_N"356 rst_fields(79)%vname="sst_m"; rst_fields(79)%grid="grid_N"357 rst_fields(80)%vname="sss_m"; rst_fields(80)%grid="grid_N"358 rst_fields(81)%vname="ssh_m"; rst_fields(81)%grid="grid_N"359 rst_fields(82)%vname="e3t_m"; rst_fields(82)%grid="grid_N"360 rst_fields(83)%vname="frq_m"; rst_fields(83)%grid="grid_N"361 rst_fields(84)%vname="avmb"; rst_fields(84)%grid="Vgrid"362 rst_fields(85)%vname="avtb"; rst_fields(85)%grid="Vgrid"363 364 END SUBROUTINE set_rst_vars365 366 263 367 264 SUBROUTINE set_rstw_active(rst_file, it) … … 372 269 TYPE(xios_file) :: file_hdl 373 270 TYPE(xios_filegroup) :: filegroup_hdl 374 INTEGER :: i375 271 376 272 !set then name of the restart file (OUTPUT!) and enable available fields … … 389 285 390 286 CALL xios_set_file_attr( "wrestart", name=trim(rst_file)) 391 call flush(numout) 392 ! CALL xios_update_calendar(it+1) ! + one because we open restart file 393 ! 1 timestep before write 394 395 !define fields for restart write context 396 !in restart.F90 397 DO i= 1, 17 398 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 287 288 CALL xios_add_child(file_hdl, field_hdl, "rdt") 289 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 290 grid_ref = "grid_scalar", operation = "instant") 291 292 CALL xios_add_child(file_hdl, field_hdl, "rdttra1") 293 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 294 grid_ref = "grid_scalar", operation = "instant") 295 296 CALL xios_add_child(file_hdl, field_hdl, "un") 297 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 298 grid_ref = "grid_N_3D", operation = "instant") 299 300 CALL xios_add_child(file_hdl, field_hdl, "ub") 301 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 302 grid_ref = "grid_N_3D", operation = "instant") 303 304 CALL xios_add_child(file_hdl, field_hdl, "vn") 305 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 306 grid_ref = "grid_N_3D", operation = "instant") 307 308 CALL xios_add_child(file_hdl, field_hdl, "vb") 309 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 310 grid_ref = "grid_N_3D", operation = "instant") 311 312 CALL xios_add_child(file_hdl, field_hdl, "tn") 313 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 314 grid_ref = "grid_N_3D", operation = "instant") 315 316 CALL xios_add_child(file_hdl, field_hdl, "tb") 317 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 318 grid_ref = "grid_N_3D", operation = "instant") 319 320 CALL xios_add_child(file_hdl, field_hdl, "sn") 321 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 322 grid_ref = "grid_N_3D", operation = "instant") 323 324 CALL xios_add_child(file_hdl, field_hdl, "sb") 325 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 326 grid_ref = "grid_N_3D", operation = "instant") 327 328 CALL xios_add_child(file_hdl, field_hdl, "sshn") 329 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 330 grid_ref = "grid_N", operation = "instant") 331 332 CALL xios_add_child(file_hdl, field_hdl, "sshb") 333 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 334 grid_ref = "grid_N", operation = "instant") 335 336 CALL xios_add_child(file_hdl, field_hdl, "hdivn") 337 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 338 grid_ref = "grid_N_3D", operation = "instant") 339 340 CALL xios_add_child(file_hdl, field_hdl, "hdivb") 341 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 342 grid_ref = "grid_N_3D", operation = "instant") 343 344 CALL xios_add_child(file_hdl, field_hdl, "rhop") 345 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 346 grid_ref = "grid_N_3D", operation = "instant") 347 348 CALL xios_add_child(file_hdl, field_hdl, "rotn") 349 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 350 grid_ref = "grid_N_3D", operation = "instant") 351 352 CALL xios_add_child(file_hdl, field_hdl, "rotb") 353 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 354 grid_ref = "grid_N_3D", operation = "instant") 355 356 357 !in daymod.F90 358 CALL xios_add_child(file_hdl, field_hdl, "kt") 399 359 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 400 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 401 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 402 ENDDO 403 !in daymod.F90 404 DO i= 18, 20 405 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 360 grid_ref = "grid_scalar", operation = "instant") 361 362 CALL xios_add_child(file_hdl, field_hdl, "ndastp") 406 363 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 407 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 408 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 409 ENDDO 364 grid_ref = "grid_scalar", operation = "instant") 365 366 CALL xios_add_child(file_hdl, field_hdl, "adatrj") 367 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 368 grid_ref = "grid_scalar", operation = "instant") 410 369 !end daymod.F90 411 370 !sbcmod.F90 412 DO i= 21, 25 413 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 371 CALL xios_add_child(file_hdl, field_hdl, "utau_b") 414 372 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 415 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 416 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 417 ENDDO 373 grid_ref = "grid_N", operation = "instant") 374 375 CALL xios_add_child(file_hdl, field_hdl, "vtau_b") 376 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 377 grid_ref = "grid_N", operation = "instant") 378 379 CALL xios_add_child(file_hdl, field_hdl, "qns_b") 380 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 381 grid_ref = "grid_N", operation = "instant") 382 383 CALL xios_add_child(file_hdl, field_hdl, "emp_b") 384 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 385 grid_ref = "grid_N", operation = "instant") 386 387 CALL xios_add_child(file_hdl, field_hdl, "sfx_b") 388 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 389 grid_ref = "grid_N", operation = "instant") 418 390 !end sbcmod.F90 419 391 !ALL FIELDS ABOUVE ALWAYS 420 392 !zdftke.F90 421 393 #if defined key_zdftke || defined key_esopa 422 DO i= 26, 31 423 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 394 CALL xios_add_child(file_hdl, field_hdl, "en") 424 395 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 425 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 426 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 427 ENDDO 396 grid_ref = "grid_N_3D", operation = "instant") 397 398 CALL xios_add_child(file_hdl, field_hdl, "avt") 399 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 400 grid_ref = "grid_N_3D", operation = "instant") 401 402 CALL xios_add_child(file_hdl, field_hdl, "avm") 403 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 404 grid_ref = "grid_N_3D", operation = "instant") 405 406 CALL xios_add_child(file_hdl, field_hdl, "avmu") 407 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 408 grid_ref = "grid_N_3D", operation = "instant") 409 410 CALL xios_add_child(file_hdl, field_hdl, "avmv") 411 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 412 grid_ref = "grid_N_3D", operation = "instant") 413 414 CALL xios_add_child(file_hdl, field_hdl, "dissl") 415 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 416 grid_ref = "grid_N_3D", operation = "instant") 428 417 #endif 429 418 !end zdftke.F90 430 419 !traqsr.F90 431 i = 34 432 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 420 CALL xios_add_child(file_hdl, field_hdl, "qsr_hc_b") 433 421 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 434 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 435 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 436 i = 37 437 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 422 grid_ref = "grid_N_3D" , operation = "instant") 423 424 CALL xios_add_child(file_hdl, field_hdl, "fraqsr_1lev") 438 425 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 439 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 440 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 426 grid_ref = "grid_N", operation = "instant") 441 427 !END traqsr.F90 442 428 #if defined key_dynspg_flt || defined key_esopa 443 429 !dynspg_flt.F90 444 DO i= 35, 36 445 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 430 CALL xios_add_child(file_hdl, field_hdl, "gcx") 446 431 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 447 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 448 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 449 ENDDO 432 grid_ref = "grid_N", operation = "instant") 433 434 CALL xios_add_child(file_hdl, field_hdl, "gcxb") 435 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 436 grid_ref = "grid_N", operation = "instant") 450 437 !end dynspg_flt.F90 451 438 #endif 452 439 !trasbc.F90 START 453 DO i= 32, 33 454 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 440 CALL xios_add_child(file_hdl, field_hdl, "sbc_hc_b") 455 441 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 456 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 457 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 458 ENDDO 459 DO i= 69, 71 460 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 442 grid_ref = "grid_N", operation = "instant") 443 444 CALL xios_add_child(file_hdl, field_hdl, "sbc_sc_b") 461 445 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 462 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 463 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 464 ENDDO 446 grid_ref = "grid_N", operation = "instant") 447 448 CALL xios_add_child(file_hdl, field_hdl, "fwf_isf_b") 449 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 450 grid_ref = "grid_N", operation = "instant") 451 452 CALL xios_add_child(file_hdl, field_hdl, "isf_sc_b") 453 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 454 grid_ref = "grid_N", operation = "instant") 455 456 CALL xios_add_child(file_hdl, field_hdl, "isf_hc_b") 457 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 458 grid_ref = "grid_N", operation = "instant") 465 459 !trasbc.F90 END 466 460 IF( lk_oasis) THEN 467 461 ! ln_coupled_iceshelf_fluxes uninitialised unless lk_oasis=true 468 462 IF( ln_coupled_iceshelf_fluxes ) THEN 469 DO i= 38, 43 470 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 471 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 472 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 473 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 474 ENDDO 463 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_mass") 464 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 465 grid_ref = "grid_scalar", operation = "instant") 466 467 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_timelapsed") 468 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 469 grid_ref = "grid_scalar", operation = "instant") 470 471 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_mass_roc") 472 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 473 grid_ref = "grid_scalar", operation = "instant") 474 475 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_mass") 476 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 477 grid_ref = "grid_scalar", operation = "instant") 478 479 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_timelapsed") 480 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 481 grid_ref = "grid_scalar", operation = "instant") 482 483 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_mass_roc") 484 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 485 grid_ref = "grid_scalar", operation = "instant") 475 486 ENDIF 476 487 ENDIF 477 488 #if defined key_zdfkpp 478 i = 44 479 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 489 CALL xios_add_child(file_hdl, field_hdl, "rhd") 480 490 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 481 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 482 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 491 grid_ref = "grid_N_3D", operation = "instant") 483 492 #endif 484 493 !dia_hsb_rst 485 494 #if defined key_diadct 486 495 IF( lk_diadct ) THEN 487 DO i= 45, 47 488 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 496 CALL xios_add_child(file_hdl, field_hdl, "frc_v") 497 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 498 grid_ref = "grid_scalar", operation = "instant") 499 500 CALL xios_add_child(file_hdl, field_hdl, "frc_t") 501 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 502 grid_ref = "grid_scalar", operation = "instant") 503 504 CALL xios_add_child(file_hdl, field_hdl, "frc_s") 505 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 506 grid_ref = "grid_scalar", operation = "instant") 507 508 CALL xios_add_child(file_hdl, field_hdl, "ssh_ini") 509 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 510 grid_ref = "grid_N", operation = "instant") 511 512 CALL xios_add_child(file_hdl, field_hdl, "e3t_ini") 513 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 514 grid_ref = "grid_N_3D", operation = "instant") 515 516 CALL xios_add_child(file_hdl, field_hdl, "hc_loc_ini") 517 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 518 grid_ref = "grid_N_3D", operation = "instant") 519 520 CALL xios_add_child(file_hdl, field_hdl, "sc_loc_ini") 521 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 522 grid_ref = "grid_N_3D", operation = "instant") 523 524 525 IF( .NOT. lk_vvl ) THEN 526 CALL xios_add_child(file_hdl, field_hdl, "frc_wn_t") 489 527 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 490 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 491 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 492 ENDDO 493 494 DO i= 50, 53 495 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 528 grid_ref = "grid_scalar", operation = "instant") 529 530 CALL xios_add_child(file_hdl, field_hdl, "frc_wn_s") 496 531 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 497 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 498 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 499 ENDDO 500 IF( .NOT. lk_vvl ) THEN 501 DO i= 48, 48 502 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 532 grid_ref = "grid_scalar", operation = "instant") 533 534 CALL xios_add_child(file_hdl, field_hdl, "ssh_hc_loc_ini") 503 535 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 504 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 505 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 506 ENDDO 507 DO i= 54, 55 508 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 536 grid_ref = "grid_N", operation = "instant") 537 538 CALL xios_add_child(file_hdl, field_hdl, "ssh_sc_loc_ini") 509 539 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 510 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant")511 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 512 ENDDO 540 grid_ref = "grid_N", operation = "instant") 541 542 513 543 ENDIF 514 544 ENDIF … … 517 547 !domvvl.F90 518 548 IF( lk_vvl ) THEN 519 DO i= 56, 57 520 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 521 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 522 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 523 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 524 ENDDO 549 CALL xios_add_child(file_hdl, field_hdl, "fse3t_b") 550 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 551 grid_ref = "grid_N_3D", operation = "instant") 552 553 CALL xios_add_child(file_hdl, field_hdl, "fse3t_n") 554 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 555 grid_ref = "grid_N_3D", operation = "instant") 556 525 557 IF( lr_vvl_ztilde .OR. lr_vvl_layer ) THEN ! z_tilde and layer cases ! 526 DO i= 58, 59 527 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 528 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 529 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 530 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 531 ENDDO 558 CALL xios_add_child(file_hdl, field_hdl, "tilde_e3t_b") 559 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 560 grid_ref = "grid_N", operation = "instant") 561 562 CALL xios_add_child(file_hdl, field_hdl, "tilde_e3t_n") 563 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 564 grid_ref = "grid_N", operation = "instant") 532 565 END IF 533 566 IF( lr_vvl_ztilde ) THEN ! z_tilde case ! 534 i=60 535 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 567 CALL xios_add_child(file_hdl, field_hdl, "hdiv_lf") 536 568 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 537 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 538 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 569 grid_ref = "grid_N", operation = "instant") 539 570 ENDIF 540 571 ENDIF … … 542 573 !dynspg_ts.F90 543 574 #if defined key_dynspg_ts || defined key_esopa 544 DO i= 61, 62 545 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 575 CALL xios_add_child(file_hdl, field_hdl, "ub2_b") 576 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 577 grid_ref = "grid_N", operation = "instant") 578 579 CALL xios_add_child(file_hdl, field_hdl, "vb2_b") 580 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 581 grid_ref = "grid_N", operation = "instant") 582 583 584 IF (.NOT.ln_bt_av) THEN 585 CALL xios_add_child(file_hdl, field_hdl, "sshbb_e") 546 586 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 547 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 548 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 549 ENDDO 550 IF (.NOT.ln_bt_av) THEN 551 DO i= 63, 68 552 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 553 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 554 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 555 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 556 ENDDO 587 grid_ref = "grid_N", operation = "instant") 588 589 CALL xios_add_child(file_hdl, field_hdl, "ubb_e") 590 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 591 grid_ref = "grid_N", operation = "instant") 592 593 CALL xios_add_child(file_hdl, field_hdl, "vbb_e") 594 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 595 grid_ref = "grid_N", operation = "instant") 596 597 CALL xios_add_child(file_hdl, field_hdl, "sshb_e") 598 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 599 grid_ref = "grid_N", operation = "instant") 600 601 CALL xios_add_child(file_hdl, field_hdl, "ub_e") 602 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 603 grid_ref = "grid_N", operation = "instant") 604 605 CALL xios_add_child(file_hdl, field_hdl, "vb_e") 606 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 607 grid_ref = "grid_N", operation = "instant") 557 608 ENDIF 558 609 #if defined key_agrif 559 610 ! Save time integrated fluxes 560 611 IF ( .NOT.Agrif_Root() ) THEN 561 DO i= 84, 85 562 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 612 CALL xios_add_child(file_hdl, field_hdl, "ub2_i_b") 563 613 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 564 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 565 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 566 ENDDO 614 grid_ref = "GRID_N", operation = "instant") 615 616 CALL xios_add_child(file_hdl, field_hdl, "vb2_i_b") 617 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 618 grid_ref = "grid_N", operation = "instant") 567 619 ENDIF 568 620 #endif … … 571 623 !sbcapr.F90 572 624 IF( ln_apr_dyn) THEN 573 i = 72 574 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 575 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 576 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 577 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 625 CALL xios_add_child(file_hdl, field_hdl, "ssh_ibb") 626 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 627 grid_ref = "grid_N", operation = "instant") 578 628 ENDIF 579 629 !end sbcapr.F90 580 630 !sbcrnf.F90 581 631 IF( ln_rnf ) THEN 582 DO i= 73, 75 583 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 584 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 585 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 586 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 587 ENDDO 632 CALL xios_add_child(file_hdl, field_hdl, "rnf_b") 633 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 634 grid_ref = "grid_N", operation = "instant") 635 636 CALL xios_add_child(file_hdl, field_hdl, "rnf_hc_b") 637 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 638 grid_ref = "grid_N", operation = "instant") 639 640 CALL xios_add_child(file_hdl, field_hdl, "rnf_sc_b") 641 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 642 grid_ref = "grid_N", operation = "instant") 588 643 ENDIF 589 644 !end sbcrnf.F90 590 645 !sbcssm.F90 591 646 IF( nn_components /= jp_iam_sas .AND. nn_fsbc .NE. 1) THEN 592 DO i= 76, 81 593 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 647 CALL xios_add_child(file_hdl, field_hdl, "nn_fsbc") 648 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 649 grid_ref = "grid_scalar", operation = "instant") 650 651 CALL xios_add_child(file_hdl, field_hdl, "ssu_m") 652 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 653 grid_ref = "grid_N", operation = "instant") 654 655 CALL xios_add_child(file_hdl, field_hdl, "ssv_m") 656 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 657 grid_ref = "grid_N", operation = "instant") 658 659 CALL xios_add_child(file_hdl, field_hdl, "sst_m") 660 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 661 grid_ref = "grid_N", operation = "instant") 662 663 CALL xios_add_child(file_hdl, field_hdl, "sss_m") 664 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 665 grid_ref = "grid_N", operation = "instant") 666 667 CALL xios_add_child(file_hdl, field_hdl, "ssh_m") 668 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 669 grid_ref = "grid_N", operation = "instant") 670 671 CALL xios_add_child(file_hdl, field_hdl, "frq_m") 672 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 673 grid_ref = "grid_N", operation = "instant") 674 675 IF( lk_vvl ) THEN 676 CALL xios_add_child(file_hdl, field_hdl, "e3t_m") 594 677 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 595 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 596 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 597 ENDDO 598 i = 83 599 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 600 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 601 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 602 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 603 IF( lk_vvl ) THEN 604 i = 82 605 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 606 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 607 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 608 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 678 grid_ref = "grid_N", operation = "instant") 609 679 ENDIF 610 680 ENDIF 611 681 !end sbcssm.F90 612 682 IF( lr_traadv_cen2 ) THEN 613 DO i= 84, 85 614 CALL xios_add_child(file_hdl, field_hdl, TRIM(rst_fields(i)%vname)) 615 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 616 grid_ref = TRIM(rst_fields(i)%grid ), operation = "instant") 617 if(lwp) write(numout,*) 'id= ',i,' set ', TRIM(rst_fields(i)%vname), ' enabled' 618 ENDDO 683 CALL xios_add_child(file_hdl, field_hdl, "avmb") 684 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 685 grid_ref = "Vgrid", operation = "instant") 686 687 CALL xios_add_child(file_hdl, field_hdl, "avtb") 688 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 689 grid_ref = "Vgrid", operation = "instant") 619 690 ENDIF 620 691 -
branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom_def.F90
r8079 r8297 75 75 END TYPE file_descriptor 76 76 TYPE(file_descriptor), DIMENSION(jpmax_files), PUBLIC :: iom_file !: array containing the info for all opened files 77 78 INTEGER, PARAMETER, PUBLIC :: max_rst_fields = 8579 80 81 TYPE, PUBLIC :: RST_FIELD82 CHARACTER(len=30) :: vname ! names of variables in restart file83 CHARACTER(len=30) :: grid84 END TYPE RST_FIELD85 TYPE(RST_FIELD), PUBLIC :: rst_fields(max_rst_fields)86 ! values needed to set correctlyfiles in reast file when using XIOS for writing87 77 !$AGRIF_END_DO_NOT_TREAT 88 78 !!=====================================================================
Note: See TracChangeset
for help on using the changeset viewer.