Changeset 2567 for trunk/LMDZ.MARS/util/lslin.F90
- Timestamp:
- Oct 5, 2021, 8:34:09 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/util/lslin.F90
r2450 r2567 131 131 write(*,*) 'Failed to open file '//infile 132 132 write(*,*) NF_STRERROR(ierr) 133 stop ""133 stop 134 134 endif 135 135 … … 149 149 write(*,*) "Failed to get number of dims for variable number:",start_var 150 150 write(*,*) NF_STRERROR(ierr) 151 stop ""151 stop 152 152 endif 153 153 enddo … … 188 188 write(*,*) 'ERROR: Field <latitude> is missing' 189 189 write(*,*) NF_STRERROR(ierr) 190 stop ""190 stop 191 191 endif 192 192 ierr=NF_INQ_DIMLEN(nid,latdim,latlen) … … 198 198 write(*,*) 'ERROR: Field <longitude> is missing' 199 199 write(*,*) NF_STRERROR(ierr) 200 stop ""200 stop 201 201 endif 202 202 ierr=NF_INQ_DIMLEN(nid,londim,lonlen) … … 208 208 write(*,*) 'ERROR: Field <altitude> is missing' 209 209 write(*,*) NF_STRERROR(ierr) 210 ! stop ""210 ! stop 211 211 altlen = 1 212 212 else … … 239 239 write(*,*) ' Dimension <index> is missing in file '//trim(infile) 240 240 ctllen=0 241 !stop ""241 !stop 242 242 endif 243 243 ierr=NF_INQ_VARID(nid,"controle",ctlvar) … … 245 245 write(*,*) 'Field <controle> is missing in file '//trim(infile) 246 246 ctllen=0 247 !stop ""247 !stop 248 248 else 249 249 ierr=NF_INQ_DIMLEN(nid,ctldim,ctllen) … … 289 289 write(*,*) 'ERROR: Dimension <Time> is missing' 290 290 write(*,*) NF_STRERROR(ierr) 291 stop ""291 stop 292 292 endif 293 293 ierr=NF_INQ_VARID(nid,"Time",timevar) … … 295 295 write(*,*) 'ERROR: Field <Time> is missing' 296 296 write(*,*) NF_STRERROR(ierr) 297 stop ""297 stop 298 298 endif 299 299 … … 407 407 408 408 do k=1,Nls 409 ierr= NF_PUT_VARA_REAL(nout,timevarout, k,1,timels(k))409 ierr= NF_PUT_VARA_REAL(nout,timevarout,(/k/),(/1/),timels(k)) 410 410 enddo 411 411 … … 426 426 write(*,*) 'ERROR: Field <',var(j),'> not found' 427 427 write(*,*) NF_STRERROR(ierr) 428 stop "Better stop now..." 428 write(*,*) "Better stop now..." 429 stop 429 430 endif 430 431 … … 589 590 if (ierr.ne.NF_NOERR) then 590 591 write(*,*) 'PUT_VAR ERROR: ',NF_STRERROR(ierr) 591 stop ""592 stop 592 593 endif 593 594 … … 716 717 WRITE(*,*)'ERROR: Impossible to create the file ',trim(filename) 717 718 write(*,*) NF_STRERROR(ierr) 718 stop ""719 stop 719 720 endif 720 721 … … 727 728 WRITE(*,*)'initiate: error failed to define dimension <latitude>' 728 729 write(*,*) NF_STRERROR(ierr) 729 stop ""730 stop 730 731 endif 731 732 ierr = NF_DEF_DIM(nout, "longitude", lonlen, londimout) … … 733 734 WRITE(*,*)'initiate: error failed to define dimension <longitude>' 734 735 write(*,*) NF_STRERROR(ierr) 735 stop ""736 stop 736 737 endif 737 738 ierr = NF_DEF_DIM(nout, "altitude", altlen, altdimout) … … 739 740 WRITE(*,*)'initiate: error failed to define dimension <altitude>' 740 741 write(*,*) NF_STRERROR(ierr) 741 stop ""742 stop 742 743 endif 743 744 if (size(ctl).ne.0) then … … 746 747 WRITE(*,*)'initiate: error failed to define dimension <index>' 747 748 write(*,*) NF_STRERROR(ierr) 748 stop ""749 stop 749 750 endif 750 751 endif … … 753 754 WRITE(*,*)'initiate: error failed to define dimension <Time>' 754 755 write(*,*) NF_STRERROR(ierr) 755 stop ""756 stop 756 757 endif 757 758 … … 761 762 WRITE(*,*)'initiate: error failed to switch out of define mode' 762 763 write(*,*) NF_STRERROR(ierr) 763 stop ""764 stop 764 765 endif 765 766 … … 785 786 WRITE(*,*)'initiate: error failed writing variable <latitude>' 786 787 write(*,*) NF_STRERROR(ierr) 787 stop ""788 stop 788 789 endif 789 790 … … 799 800 WRITE(*,*)'initiate: error failed writing variable <longitude>' 800 801 write(*,*) NF_STRERROR(ierr) 801 stop ""802 stop 802 803 endif 803 804 … … 822 823 WRITE(*,*)'initiate: error failed writing variable <altitude>' 823 824 write(*,*) NF_STRERROR(ierr) 824 stop ""825 stop 825 826 endif 826 827 … … 844 845 WRITE(*,*)'initiate: error failed writing variable <controle>' 845 846 write(*,*) NF_STRERROR(ierr) 846 stop ""847 stop 847 848 endif 848 849 endif … … 917 918 ierr=NF_GET_VAR_REAL(infid,tmpvarid,aps) 918 919 if (ierr.ne.NF_NOERR) then 919 stop "init2 error: Failed reading aps" 920 write(*,*) "init2 error: Failed reading aps" 921 stop 920 922 aps_ok=.false. 921 923 endif … … 945 947 ierr=NF_GET_VAR_REAL(infid,tmpvarid,bps) 946 948 if (ierr.ne.NF_NOERR) then 947 stop "init2 Error: Failed reading bps" 949 write(*,*) "init2 Error: Failed reading bps" 950 stop 948 951 bps_ok=.false. 949 952 endif … … 966 969 ierr=NF_GET_VAR_REAL(infid,tmpvarid,phisinit) 967 970 if (ierr.ne.NF_NOERR) then 968 stop "init2 Error: Failed reading phisinit" 971 write(*,*) "init2 Error: Failed reading phisinit" 972 stop 969 973 endif 970 974 phis = .true. … … 985 989 (/altdimout/),apsid,ierr) 986 990 if (ierr.ne.NF_NOERR) then 987 stop "Error: Failed to def_var aps" 991 write(*,*) "Error: Failed to def_var aps" 992 stop 988 993 endif 989 994 … … 991 996 ierr=NF_PUT_VAR_REAL(outfid,apsid,aps) 992 997 if (ierr.ne.NF_NOERR) then 993 stop "Error: Failed to write aps" 998 write(*,*) "Error: Failed to write aps" 999 stop 994 1000 endif 995 1001 ENDIF ! of IF (aps_ok) … … 1000 1006 (/altdimout/),bpsid,ierr) 1001 1007 if (ierr.ne.NF_NOERR) then 1002 stop "Error: Failed to def_var bps" 1008 write(*,*) "Error: Failed to def_var bps" 1009 stop 1003 1010 endif 1004 1011 … … 1006 1013 ierr=NF_PUT_VAR_REAL(outfid,bpsid,bps) 1007 1014 if (ierr.ne.NF_NOERR) then 1008 stop "Error: Failed to write bps" 1015 write(*,*) "Error: Failed to write bps" 1016 stop 1009 1017 endif 1010 1018 ENDIF ! of IF (bps_ok) … … 1020 1028 (/londimout,latdimout/),phisinitid,ierr) 1021 1029 if (ierr.ne.NF_NOERR) then 1022 stop "Error: Failed to def_var phisinit" 1030 write(*,*) "Error: Failed to def_var phisinit" 1031 stop 1023 1032 endif 1024 1033 … … 1026 1035 ierr=NF_PUT_VAR_REAL(outfid,phisinitid,phisinit) 1027 1036 if (ierr.ne.NF_NOERR) then 1028 stop "Error: Failed to write phisinit" 1037 write(*,*) "Error: Failed to write phisinit" 1038 stop 1029 1039 endif 1030 1040 … … 1141 1151 ! print*,'missing_value: valid_range attribution failed' 1142 1152 ! print*, NF_STRERROR(ierr) 1143 ! stop ""1153 ! stop 1144 1154 !endif 1145 1155 !********************************************************* … … 1150 1160 print*, 'missing_value: missing value attribution failed' 1151 1161 print*, NF_STRERROR(ierr) 1152 stop ""1162 stop 1153 1163 endif 1154 1164
Note: See TracChangeset
for help on using the changeset viewer.