Changeset 8299
- Timestamp:
- 2017-07-07T17:33:29+02:00 (6 years ago)
- Location:
- branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r8079 r8299 153 153 LOGICAL :: lsp_area = .TRUE. !: to make a control print over a specific area 154 154 CHARACTER(lc) :: cxios_context !: context name used in xios 155 CHARACTER(lc) :: wxios_context = "nemo_rstw"!: context name used in xios to write restart file155 CHARACTER(lc) :: wxios_context !: context name used in xios to write restart file 156 156 157 157 !!---------------------------------------------------------------------- -
branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90
r8297 r8299 92 92 CONTAINS 93 93 94 SUBROUTINE iom_init( cdname , filename, it)94 SUBROUTINE iom_init( cdname ) 95 95 !!---------------------------------------------------------------------- 96 96 !! *** ROUTINE *** … … 112 112 ! 113 113 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: z_bnds 114 CHARACTER(len=*), OPTIONAL, INTENT(in) :: filename115 LOGICAL :: lrst_context ! is context related to restart116 INTEGER, OPTIONAL :: it ! timestep when subroutine was called117 114 !!---------------------------------------------------------------------- 118 115 #if ! defined key_xios2 … … 126 123 CALL xios_context_initialize(TRIM(clname), mpi_comm_opa) 127 124 CALL iom_swap( cdname ) 128 lrst_context = (TRIM(cdname) == TRIM(wxios_context))129 125 130 126 ! calendar parameters … … 153 149 CALL set_scalar 154 150 155 IF( TRIM(cdname) == TRIM(cxios_context) .OR. lrst_context) THEN156 CALL set_grid( "T", glamt, gphit, ln_mskland)157 CALL set_grid( "U", glamu, gphiu, ln_mskland)158 CALL set_grid( "V", glamv, gphiv, ln_mskland)159 CALL set_grid( "W", glamt, gphit, ln_mskland)151 IF( TRIM(cdname) == TRIM(cxios_context)) THEN 152 CALL set_grid( "T", glamt, gphit, .TRUE. ) 153 CALL set_grid( "U", glamu, gphiu, .TRUE. ) 154 CALL set_grid( "V", glamv, gphiv, .TRUE. ) 155 CALL set_grid( "W", glamt, gphit, .TRUE. ) 160 156 CALL set_grid_znl( gphit ) 161 CALL set_grid("N",glamt, gphit, .FALSE.) ! not masked values162 157 ! 163 IF( ln_cfmeta .AND. .NOT.lrst_context) THEN ! Add additional grid metadata158 IF( ln_cfmeta ) THEN ! Add additional grid metadata 164 159 CALL iom_set_domain_attr("grid_T", area = e12t(nldi:nlei, nldj:nlej)) 165 160 CALL iom_set_domain_attr("grid_U", area = e12u(nldi:nlei, nldj:nlej)) … … 184 179 CALL dom_grid_glo ! Return to parent grid domain 185 180 ! 186 IF( ln_cfmeta .AND. .NOT.lrst_context) THEN ! Add additional grid metadata181 IF( ln_cfmeta) THEN ! Add additional grid metadata 187 182 CALL iom_set_domain_attr("grid_T", area = e1e2t_crs(nldi:nlei, nldj:nlej)) 188 183 CALL iom_set_domain_attr("grid_U", area = e1u_crs(nldi:nlei, nldj:nlej) * e2u_crs(nldi:nlei, nldj:nlej)) … … 239 234 CALL iom_set_axis_attr( "iax_28C", (/ REAL(28,wp) /) ) 240 235 241 ! automatic definitions of some of the xml attributs 242 IF( TRIM(cdname) == TRIM(wxios_context)) THEN 243 !set which fields are to be read from restart file 244 CALL set_rstw_active(filename, it) 245 ELSE 246 CALL set_xmlatt 247 ENDIF 236 CALL set_xmlatt 248 237 249 238 CALL set_1point … … 262 251 END SUBROUTINE iom_init 263 252 253 SUBROUTINE iom_rstw_init( cdname, filename, it ) 254 !!---------------------------------------------------------------------- 255 !! *** ROUTINE *** 256 !! 257 !! ** Purpose : 258 !! 259 !!---------------------------------------------------------------------- 260 CHARACTER(len=*), INTENT(in) :: cdname 261 #if defined key_iomput 262 #if defined key_xios2 263 TYPE(xios_duration) :: dtime = xios_duration(0, 0, 0, 0, 0, 0) 264 TYPE(xios_date) :: start_date 265 TYPE(xios_domaingroup) :: domaingroup_hdl 266 TYPE(xios_domain) :: domain_hdl 267 TYPE(xios_axisgroup) :: axisgroup_hdl 268 TYPE(xios_axis) :: axis_hdl 269 TYPE(xios_scalar) :: scalar_hdl 270 TYPE(xios_scalargroup) :: scalargroup_hdl 271 #endif 272 CHARACTER(len=128) :: clname 273 INTEGER :: ji 274 ! 275 CHARACTER(len=*), OPTIONAL, INTENT(in) :: filename 276 INTEGER, OPTIONAL :: it ! timestep when subroutine was called 277 !!---------------------------------------------------------------------- 278 279 clname = cdname 280 if(lwp) write(numout,*) 'initialize CONTEXT:', TRIM(cdname) 281 IF( TRIM(Agrif_CFixed()) /= '0' ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(cdname) 282 CALL xios_context_initialize(TRIM(clname), mpi_comm_opa) 283 CALL iom_swap( cdname ) 284 ! calendar parameters 285 #if defined key_xios2 286 ! Calendar type is now defined in xml file 287 SELECT CASE ( nleapy ) ! Choose calendar for IOIPSL 288 CASE ( 1) ; CALL xios_define_calendar( TYPE = "Gregorian", time_origin = xios_date(1900,01,01,00,00,00), & 289 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 290 CASE ( 0) ; CALL xios_define_calendar( TYPE = "NoLeap" , time_origin = xios_date(1900,01,01,00,00,00), & 291 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 292 CASE (30) ; CALL xios_define_calendar( TYPE = "D360" , time_origin = xios_date(1900,01,01,00,00,00), & 293 & start_date = xios_date(nyear,nmonth,nday,0,0,0) ) 294 END SELECT 295 296 #endif 297 CALL xios_get_handle("domain_definition",domaingroup_hdl) 298 CALL xios_add_child(domaingroup_hdl, domain_hdl, "grid_N") 299 CALL set_grid("N", glamt, gphit, .FALSE.) 300 301 CALL xios_get_handle("axis_definition",axisgroup_hdl) 302 CALL xios_add_child(axisgroup_hdl, axis_hdl, "deptht") 303 CALL xios_set_axis_attr( "deptht", long_name="Vertical levels", unit="m", positive="down") 304 ! vertical grid definition 305 CALL iom_set_axis_attr( "deptht", paxis = gdept_1d ) 306 307 CALL XIOS_GET_HANDLE("scalar_definition",scalargroup_hdl) 308 CALL xios_add_child(scalargroup_hdl, scalar_hdl, "grid_scalar") 309 CALL xios_set_scalar_attr( "grid_scalar", value=1. ) 310 311 ! automatic definitions of some of the xml attributs 312 IF( TRIM(cdname) == TRIM(wxios_context)) THEN 313 !set which fields are to be read from restart file 314 CALL set_rstw_active(filename, it) 315 ENDIF 316 317 ! end file definition 318 dtime%second = rdt 319 CALL xios_set_timestep(dtime) 320 CALL xios_close_context_definition() 321 322 #endif 323 324 END SUBROUTINE iom_rstw_init 325 264 326 SUBROUTINE set_rstw_active(rst_file, it) 265 327 !sets enabled = .TRUE. for each field in restart file 266 328 CHARACTER(len=*) :: rst_file 267 329 INTEGER, INTENT(in) :: it ! timestep when iom_init was called 268 TYPE(xios_field) :: field_hdl269 330 TYPE(xios_file) :: file_hdl 270 331 TYPE(xios_filegroup) :: filegroup_hdl … … 285 346 286 347 CALL xios_set_file_attr( "wrestart", name=trim(rst_file)) 348 CALL set_numro_active(file_hdl) 349 350 END SUBROUTINE set_rstw_active 351 352 SUBROUTINE set_numro_active(file_hdl) 353 TYPE(xios_field) :: field_hdl 354 TYPE(xios_file) :: file_hdl 287 355 288 356 CALL xios_add_child(file_hdl, field_hdl, "rdt") 289 357 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 290 grid_ref = "grid_scalar", operation = "instant")358 scalar_ref = "grid_scalar", operation = "instant") 291 359 292 360 CALL xios_add_child(file_hdl, field_hdl, "rdttra1") 293 361 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 294 grid_ref = "grid_scalar", operation = "instant")362 scalar_ref = "grid_scalar", operation = "instant") 295 363 296 364 CALL xios_add_child(file_hdl, field_hdl, "un") 297 365 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 298 grid_ref = "grid_N_3D", operation = "instant")366 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 299 367 300 368 CALL xios_add_child(file_hdl, field_hdl, "ub") 301 369 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 302 grid_ref = "grid_N_3D", operation = "instant")370 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 303 371 304 372 CALL xios_add_child(file_hdl, field_hdl, "vn") 305 373 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 306 grid_ref = "grid_N_3D", operation = "instant")374 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 307 375 308 376 CALL xios_add_child(file_hdl, field_hdl, "vb") 309 377 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 310 grid_ref = "grid_N_3D", operation = "instant")378 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 311 379 312 380 CALL xios_add_child(file_hdl, field_hdl, "tn") 313 381 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 314 grid_ref = "grid_N_3D", operation = "instant")382 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 315 383 316 384 CALL xios_add_child(file_hdl, field_hdl, "tb") 317 385 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 318 grid_ref = "grid_N_3D", operation = "instant")386 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 319 387 320 388 CALL xios_add_child(file_hdl, field_hdl, "sn") 321 389 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 322 grid_ref = "grid_N_3D", operation = "instant")390 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 323 391 324 392 CALL xios_add_child(file_hdl, field_hdl, "sb") 325 393 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 326 grid_ref = "grid_N_3D", operation = "instant")394 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 327 395 328 396 CALL xios_add_child(file_hdl, field_hdl, "sshn") 329 397 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 330 grid_ref = "grid_N", operation = "instant")398 domain_ref = "grid_N", operation = "instant") 331 399 332 400 CALL xios_add_child(file_hdl, field_hdl, "sshb") 333 401 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 334 grid_ref = "grid_N", operation = "instant")402 domain_ref = "grid_N", operation = "instant") 335 403 336 404 CALL xios_add_child(file_hdl, field_hdl, "hdivn") 337 405 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 338 grid_ref = "grid_N_3D", operation = "instant")406 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 339 407 340 408 CALL xios_add_child(file_hdl, field_hdl, "hdivb") 341 409 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 342 grid_ref = "grid_N_3D", operation = "instant")410 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 343 411 344 412 CALL xios_add_child(file_hdl, field_hdl, "rhop") 345 413 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 346 grid_ref = "grid_N_3D", operation = "instant")414 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 347 415 348 416 CALL xios_add_child(file_hdl, field_hdl, "rotn") 349 417 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 350 grid_ref = "grid_N_3D", operation = "instant")418 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 351 419 352 420 CALL xios_add_child(file_hdl, field_hdl, "rotb") 353 421 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 354 grid_ref = "grid_N_3D", operation = "instant") 355 422 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 356 423 357 424 !in daymod.F90 358 425 CALL xios_add_child(file_hdl, field_hdl, "kt") 359 426 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 360 grid_ref = "grid_scalar", operation = "instant")427 scalar_ref = "grid_scalar", operation = "instant") 361 428 362 429 CALL xios_add_child(file_hdl, field_hdl, "ndastp") 363 430 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 364 grid_ref = "grid_scalar", operation = "instant")431 scalar_ref = "grid_scalar", operation = "instant") 365 432 366 433 CALL xios_add_child(file_hdl, field_hdl, "adatrj") 367 434 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 368 grid_ref = "grid_scalar", operation = "instant")435 scalar_ref = "grid_scalar", operation = "instant") 369 436 !end daymod.F90 370 437 !sbcmod.F90 371 438 CALL xios_add_child(file_hdl, field_hdl, "utau_b") 372 439 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 373 grid_ref = "grid_N", operation = "instant")440 domain_ref = "grid_N", operation = "instant") 374 441 375 442 CALL xios_add_child(file_hdl, field_hdl, "vtau_b") 376 443 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 377 grid_ref = "grid_N", operation = "instant")444 domain_ref = "grid_N", operation = "instant") 378 445 379 446 CALL xios_add_child(file_hdl, field_hdl, "qns_b") 380 447 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 381 grid_ref = "grid_N", operation = "instant")448 domain_ref = "grid_N", operation = "instant") 382 449 383 450 CALL xios_add_child(file_hdl, field_hdl, "emp_b") 384 451 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 385 grid_ref = "grid_N", operation = "instant")452 domain_ref = "grid_N", operation = "instant") 386 453 387 454 CALL xios_add_child(file_hdl, field_hdl, "sfx_b") 388 455 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 389 grid_ref = "grid_N", operation = "instant")456 domain_ref = "grid_N", operation = "instant") 390 457 !end sbcmod.F90 391 458 !ALL FIELDS ABOUVE ALWAYS … … 394 461 CALL xios_add_child(file_hdl, field_hdl, "en") 395 462 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 396 grid_ref = "grid_N_3D", operation = "instant")463 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 397 464 398 465 CALL xios_add_child(file_hdl, field_hdl, "avt") 399 466 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 400 grid_ref = "grid_N_3D", operation = "instant")467 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 401 468 402 469 CALL xios_add_child(file_hdl, field_hdl, "avm") 403 470 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 404 grid_ref = "grid_N_3D", operation = "instant")471 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 405 472 406 473 CALL xios_add_child(file_hdl, field_hdl, "avmu") 407 474 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 408 grid_ref = "grid_N_3D", operation = "instant")475 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 409 476 410 477 CALL xios_add_child(file_hdl, field_hdl, "avmv") 411 478 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 412 grid_ref = "grid_N_3D", operation = "instant")479 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 413 480 414 481 CALL xios_add_child(file_hdl, field_hdl, "dissl") 415 482 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 416 grid_ref = "grid_N_3D", operation = "instant")483 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 417 484 #endif 418 485 !end zdftke.F90 … … 420 487 CALL xios_add_child(file_hdl, field_hdl, "qsr_hc_b") 421 488 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 422 grid_ref = "grid_N_3D" , operation = "instant")489 domain_ref="grid_N", axis_ref="deptht" , operation = "instant") 423 490 424 491 CALL xios_add_child(file_hdl, field_hdl, "fraqsr_1lev") 425 492 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 426 grid_ref = "grid_N", operation = "instant")493 domain_ref = "grid_N", operation = "instant") 427 494 !END traqsr.F90 428 495 #if defined key_dynspg_flt || defined key_esopa … … 430 497 CALL xios_add_child(file_hdl, field_hdl, "gcx") 431 498 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 432 grid_ref = "grid_N", operation = "instant")499 domain_ref = "grid_N", operation = "instant") 433 500 434 501 CALL xios_add_child(file_hdl, field_hdl, "gcxb") 435 502 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 436 grid_ref = "grid_N", operation = "instant")503 domain_ref = "grid_N", operation = "instant") 437 504 !end dynspg_flt.F90 438 505 #endif … … 440 507 CALL xios_add_child(file_hdl, field_hdl, "sbc_hc_b") 441 508 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 442 grid_ref = "grid_N", operation = "instant")509 domain_ref = "grid_N", operation = "instant") 443 510 444 511 CALL xios_add_child(file_hdl, field_hdl, "sbc_sc_b") 445 512 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 446 grid_ref = "grid_N", operation = "instant")513 domain_ref = "grid_N", operation = "instant") 447 514 448 515 CALL xios_add_child(file_hdl, field_hdl, "fwf_isf_b") 449 516 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 450 grid_ref = "grid_N", operation = "instant")517 domain_ref = "grid_N", operation = "instant") 451 518 452 519 CALL xios_add_child(file_hdl, field_hdl, "isf_sc_b") 453 520 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 454 grid_ref = "grid_N", operation = "instant")521 domain_ref = "grid_N", operation = "instant") 455 522 456 523 CALL xios_add_child(file_hdl, field_hdl, "isf_hc_b") 457 524 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 458 grid_ref = "grid_N", operation = "instant")525 domain_ref = "grid_N", operation = "instant") 459 526 !trasbc.F90 END 460 527 IF( lk_oasis) THEN … … 463 530 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_mass") 464 531 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 465 grid_ref = "grid_scalar", operation = "instant")532 scalar_ref = "grid_scalar", operation = "instant") 466 533 467 534 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_timelapsed") 468 535 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 469 grid_ref = "grid_scalar", operation = "instant")536 scalar_ref = "grid_scalar", operation = "instant") 470 537 471 538 CALL xios_add_child(file_hdl, field_hdl, "greenland_icesheet_mass_roc") 472 539 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 473 grid_ref = "grid_scalar", operation = "instant")540 scalar_ref = "grid_scalar", operation = "instant") 474 541 475 542 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_mass") 476 543 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 477 grid_ref = "grid_scalar", operation = "instant")544 scalar_ref = "grid_scalar", operation = "instant") 478 545 479 546 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_timelapsed") 480 547 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 481 grid_ref = "grid_scalar", operation = "instant")548 scalar_ref = "grid_scalar", operation = "instant") 482 549 483 550 CALL xios_add_child(file_hdl, field_hdl, "antarctica_icesheet_mass_roc") 484 551 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 485 grid_ref = "grid_scalar", operation = "instant")552 scalar_ref = "grid_scalar", operation = "instant") 486 553 ENDIF 487 554 ENDIF … … 489 556 CALL xios_add_child(file_hdl, field_hdl, "rhd") 490 557 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 491 grid_ref = "grid_N_3D", operation = "instant")558 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 492 559 #endif 493 560 !dia_hsb_rst … … 496 563 CALL xios_add_child(file_hdl, field_hdl, "frc_v") 497 564 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 498 grid_ref = "grid_scalar", operation = "instant")565 scalar_ref = "grid_scalar", operation = "instant") 499 566 500 567 CALL xios_add_child(file_hdl, field_hdl, "frc_t") 501 568 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 502 grid_ref = "grid_scalar", operation = "instant")569 scalar_ref = "grid_scalar", operation = "instant") 503 570 504 571 CALL xios_add_child(file_hdl, field_hdl, "frc_s") 505 572 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 506 grid_ref = "grid_scalar", operation = "instant")573 scalar_ref = "grid_scalar", operation = "instant") 507 574 508 575 CALL xios_add_child(file_hdl, field_hdl, "ssh_ini") 509 576 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 510 grid_ref = "grid_N", operation = "instant")577 domain_ref = "grid_N", operation = "instant") 511 578 512 579 CALL xios_add_child(file_hdl, field_hdl, "e3t_ini") 513 580 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 514 grid_ref = "grid_N_3D", operation = "instant")581 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 515 582 516 583 CALL xios_add_child(file_hdl, field_hdl, "hc_loc_ini") 517 584 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 518 grid_ref = "grid_N_3D", operation = "instant")585 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 519 586 520 587 CALL xios_add_child(file_hdl, field_hdl, "sc_loc_ini") 521 588 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 522 grid_ref = "grid_N_3D", operation = "instant")589 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 523 590 524 591 … … 526 593 CALL xios_add_child(file_hdl, field_hdl, "frc_wn_t") 527 594 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 528 grid_ref = "grid_scalar", operation = "instant")595 scalar_ref = "grid_scalar", operation = "instant") 529 596 530 597 CALL xios_add_child(file_hdl, field_hdl, "frc_wn_s") 531 598 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 532 grid_ref = "grid_scalar", operation = "instant")599 scalar_ref = "grid_scalar", operation = "instant") 533 600 534 601 CALL xios_add_child(file_hdl, field_hdl, "ssh_hc_loc_ini") 535 602 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 536 grid_ref = "grid_N", operation = "instant")603 domain_ref = "grid_N", operation = "instant") 537 604 538 605 CALL xios_add_child(file_hdl, field_hdl, "ssh_sc_loc_ini") 539 606 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 540 grid_ref = "grid_N", operation = "instant")607 domain_ref = "grid_N", operation = "instant") 541 608 542 609 … … 549 616 CALL xios_add_child(file_hdl, field_hdl, "fse3t_b") 550 617 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 551 grid_ref = "grid_N_3D", operation = "instant")618 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 552 619 553 620 CALL xios_add_child(file_hdl, field_hdl, "fse3t_n") 554 621 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 555 grid_ref = "grid_N_3D", operation = "instant")622 domain_ref="grid_N", axis_ref="deptht", operation = "instant") 556 623 557 624 IF( lr_vvl_ztilde .OR. lr_vvl_layer ) THEN ! z_tilde and layer cases ! 558 625 CALL xios_add_child(file_hdl, field_hdl, "tilde_e3t_b") 559 626 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 560 grid_ref = "grid_N", operation = "instant")627 domain_ref = "grid_N", operation = "instant") 561 628 562 629 CALL xios_add_child(file_hdl, field_hdl, "tilde_e3t_n") 563 630 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 564 grid_ref = "grid_N", operation = "instant")631 domain_ref = "grid_N", operation = "instant") 565 632 END IF 566 633 IF( lr_vvl_ztilde ) THEN ! z_tilde case ! 567 634 CALL xios_add_child(file_hdl, field_hdl, "hdiv_lf") 568 635 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 569 grid_ref = "grid_N", operation = "instant")636 domain_ref = "grid_N", operation = "instant") 570 637 ENDIF 571 638 ENDIF … … 575 642 CALL xios_add_child(file_hdl, field_hdl, "ub2_b") 576 643 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 577 grid_ref = "grid_N", operation = "instant")644 domain_ref = "grid_N", operation = "instant") 578 645 579 646 CALL xios_add_child(file_hdl, field_hdl, "vb2_b") 580 647 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 581 grid_ref = "grid_N", operation = "instant")648 domain_ref = "grid_N", operation = "instant") 582 649 583 650 … … 585 652 CALL xios_add_child(file_hdl, field_hdl, "sshbb_e") 586 653 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 587 grid_ref = "grid_N", operation = "instant")654 domain_ref = "grid_N", operation = "instant") 588 655 589 656 CALL xios_add_child(file_hdl, field_hdl, "ubb_e") 590 657 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 591 grid_ref = "grid_N", operation = "instant")658 domain_ref = "grid_N", operation = "instant") 592 659 593 660 CALL xios_add_child(file_hdl, field_hdl, "vbb_e") 594 661 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 595 grid_ref = "grid_N", operation = "instant")662 domain_ref = "grid_N", operation = "instant") 596 663 597 664 CALL xios_add_child(file_hdl, field_hdl, "sshb_e") 598 665 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 599 grid_ref = "grid_N", operation = "instant")666 domain_ref = "grid_N", operation = "instant") 600 667 601 668 CALL xios_add_child(file_hdl, field_hdl, "ub_e") 602 669 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 603 grid_ref = "grid_N", operation = "instant")670 domain_ref = "grid_N", operation = "instant") 604 671 605 672 CALL xios_add_child(file_hdl, field_hdl, "vb_e") 606 673 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 607 grid_ref = "grid_N", operation = "instant")674 domain_ref = "grid_N", operation = "instant") 608 675 ENDIF 609 676 #if defined key_agrif … … 612 679 CALL xios_add_child(file_hdl, field_hdl, "ub2_i_b") 613 680 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 614 grid_ref = "GRID_N", operation = "instant")681 domain_ref = "grid_N", operation = "instant") 615 682 616 683 CALL xios_add_child(file_hdl, field_hdl, "vb2_i_b") 617 684 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 618 grid_ref = "grid_N", operation = "instant")685 domain_ref = "grid_N", operation = "instant") 619 686 ENDIF 620 687 #endif … … 625 692 CALL xios_add_child(file_hdl, field_hdl, "ssh_ibb") 626 693 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 627 grid_ref = "grid_N", operation = "instant")694 domain_ref = "grid_N", operation = "instant") 628 695 ENDIF 629 696 !end sbcapr.F90 … … 632 699 CALL xios_add_child(file_hdl, field_hdl, "rnf_b") 633 700 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 634 grid_ref = "grid_N", operation = "instant")701 domain_ref = "grid_N", operation = "instant") 635 702 636 703 CALL xios_add_child(file_hdl, field_hdl, "rnf_hc_b") 637 704 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 638 grid_ref = "grid_N", operation = "instant")705 domain_ref = "grid_N", operation = "instant") 639 706 640 707 CALL xios_add_child(file_hdl, field_hdl, "rnf_sc_b") 641 708 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 642 grid_ref = "grid_N", operation = "instant")709 domain_ref = "grid_N", operation = "instant") 643 710 ENDIF 644 711 !end sbcrnf.F90 … … 647 714 CALL xios_add_child(file_hdl, field_hdl, "nn_fsbc") 648 715 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 649 grid_ref = "grid_scalar", operation = "instant")716 scalar_ref = "grid_scalar", operation = "instant") 650 717 651 718 CALL xios_add_child(file_hdl, field_hdl, "ssu_m") 652 719 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 653 grid_ref = "grid_N", operation = "instant")720 domain_ref = "grid_N", operation = "instant") 654 721 655 722 CALL xios_add_child(file_hdl, field_hdl, "ssv_m") 656 723 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 657 grid_ref = "grid_N", operation = "instant")724 domain_ref = "grid_N", operation = "instant") 658 725 659 726 CALL xios_add_child(file_hdl, field_hdl, "sst_m") 660 727 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 661 grid_ref = "grid_N", operation = "instant")728 domain_ref = "grid_N", operation = "instant") 662 729 663 730 CALL xios_add_child(file_hdl, field_hdl, "sss_m") 664 731 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 665 grid_ref = "grid_N", operation = "instant")732 domain_ref = "grid_N", operation = "instant") 666 733 667 734 CALL xios_add_child(file_hdl, field_hdl, "ssh_m") 668 735 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 669 grid_ref = "grid_N", operation = "instant")736 domain_ref = "grid_N", operation = "instant") 670 737 671 738 CALL xios_add_child(file_hdl, field_hdl, "frq_m") 672 739 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 673 grid_ref = "grid_N", operation = "instant")740 domain_ref = "grid_N", operation = "instant") 674 741 675 742 IF( lk_vvl ) THEN 676 743 CALL xios_add_child(file_hdl, field_hdl, "e3t_m") 677 744 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 678 grid_ref = "grid_N", operation = "instant")745 domain_ref = "grid_N", operation = "instant") 679 746 ENDIF 680 747 ENDIF … … 683 750 CALL xios_add_child(file_hdl, field_hdl, "avmb") 684 751 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 685 grid_ref = "Vgrid", operation = "instant")752 axis_ref = "deptht", operation = "instant") 686 753 687 754 CALL xios_add_child(file_hdl, field_hdl, "avtb") 688 755 CALL xios_set_attr (field_hdl, enabled = .TRUE., prec = 8, & 689 grid_ref = "Vgrid", operation = "instant")756 axis_ref = "deptht", operation = "instant") 690 757 ENDIF 691 758 692 END SUBROUTINE set_ rstw_active759 END SUBROUTINE set_numro_active 693 760 694 761 SUBROUTINE iom_swap( cdname ) … … 1871 1938 1872 1939 1873 SUBROUTINE set_grid( cdgrd, plon, plat, l mask)1940 SUBROUTINE set_grid( cdgrd, plon, plat, lxios ) 1874 1941 !!---------------------------------------------------------------------- 1875 1942 !! *** ROUTINE set_grid *** … … 1884 1951 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zmask 1885 1952 INTEGER :: ni,nj 1886 LOGICAL :: l mask1953 LOGICAL :: lxios 1887 1954 1888 1955 ni=nlei-nldi+1 ; nj=nlej-nldj+1 … … 1894 1961 #endif 1895 1962 CALL iom_set_domain_attr("grid_"//cdgrd, data_dim=2, data_ibegin = 1-nldi, data_ni = jpi, data_jbegin = 1-nldj, data_nj = jpj) 1896 CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = RESHAPE(plon(nldi:nlei, nldj:nlej),(/ ni*nj /)), &1963 if(.NOT.lxios) CALL iom_set_domain_attr("grid_"//cdgrd, lonvalue = RESHAPE(plon(nldi:nlei, nldj:nlej),(/ ni*nj /)), & 1897 1964 & latvalue = RESHAPE(plat(nldi:nlei, nldj:nlej),(/ ni*nj /))) 1898 1965 1899 IF ( l mask) THEN1966 IF ( ln_mskland.AND.(.NOT.lxios) ) THEN 1900 1967 ! mask land points, keep values on coast line -> specific mask for U, V and W points 1901 1968 SELECT CASE ( cdgrd ) -
branches/UKMO/dev_r7573_xios_write/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
r8208 r8299 126 126 CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib ) 127 127 ELSE 128 CALL iom_init( wxios_context, TRIM(clpath)//TRIM(clname) ) 128 wxios_context = "rstw_"//TRIM(ADJUSTL(clkt)) 129 CALL iom_rstw_init( wxios_context, TRIM(clpath)//TRIM(clname) ) 129 130 CALL xios_update_calendar(nitrst) 130 131 CALL iom_swap( cxios_context )
Note: See TracChangeset
for help on using the changeset viewer.