My Project
 All Classes Files Functions Variables Macros
write_field_phy.F90
Go to the documentation of this file.
1 !
2 ! $Header$
3 !
5 
6  CONTAINS
7 
8  SUBROUTINE writefield_phy(name,Field,ll)
9  USE dimphy
12  USE write_field
13 
14  IMPLICIT NONE
15  include 'dimensions.h'
16  include 'paramet.h'
17 
18  character(len=*) :: name
19  INTEGER :: ll
20  real, dimension(klon_omp,ll) :: field
21  real,save,allocatable :: field_tmp(:,:)
22  real, dimension(klon_glo,ll):: new_field
23  real, dimension(iim,jjp1,ll):: field_2d
24 
25  CALL gather(field,new_field)
26 !$OMP MASTER
27  IF (is_mpi_root) THEN
28  CALL grid1dto2d_glo(new_field,field_2d)
29  CALL writefield(name,field_2d)
30  ENDIF
31 !$OMP END MASTER
32 
33 
34  END SUBROUTINE writefield_phy
35 
36  END MODULE write_field_phy