Changeset 1118 for trunk/LMDZ.MARS/util/concatnc.F90
- Timestamp:
- Nov 25, 2013, 5:40:00 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/util/concatnc.F90
r1073 r1118 27 27 character (len=80), dimension(1000) :: file 28 28 ! file(): input file(s) names(s) 29 character (len=30), dimension(1 5) :: notconcat30 ! notconcat(): names of the (1 5) variables that won't be concatenated29 character (len=30), dimension(16) :: notconcat 30 ! notconcat(): names of the (16) variables that won't be concatenated 31 31 character (len=50), dimension(:), allocatable :: var 32 32 ! var(): name(s) of variable(s) that will be concatenated … … 192 192 notconcat(14)='aire' 193 193 notconcat(15)='phisinit' 194 notconcat(16)='soildepth' 195 194 196 195 197 !============================================================================== … … 202 204 ! vartmp now contains the "name" of variable of ID # i 203 205 var_ok=0 204 do inter=1, 15206 do inter=1,size(notconcat) 205 207 if (vartmp.eq.notconcat(inter)) then 206 208 var_ok=1 207 209 Nnotconcat=Nnotconcat+1 208 210 endif 209 enddo 211 enddo 210 212 if (var_ok.eq.0) write(*,*) trim(vartmp) 211 213 enddo … … 249 251 ! Variables names from the file are catched 250 252 nbvar=nbvarfile-Nnotconcat 251 do i=1,nbvar 252 ierr=nf_inq_varname(nid,i+Nnotconcat,var(i)) 253 write(*,'(a9,1x,i2,1x,a1,1x,a50)') "variable ",i,":",var(i) 253 j=1 254 do i=1,nbvarfile 255 ierr=nf_inq_varname(nid,i,vartmp) 256 var_ok=0 257 do inter=1,size(notconcat) 258 if (vartmp.eq.notconcat(inter)) then 259 var_ok=1 260 endif 261 enddo 262 if (var_ok.eq.0) then 263 if (j .gt. nbvar) then 264 write(*,*) "PROBLEM HERE !", var 265 stop 266 endif 267 var(j) = vartmp 268 write(*,'(a9,1x,i2,1x,a1,1x,a50)') "variable ",j,":",var(j) 269 j=j+1 270 endif 254 271 enddo 255 272 else if(nbvar==0) then … … 379 396 modulo(int(memotime),669)," but ",modulo(int(ctl(4)),669),"!!" 380 397 write(*,*) "Starting day of the run has been corrected." 381 memotime=float(modulo(int(ctl(4)),669)) 398 memotime=float(modulo(int(ctl(4)),669)) + ctl(27) 399 ctl(4) = 0. 400 ctl(27) = 0. 382 401 endif 383 402 endif … … 746 765 ierr = NF_REDEF (nout) 747 766 748 767 #ifdef NC_DOUBLE 749 768 ierr = NF_DEF_VAR (nout,"controle",NF_DOUBLE,1,ctldimout,nvarid) 750 769 #else 751 770 ierr = NF_DEF_VAR (nout,"controle",NF_FLOAT,1,ctldimout,nvarid) 752 771 #endif 753 772 754 773 ierr = NF_PUT_ATT_TEXT (nout,nvarid,"title",18,"Control parameters") … … 757 776 ierr = NF_ENDDEF(nout) 758 777 759 778 #ifdef NC_DOUBLE 760 779 ierr = NF_PUT_VAR_DOUBLE (nout,nvarid,ctl) 761 780 #else 762 781 ierr = NF_PUT_VAR_REAL (nout,nvarid,ctl) 763 782 #endif 764 783 endif 765 784
Note: See TracChangeset
for help on using the changeset viewer.