/[lmdze]/trunk/libf/test_disvert.f90
ViewVC logotype

Diff of /trunk/libf/test_disvert.f90

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 36 by guez, Mon Dec 14 15:25:16 2009 UTC revision 37 by guez, Tue Dec 21 15:45:48 2010 UTC
# Line 15  program test_disvert Line 15  program test_disvert
15    ! "s(l)" : à l'interface des couches "l" et "l-1"    ! "s(l)" : à l'interface des couches "l" et "l-1"
16    
17    real p(llm + 1) ! pressure at level, in Pa    real p(llm + 1) ! pressure at level, in Pa
18      real z(llm) ! pressure-altitude (km)
19    
20    !---------------------    !---------------------
21    
# Line 23  program test_disvert Line 24  program test_disvert
24    call disvert    call disvert
25    s = ap / pa + bp    s = ap / pa + bp
26    p = ap + bp * preff    p = ap + bp * preff
27      z = - 7. * log(ap(:llm) / preff + bp(:llm))
28    
29    call new_unit(unit)    call new_unit(unit)
30    open(unit, file="test_disvert.csv", status="replace", action="write")    open(unit, file="test_disvert.csv", status="replace", action="write")
31    write(unit, fmt=*) '"ap (hPa)" "bp" "s" "p (hPa)"' ! title line    ! Title line:
32    do l = 1, llm    write(unit, fmt=*) '"ap (hPa)" "bp" "s" "p (hPa)", "z (km)", "delta z (km)"'
33       write(unit, fmt=*) ap(l) / 100., bp(l), s(l), p(l) / 100.    do l = 1, llm - 1
34         write(unit, fmt=*) ap(l) / 100., bp(l), s(l), p(l) / 100., z(l), &
35              z(l+1) - z(l)
36    end do    end do
37      write(unit, fmt=*) ap(llm) / 100., bp(llm), s(llm), p(llm) / 100., z(llm)
38    close(unit)    close(unit)
39    print *, 'The file "test_disvert.csv" has been created.'    print *, 'The file "test_disvert.csv" has been created.'
40    

Legend:
Removed from v.36  
changed lines
  Added in v.37

  ViewVC Help
Powered by ViewVC 1.1.21