Changeset 2313 for trunk/LMDZ.MARS/util/concatnc.F90
- Timestamp:
- May 7, 2020, 9:58:54 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/util/concatnc.F90
r2308 r2313 157 157 write(*,*) "Starting day to be stored in the output file time axis?" 158 158 write(*,*) "(e.g.: 100 if you want the output file to start at time=100 sols)" 159 read(*,*) starttimeoffset 159 write(*,*) "Your answer will bypass any starting day value stored in the 1st" 160 write(*,*) "input file. Conversely, just type return if you want this 1st file's" 161 write(*,*) "value to be kept for the output file starting day." 162 read(*,*,iostat=ierr) starttimeoffset 163 if (ierr.ne.0) then 164 ! if nothing or a character that is not a float is read 165 write(*,*) "1st input file's starting day will serve as starting day for the outfile." 166 firstsol='n' 167 else ! if the user gave a number 168 write(*,*) "Your input day will serve as starting day for the outfile." 169 firstsol='y' 170 endif 160 171 161 172 !============================================================================== … … 287 298 endif ! of if (tmpvar=="all") 288 299 289 ! Name of the new file290 !==========================================================291 !filename=var(1)292 !do i=2, nbvar293 ! filename=trim(adjustl(filename))//"_"//var(i)294 !enddo295 !filename=trim(adjustl(filename))//".nc"296 300 297 301 !============================================================================== … … 450 454 ierr = NF_GET_VAR_REAL(nid,altvar,alt) 451 455 #endif 452 firstsol = 'n' ! defaut value453 456 write(*,*) 454 457 if (ctllen .ne. 0) then 455 458 if (int(starttimeoffset) .ne. (int(ctlsol)+int(time(1))) ) then 456 459 write(*,*) "WARNING: Starting day of the first file is not ",& 457 int(starttimeoffset)," but ",int(ctlsol)+int(time(1)),"!" 458 write(*,*) "Answer:" 459 write(*,*) " y to use the starting day you have inputted" 460 write(*,*) " n to keep the starting day of the first file" 461 write(*,*) "as the starting day of the output file" 462 read(*,*) firstsol 460 int(starttimeoffset)," but ",int(ctlsol)+int(time(1)),"!" 463 461 endif 464 462 465 463 if (firstsol.eq.'y') then 466 write(*,*) "The day given by the user is used as the starting day of the ouput file"467 464 starttimeoffset = float(int(ctlsol)+int(time(1))) + ctl(27) - starttimeoffset 468 else ! if firstsol.eq.'n' or other (default case, for retrocompatibility with previous concatnc.def) 469 write(*,*) "The starting day of the 1st file is used as the starting day of the ouput file" 465 else ! if firstsol.eq.'n' 470 466 starttimeoffset = 0 471 467 endif 472 468 473 469 memotime=float(int(ctlsol)+int(time(1))) + ctl(27) 474 470 ctl(4) = 0. ! values written in the output … … 478 474 if (int(starttimeoffset) .ne. (int(time(1))) ) then 479 475 write(*,*) "WARNING: Starting day of the first file is not ",& 480 int(starttimeoffset)," but ",int(time(1)),"!" 481 write(*,*) "Answer:" 482 write(*,*) " y to use the starting day you have inputted" 483 write(*,*) " n to keep the starting day of the first file" 484 write(*,*) "as the starting day of the output file" 485 read(*,*) firstsol 476 int(starttimeoffset)," but ",int(time(1)),"!" 486 477 endif 487 478 488 479 if (firstsol.eq.'y') then 489 write(*,*) "The day given by the user is used as the starting day of the ouput file"490 480 starttimeoffset = int(time(1)) - starttimeoffset 491 else ! if firstsol.eq.'n' or other (default case, for retrocompatibility with previous concatnc.def) 492 write(*,*) "The starting day of the 1st file is used as the starting day of the ouput file" 481 else ! if firstsol.eq.'n' 493 482 starttimeoffset = 0 494 483 endif … … 499 488 ! Initialize output file's lat,lon,alt and time dimensions 500 489 write(*,*) 501 call initiate 490 call initiate(filename,lat,lon,alt,ctl,GCM_layers,nout,& 502 491 latdimout,londimout,altdimout,timedimout,& 503 492 layerdimout,interlayerdimout,timevarout,axis)
Note: See TracChangeset
for help on using the changeset viewer.