/[lmdze]/trunk/Sources/dyn3d/test_disvert.f
ViewVC logotype

Diff of /trunk/Sources/dyn3d/test_disvert.f

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

revision 107 by guez, Thu Sep 11 15:09:15 2014 UTC revision 116 by guez, Thu Dec 4 16:35:03 2014 UTC
# Line 42  contains Line 42  contains
42      call exner_hyb(ps, p, pks, pk)      call exner_hyb(ps, p, pks, pk)
43      p_lay = preff * (pk(:, 1, :) / cpp)**(1. / kappa)      p_lay = preff * (pk(:, 1, :) / cpp)**(1. / kappa)
44    
     ! Are pressure values in the right order?  
     if (any(p(:, 1, :llm) <= p_lay .or. p_lay <= p(:, 1, 2:))) then  
        ! List details and stop:  
        do l = 1, llm  
           do i = 1, ngrid  
              if (p(i, 1, l) <= p_lay(i, l)) then  
                 print 1000, "ps = ", ps(i, 1) / 100., "hPa, p(level ",  l, &  
                      ") = ", p(i, 1, l) / 100., " hPa <= p(layer ", l, ") = ", &  
                      p_lay(i, l) / 100., " hPa"  
              end if  
              if (p_lay(i, l) <= p(i, 1, l+1)) then  
                 print 1000, "ps = ", ps(i, 1) / 100., &  
                      "hPa, p(layer ", l, ") = ", p_lay(i, l) / 100., &  
                      " hPa <= p(level ", l + 1, ") = ", &  
                      p(i, 1, l + 1) / 100., " hPa"  
              end if  
           end do  
        end do  
        call abort_gcm("test_disvert", "bad order of pressure values", 1)  
     end if  
   
45      ! Write distribution for the reference surface pressure (index ngrid):      ! Write distribution for the reference surface pressure (index ngrid):
46    
47      z = 7. * log(preff / p(ngrid, 1, :llm))      z = 7. * log(preff / p(ngrid, 1, :llm))
# Line 90  contains Line 69  contains
69      close(unit)      close(unit)
70      print *, 'The file "full_level.csv" has been created.'      print *, 'The file "full_level.csv" has been created.'
71    
72        ! Are pressure values in the right order?
73        if (any(p(:, 1, :llm) <= p_lay .or. p_lay <= p(:, 1, 2:))) then
74           ! List details and stop:
75           do l = 1, llm
76              do i = 1, ngrid
77                 if (p(i, 1, l) <= p_lay(i, l)) then
78                    print 1000, "ps = ", ps(i, 1) / 100., "hPa, p(level ",  l, &
79                         ") = ", p(i, 1, l) / 100., " hPa <= p(layer ", l, ") = ", &
80                         p_lay(i, l) / 100., " hPa"
81                 end if
82                 if (p_lay(i, l) <= p(i, 1, l+1)) then
83                    print 1000, "ps = ", ps(i, 1) / 100., &
84                         "hPa, p(layer ", l, ") = ", p_lay(i, l) / 100., &
85                         " hPa <= p(level ", l + 1, ") = ", &
86                         p(i, 1, l + 1) / 100., " hPa"
87                 end if
88              end do
89           end do
90           call abort_gcm("test_disvert", "bad order of pressure values", 1)
91        end if
92    
93  1000 format (3(a, g10.4, a, i0))  1000 format (3(a, g10.4, a, i0))
94    
95    end subroutine test_disvert    end subroutine test_disvert

Legend:
Removed from v.107  
changed lines
  Added in v.116

  ViewVC Help
Powered by ViewVC 1.1.21