! $Id: lmdz_writefield_phy.f90 5133 2024-07-26 12:20:54Z fairhead $ MODULE lmdz_writefield_phy ! Dump a field on the global (nbp_lon by nbp_lat) physics grid IMPLICIT NONE; PRIVATE PUBLIC writefield_phy CONTAINS SUBROUTINE WriteField_phy(name, Field, ll) USE lmdz_phys_para, ONLY: klon_omp, is_mpi_root, & Gather USE lmdz_grid_phy, ONLY: nbp_lon, nbp_lat, klon_glo, & Grid1Dto2D_glo USE lmdz_write_field, ONLY: WriteField IMPLICIT NONE CHARACTER(len = *), INTENT(IN) :: name INTEGER, INTENT(IN) :: ll REAL, INTENT(IN) :: Field(klon_omp, ll) REAL, DIMENSION(klon_glo, ll) :: New_Field REAL, DIMENSION(nbp_lon, nbp_lat, ll) :: Field_2d CALL Gather(Field, New_Field) !$OMP MASTER IF (is_mpi_root) THEN CALL Grid1Dto2D_glo(New_Field, Field_2D) CALL WriteField(name, Field_2d) ENDIF !$OMP END MASTER END SUBROUTINE WriteField_phy END MODULE lmdz_writefield_phy