/[lmdze]/trunk/Sources/phylmd/hgardfou.f
ViewVC logotype

Annotation of /trunk/Sources/phylmd/hgardfou.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 222 - (hide annotations)
Tue Apr 25 15:31:48 2017 UTC (7 years ago) by guez
File size: 1301 byte(s)
In interfsurf_hq, changed names of variables : tsurf becomes ts (name of
actual argument), tsurf_temp  can then become simply tsurf.

1 guez 3 module hgardfou_m
2    
3     IMPLICIT none
4    
5     contains
6    
7 guez 222 SUBROUTINE hgardfou(t_seri, ftsol)
8 guez 3
9 guez 221 ! From phylmd/hgardfou.F, v 1.1.1.1, 2004/05/19 12:53:07
10 guez 3
11     ! This procedure aborts the program if the temperature gets out of range.
12    
13 guez 69 USE indicesol, ONLY: nbsrf
14     USE dimphy, ONLY: klev, klon
15 guez 70 use nr_util, only: ifirstloc
16 guez 3
17 guez 222 REAL, intent(in):: t_seri(:, :) ! (klon, klev)
18     REAL, intent(in):: ftsol(:, :) ! (klon, nbsrf)
19 guez 3
20     ! Variables local to the procedure:
21    
22     real, parameter:: temp_min = 50., temp_max = 370. ! temperature range, in K
23 guez 70 INTEGER k, nsrf, jbad
24 guez 3
25     !----------------------------------------------------------
26    
27     DO k = 1, klev
28 guez 222 jbad = ifirstloc(t_seri(:, k) > temp_max .or. t_seri(:, k) < temp_min)
29 guez 70 if (jbad <= klon) then
30     PRINT *, 'hgardfou: temperature out of range'
31 guez 222 print *, "t_seri(", jbad, ", ", k, ") = ", t_seri(jbad, k)
32 guez 70 stop 1
33     end if
34 guez 3 ENDDO
35    
36     DO nsrf = 1, nbsrf
37 guez 207 jbad = ifirstloc(ftsol(:, nsrf) > temp_max &
38     .or. ftsol(:, nsrf) < temp_min)
39 guez 70 if (jbad <= klon) then
40     PRINT *, 'hgardfou: temperature out of range'
41 guez 207 print *, "ftsol(", jbad, ", ", nsrf, ") = ", ftsol(jbad, nsrf)
42 guez 70 stop 1
43 guez 3 ENDIF
44     ENDDO
45    
46     END SUBROUTINE hgardfou
47    
48     end module hgardfou_m

  ViewVC Help
Powered by ViewVC 1.1.21