Changeset 8693 for branches/UKMO/dev_r5518_obs_oper_update_bgc3d
- Timestamp:
- 2017-11-10T14:42:18+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_obs_oper_update_bgc3d/NEMOGCM/NEMO/OPA_SRC/OBS/obs_write.F90
r8687 r8693 322 322 CHARACTER(LEN=27) :: clfiletype 323 323 CHARACTER(LEN=12), PARAMETER :: cpname = 'obs_wri_surf' 324 CHARACTER(LEN=ilenlong) :: cllongname ! Long name of variable 325 CHARACTER(LEN=ilenunit) :: clunits ! Units of variable 326 CHARACTER(LEN=ilengrid) :: clgrid ! Grid of variable 324 327 INTEGER :: jo 325 328 INTEGER :: ja … … 344 347 SELECT CASE ( TRIM(surfdata%cvars(1)) ) 345 348 CASE('SLA') 349 350 ! SLA needs special treatment because of MDT, so is all done here 351 ! Other variables are done more generically 346 352 347 353 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & … … 374 380 CASE('SST') 375 381 382 clfiletype = 'sstfb' 383 cllongname = 'Sea surface temperature' 384 clunits = 'Degree centigrade' 385 clgrid = 'T' 386 387 CASE('ICECONC') 388 389 clfiletype = 'sicfb' 390 cllongname = 'Sea ice' 391 clunits = 'Fraction' 392 clgrid = 'T' 393 394 CASE('SSS') 395 396 clfiletype = 'sssfb' 397 cllongname = 'Sea surface salinity' 398 clunits = 'psu' 399 clgrid = 'T' 400 401 CASE('SURF_LOGCHL_TOTAL','LOGCHL','LogChl','logchl') 402 403 clfiletype = 'surf_logchl_totalfb' 404 cllongname = 'Surface total log10(chlorophyll)' 405 clunits = 'log10(mg/m3)' 406 clgrid = 'T' 407 408 CASE('SURF_LOGCHL_DIAT') 409 410 clfiletype = 'surf_logchl_diatfb' 411 cllongname = 'Surface diatom log10(chlorophyll)' 412 clunits = 'log10(mg/m3)' 413 clgrid = 'T' 414 415 CASE('SURF_LOGCHL_NONDIAT') 416 417 clfiletype = 'surf_logchl_nondiatfb' 418 cllongname = 'Surface non-diatom log10(chlorophyll)' 419 clunits = 'log10(mg/m3)' 420 clgrid = 'T' 421 422 CASE('SURF_LOGCHL_DINO') 423 424 clfiletype = 'surf_logchl_dinofb' 425 cllongname = 'Surface dinoflagellate log10(chlorophyll)' 426 clunits = 'log10(mg/m3)' 427 clgrid = 'T' 428 429 CASE('SURF_LOGCHL_MICRO') 430 431 clfiletype = 'surf_logchl_microfb' 432 cllongname = 'Surface microphytoplankton log10(chlorophyll)' 433 clunits = 'log10(mg/m3)' 434 clgrid = 'T' 435 436 CASE('SURF_LOGCHL_NANO') 437 438 clfiletype = 'surf_logchl_nanofb' 439 cllongname = 'Surface nanophytoplankton log10(chlorophyll)' 440 clunits = 'log10(mg/m3)' 441 clgrid = 'T' 442 443 CASE('SURF_LOGCHL_PICO') 444 445 clfiletype = 'surf_logchl_picofb' 446 cllongname = 'Surface picophytoplankton log10(chlorophyll)' 447 clunits = 'log10(mg/m3)' 448 clgrid = 'T' 449 450 CASE('SURF_CHL_TOTAL') 451 452 clfiletype = 'surf_chl_totalfb' 453 cllongname = 'Surface total chlorophyll' 454 clunits = 'mg/m3' 455 clgrid = 'T' 456 457 CASE('SURF_SPM') 458 459 clfiletype = 'surf_spmfb' 460 cllongname = 'Surface suspended particulate matter' 461 clunits = 'g/m3' 462 clgrid = 'T' 463 464 CASE('SURF_FCO2','FCO2','fCO2','fco2') 465 466 clfiletype = 'surf_fco2fb' 467 cllongname = 'Surface fugacity of carbon dioxide' 468 clunits = 'uatm' 469 clgrid = 'T' 470 471 CASE('SURF_PCO2') 472 473 clfiletype = 'surf_pco2fb' 474 cllongname = 'Surface partial pressure of carbon dioxide' 475 clunits = 'uatm' 476 clgrid = 'T' 477 478 CASE DEFAULT 479 480 CALL ctl_stop( 'Unknown observation type '//TRIM(surfdata%cvars(1))//' in obs_wri_surf' ) 481 482 END SELECT 483 484 ! SLA needs special treatment because of MDT, so is done above 485 ! Remaining variables treated more generically 486 487 IF ( TRIM(surfdata%cvars(1)) /= 'SLA' ) THEN 488 376 489 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 377 490 & 1 + iadd, iext, .TRUE. ) 378 491 379 clfiletype = 'sstfb'380 492 fbdata%cname(1) = surfdata%cvars(1) 381 fbdata%coblong(1) = 'Sea surface temperature'382 fbdata%cobunit(1) = 'Degree centigrade'493 fbdata%coblong(1) = cllongname 494 fbdata%cobunit(1) = clunits 383 495 DO je = 1, iext 384 496 fbdata%cextname(je) = pext%cdname(je) … … 386 498 fbdata%cextunit(je) = pext%cdunit(je,1) 387 499 END DO 388 fbdata%caddlong(1,1) = 'Model interpolated SST' 389 fbdata%caddunit(1,1) = 'Degree centigrade' 390 fbdata%cgrid(1) = 'T' 500 IF ( TRIM(surfdata%cvars(1)) == 'ICECONC' ) THEN 501 fbdata%caddlong(1,1) = 'Model interpolated ICE' 502 ELSE 503 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 504 ENDIF 505 fbdata%caddunit(1,1) = clunits 506 fbdata%cgrid(1) = clgrid 391 507 DO ja = 1, iadd 392 508 fbdata%caddname(1+ja) = padd%cdname(ja) … … 395 511 END DO 396 512 397 CASE('ICECONC') 398 399 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 400 & 1 + iadd, iext, .TRUE. ) 401 402 clfiletype = 'sicfb' 403 fbdata%cname(1) = surfdata%cvars(1) 404 fbdata%coblong(1) = 'Sea ice' 405 fbdata%cobunit(1) = 'Fraction' 406 DO je = 1, iext 407 fbdata%cextname(je) = pext%cdname(je) 408 fbdata%cextlong(je) = pext%cdlong(je,1) 409 fbdata%cextunit(je) = pext%cdunit(je,1) 410 END DO 411 fbdata%caddlong(1,1) = 'Model interpolated ICE' 412 fbdata%caddunit(1,1) = 'Fraction' 413 fbdata%cgrid(1) = 'T' 414 DO ja = 1, iadd 415 fbdata%caddname(1+ja) = padd%cdname(ja) 416 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 417 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 418 END DO 419 420 CASE('SSS') 421 422 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 423 & 1 + iadd, iext, .TRUE. ) 424 425 clfiletype = 'sssfb' 426 fbdata%cname(1) = surfdata%cvars(1) 427 fbdata%coblong(1) = 'Sea surface salinity' 428 fbdata%cobunit(1) = 'psu' 429 DO je = 1, iext 430 fbdata%cextname(je) = pext%cdname(je) 431 fbdata%cextlong(je) = pext%cdlong(je,1) 432 fbdata%cextunit(je) = pext%cdunit(je,1) 433 END DO 434 fbdata%caddlong(1,1) = 'Model interpolated SSS' 435 fbdata%caddunit(1,1) = 'psu' 436 fbdata%cgrid(1) = 'T' 437 DO ja = 1, iadd 438 fbdata%caddname(1+ja) = padd%cdname(ja) 439 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 440 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 441 END DO 442 443 CASE('SURF_LOGCHL_TOTAL','LOGCHL','LogChl','logchl') 444 445 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 446 & 1 + iadd, iext, .TRUE. ) 447 448 clfiletype = 'surf_logchl_totalfb' 449 fbdata%cname(1) = surfdata%cvars(1) 450 fbdata%coblong(1) = 'Surface total log10(chlorophyll)' 451 fbdata%cobunit(1) = 'log10(mg/m3)' 452 DO je = 1, iext 453 fbdata%cextname(je) = pext%cdname(je) 454 fbdata%cextlong(je) = pext%cdlong(je,1) 455 fbdata%cextunit(je) = pext%cdunit(je,1) 456 END DO 457 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 458 fbdata%caddunit(1,1) = 'log10(mg/m3)' 459 fbdata%cgrid(1) = 'T' 460 DO ja = 1, iadd 461 fbdata%caddname(1+ja) = padd%cdname(ja) 462 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 463 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 464 END DO 465 466 CASE('SURF_LOGCHL_DIAT') 467 468 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 469 & 1 + iadd, iext, .TRUE. ) 470 471 clfiletype = 'surf_logchl_diatfb' 472 fbdata%cname(1) = surfdata%cvars(1) 473 fbdata%coblong(1) = 'Surface diatom log10(chlorophyll)' 474 fbdata%cobunit(1) = 'log10(mg/m3)' 475 DO je = 1, iext 476 fbdata%cextname(je) = pext%cdname(je) 477 fbdata%cextlong(je) = pext%cdlong(je,1) 478 fbdata%cextunit(je) = pext%cdunit(je,1) 479 END DO 480 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 481 fbdata%caddunit(1,1) = 'log10(mg/m3)' 482 fbdata%cgrid(1) = 'T' 483 DO ja = 1, iadd 484 fbdata%caddname(1+ja) = padd%cdname(ja) 485 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 486 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 487 END DO 488 489 CASE('SURF_LOGCHL_NONDIAT') 490 491 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 492 & 1 + iadd, iext, .TRUE. ) 493 494 clfiletype = 'surf_logchl_nondiatfb' 495 fbdata%cname(1) = surfdata%cvars(1) 496 fbdata%coblong(1) = 'Surface non-diatom log10(chlorophyll)' 497 fbdata%cobunit(1) = 'log10(mg/m3)' 498 DO je = 1, iext 499 fbdata%cextname(je) = pext%cdname(je) 500 fbdata%cextlong(je) = pext%cdlong(je,1) 501 fbdata%cextunit(je) = pext%cdunit(je,1) 502 END DO 503 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 504 fbdata%caddunit(1,1) = 'log10(mg/m3)' 505 fbdata%cgrid(1) = 'T' 506 DO ja = 1, iadd 507 fbdata%caddname(1+ja) = padd%cdname(ja) 508 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 509 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 510 END DO 511 512 CASE('SURF_LOGCHL_DINO') 513 514 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 515 & 1 + iadd, iext, .TRUE. ) 516 517 clfiletype = 'surf_logchl_dinofb' 518 fbdata%cname(1) = surfdata%cvars(1) 519 fbdata%coblong(1) = 'Surface dinoflagellate log10(chlorophyll)' 520 fbdata%cobunit(1) = 'log10(mg/m3)' 521 DO je = 1, iext 522 fbdata%cextname(je) = pext%cdname(je) 523 fbdata%cextlong(je) = pext%cdlong(je,1) 524 fbdata%cextunit(je) = pext%cdunit(je,1) 525 END DO 526 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 527 fbdata%caddunit(1,1) = 'log10(mg/m3)' 528 fbdata%cgrid(1) = 'T' 529 DO ja = 1, iadd 530 fbdata%caddname(1+ja) = padd%cdname(ja) 531 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 532 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 533 END DO 534 535 CASE('SURF_LOGCHL_MICRO') 536 537 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 538 & 1 + iadd, iext, .TRUE. ) 539 540 clfiletype = 'surf_logchl_microfb' 541 fbdata%cname(1) = surfdata%cvars(1) 542 fbdata%coblong(1) = 'Surface microphytoplankton log10(chlorophyll)' 543 fbdata%cobunit(1) = 'log10(mg/m3)' 544 DO je = 1, iext 545 fbdata%cextname(je) = pext%cdname(je) 546 fbdata%cextlong(je) = pext%cdlong(je,1) 547 fbdata%cextunit(je) = pext%cdunit(je,1) 548 END DO 549 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 550 fbdata%caddunit(1,1) = 'log10(mg/m3)' 551 fbdata%cgrid(1) = 'T' 552 DO ja = 1, iadd 553 fbdata%caddname(1+ja) = padd%cdname(ja) 554 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 555 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 556 END DO 557 558 CASE('SURF_LOGCHL_NANO') 559 560 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 561 & 1 + iadd, iext, .TRUE. ) 562 563 clfiletype = 'surf_logchl_nanofb' 564 fbdata%cname(1) = surfdata%cvars(1) 565 fbdata%coblong(1) = 'Surface nanophytoplankton log10(chlorophyll)' 566 fbdata%cobunit(1) = 'log10(mg/m3)' 567 DO je = 1, iext 568 fbdata%cextname(je) = pext%cdname(je) 569 fbdata%cextlong(je) = pext%cdlong(je,1) 570 fbdata%cextunit(je) = pext%cdunit(je,1) 571 END DO 572 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 573 fbdata%caddunit(1,1) = 'log10(mg/m3)' 574 fbdata%cgrid(1) = 'T' 575 DO ja = 1, iadd 576 fbdata%caddname(1+ja) = padd%cdname(ja) 577 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 578 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 579 END DO 580 581 CASE('SURF_LOGCHL_PICO') 582 583 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 584 & 1 + iadd, iext, .TRUE. ) 585 586 clfiletype = 'surf_logchl_picofb' 587 fbdata%cname(1) = surfdata%cvars(1) 588 fbdata%coblong(1) = 'Surface picophytoplankton log10(chlorophyll)' 589 fbdata%cobunit(1) = 'log10(mg/m3)' 590 DO je = 1, iext 591 fbdata%cextname(je) = pext%cdname(je) 592 fbdata%cextlong(je) = pext%cdlong(je,1) 593 fbdata%cextunit(je) = pext%cdunit(je,1) 594 END DO 595 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 596 fbdata%caddunit(1,1) = 'log10(mg/m3)' 597 fbdata%cgrid(1) = 'T' 598 DO ja = 1, iadd 599 fbdata%caddname(1+ja) = padd%cdname(ja) 600 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 601 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 602 END DO 603 604 CASE('SURF_CHL_TOTAL') 605 606 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 607 & 1 + iadd, iext, .TRUE. ) 608 609 clfiletype = 'surf_chl_totalfb' 610 fbdata%cname(1) = surfdata%cvars(1) 611 fbdata%coblong(1) = 'Surface total chlorophyll' 612 fbdata%cobunit(1) = 'mg/m3' 613 DO je = 1, iext 614 fbdata%cextname(je) = pext%cdname(je) 615 fbdata%cextlong(je) = pext%cdlong(je,1) 616 fbdata%cextunit(je) = pext%cdunit(je,1) 617 END DO 618 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 619 fbdata%caddunit(1,1) = 'mg/m3' 620 fbdata%cgrid(1) = 'T' 621 DO ja = 1, iadd 622 fbdata%caddname(1+ja) = padd%cdname(ja) 623 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 624 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 625 END DO 626 627 CASE('SURF_SPM') 628 629 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 630 & 1 + iadd, iext, .TRUE. ) 631 632 clfiletype = 'surf_spmfb' 633 fbdata%cname(1) = surfdata%cvars(1) 634 fbdata%coblong(1) = 'Surface suspended particulate matter' 635 fbdata%cobunit(1) = 'g/m3' 636 DO je = 1, iext 637 fbdata%cextname(je) = pext%cdname(je) 638 fbdata%cextlong(je) = pext%cdlong(je,1) 639 fbdata%cextunit(je) = pext%cdunit(je,1) 640 END DO 641 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 642 fbdata%caddunit(1,1) = 'g/m3' 643 fbdata%cgrid(1) = 'T' 644 DO ja = 1, iadd 645 fbdata%caddname(1+ja) = padd%cdname(ja) 646 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 647 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 648 END DO 649 650 CASE('SURF_FCO2','FCO2','fCO2','fco2') 651 652 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 653 & 1 + iadd, iext, .TRUE. ) 654 655 clfiletype = 'surf_fco2fb' 656 fbdata%cname(1) = surfdata%cvars(1) 657 fbdata%coblong(1) = 'Surface fugacity of carbon dioxide' 658 fbdata%cobunit(1) = 'uatm' 659 DO je = 1, iext 660 fbdata%cextname(je) = pext%cdname(je) 661 fbdata%cextlong(je) = pext%cdlong(je,1) 662 fbdata%cextunit(je) = pext%cdunit(je,1) 663 END DO 664 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 665 fbdata%caddunit(1,1) = 'uatm' 666 fbdata%cgrid(1) = 'T' 667 DO ja = 1, iadd 668 fbdata%caddname(1+ja) = padd%cdname(ja) 669 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 670 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 671 END DO 672 673 CASE('SURF_PCO2') 674 675 CALL alloc_obfbdata( fbdata, 1, surfdata%nsurf, 1, & 676 & 1 + iadd, iext, .TRUE. ) 677 678 clfiletype = 'surf_pco2fb' 679 fbdata%cname(1) = surfdata%cvars(1) 680 fbdata%coblong(1) = 'Surface partial pressure of carbon dioxide' 681 fbdata%cobunit(1) = 'uatm' 682 DO je = 1, iext 683 fbdata%cextname(je) = pext%cdname(je) 684 fbdata%cextlong(je) = pext%cdlong(je,1) 685 fbdata%cextunit(je) = pext%cdunit(je,1) 686 END DO 687 fbdata%caddlong(1,1) = 'Model interpolated ' // TRIM(surfdata%cvars(1)) 688 fbdata%caddunit(1,1) = 'uatm' 689 fbdata%cgrid(1) = 'T' 690 DO ja = 1, iadd 691 fbdata%caddname(1+ja) = padd%cdname(ja) 692 fbdata%caddlong(1+ja,1) = padd%cdlong(ja,1) 693 fbdata%caddunit(1+ja,1) = padd%cdunit(ja,1) 694 END DO 695 696 CASE DEFAULT 697 698 CALL ctl_stop( 'Unknown observation type '//TRIM(surfdata%cvars(1))//' in obs_wri_surf' ) 699 700 END SELECT 701 513 ENDIF 514 702 515 fbdata%caddname(1) = 'Hx' 703 516
Note: See TracChangeset
for help on using the changeset viewer.