Changeset 397 for trunk/LMDZ.MARS/util/concatnc.F90
- Timestamp:
- Nov 18, 2011, 12:49:09 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/util/concatnc.F90
r322 r397 16 16 ! of data (which is the case for outputs from 'zrecast') 17 17 ! (EM, April 2010) 18 ! + handle absence of ap() and bp() if aps and bps are available 19 ! (case of stats file) FF, November 2011 18 20 ! ******************************************************** 19 21 … … 748 750 logical :: phis ! is "phisinit" available ? 749 751 logical :: hybrid ! are "aps" and "bps" available ? 752 logical :: apbp ! are "ap" and "bp" available ? 750 753 751 754 !============================================================================== … … 797 800 if (ierr.ne.NF_NOERR) then 798 801 write(*,*) "Ooops. Failed to get ap ID. OK." 799 hybrid=.false.802 apbp=.false. 800 803 else 801 804 ierr=NF_GET_VAR_REAL(infid,tmpvarid,ap) 802 hybrid=.true.805 apbp=.true. 803 806 if (ierr.ne.NF_NOERR) then 804 807 stop "Error: Failed reading ap" … … 816 819 if (ierr.ne.NF_NOERR) then 817 820 write(*,*) "Ooops. Failed to get bp ID. OK." 818 hybrid=.false.821 apbp=.false. 819 822 else 820 823 ierr=NF_GET_VAR_REAL(infid,tmpvarid,bp) 821 hybrid=.true.824 apbp=.true. 822 825 if (ierr.ne.NF_NOERR) then 823 826 stop "Error: Failed reading bp" … … 900 903 endif 901 904 902 ! define ap 903 call def_var(nout,"ap","hybrid sigma at interlayers"," ",1,& 905 if (apbp) then 906 ! define ap 907 call def_var(nout,"ap","hybrid sigma at interlayers"," ",1,& 904 908 (/interlayerdimout/),apid,ierr) 905 if (ierr.ne.NF_NOERR) then906 stop "Error: Failed to def_var ap"907 endif909 if (ierr.ne.NF_NOERR) then 910 stop "Error: Failed to def_var ap" 911 endif 908 912 909 913 ! write ap 910 914 #ifdef NC_DOUBLE 911 ierr=NF_PUT_VAR_DOUBLE(outfid,apid,ap)912 #else 913 ierr=NF_PUT_VAR_REAL(outfid,apid,ap)914 #endif 915 if (ierr.ne.NF_NOERR) then916 stop "Error: Failed to write ap"917 endif915 ierr=NF_PUT_VAR_DOUBLE(outfid,apid,ap) 916 #else 917 ierr=NF_PUT_VAR_REAL(outfid,apid,ap) 918 #endif 919 if (ierr.ne.NF_NOERR) then 920 stop "Error: Failed to write ap" 921 endif 918 922 919 923 ! define bp 920 call def_var(nout,"bp","hybrid sigma at interlayers"," ",1,&924 call def_var(nout,"bp","hybrid sigma at interlayers"," ",1,& 921 925 (/interlayerdimout/),bpid,ierr) 922 if (ierr.ne.NF_NOERR) then 923 stop "Error: Failed to def_var bp" 924 endif 925 926 ! write bp 927 #ifdef NC_DOUBLE 928 ierr=NF_PUT_VAR_DOUBLE(outfid,bpid,bp) 929 #else 930 ierr=NF_PUT_VAR_REAL(outfid,bpid,bp) 931 #endif 932 if (ierr.ne.NF_NOERR) then 933 stop "Error: Failed to write bp" 934 endif 926 if (ierr.ne.NF_NOERR) then 927 stop "Error: Failed to def_var bp" 928 endif 929 930 ! write bp 931 #ifdef NC_DOUBLE 932 ierr=NF_PUT_VAR_DOUBLE(outfid,bpid,bp) 933 #else 934 ierr=NF_PUT_VAR_REAL(outfid,bpid,bp) 935 #endif 936 if (ierr.ne.NF_NOERR) then 937 stop "Error: Failed to write bp" 938 endif 939 endif ! of if (apbp) 935 940 936 941 else
Note: See TracChangeset
for help on using the changeset viewer.