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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 227 - (hide annotations)
Thu Nov 2 15:47:03 2017 UTC (6 years, 6 months ago) by guez
File size: 1594 byte(s)
Rename phisinit to phis in restart.nc: clearer, same name as Fortran variable.

In aaam_bud, use rlat and rlon from phyetat0_m instead of having these
module variables associated to actual arguments in physiq.

In clmain, too many wind variables make the procedure hard to
understand. Use yu(:knon, 1) and yv(:knon, 1) instead of u1lay(:knon)
and v1lay(:knon). Note that when yu(:knon, 1) and yv(:knon, 1) are
used as actual arguments, they are probably copied to new arrays since
the elements are not contiguous. Rename yu10m to wind10m because this
is the norm of wind vector, not its zonal component. Rename yustar to
ustar. Rename uzon and vmer to u1 and v1 since these are wind
components at first layer and u1 and v1 are the names of corresponding
dummy arguments in stdlevvar.

In clmain, rename yzlev to zlev.

In clmain, screenc, stdlevvar and coefcdrag, remove the code
corresponding to zxli true (not used in LMDZ either).

Subroutine ustarhb becomes a function. Simplifications using the fact
that zx_alf2 = 0 and zx_alf1 = 1 (discarding the possibility to change
this).

In procedure vdif_kcay, remove unused dummy argument plev. Remove
useless computations of sss and sssq.

In clouds_gno, exp(100.) would overflow in single precision. Set
maximum to exp(80.) instead.

In physiq, use u(:, 1) and v(:, 1) as arguments to phytrac instead of
creating ad hoc variables yu1 and yv1.

In stdlevvar, rename dummy argument u_10m to wind10m, following the
corresponding modification in clmain. Simplifications using the fact
that ok_pred = 0 and ok_corr = 1 (discarding the possibility to change
this).

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 227 use abort_gcm_m, only: abort_gcm
14     USE indicesol, ONLY: nbsrf, clnsurf
15 guez 69 USE dimphy, ONLY: klev, klon
16 guez 70 use nr_util, only: ifirstloc
17 guez 227 use phyetat0_m, only: rlon, rlat
18 guez 3
19 guez 222 REAL, intent(in):: t_seri(:, :) ! (klon, klev)
20     REAL, intent(in):: ftsol(:, :) ! (klon, nbsrf)
21 guez 3
22     ! Variables local to the procedure:
23    
24     real, parameter:: temp_min = 50., temp_max = 370. ! temperature range, in K
25 guez 70 INTEGER k, nsrf, jbad
26 guez 3
27     !----------------------------------------------------------
28    
29     DO k = 1, klev
30 guez 222 jbad = ifirstloc(t_seri(:, k) > temp_max .or. t_seri(:, k) < temp_min)
31 guez 70 if (jbad <= klon) then
32 guez 222 print *, "t_seri(", jbad, ", ", k, ") = ", t_seri(jbad, k)
33 guez 227 call abort_gcm('hgardfou', 'temperature out of range')
34 guez 70 end if
35 guez 3 ENDDO
36    
37     DO nsrf = 1, nbsrf
38 guez 207 jbad = ifirstloc(ftsol(:, nsrf) > temp_max &
39     .or. ftsol(:, nsrf) < temp_min)
40 guez 70 if (jbad <= klon) then
41 guez 227 print *, "ftsol(position index =", jbad, ", sub-surface index =", &
42     nsrf, ") =", ftsol(jbad, nsrf)
43     print *, "sub-surface name: ", clnsurf(nsrf)
44     print *, "longitude:", rlon(jbad), "degrees east"
45     print *, "latitude:", rlat(jbad), "degrees north"
46     call abort_gcm('hgardfou', 'temperature out of range')
47 guez 3 ENDIF
48     ENDDO
49    
50     END SUBROUTINE hgardfou
51    
52     end module hgardfou_m

  ViewVC Help
Powered by ViewVC 1.1.21