Changeset 1331 for LMDZ4/trunk
- Timestamp:
- Mar 25, 2010, 11:52:08 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/trunk/libf/phylmd/iophy.F90
r1001 r1331 4 4 module iophy 5 5 6 REAL,private,allocatable,dimension(:,:),save :: tmp_tab2d7 REAL,private,allocatable,dimension(:,:,:),save :: tmp_tab3d8 INTEGER,private,allocatable,dimension(:),save :: ndex2d9 INTEGER,private,allocatable,dimension(:),save :: ndex3d10 6 ! abd REAL,private,allocatable,dimension(:),save :: io_lat 11 7 ! abd REAL,private,allocatable,dimension(:),save :: io_lon … … 61 57 io_lon(:)=rlon_glo(2-1/iim:iim+1-1/iim) 62 58 63 64 allocate(tmp_tab2d(iim,jj_nb))65 allocate(tmp_tab3d(iim,jj_nb,klev))66 allocate(ndex2d(iim*jj_nb))67 allocate(ndex3d(iim*jj_nb*klev))68 ndex2d(:)=069 ndex3d(:)=070 71 59 ddid=(/ 1,2 /) 72 60 dsg=(/ iim, jjm+1-1/iim /) … … 110 98 allocate(io_lon(iim)) 111 99 io_lon(:)=lon(:) 112 allocate(tmp_tab2d(iim,jj_nb)) 113 allocate(tmp_tab3d(iim,jj_nb,klev)) 114 allocate(ndex2d(iim*jj_nb)) 115 allocate(ndex3d(iim*jj_nb*klev)) 116 ndex2d(:)=0 117 ndex3d(:)=0 118 100 119 101 ddid=(/ 1,2 /) 120 102 dsg=(/ iim, jjm+1-1/iim /) … … 173 155 character*(*), intent(IN) :: name 174 156 integer, intent(in) :: itau 175 real,dimension(klon),intent(in) :: field 176 157 real,dimension(:),intent(in) :: field 177 158 REAL,dimension(klon_mpi) :: buffer_omp 159 INTEGER :: index2d(iim*jj_nb) 160 REAL :: Field2d(iim,jj_nb) 161 162 IF (size(field)/=klon) CALL abort_gcm('iophy::histwrite2d','Field first dimension not equal to klon',1) 178 163 179 164 CALL Gather_omp(field,buffer_omp) 180 165 !$OMP MASTER 181 CALL grid1Dto2D_mpi(buffer_omp, tmp_tab2d)182 CALL histwrite(nid,name,itau, tmp_tab2d,iim*jj_nb,ndex2d)166 CALL grid1Dto2D_mpi(buffer_omp,Field2d) 167 CALL histwrite(nid,name,itau,Field2d,iim*jj_nb,index2d) 183 168 !$OMP END MASTER 184 169 end subroutine histwrite2d_phy 170 171 185 172 186 173 subroutine histwrite3d_phy(nid,name,itau,field) … … 195 182 character*(*), intent(IN) :: name 196 183 integer, intent(in) :: itau 197 real,dimension(klon,klev),intent(in) :: field 198 199 REAL,dimension(klon_mpi,klev) :: buffer_omp 184 real,dimension(:,:),intent(in) :: field ! --> field(klon,:) 185 REAL,dimension(klon_mpi,size(field,2)) :: buffer_omp 186 INTEGER :: nlev 187 INTEGER :: index3d(iim*jj_nb*size(field,2)) 188 REAL :: Field3d(iim,jj_nb,size(field,2)) 189 190 IF (size(field,1)/=klon) CALL abort_gcm('iophy::histwrite3d','Field first dimension not equal to klon',1) 191 nlev=size(field,2) 200 192 201 193 CALL Gather_omp(field,buffer_omp) 202 194 !$OMP MASTER 203 CALL grid1Dto2D_mpi(buffer_omp, tmp_tab3d)204 CALL histwrite(nid,name,itau, tmp_tab3d,iim*jj_nb*klev,ndex3d)195 CALL grid1Dto2D_mpi(buffer_omp,field3d) 196 CALL histwrite(nid,name,itau,Field3d,iim*jj_nb*nlev,index3d) 205 197 !$OMP END MASTER 206 198 end subroutine histwrite3d_phy
Note: See TracChangeset
for help on using the changeset viewer.