Changeset 293 for trunk/LMDZ.MARS/util
- Timestamp:
- Sep 13, 2011, 9:19:35 AM (13 years ago)
- Location:
- trunk/LMDZ.MARS/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/util/README.exec
r282 r293 151 151 coordinate in the input file), one per line, at which values are 152 152 sought 153 - output values are given on standard output; with extraction mode 1 as 154 lines of "lon lat alt Ls LT value" an for a profile (extraction mode 2) 155 as lines of "alt value" 153 - output values are sent to (ASCII) output file 'infile_var_.dat', where 154 'infile' is the input file name (without trailing '.nc') and 155 'var' is the sought variable, for extraction mode 1 as 156 lines of "lon lat alt Ls LT value" and for a profile (extraction mode 2) 157 as lines of "alt value" 158 156 159 NB: If there is no data to do an appropriate interpolation to extract 157 160 the sought value, then a "missing_value" (taken from the variable's -
trunk/LMDZ.MARS/util/extract.F90
r282 r293 18 18 ! coordinate in the input file), one per line, at which values are 19 19 ! sought 20 ! - output values are given on standard output; with extraction mode 1 as 21 ! lines of "lon lat alt Ls LT value" an for a profile (extraction mode 2) 20 ! - output values are sent to (ASCII) output file 'infile_var_.dat', where 21 ! 'infile' is the input file name (without trailing '.nc') and 22 ! 'var' is the sought variable, for extraction mode 1 as 23 ! lines of "lon lat alt Ls LT value" and for a profile (extraction mode 2) 22 24 ! as lines of "alt value" 23 25 ! … … 33 35 ! Input file: 34 36 character(len=256) :: infile 37 character(len=256) :: outfile 35 38 36 39 character (len=64) :: text ! to store some text … … 310 313 ! 2. Process and interpolate 311 314 !=============================================================================== 315 316 !=============================================================================== 317 ! 2.1 Create output file 318 !=============================================================================== 319 320 outfile=trim(infile(1:index(infile,".nc",back=.true.)-1))//"_"//& 321 trim(varname)//".dat" 322 open(42,file=outfile,form="formatted") 323 write(*,*) "Output file is: ",trim(outfile) 324 325 !=============================================================================== 326 ! 2.2 Extract values 327 !=============================================================================== 328 312 329 if (extract_mode==1) then ! pointwise extraction 313 330 write(*,*) " Enter values of: lon lat alt Ls LT (all on the same line," … … 370 387 ! 2.4 Write value to output 371 388 if (extract_mode==1) then ! pointwise extraction 372 write( *,'(6(1x,1pe12.5))')lon,lat,alt,Ls,LT,value389 write(42,'(6(1x,1pe12.5))')lon,lat,alt,Ls,LT,value 373 390 else ! profile 374 write( *,'(6(1x,1pe12.5))')alt,value391 write(42,'(6(1x,1pe12.5))')alt,value 375 392 endif 376 393 enddo ! of do while 377 394 395 ! close output file 396 close(42) 378 397 379 398 end program extract
Note: See TracChangeset
for help on using the changeset viewer.