/[lmdze]/trunk/libf/dyn3d/grid_change.f90
ViewVC logotype

Diff of /trunk/libf/dyn3d/grid_change.f90

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

revision 14 by guez, Wed Feb 27 13:16:39 2008 UTC revision 15 by guez, Fri Aug 1 15:24:12 2008 UTC
# Line 57  contains Line 57  contains
57    
58    !********************************************    !********************************************
59    
60    function gr_phy_write(pfi)    function gr_phy_write_2d(pfi)
61    
62      ! From phylmd/physiq.F, version 1.22 2006/02/20 09:38:28      ! From phylmd/physiq.F, version 1.22 2006/02/20 09:38:28
63      ! Transforme une variable de la grille physique à la grille d'écriture.      ! Transforme une variable de la grille physique à la grille d'écriture.
# Line 67  contains Line 67  contains
67      use dimphy, only: klon      use dimphy, only: klon
68    
69      REAL, intent(in):: pfi(:)      REAL, intent(in):: pfi(:)
70      real gr_phy_write(iim, jjm + 1)      real gr_phy_write_2d(iim, jjm + 1)
71    
72      ! Variable local to the procedure:      ! Variable local to the procedure:
73      real field(iim, jjm + 1)      real field(iim, jjm + 1)
74    
75      !-----------------------------------------------------------------------      !-----------------------------------------------------------------------
76    
77      if (size(pfi) /= klon) stop "gr_phy_write"      if (size(pfi) /= klon) stop "gr_phy_write_2d"
78    
79      ! Traitement des pôles :      ! Traitement des pôles :
80      field(2:, 1) = pfi(1)      field(2:, 1) = pfi(1)
81      field(2:, jjm + 1) = pfi(klon)      field(2:, jjm + 1) = pfi(klon)
82    
83      gr_phy_write = unpack(pfi, dyn_phy(:iim, :), field)      gr_phy_write_2d = unpack(pfi, dyn_phy(:iim, :), field)
84    
85    END function gr_phy_write    END function gr_phy_write_2d
86    
87      !***************************************************
88    
89      function gr_phy_write_3d(pfi)
90    
91        ! Transforme une variable dépendant de la position verticale de la
92        ! grille physique à la grille d'écriture.
93        ! The grid for output files does not duplicate the first longitude
94        ! in the last longitude.
95    
96        use dimphy, only: klon
97        use dimens_m, only: llm
98        use numer_rec, only: assert
99    
100        REAL, intent(in):: pfi(:, :)
101        real gr_phy_write_3d(iim, jjm + 1, llm)
102    
103        ! Variable local to the procedure:
104        integer l
105    
106        !-----------------------------------------------------------------------
107    
108        call assert(shape(pfi) == (/klon, llm/), "gr_phy_write_3d")
109    
110        do l = 1, llm
111           gr_phy_write_3d(:, :, l) = gr_phy_write_2d(pfi(:, l))
112        end do
113    
114      END function gr_phy_write_3d
115    
116  end module grid_change  end module grid_change

Legend:
Removed from v.14  
changed lines
  Added in v.15

  ViewVC Help
Powered by ViewVC 1.1.21