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

Diff of /trunk/phylmd/ini_histins.f

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

revision 175 by guez, Fri Feb 5 16:02:34 2016 UTC revision 212 by guez, Thu Jan 12 12:31:31 2017 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, itau_phy)    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
     use dimphy, only: klon  
16      use disvert_m, only: presnivs      use disvert_m, only: presnivs
17      use dynetat0_m, only: day_ref, annee_ref      use dynetat0_m, only: day_ref, annee_ref, rlatu, rlonv
18      USE histbeg_totreg_m, ONLY : histbeg_totreg      USE histbeg_totreg_m, ONLY : histbeg_totreg
19      USE histdef_m, ONLY : histdef      USE histdef_m, ONLY : histdef
20      USE histend_m, ONLY : histend      USE histend_m, ONLY : histend
21      USE histvert_m, ONLY : histvert      USE histvert_m, ONLY : histvert
22      use indicesol, only: nbsrf, clnsurf      use indicesol, only: nbsrf, clnsurf
23      use iniadvtrac_m, only: tname, ttext      use iniadvtrac_m, only: tname, ttext
24      use phyetat0_m, only: rlon, rlat      use nr_util, only: pi
25        use phyetat0_m, only: itau_phy
26      USE ymds2ju_m, only: ymds2ju      USE ymds2ju_m, only: ymds2ju
27    
28      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  
     integer, intent(in):: itau_phy  
29    
30      ! Local:      ! Local:
     REAL zx_lon(iim, jjm + 1), zx_lat(iim, jjm + 1)  
31      real zjulian, zsto, zout      real zjulian, zsto, zout
32      integer i, nhori, nvert, nsrf, iq, it      integer nhori, nvert, nsrf, iq, it
33    
34      !-------------------------------------------------------------------      !-------------------------------------------------------------------
35    
36      IF (ok_instan) THEN      IF (ok_instan) THEN
37         zsto = dtime * ecrit_ins         zsto = dtime * ecrit_ins
38         zout = dtime * ecrit_ins         zout = dtime * ecrit_ins
   
39         CALL ymds2ju(annee_ref, 1, day_ref, 0.0, zjulian)         CALL ymds2ju(annee_ref, 1, day_ref, 0.0, zjulian)
40           CALL histbeg_totreg("histins", rlonv(:iim) / pi * 180., &
41         CALL gr_fi_ecrit(1, klon, iim, (jjm + 1), rlon, zx_lon)              rlatu / pi * 180., 1, iim, &
42         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)  
43         write(*, *)'Inst ', itau_phy, zjulian         write(*, *)'Inst ', itau_phy, zjulian
44         CALL histvert(nid_ins, "presnivs", "Vertical levels", "mb", &         CALL histvert(nid_ins, "presnivs", "Vertical levels", "mb", &
45              presnivs/100., nvert)              presnivs/100., nvert)
   
46         CALL histdef(nid_ins, "phis", "Surface geop. height", "-", &         CALL histdef(nid_ins, "phis", "Surface geop. height", "-", &
47              iim, (jjm + 1), nhori, 1, 1, 1, -99, &              iim, (jjm + 1), nhori, 1, 1, 1, -99, &
48              "once", zsto, zout)              "once", zsto, zout)
   
49         CALL histdef(nid_ins, "aire", "Grid area", "-", &         CALL histdef(nid_ins, "aire", "Grid area", "-", &
50              iim, (jjm + 1), nhori, 1, 1, 1, -99, &              iim, (jjm + 1), nhori, 1, 1, 1, -99, &
51              "once", zsto, zout)              "once", zsto, zout)
# Line 164  contains Line 154  contains
154              "inst(X)", zsto, zout)              "inst(X)", zsto, zout)
155    
156         DO nsrf = 1, nbsrf         DO nsrf = 1, nbsrf
   
157            call histdef(nid_ins, "pourc_"//clnsurf(nsrf),  &            call histdef(nid_ins, "pourc_"//clnsurf(nsrf),  &
158                 "% "//clnsurf(nsrf), "%",   &                 "% "//clnsurf(nsrf), "%",   &
159                 iim, (jjm + 1), nhori, 1, 1, 1, -99, &                 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
# Line 209  contains Line 198  contains
198                 "rugosite "//clnsurf(nsrf), "-",   &                 "rugosite "//clnsurf(nsrf), "-",   &
199                 iim, (jjm + 1), nhori, 1, 1, 1, -99, &                 iim, (jjm + 1), nhori, 1, 1, 1, -99, &
200                 "inst(X)", zsto, zout)                 "inst(X)", zsto, zout)
           !XXX  
201         END DO         END DO
202    
203         CALL histdef(nid_ins, "rugs", "rugosity", "-", &         CALL histdef(nid_ins, "rugs", "rugosity", "-", &
204              iim, (jjm + 1), nhori, 1, 1, 1, -99,  &              iim, (jjm + 1), nhori, 1, 1, 1, -99,  &
205              "inst(X)", zsto, zout)              "inst(X)", zsto, zout)
# Line 260  contains Line 249  contains
249              iim, (jjm + 1), nhori, 1, 1, 1, -99, &              iim, (jjm + 1), nhori, 1, 1, 1, -99, &
250              "inst(X)", zsto, zout)              "inst(X)", zsto, zout)
251    
252         !IM cf. AM 081204 END         if (conv_emanuel) then
253              CALL histdef(nid_ins, "ptop", "cloud top pressure", &
254                   "Pa", iim, jjm + 1, nhori, 1, 1, 1, -99, "inst(X)", zsto, zout)
255              CALL histdef(nid_ins, "dnwd0", "unsaturated downdraft", &
256                   "kg/m2/s", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
257                   zsto, zout)
258           end if
259    
260         ! Champs 3D:         ! Champs 3D:
261    
262           CALL histdef(nid_ins, "tro3", "ozone mole fraction", "-", &
263                iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", zsto, zout)
264    
265         CALL histdef(nid_ins, "temp", "Temperature", "K", &         CALL histdef(nid_ins, "temp", "Temperature", "K", &
266              iim, (jjm + 1), nhori, llm, 1, llm, nvert, &              iim, (jjm + 1), nhori, llm, 1, llm, nvert, &
267              "inst(X)", zsto, zout)              "inst(X)", zsto, zout)
# Line 296  contains Line 294  contains
294              "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)", &
295              zsto, zout)              zsto, zout)
296    
297           CALL histdef(nid_ins, "rhum", "Relative humidity", &
298                "", iim, jjm + 1, nhori, llm, 1, llm, nvert, "inst(X)", &
299                zsto, zout)
300    
301         DO it = 1, nqmx - 2         DO it = 1, nqmx - 2
302            ! champ 2D            ! champ 2D
303            iq=it+2            iq=it+2

Legend:
Removed from v.175  
changed lines
  Added in v.212

  ViewVC Help
Powered by ViewVC 1.1.21