Changeset 5270 for LMDZ6/trunk/libf/phylmd/phyaqua_mod.f90
- Timestamp:
- Oct 24, 2024, 1:55:38 PM (8 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/phyaqua_mod.f90
r5268 r5270 517 517 IMPLICIT NONE 518 518 519 include "netcdf.inc"520 521 519 INTEGER, INTENT (IN) :: klon 522 520 REAL, INTENT (IN) :: phy_nat(klon, 360) … … 572 570 USE mod_phys_lmdz_transfert_para, ONLY: gather 573 571 USE phys_cal_mod, ONLY: year_len 574 use netcdf, only: nf90_def_var, nf90_double, nf90_float, nf90_put_var 572 USE netcdf, ONLY: nf90_def_var, nf90_put_var, nf90_get_var, nf90_strerror, nf90_close, & 573 nf90_enddef, nf90_put_att, nf90_unlimited, nf90_noerr, nf90_global, nf90_clobber, & 574 nf90_64bit_offset, nf90_def_dim, nf90_create 575 575 USE lmdz_cppkeys_wrapper, ONLY: nf90_format 576 576 IMPLICIT NONE 577 include "netcdf.inc"578 577 579 578 INTEGER, INTENT (IN) :: klon … … 606 605 PRINT *, 'writelim: Ecriture du fichier limit' 607 606 608 ierr = nf_create('limit.nc', IOR(NF_CLOBBER,NF_64BIT_OFFSET), nid) 609 610 ierr = nf_put_att_text(nid, nf_global, 'title', 30, & 611 'Fichier conditions aux limites') 612 ! ! ierr = NF_DEF_DIM (nid, "points_physiques", klon, ndim) 613 ierr = nf_def_dim(nid, 'points_physiques', klon_glo, ndim) 614 ierr = nf_def_dim(nid, 'time', nf_unlimited, ntim) 607 ierr = nf90_create('limit.nc', IOR(nf90_clobber,nf90_64bit_offset), nid) 608 609 ierr = nf90_put_att(nid, nf90_global, 'title', 'Fichier conditions aux limites') 610 ! ! ierr = nf90_def_dim (nid, "points_physiques", klon, ndim) 611 ierr = nf90_def_dim(nid, 'points_physiques', klon_glo, ndim) 612 ierr = nf90_def_dim(nid, 'time', nf90_unlimited, ntim) 615 613 616 614 dims(1) = ndim … … 618 616 619 617 ierr = nf90_def_var(nid, 'TEMPS', nf90_format, [ntim], id_tim) 620 ierr = nf _put_att_text(nid, id_tim, 'title', 17, 'Jour dans l annee')618 ierr = nf90_put_att(nid, id_tim, 'title', 'Jour dans l annee') 621 619 622 620 ierr = nf90_def_var(nid, 'NAT', nf90_format, dims, id_nat) 623 ierr = nf_put_att_text(nid, id_nat, 'title', 23, & 624 'Nature du sol (0,1,2,3)') 621 ierr = nf90_put_att(nid, id_nat, 'title', 'Nature du sol (0,1,2,3)') 625 622 626 623 ierr = nf90_def_var(nid, 'SST', nf90_format, dims, id_sst) 627 ierr = nf_put_att_text(nid, id_sst, 'title', 35, & 628 'Temperature superficielle de la mer') 624 ierr = nf90_put_att(nid, id_sst, 'title', 'Temperature superficielle de la mer') 629 625 630 626 ierr = nf90_def_var(nid, 'BILS', nf90_format, dims, id_bils) 631 ierr = nf_put_att_text(nid, id_bils, 'title', 32, & 632 'Reference flux de chaleur au sol') 627 ierr = nf90_put_att(nid, id_bils, 'title', 'Reference flux de chaleur au sol') 633 628 634 629 ierr = nf90_def_var(nid, 'ALB', nf90_format, dims, id_alb) 635 ierr = nf _put_att_text(nid, id_alb, 'title', 19, 'Albedo a la surface')630 ierr = nf90_put_att(nid, id_alb, 'title', 'Albedo a la surface') 636 631 637 632 ierr = nf90_def_var(nid, 'RUG', nf90_format, dims, id_rug) 638 ierr = nf _put_att_text(nid, id_rug, 'title', 8, 'Rugosite')633 ierr = nf90_put_att(nid, id_rug, 'title', 'Rugosite') 639 634 640 635 ierr = nf90_def_var(nid, 'FTER', nf90_format, dims, id_fter) 641 ierr = nf _put_att_text(nid, id_fter, 'title',10,'Frac. Land')636 ierr = nf90_put_att(nid, id_fter, 'title','Frac. Land') 642 637 ierr = nf90_def_var(nid, 'FOCE', nf90_format, dims, id_foce) 643 ierr = nf _put_att_text(nid, id_foce, 'title',11,'Frac. Ocean')638 ierr = nf90_put_att(nid, id_foce, 'title','Frac. Ocean') 644 639 ierr = nf90_def_var(nid, 'FSIC', nf90_format, dims, id_fsic) 645 ierr = nf _put_att_text(nid, id_fsic, 'title',13,'Frac. Sea Ice')640 ierr = nf90_put_att(nid, id_fsic, 'title','Frac. Sea Ice') 646 641 ierr = nf90_def_var(nid, 'FLIC', nf90_format, dims, id_flic) 647 ierr = nf _put_att_text(nid, id_flic, 'title',14,'Frac. Land Ice')648 649 ierr = nf _enddef(nid)650 IF (ierr/=nf _noerr) THEN642 ierr = nf90_put_att(nid, id_flic, 'title','Frac. Land Ice') 643 644 ierr = nf90_enddef(nid) 645 IF (ierr/=nf90_noerr) THEN 651 646 WRITE (*, *) 'writelim error: failed to end define mode' 652 WRITE (*, *) nf _strerror(ierr)647 WRITE (*, *) nf90_strerror(ierr) 653 648 END IF 654 649 … … 657 652 DO k = 1, year_len 658 653 ierr = nf90_put_var(nid, id_tim, k, [k]) 659 IF (ierr/=nf _noerr) THEN654 IF (ierr/=nf90_noerr) THEN 660 655 WRITE (*, *) 'writelim error with temps(k),k=', k 661 WRITE (*, *) nf _strerror(ierr)656 WRITE (*, *) nf90_strerror(ierr) 662 657 END IF 663 658 END DO … … 670 665 IF (is_master) THEN 671 666 ierr = nf90_put_var(nid, id_nat, phy_glo) 672 IF (ierr/=nf _noerr) THEN667 IF (ierr/=nf90_noerr) THEN 673 668 WRITE (*, *) 'writelim error with phy_nat' 674 WRITE (*, *) nf _strerror(ierr)669 WRITE (*, *) nf90_strerror(ierr) 675 670 END IF 676 671 END IF … … 679 674 IF (is_master) THEN 680 675 ierr = nf90_put_var(nid, id_sst, phy_glo) 681 IF (ierr/=nf _noerr) THEN676 IF (ierr/=nf90_noerr) THEN 682 677 WRITE (*, *) 'writelim error with phy_sst' 683 WRITE (*, *) nf _strerror(ierr)678 WRITE (*, *) nf90_strerror(ierr) 684 679 END IF 685 680 END IF … … 688 683 IF (is_master) THEN 689 684 ierr = nf90_put_var(nid, id_bils, phy_glo) 690 IF (ierr/=nf _noerr) THEN685 IF (ierr/=nf90_noerr) THEN 691 686 WRITE (*, *) 'writelim error with phy_bil' 692 WRITE (*, *) nf _strerror(ierr)687 WRITE (*, *) nf90_strerror(ierr) 693 688 END IF 694 689 END IF … … 697 692 IF (is_master) THEN 698 693 ierr = nf90_put_var(nid, id_alb, phy_glo) 699 IF (ierr/=nf _noerr) THEN694 IF (ierr/=nf90_noerr) THEN 700 695 WRITE (*, *) 'writelim error with phy_alb' 701 WRITE (*, *) nf _strerror(ierr)696 WRITE (*, *) nf90_strerror(ierr) 702 697 END IF 703 698 END IF … … 706 701 IF (is_master) THEN 707 702 ierr = nf90_put_var(nid, id_rug, phy_glo) 708 IF (ierr/=nf _noerr) THEN703 IF (ierr/=nf90_noerr) THEN 709 704 WRITE (*, *) 'writelim error with phy_rug' 710 WRITE (*, *) nf _strerror(ierr)705 WRITE (*, *) nf90_strerror(ierr) 711 706 END IF 712 707 END IF … … 715 710 IF (is_master) THEN 716 711 ierr = nf90_put_var(nid, id_fter, phy_glo) 717 IF (ierr/=nf _noerr) THEN712 IF (ierr/=nf90_noerr) THEN 718 713 WRITE (*, *) 'writelim error with phy_fter' 719 WRITE (*, *) nf _strerror(ierr)714 WRITE (*, *) nf90_strerror(ierr) 720 715 END IF 721 716 END IF … … 724 719 IF (is_master) THEN 725 720 ierr = nf90_put_var(nid, id_foce, phy_glo) 726 IF (ierr/=nf _noerr) THEN721 IF (ierr/=nf90_noerr) THEN 727 722 WRITE (*, *) 'writelim error with phy_foce' 728 WRITE (*, *) nf _strerror(ierr)723 WRITE (*, *) nf90_strerror(ierr) 729 724 END IF 730 725 END IF … … 733 728 IF (is_master) THEN 734 729 ierr = nf90_put_var(nid, id_fsic, phy_glo) 735 IF (ierr/=nf _noerr) THEN730 IF (ierr/=nf90_noerr) THEN 736 731 WRITE (*, *) 'writelim error with phy_fsic' 737 WRITE (*, *) nf _strerror(ierr)732 WRITE (*, *) nf90_strerror(ierr) 738 733 END IF 739 734 END IF … … 742 737 IF (is_master) THEN 743 738 ierr = nf90_put_var(nid, id_flic, phy_glo) 744 IF (ierr/=nf _noerr) THEN739 IF (ierr/=nf90_noerr) THEN 745 740 WRITE (*, *) 'writelim error with phy_flic' 746 WRITE (*, *) nf _strerror(ierr)741 WRITE (*, *) nf90_strerror(ierr) 747 742 END IF 748 743 END IF … … 750 745 ! close file: 751 746 IF (is_master) THEN 752 ierr = nf _close(nid)747 ierr = nf90_close(nid) 753 748 END IF 754 749
Note: See TracChangeset
for help on using the changeset viewer.