Changeset 5249 for LMDZ6/trunk/libf/phylmdiso
- Timestamp:
- Oct 22, 2024, 11:35:08 AM (5 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmdiso/phyaqua_mod.F90
r5084 r5249 593 593 USE mod_phys_lmdz_transfert_para, ONLY: gather 594 594 USE phys_cal_mod, ONLY: year_len 595 USE netcdf, ONLY: nf90_put_var, nf90_def_var 596 USE lmdz_cppkeys_wrapper, ONLY: nf90_format 595 597 IMPLICIT NONE 596 598 include "netcdf.inc" … … 636 638 dims(2) = ntim 637 639 638 #ifdef NC_DOUBLE 639 ierr = nf_def_var(nid, 'TEMPS', nf_double, 1, ntim, id_tim) 640 #else 641 ierr = nf_def_var(nid, 'TEMPS', nf_float, 1, ntim, id_tim) 642 #endif 640 ierr = nf90_def_var(nid, 'TEMPS', nf90_format, ntim, id_tim) 643 641 ierr = nf_put_att_text(nid, id_tim, 'title', 17, 'Jour dans l annee') 644 642 645 #ifdef NC_DOUBLE 646 ierr = nf_def_var(nid, 'NAT', nf_double, 2, dims, id_nat) 647 #else 648 ierr = nf_def_var(nid, 'NAT', nf_float, 2, dims, id_nat) 649 #endif 643 ierr = nf90_def_var(nid, 'NAT', nf90_format, dims, id_nat) 650 644 ierr = nf_put_att_text(nid, id_nat, 'title', 23, & 651 645 'Nature du sol (0,1,2,3)') 652 646 653 #ifdef NC_DOUBLE 654 ierr = nf_def_var(nid, 'SST', nf_double, 2, dims, id_sst) 655 #else 656 ierr = nf_def_var(nid, 'SST', nf_float, 2, dims, id_sst) 657 #endif 647 ierr = nf90_def_var(nid, 'SST', nf90_format, dims, id_sst) 658 648 ierr = nf_put_att_text(nid, id_sst, 'title', 35, & 659 649 'Temperature superficielle de la mer') 660 650 661 #ifdef NC_DOUBLE 662 ierr = nf_def_var(nid, 'BILS', nf_double, 2, dims, id_bils) 663 #else 664 ierr = nf_def_var(nid, 'BILS', nf_float, 2, dims, id_bils) 665 #endif 651 ierr = nf90_def_var(nid, 'BILS', nf90_format, dims, id_bils) 666 652 ierr = nf_put_att_text(nid, id_bils, 'title', 32, & 667 653 'Reference flux de chaleur au sol') 668 654 669 #ifdef NC_DOUBLE 670 ierr = nf_def_var(nid, 'ALB', nf_double, 2, dims, id_alb) 671 #else 672 ierr = nf_def_var(nid, 'ALB', nf_float, 2, dims, id_alb) 673 #endif 655 ierr = nf90_def_var(nid, 'ALB', nf90_format, dims, id_alb) 674 656 ierr = nf_put_att_text(nid, id_alb, 'title', 19, 'Albedo a la surface') 675 657 676 #ifdef NC_DOUBLE 677 ierr = nf_def_var(nid, 'RUG', nf_double, 2, dims, id_rug) 678 #else 679 ierr = nf_def_var(nid, 'RUG', nf_float, 2, dims, id_rug) 680 #endif 658 ierr = nf90_def_var(nid, 'RUG', nf90_format, dims, id_rug) 681 659 ierr = nf_put_att_text(nid, id_rug, 'title', 8, 'Rugosite') 682 660 683 #ifdef NC_DOUBLE 684 ierr = nf_def_var(nid, 'FTER', nf_double, 2, dims, id_fter) 685 #else 686 ierr = nf_def_var(nid, 'FTER', nf_float, 2, dims, id_fter) 687 #endif 661 ierr = nf90_def_var(nid, 'FTER', nf90_format, dims, id_fter) 688 662 ierr = nf_put_att_text(nid, id_fter, 'title',10,'Frac. Land') 689 #ifdef NC_DOUBLE 690 ierr = nf_def_var(nid, 'FOCE', nf_double, 2, dims, id_foce) 691 #else 692 ierr = nf_def_var(nid, 'FOCE', nf_float, 2, dims, id_foce) 693 #endif 663 ierr = nf90_def_var(nid, 'FOCE', nf90_format, dims, id_foce) 694 664 ierr = nf_put_att_text(nid, id_foce, 'title',11,'Frac. Ocean') 695 #ifdef NC_DOUBLE 696 ierr = nf_def_var(nid, 'FSIC', nf_double, 2, dims, id_fsic) 697 #else 698 ierr = nf_def_var(nid, 'FSIC', nf_float, 2, dims, id_fsic) 699 #endif 665 ierr = nf90_def_var(nid, 'FSIC', nf90_format, dims, id_fsic) 700 666 ierr = nf_put_att_text(nid, id_fsic, 'title',13,'Frac. Sea Ice') 701 #ifdef NC_DOUBLE 702 ierr = nf_def_var(nid, 'FLIC', nf_double, 2, dims, id_flic) 703 #else 704 ierr = nf_def_var(nid, 'FLIC', nf_float, 2, dims, id_flic) 705 #endif 667 ierr = nf90_def_var(nid, 'FLIC', nf90_format, dims, id_flic) 706 668 ierr = nf_put_att_text(nid, id_flic, 'title',14,'Frac. Land Ice') 707 669 … … 715 677 ! write the 'times' 716 678 DO k = 1, year_len 717 #ifdef NC_DOUBLE 718 ierr = nf_put_var1_double(nid, id_tim, k, dble(k)) 719 #else 720 ierr = nf_put_var1_real(nid, id_tim, k, float(k)) 721 #endif 679 ierr = nf90_put_var(nid, id_tim, k, [k]) 722 680 IF (ierr/=nf_noerr) THEN 723 681 WRITE (*, *) 'writelim error with temps(k),k=', k … … 732 690 CALL gather(phy_nat, phy_glo) 733 691 IF (is_master) THEN 734 #ifdef NC_DOUBLE 735 ierr = nf_put_var_double(nid, id_nat, phy_glo) 736 #else 737 ierr = nf_put_var_real(nid, id_nat, phy_glo) 738 #endif 692 ierr = nf90_put_var(nid, id_nat, phy_glo) 739 693 IF (ierr/=nf_noerr) THEN 740 694 WRITE (*, *) 'writelim error with phy_nat' … … 745 699 CALL gather(phy_sst, phy_glo) 746 700 IF (is_master) THEN 747 #ifdef NC_DOUBLE 748 ierr = nf_put_var_double(nid, id_sst, phy_glo) 749 #else 750 ierr = nf_put_var_real(nid, id_sst, phy_glo) 751 #endif 701 ierr = nf90_put_var(nid, id_sst, phy_glo) 752 702 IF (ierr/=nf_noerr) THEN 753 703 WRITE (*, *) 'writelim error with phy_sst' … … 758 708 CALL gather(phy_bil, phy_glo) 759 709 IF (is_master) THEN 760 #ifdef NC_DOUBLE 761 ierr = nf_put_var_double(nid, id_bils, phy_glo) 762 #else 763 ierr = nf_put_var_real(nid, id_bils, phy_glo) 764 #endif 710 ierr = nf90_put_var(nid, id_bils, phy_glo) 765 711 IF (ierr/=nf_noerr) THEN 766 712 WRITE (*, *) 'writelim error with phy_bil' … … 771 717 CALL gather(phy_alb, phy_glo) 772 718 IF (is_master) THEN 773 #ifdef NC_DOUBLE 774 ierr = nf_put_var_double(nid, id_alb, phy_glo) 775 #else 776 ierr = nf_put_var_real(nid, id_alb, phy_glo) 777 #endif 719 ierr = nf90_put_var(nid, id_alb, phy_glo) 778 720 IF (ierr/=nf_noerr) THEN 779 721 WRITE (*, *) 'writelim error with phy_alb' … … 784 726 CALL gather(phy_rug, phy_glo) 785 727 IF (is_master) THEN 786 #ifdef NC_DOUBLE 787 ierr = nf_put_var_double(nid, id_rug, phy_glo) 788 #else 789 ierr = nf_put_var_real(nid, id_rug, phy_glo) 790 #endif 728 ierr = nf90_put_var(nid, id_rug, phy_glo) 791 729 IF (ierr/=nf_noerr) THEN 792 730 WRITE (*, *) 'writelim error with phy_rug' … … 797 735 CALL gather(phy_fter, phy_glo) 798 736 IF (is_master) THEN 799 #ifdef NC_DOUBLE 800 ierr = nf_put_var_double(nid, id_fter, phy_glo) 801 #else 802 ierr = nf_put_var_real(nid, id_fter, phy_glo) 803 #endif 737 ierr = nf90_put_var(nid, id_fter, phy_glo) 804 738 IF (ierr/=nf_noerr) THEN 805 739 WRITE (*, *) 'writelim error with phy_fter' … … 810 744 CALL gather(phy_foce, phy_glo) 811 745 IF (is_master) THEN 812 #ifdef NC_DOUBLE 813 ierr = nf_put_var_double(nid, id_foce, phy_glo) 814 #else 815 ierr = nf_put_var_real(nid, id_foce, phy_glo) 816 #endif 746 ierr = nf90_put_var(nid, id_foce, phy_glo) 817 747 IF (ierr/=nf_noerr) THEN 818 748 WRITE (*, *) 'writelim error with phy_foce' … … 823 753 CALL gather(phy_fsic, phy_glo) 824 754 IF (is_master) THEN 825 #ifdef NC_DOUBLE 826 ierr = nf_put_var_double(nid, id_fsic, phy_glo) 827 #else 828 ierr = nf_put_var_real(nid, id_fsic, phy_glo) 829 #endif 755 ierr = nf90_put_var(nid, id_fsic, phy_glo) 830 756 IF (ierr/=nf_noerr) THEN 831 757 WRITE (*, *) 'writelim error with phy_fsic' … … 836 762 CALL gather(phy_flic, phy_glo) 837 763 IF (is_master) THEN 838 #ifdef NC_DOUBLE 839 ierr = nf_put_var_double(nid, id_flic, phy_glo) 840 #else 841 ierr = nf_put_var_real(nid, id_flic, phy_glo) 842 #endif 764 ierr = nf90_put_var(nid, id_flic, phy_glo) 843 765 IF (ierr/=nf_noerr) THEN 844 766 WRITE (*, *) 'writelim error with phy_flic'
Note: See TracChangeset
for help on using the changeset viewer.