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

Diff of /trunk/Sources/phylmd/ini_histins.f

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

revision 159 by guez, Tue Jul 21 15:29:52 2015 UTC revision 191 by guez, Mon May 9 19:56:28 2016 UTC
# Line 2  module ini_histins_m Line 2  module ini_histins_m
2    
3    implicit none    implicit none
4    
5      integer, save:: nid_ins
6    
7  contains  contains
8    
9    subroutine ini_histins(dtime, ok_instan, nid_ins)    subroutine ini_histins(dtime)
10    
11      ! From phylmd/ini_histins.h, v 1.2 2005/05/25 13:10:09      ! From phylmd/ini_histins.h, v 1.2 2005/05/25 13:10:09
12    
13      use clesphys, only: ecrit_ins      use clesphys, only: ecrit_ins, ok_instan
14        use clesphys2, only: conv_emanuel
15      use dimens_m, only: iim, jjm, llm, nqmx      use dimens_m, only: iim, jjm, llm, nqmx
16      use dimphy, only: klon      use dimphy, only: klon
17      use disvert_m, only: presnivs      use disvert_m, only: presnivs
18      use dynetat0_m, only: day_ref, annee_ref      use dynetat0_m, only: day_ref, annee_ref, rlatu, rlonv
19      USE histbeg_totreg_m, ONLY : histbeg_totreg      USE histbeg_totreg_m, ONLY : histbeg_totreg
20      USE histdef_m, ONLY : histdef      USE histdef_m, ONLY : histdef
21      USE histend_m, ONLY : histend      USE histend_m, ONLY : histend
22      USE histvert_m, ONLY : histvert      USE histvert_m, ONLY : histvert
23      use indicesol, only: nbsrf, clnsurf      use indicesol, only: nbsrf, clnsurf
24      use iniadvtrac_m, only: tname, ttext      use iniadvtrac_m, only: tname, ttext
25      use phyetat0_m, only: rlon, rlat      use nr_util, only: pi
26      use temps, only: itau_phy      use phyetat0_m, only: itau_phy
27      USE ymds2ju_m, only: ymds2ju      USE ymds2ju_m, only: ymds2ju
28    
29      REAL, intent(in):: dtime ! pas temporel de la physique (s)      REAL, intent(in):: dtime ! pas temporel de la physique (s)
     logical, intent(in):: ok_instan  
     integer, intent(out):: nid_ins  
30    
31      REAL zx_lon(iim, jjm + 1), zx_lat(iim, jjm + 1)      ! Local:
32      real zjulian, zsto, zout      real zjulian, zsto, zout
33      integer i, nhori, nvert, nsrf, iq, it      integer nhori, nvert, nsrf, iq, it
34    
35      !-------------------------------------------------------------------      !-------------------------------------------------------------------
36    
37      IF (ok_instan) THEN      IF (ok_instan) THEN
38         zsto = dtime * ecrit_ins         zsto = dtime * ecrit_ins
39         zout = dtime * ecrit_ins         zout = dtime * ecrit_ins
   
40         CALL ymds2ju(annee_ref, 1, day_ref, 0.0, zjulian)         CALL ymds2ju(annee_ref, 1, day_ref, 0.0, zjulian)
41           CALL histbeg_totreg("histins", rlonv(:iim) / pi * 180., &
42         CALL gr_fi_ecrit(1, klon, iim, (jjm + 1), rlon, zx_lon)              rlatu / pi * 180., 1, iim, &
43         DO i = 1, iim              1, jjm + 1, itau_phy, zjulian, dtime, nhori, nid_ins)
           zx_lon(i, 1) = rlon(i+1)  
           zx_lon(i, (jjm + 1)) = rlon(i+1)  
        ENDDO  
        CALL gr_fi_ecrit(1, klon, iim, (jjm + 1), rlat, zx_lat)  
        CALL histbeg_totreg("histins", zx_lon(:, 1), zx_lat(1, :), 1, iim, 1, &  
             jjm + 1, itau_phy, zjulian, dtime, nhori, nid_ins)  
44         write(*, *)'Inst ', itau_phy, zjulian         write(*, *)'Inst ', itau_phy, zjulian
45         CALL histvert(nid_ins, "presnivs", "Vertical levels", "mb", &         CALL histvert(nid_ins, "presnivs", "Vertical levels", "mb", &
46              presnivs/100., nvert)              presnivs/100., nvert)
   
47         CALL histdef(nid_ins, "phis", "Surface geop. height", "-", &         CALL histdef(nid_ins, "phis", "Surface geop. height", "-", &
48              iim, (jjm + 1), nhori, 1, 1, 1, -99, &              iim, (jjm + 1), nhori, 1, 1, 1, -99, &
49              "once", zsto, zout)              "once", zsto, zout)
   
50         CALL histdef(nid_ins, "aire", "Grid area", "-", &         CALL histdef(nid_ins, "aire", "Grid area", "-", &
51              iim, (jjm + 1), nhori, 1, 1, 1, -99, &              iim, (jjm + 1), nhori, 1, 1, 1, -99, &
52              "once", zsto, zout)              "once", zsto, zout)
# Line 259  contains Line 251  contains
251              iim, (jjm + 1), nhori, 1, 1, 1, -99, &              iim, (jjm + 1), nhori, 1, 1, 1, -99, &
252              "inst(X)", zsto, zout)              "inst(X)", zsto, zout)
253    
254         !IM cf. AM 081204 END         if (conv_emanuel) CALL histdef(nid_ins, "ptop", "cloud top pressure", &
255                "Pa", iim, jjm + 1, nhori, 1, 1, 1, -99, "inst(X)", zsto, zout)
256    
257         ! Champs 3D:         ! Champs 3D:
258    
# Line 295  contains Line 288  contains
288              "kg m-2", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &              "kg m-2", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
289              zsto, zout)              zsto, zout)
290    
291           CALL histdef(nid_ins, "rhum", "Relative humidity", &
292                "", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
293                zsto, zout)
294    
295         DO it = 1, nqmx - 2         DO it = 1, nqmx - 2
296            ! champ 2D            ! champ 2D
297            iq=it+2            iq=it+2

Legend:
Removed from v.159  
changed lines
  Added in v.191

  ViewVC Help
Powered by ViewVC 1.1.21