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

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

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

trunk/libf/phylmd/phyredem.f90 revision 72 by guez, Tue Jul 23 13:00:07 2013 UTC trunk/phylmd/phyredem.f revision 101 by guez, Mon Jul 7 17:45:21 2014 UTC
# Line 12  contains Line 12  contains
12    
13      ! From phylmd/phyredem.F, version 1.3 2005/05/25 13:10:09      ! From phylmd/phyredem.F, version 1.3 2005/05/25 13:10:09
14      ! Author: Z. X. Li (LMD/CNRS)      ! Author: Z. X. Li (LMD/CNRS)
15      ! Date: 19930818      ! Date: 1993/08/18
16      ! Objet : écriture de l'état de démarrage ou redémarrage pour la physique      ! Objet : écriture de l'état de démarrage ou redémarrage pour la physique
17    
18      USE dimphy, ONLY: klev, klon, zmasq      USE dimphy, ONLY: klev, klon, zmasq
# Line 23  contains Line 23  contains
23           nf95_def_var, nf95_enddef, nf95_redef, nf95_put_var, nf95_close           nf95_def_var, nf95_enddef, nf95_redef, nf95_put_var, nf95_close
24      USE temps, ONLY: itau_phy      USE temps, ONLY: itau_phy
25    
26      CHARACTER(len=*) fichnom      CHARACTER(len=*), INTENT(IN):: fichnom
27      REAL, INTENT(IN):: rlat(klon), rlon(klon)      REAL, INTENT(IN):: rlat(klon), rlon(klon)
28      REAL pctsrf(klon, nbsrf)      REAL, INTENT(IN):: pctsrf(klon, nbsrf)
29      REAL tsol(klon, nbsrf)      REAL, INTENT(IN):: tsol(:, :) ! (klon, nbsrf)
30      REAL tsoil(klon, nsoilmx, nbsrf)      REAL, INTENT(IN):: tsoil(:, :, :) ! (klon, nsoilmx, nbsrf)
31      REAL tslab(klon), seaice(klon) !IM "slab" ocean      REAL, INTENT(IN):: tslab(:), seaice(:) ! (klon) slab ocean
32      REAL qsurf(klon, nbsrf)      REAL, INTENT(IN):: qsurf(:, :) ! (klon, nbsrf)
33      REAL, intent(in):: qsol(klon)  
34      REAL snow(klon, nbsrf)      REAL, intent(in):: qsol(:) ! (klon)
35      REAL albedo(klon, nbsrf)      ! column-density of water in soil, in kg m-2
36      REAL alblw(klon, nbsrf)  
37      REAL evap(klon, nbsrf)      REAL, INTENT(IN):: snow(klon, nbsrf)
38        REAL, INTENT(IN):: albedo(klon, nbsrf)
39        REAL, INTENT(IN):: alblw(klon, nbsrf)
40        REAL, INTENT(IN):: evap(klon, nbsrf)
41      REAL, INTENT(IN):: rain_fall(klon)      REAL, INTENT(IN):: rain_fall(klon)
42      REAL snow_fall(klon)      REAL, INTENT(IN):: snow_fall(klon)
43      REAL solsw(klon)      REAL, INTENT(IN):: solsw(klon)
44      REAL, INTENT(IN):: sollw(klon)      REAL, INTENT(IN):: sollw(klon)
45      REAL fder(klon)      REAL, INTENT(IN):: fder(klon)
46      REAL radsol(klon)      REAL, INTENT(IN):: radsol(klon)
47      REAL frugs(klon, nbsrf)      REAL, INTENT(IN):: frugs(klon, nbsrf)
48      REAL agesno(klon, nbsrf)      REAL, INTENT(IN):: agesno(klon, nbsrf)
49      REAL zmea(klon)      REAL, INTENT(IN):: zmea(klon)
50      REAL, intent(in):: zstd(klon)      REAL, intent(in):: zstd(klon)
51      REAL, intent(in):: zsig(klon)      REAL, intent(in):: zsig(klon)
52      REAL zgam(klon)      REAL, intent(in):: zgam(klon)
53      REAL zthe(klon)      REAL, intent(in):: zthe(klon)
54      REAL zpic(klon)      REAL, intent(in):: zpic(klon)
55      REAL zval(klon)      REAL, intent(in):: zval(klon)
56      REAL t_ancien(klon, klev), q_ancien(klon, klev)      REAL, intent(in):: t_ancien(klon, klev), q_ancien(klon, klev)
57      REAL rnebcon(klon, klev), ratqs(klon, klev), clwcon(klon, klev)      REAL, intent(in):: rnebcon(klon, klev), ratqs(klon, klev)
58      REAL run_off_lic_0(klon)      REAL, intent(in):: clwcon(klon, klev)
59        REAL, intent(in):: run_off_lic_0(klon)
60      real, intent(in):: sig1(klon, klev) ! section adiabatic updraft      real, intent(in):: sig1(klon, klev) ! section adiabatic updraft
61    
62      real, intent(in):: w01(klon, klev)      real, intent(in):: w01(klon, klev)
# Line 60  contains Line 64  contains
64    
65      ! Local:      ! Local:
66    
67      INTEGER ncid, idim2, idim3      INTEGER ncid, idim2, idim3, dimid_nbsrf
68      integer varid, varid_run_off_lic_0, varid_sig1, varid_w01      integer varid, varid_run_off_lic_0, varid_sig1, varid_w01, varid_rlon
69        integer varid_rlat, varid_zmasq, varid_fter, varid_flic, varid_foce
70        integer varid_fsic
71      INTEGER isoil, nsrf      INTEGER isoil, nsrf
72      CHARACTER(len=7) str7      CHARACTER(len=7) str7
73      CHARACTER(len=2) str2      CHARACTER(len=2) str2
# Line 77  contains Line 83  contains
83    
84      call nf95_def_dim(ncid, 'points_physiques', klon, idim2)      call nf95_def_dim(ncid, 'points_physiques', klon, idim2)
85      call nf95_def_dim(ncid, 'klev', klev, idim3)      call nf95_def_dim(ncid, 'klev', klev, idim3)
86        call nf95_def_dim(ncid, 'nbsrf', nbsrf, dimid_nbsrf)
87    
88      call nf95_def_var(ncid, 'longitude', nf90_float, idim2, varid)      call nf95_def_var(ncid, 'longitude', nf90_float, idim2, varid_rlon)
89      call nf95_put_att(ncid, varid, 'title', &      call nf95_def_var(ncid, 'latitude', nf90_float, idim2, varid_rlat)
          'Longitudes de la grille physique')  
     call nf95_enddef(ncid)  
     call nf95_put_var(ncid, varid, rlon)  
   
     call nf95_redef(ncid)  
     call nf95_def_var(ncid, 'latitude', nf90_float, idim2, varid)  
     call nf95_put_att(ncid, varid, 'title', &  
          'Latitudes de la grille physique')  
     call nf95_enddef(ncid)  
     call nf95_put_var(ncid, varid, rlat)  
90    
91      ! PB ajout du masque terre/mer      call nf95_def_var(ncid, 'masque', nf90_float, idim2, varid_zmasq)
92        call nf95_put_att(ncid, varid_zmasq, 'title', 'masque terre mer')
     call nf95_redef(ncid)  
     call nf95_def_var(ncid, 'masque', nf90_float, idim2, varid)  
     call nf95_put_att(ncid, varid, 'title', 'masque terre mer')  
     call nf95_enddef(ncid)  
     call nf95_put_var(ncid, varid, zmasq)  
     ! BP ajout des fraction de chaque sous-surface  
93    
94      ! 1. fraction de terre      ! Fractions de chaque sous-surface
95    
96      call nf95_redef(ncid)      call nf95_def_var(ncid, 'FTER', nf90_float, idim2, varid_fter)
97      call nf95_def_var(ncid, 'FTER', nf90_float, idim2, varid)      call nf95_put_att(ncid, varid_fter, 'title', 'fraction de continent')
     call nf95_put_att(ncid, varid, 'title', 'fraction de continent')  
     call nf95_enddef(ncid)  
     call nf95_put_var(ncid, varid, pctsrf(:, is_ter))  
98    
99      ! 2. Fraction de glace de terre      call nf95_def_var(ncid, 'FLIC', nf90_float, idim2, varid_flic)
100        call nf95_put_att(ncid, varid_flic, 'title', 'fraction glace de terre')
101    
102      call nf95_redef(ncid)      call nf95_def_var(ncid, 'FOCE', nf90_float, idim2, varid_foce)
103      call nf95_def_var(ncid, 'FLIC', nf90_float, idim2, varid)      call nf95_put_att(ncid, varid_foce, 'title', 'fraction ocean')
     call nf95_put_att(ncid, varid, 'title', 'fraction glace de terre')  
     call nf95_enddef(ncid)  
     call nf95_put_var(ncid, varid, pctsrf(:, is_lic))  
104    
105      ! 3. fraction ocean      call nf95_def_var(ncid, 'FSIC', nf90_float, idim2, varid_fsic)
106        call nf95_put_att(ncid, varid_fsic, 'title', 'fraction glace mer')
107    
     call nf95_redef(ncid)  
     call nf95_def_var(ncid, 'FOCE', nf90_float, idim2, varid)  
     call nf95_put_att(ncid, varid, 'title', 'fraction ocean')  
108      call nf95_enddef(ncid)      call nf95_enddef(ncid)
     call nf95_put_var(ncid, varid, pctsrf(:, is_oce))  
109    
110      ! 4. Fraction glace de mer      call nf95_put_var(ncid, varid_rlon, rlon)
111        call nf95_put_var(ncid, varid_rlat, rlat)
112        call nf95_put_var(ncid, varid_zmasq, zmasq)
113        call nf95_put_var(ncid, varid_fter, pctsrf(:, is_ter))
114        call nf95_put_var(ncid, varid_flic, pctsrf(:, is_lic))
115        call nf95_put_var(ncid, varid_foce, pctsrf(:, is_oce))
116        call nf95_put_var(ncid, varid_fsic, pctsrf(:, is_sic))
117    
118      call nf95_redef(ncid)      call nf95_redef(ncid)
119      call nf95_def_var(ncid, 'FSIC', nf90_float, idim2, varid)      call nf95_def_var(ncid, 'TS', nf90_float, (/idim2, dimid_nbsrf/), varid)
120      call nf95_put_att(ncid, varid, 'title', 'fraction glace mer')      call nf95_put_att(ncid, varid, 'title', 'surface temperature')
121      call nf95_enddef(ncid)      call nf95_enddef(ncid)
122      call nf95_put_var(ncid, varid, pctsrf(:, is_sic))      call nf95_put_var(ncid, varid, tsol)
   
     DO nsrf = 1, nbsrf  
        IF (nsrf<=99) THEN  
           WRITE (str2, '(i2.2)') nsrf  
           call nf95_redef(ncid)  
           call nf95_def_var(ncid, 'TS'//str2, nf90_float, idim2, varid)  
           call nf95_put_att(ncid, varid, 'title', &  
                'Temperature de surface No.'//str2)  
           call nf95_enddef(ncid)  
        ELSE  
           PRINT *, 'Trop de sous-mailles'  
           STOP 1  
        END IF  
        call nf95_put_var(ncid, varid, tsol(:, nsrf))  
     END DO  
123    
124      DO nsrf = 1, nbsrf      DO nsrf = 1, nbsrf
125         DO isoil = 1, nsoilmx         DO isoil = 1, nsoilmx

Legend:
Removed from v.72  
changed lines
  Added in v.101

  ViewVC Help
Powered by ViewVC 1.1.21