/[lmdze]/trunk/Sources/dyn3d/Dissipation/inidissip.f
ViewVC logotype

Diff of /trunk/Sources/dyn3d/Dissipation/inidissip.f

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

revision 64 by guez, Wed Aug 29 14:47:17 2012 UTC revision 65 by guez, Thu Sep 20 09:57:03 2012 UTC
# Line 8  module inidissip_m Line 8  module inidissip_m
8    
9    REAL dtdiss ! in s    REAL dtdiss ! in s
10    integer idissip ! période de la dissipation (en pas de temps)    integer idissip ! période de la dissipation (en pas de temps)
11    real tetaudiv(llm), tetaurot(llm), tetah(llm) ! in s    real tetaudiv(llm), tetaurot(llm), tetah(llm) ! in s-1
12    real cdivu, crot, cdivh    real cdivu, crot, cdivh
13    
14  contains  contains
# Line 26  contains Line 26  contains
26      USE comvert, ONLY: preff, presnivs      USE comvert, ONLY: preff, presnivs
27      USE conf_gcm_m, ONLY: iperiod      USE conf_gcm_m, ONLY: iperiod
28      USE dimens_m, ONLY: iim, jjm      USE dimens_m, ONLY: iim, jjm
29        use divgrad2_m, only: divgrad2
30      use filtreg_m, only: filtreg      use filtreg_m, only: filtreg
31      use gradiv2_m, only: gradiv2      use gradiv2_m, only: gradiv2
32      use jumble, only: new_unit      use jumble, only: new_unit
33        use nxgraro2_m, only: nxgraro2
34      USE paramet_m, ONLY: jjp1      USE paramet_m, ONLY: jjp1
35    
36      ! Variables local to the procedure:      ! Variables local to the procedure:
# Line 87  contains Line 89  contains
89      CALL filtreg(zv, jjm, 1, 2, 1, .FALSE.)      CALL filtreg(zv, jjm, 1, 2, 1, .FALSE.)
90    
91      DO l = 1, 50      DO l = 1, 50
92         CALL nxgraro2(1, zu, zv, nitergrot, gx, gy, -1.)         CALL nxgraro2(zu, zv, nitergrot, gx, gy, -1.)
93         zllm = max(abs(maxval(gx)), abs(maxval(gy)))         zllm = max(abs(maxval(gx)), abs(maxval(gy)))
94         zu = gx / zllm         zu = gx / zllm
95         zv = gy / zllm         zv = gy / zllm
# Line 104  contains Line 106  contains
106      tetaurot = zvert / tetagrot      tetaurot = zvert / tetagrot
107      tetah = zvert / tetatemp      tetah = zvert / tetatemp
108    
     call new_unit(unit)  
     open(unit, file="inidissip.csv", status="replace", action="write")  
     write(unit, fmt=*) '"tetaudiv (s)" "tetaurot (s)" "tetah (s)"' ! title line  
     do l = 1, llm  
        write(unit, fmt=*) tetaudiv(l), tetaurot(l), tetah(l)  
     end do  
     close(unit)  
     print *, 'Created file "inidissip.csv".'  
   
109      max_zvert = maxval(zvert)      max_zvert = maxval(zvert)
110      tetamin = min(1e6, tetagdiv / max_zvert, tetagrot / max_zvert, &      tetamin = min(1e6, tetagdiv / max_zvert, tetagrot / max_zvert, &
111           tetatemp / max_zvert)           tetatemp / max_zvert)
# Line 122  contains Line 115  contains
115      dtdiss = idissip * dtvr      dtdiss = idissip * dtvr
116      PRINT *, 'dtdiss = ', dtdiss, "s"      PRINT *, 'dtdiss = ', dtdiss, "s"
117    
118        call new_unit(unit)
119        open(unit, file="inidissip.csv", status="replace", action="write")
120    
121        ! Title line:
122        write(unit, fmt=*) '"presnivs (hPa)" "dtdiss * tetaudiv" ' &
123             // '"dtdiss * tetaurot" "dtdiss * tetah"'
124    
125        do l = 1, llm
126           write(unit, fmt=*) presnivs(l) / 100., dtdiss * tetaudiv(l), &
127                dtdiss * tetaurot(l), dtdiss * tetah(l)
128        end do
129        close(unit)
130        print *, 'Created file "inidissip.csv".'
131    
132    END SUBROUTINE inidissip    END SUBROUTINE inidissip
133    
134  end module inidissip_m  end module inidissip_m

Legend:
Removed from v.64  
changed lines
  Added in v.65

  ViewVC Help
Powered by ViewVC 1.1.21