Ignore:
Timestamp:
Dec 14, 2015, 11:43:09 AM (9 years ago)
Author:
Laurent Fairhead
Message:

Merged trunk changes r2298:2396 into testing branch

Location:
LMDZ5/branches/testing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/testing

  • LMDZ5/branches/testing/libf/phylmd/iophy.F90

    r2160 r2408  
    4646                                is_sequential, is_south_pole
    4747  USE mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, klon_glo
     48  USE print_control_mod, ONLY: prt_level,lunout
    4849#ifdef CPP_IOIPSL
    4950  USE ioipsl, only: flio_dom_set
     
    5354#endif
    5455  IMPLICIT NONE
    55   INCLUDE 'dimensions.h'
    56   include 'iniprint.h'
    5756    REAL,DIMENSION(klon),INTENT(IN) :: rlon
    5857    REAL,DIMENSION(klon),INTENT(IN) :: rlat
     
    7776   
    7877!$OMP MASTER 
    79     ALLOCATE(io_lat(jjm+1-1/(iim*jjm)))
    80     io_lat(1)=rlat_glo(1)
    81     io_lat(jjm+1-1/(iim*jjm))=rlat_glo(klon_glo)
    82     IF ((iim*jjm) > 1) then
    83       DO i=2,jjm
    84         io_lat(i)=rlat_glo(2+(i-2)*iim)
     78    ALLOCATE(io_lat(nbp_lat))
     79    IF (klon_glo == 1) THEN
     80      io_lat(1)=rlat_glo(1)
     81    ELSE
     82      io_lat(1)=rlat_glo(1)
     83      io_lat(nbp_lat)=rlat_glo(klon_glo)
     84      DO i=2,nbp_lat-1
     85        io_lat(i)=rlat_glo(2+(i-2)*nbp_lon)
    8586      ENDDO
    8687    ENDIF
    8788
    88     ALLOCATE(io_lon(iim))
    89     io_lon(:)=rlon_glo(2-1/(iim*jjm):iim+1-1/(iim*jjm))
     89    ALLOCATE(io_lon(nbp_lon))
     90    IF (klon_glo == 1) THEN
     91      io_lon(1)=rlon_glo(1)
     92    ELSE
     93      io_lon(1:nbp_lon)=rlon_glo(2:nbp_lon+1)
     94    ENDIF
     95
    9096!! (I) dtnb   : total number of domains
    9197!! (I) dnb    : domain number
     
    104110
    105111    ddid=(/ 1,2 /)
    106     dsg=(/ iim, jjm+1-1/(iim*jjm) /)
    107     dsl=(/ iim, jj_nb /)
     112    dsg=(/ nbp_lon, nbp_lat /)
     113    dsl=(/ nbp_lon, jj_nb /)
    108114    dpf=(/ 1,jj_begin /)
    109     dpl=(/ iim, jj_end /)
     115    dpl=(/ nbp_lon, jj_end /)
    110116    dhs=(/ ii_begin-1,0 /)
    111117    IF (mpi_rank==mpi_size-1) THEN
    112118      dhe=(/0,0/)
    113119    ELSE
    114       dhe=(/ iim-ii_end,0 /) 
     120      dhe=(/ nbp_lon-ii_end,0 /) 
    115121    ENDIF
    116122
     
    155161                                mpi_size, mpi_rank
    156162  USE ioipsl, only: flio_dom_set
     163  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    157164  IMPLICIT NONE
    158   INCLUDE 'dimensions.h'   
    159     REAL,DIMENSION(iim),INTENT(IN) :: lon
    160     REAL,DIMENSION(jjm+1-1/(iim*jjm)),INTENT(IN) :: lat
     165    REAL,DIMENSION(nbp_lon),INTENT(IN) :: lon
     166    REAL,DIMENSION(nbp_lat),INTENT(IN) :: lat
    161167
    162168    INTEGER,DIMENSION(2) :: ddid
     
    169175
    170176!$OMP MASTER 
    171     allocate(io_lat(jjm+1-1/(iim*jjm)))
     177    allocate(io_lat(nbp_lat))
    172178    io_lat(:)=lat(:)
    173     allocate(io_lon(iim))
     179    allocate(io_lon(nbp_lon))
    174180    io_lon(:)=lon(:)
    175181   
    176182    ddid=(/ 1,2 /)
    177     dsg=(/ iim, jjm+1-1/(iim*jjm) /)
    178     dsl=(/ iim, jj_nb /)
     183    dsg=(/ nbp_lon, nbp_lat /)
     184    dsl=(/ nbp_lon, jj_nb /)
    179185    dpf=(/ 1,jj_begin /)
    180     dpl=(/ iim, jj_end /)
     186    dpl=(/ nbp_lon, jj_end /)
    181187    dhs=(/ ii_begin-1,0 /)
    182188    if (mpi_rank==mpi_size-1) then
    183189      dhe=(/0,0/)
    184190    else
    185       dhe=(/ iim-ii_end,0 /) 
     191      dhe=(/ nbp_lon-ii_end,0 /) 
    186192    endif
    187193   
     
    198204  USE mod_phys_lmdz_para, only: is_sequential, is_using_mpi, is_mpi_root, &
    199205                                jj_begin, jj_end, jj_nb
     206  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    200207  use ioipsl, only: histbeg
    201208#ifdef CPP_XIOS
     
    203210#endif
    204211  IMPLICIT NONE
    205   include 'dimensions.h'
    206212  include 'clesphys.h'
    207213   
     
    217223!$OMP MASTER   
    218224    if (is_sequential) then
    219       call histbeg(name,iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    220                    1,iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
     225      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
     226                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
    221227    else
    222       call histbeg(name,iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    223                    1,iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
     228      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
     229                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
    224230    endif
    225231
     
    240246
    241247  USE mod_phys_lmdz_para, only: jj_begin, jj_end, jj_nb, is_sequential
     248  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    242249  use ioipsl, only: histbeg
    243250
    244251  IMPLICIT NONE
    245   include 'dimensions.h'
    246252   
    247253    character*(*), INTENT(IN) :: name
     
    255261#ifndef CPP_IOIPSL_NO_OUTPUT
    256262    if (is_sequential) then
    257       call histbeg(name,iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    258                    1,iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
     263      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
     264                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day)
    259265    else
    260       call histbeg(name,iim,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
    261                    1,iim,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
     266      call histbeg(name,nbp_lon,io_lon, jj_nb,io_lat(jj_begin:jj_end), &
     267                   1,nbp_lon,1,jj_nb,itau0, zjulian, dtime, nhori, nid_day,phys_domain_id)
    262268    endif
    263269#endif
     
    274280                                is_sequential, klon_mpi_begin, klon_mpi_end, &
    275281                                mpi_rank
    276   USE mod_grid_phy_lmdz, only: klon_glo
     282  USE mod_grid_phy_lmdz, only: klon_glo, nbp_lon, nbp_lat
    277283  use ioipsl, only: histbeg
    278284
    279285  IMPLICIT NONE
    280   include 'dimensions.h'
    281286
    282287    REAL,DIMENSION(klon),INTENT(IN) :: rlon
     
    304309    REAL, allocatable, DIMENSION(:) :: npplat, npplon
    305310    REAL, allocatable, DIMENSION(:,:) :: npplat_bounds, npplon_bounds
    306     INTEGER, PARAMETER :: jjmp1=jjm+1-1/jjm
    307     REAL, DIMENSION(iim,jjmp1) :: zx_lon, zx_lat
     311    REAL, DIMENSION(nbp_lon,nbp_lat) :: zx_lon, zx_lat
    308312
    309313    CALL gather(rlat,rlat_glo)
     
    330334     endif
    331335!
    332      IF ( tabij(i).LE.iim) THEN
     336     IF ( tabij(i).LE.nbp_lon) THEN
    333337      plat_bounds(i,1)=rlat_glo(tabij(i))
    334338     ELSE
    335       plat_bounds(i,1)=rlat_glo(tabij(i)-iim)
     339      plat_bounds(i,1)=rlat_glo(tabij(i)-nbp_lon)
    336340     ENDIF
    337      plat_bounds(i,2)=rlat_glo(tabij(i)+iim)
     341     plat_bounds(i,2)=rlat_glo(tabij(i)+nbp_lon)
    338342!
    339343!    print*,'CFMIP_iophy point i lon lon_bds',i,plon_bounds(i,1),rlon_glo(tabij(i)),plon_bounds(i,2)
     
    351355     ENDDO
    352356
    353        CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlon_glo,zx_lon)
    354        if ((iim*jjm).gt.1) then
    355        DO i = 1, iim
     357       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon_glo,zx_lon)
     358       if ((nbp_lon*nbp_lat).gt.1) then
     359       DO i = 1, nbp_lon
    356360         zx_lon(i,1) = rlon_glo(i+1)
    357          zx_lon(i,jjmp1) = rlon_glo(i+1)
     361         zx_lon(i,nbp_lat) = rlon_glo(i+1)
    358362       ENDDO
    359363       endif
    360        CALL gr_fi_ecrit(1,klon,iim,jjmp1,rlat_glo,zx_lat)
     364       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat_glo,zx_lat)
    361365
    362366    DO i=1,pim
     
    367371
    368372     if (ipt(i).EQ.1) then
    369       plon_bounds(i,1)=zx_lon(iim,jpt(i))
     373      plon_bounds(i,1)=zx_lon(nbp_lon,jpt(i))
    370374      plon_bounds(i,2)=360.+zx_lon(ipt(i)+1,jpt(i))
    371375     endif
    372376 
    373      if (ipt(i).EQ.iim) then
     377     if (ipt(i).EQ.nbp_lon) then
    374378      plon_bounds(i,2)=360.+zx_lon(1,jpt(i))
    375379     endif
     
    383387     endif
    384388 
    385      if (jpt(i).EQ.jjmp1) then
    386       plat_bounds(i,1)=zx_lat(ipt(i),jjmp1)+0.001
    387       plat_bounds(i,2)=zx_lat(ipt(i),jjmp1)-0.001
     389     if (jpt(i).EQ.nbp_lat) then
     390      plat_bounds(i,1)=zx_lat(ipt(i),nbp_lat)+0.001
     391      plat_bounds(i,2)=zx_lat(ipt(i),nbp_lat)-0.001
    388392     endif
    389393!
     
    451455    use phys_output_var_mod, only: type_ecri, zoutm, zdtime_moy, lev_files, &
    452456                                   nid_files, nhorim, swaero_diag, nfiles
     457    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    453458    IMPLICIT NONE
    454459
    455     INCLUDE "dimensions.h"
    456     INCLUDE "temps.h"
    457460    INCLUDE "clesphys.h"
    458461
     
    478481       IF ( flag_var(iff)<=lev_files(iff) ) THEN
    479482          CALL histdef (nid_files(iff),nomvar,titrevar,unitvar, &
    480                iim,jj_nb,nhorim(iff), 1,1,1, -99, 32, &
     483               nbp_lon,jj_nb,nhorim(iff), 1,1,1, -99, 32, &
    481484               type_ecri(iff), zstophym,zoutm(iff))               
    482485       ENDIF
     
    507510                                   nhorim, zdtime_moy, levmin, levmax, &
    508511                                   nvertm, nfiles
     512    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    509513    IMPLICIT NONE
    510514
    511     INCLUDE "dimensions.h"
    512     INCLUDE "temps.h"
    513 !    INCLUDE "indicesol.h"
    514515    INCLUDE "clesphys.h"
    515516
     
    535536       IF ( flag_var(iff)<=lev_files(iff) ) THEN
    536537          CALL histdef (nid_files(iff), nomvar, titrevar, unitvar, &
    537                iim, jj_nb, nhorim(iff), klev, levmin(iff), &
     538               nbp_lon, jj_nb, nhorim(iff), klev, levmin(iff), &
    538539               levmax(iff)-levmin(iff)+1, nvertm(iff), 32, type_ecri(iff), &
    539540               zstophym, zoutm(iff))
     
    563564                                   clef_stations, phys_out_filenames, lev_files, &
    564565                                   nid_files, nhorim, swaero_diag
     566    USE print_control_mod, ONLY: prt_level,lunout
     567    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    565568#ifdef CPP_XIOS
    566569    use wxios, only: wxios_add_field_to_file
     
    568571    IMPLICIT NONE
    569572
    570     INCLUDE "dimensions.h"
    571     INCLUDE "temps.h"
    572573    INCLUDE "clesphys.h"
    573     INCLUDE "iniprint.h"
    574574
    575575    INTEGER                          :: iff
     
    621621       IF ( var%flag(iff)<=lev_files(iff) ) THEN
    622622          CALL histdef (nid_files(iff), var%name, var%description, var%unit, &
    623                iim,jj_nb,nhorim(iff), 1,1,1, -99, 32, &
     623               nbp_lon,jj_nb,nhorim(iff), 1,1,1, -99, 32, &
    624624               typeecrit, zstophym,zoutm(iff))               
    625625       ENDIF
     
    650650                                   nid_files, nhorim, swaero_diag, levmin, &
    651651                                   levmax, nvertm
     652    USE print_control_mod, ONLY: prt_level,lunout
     653    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    652654#ifdef CPP_XIOS
    653655    use wxios, only: wxios_add_field_to_file
     
    655657    IMPLICIT NONE
    656658
    657     INCLUDE "dimensions.h"
    658     INCLUDE "temps.h"
    659659    INCLUDE "clesphys.h"
    660     INCLUDE "iniprint.h"
    661660
    662661    INTEGER                          :: iff
     
    708707       IF ( var%flag(iff)<=lev_files(iff) ) THEN
    709708          CALL histdef (nid_files(iff), var%name, var%description, var%unit, &
    710                iim, jj_nb, nhorim(iff), klev, levmin(iff), &
     709               nbp_lon, jj_nb, nhorim(iff), klev, levmin(iff), &
    711710               levmax(iff)-levmin(iff)+1, nvertm(iff), 32, typeecrit, &
    712711               zstophym, zoutm(iff))
     
    728727    use ioipsl, only: getin
    729728    use phys_output_var_mod, only: nfiles
     729    USE print_control_mod, ONLY: prt_level,lunout
    730730    IMPLICIT NONE
    731 
    732     include 'iniprint.h'
    733731
    734732    CHARACTER(LEN=20)                :: nam_var
     
    750748                                jj_nb, klon_mpi
    751749  USE ioipsl, only: histwrite
     750  USE print_control_mod, ONLY: prt_level,lunout
     751  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    752752  IMPLICIT NONE
    753   include 'dimensions.h'
    754   include 'iniprint.h'
    755753   
    756754    integer,INTENT(IN) :: nid
     
    761759    REAL,DIMENSION(klon_mpi) :: buffer_omp
    762760    INTEGER, allocatable, DIMENSION(:) :: index2d
    763     REAL :: Field2d(iim,jj_nb)
     761    REAL :: Field2d(nbp_lon,jj_nb)
    764762
    765763    integer :: ip
     
    767765
    768766
    769     IF (size(field)/=klon) CALL abort_gcm('iophy::histwrite2d','Field first DIMENSION not equal to klon',1)
     767    IF (size(field)/=klon) CALL abort_physic('iophy::histwrite2d','Field first DIMENSION not equal to klon',1)
    770768   
    771769    CALL Gather_omp(field,buffer_omp)   
     
    773771    CALL grid1Dto2D_mpi(buffer_omp,Field2d)
    774772    if(.NOT.lpoint) THEN
    775      ALLOCATE(index2d(iim*jj_nb))
    776      ALLOCATE(fieldok(iim*jj_nb))
     773     ALLOCATE(index2d(nbp_lon*jj_nb))
     774     ALLOCATE(fieldok(nbp_lon*jj_nb))
    777775     IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL'
    778      CALL histwrite(nid,name,itau,Field2d,iim*jj_nb,index2d)
     776     CALL histwrite(nid,name,itau,Field2d,nbp_lon*jj_nb,index2d)
    779777     IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
    780778    else
     
    814812                                is_sequential, klon_mpi_begin, klon_mpi_end, &
    815813                                jj_nb, klon_mpi
     814  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    816815  use ioipsl, only: histwrite
     816  USE print_control_mod, ONLY: prt_level,lunout
    817817  IMPLICIT NONE
    818   include 'dimensions.h'
    819   include 'iniprint.h'
    820818   
    821819    integer,INTENT(IN) :: nid
     
    825823    REAL,DIMENSION(:,:),INTENT(IN) :: field  ! --> field(klon,:)
    826824    REAL,DIMENSION(klon_mpi,size(field,2)) :: buffer_omp
    827     REAL :: Field3d(iim,jj_nb,size(field,2))
     825    REAL :: Field3d(nbp_lon,jj_nb,size(field,2))
    828826    INTEGER :: ip, n, nlev
    829827    INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d
     
    831829
    832830
    833     IF (size(field,1)/=klon) CALL abort_gcm('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
     831    IF (size(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
    834832    nlev=size(field,2)
    835833
     
    838836    CALL grid1Dto2D_mpi(buffer_omp,field3d)
    839837    if(.NOT.lpoint) THEN
    840      ALLOCATE(index3d(iim*jj_nb*nlev))
    841      ALLOCATE(fieldok(iim*jj_nb,nlev))
     838     ALLOCATE(index3d(nbp_lon*jj_nb*nlev))
     839     ALLOCATE(fieldok(nbp_lon*jj_nb,nlev))
    842840     IF (prt_level >= 10) write(lunout,*)'Sending ',name,' to IOIPSL'
    843      CALL histwrite(nid,name,itau,Field3d,iim*jj_nb*nlev,index3d)
     841     CALL histwrite(nid,name,itau,Field3d,nbp_lon*jj_nb*nlev,index3d)
    844842     IF (prt_level >= 10) write(lunout,*)'Finished sending ',name,' to IOIPSL'
    845843   else
     
    889887                                 nfiles, vars_defined, clef_stations, &
    890888                                 nid_files
     889  USE print_control_mod, ONLY: prt_level,lunout
     890  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    891891#ifdef CPP_XIOS
    892892  USE xios, only: xios_send_field
     
    895895
    896896  IMPLICIT NONE
    897   INCLUDE 'dimensions.h'
    898   INCLUDE 'iniprint.h'
    899897  include 'clesphys.h'
    900898
     
    909907    REAL,DIMENSION(klon_mpi) :: buffer_omp
    910908    INTEGER, allocatable, DIMENSION(:) :: index2d
    911     REAL :: Field2d(iim,jj_nb)
     909    REAL :: Field2d(nbp_lon,jj_nb)
    912910
    913911    INTEGER :: ip
     
    945943
    946944    !Et sinon on.... écrit
    947     IF (SIZE(field)/=klon) CALL abort_gcm('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon',1)
     945    IF (SIZE(field)/=klon) CALL abort_physic('iophy::histwrite2d_phy','Field first DIMENSION not equal to klon',1)
    948946   
    949947    if (prt_level >= 10) then
     
    971969          endif
    972970#else
    973         CALL abort_gcm ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
     971        CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
    974972#endif
    975973      ELSE 
     
    990988
    991989                  IF(.NOT.clef_stations(iff)) THEN
    992                         ALLOCATE(index2d(iim*jj_nb))
    993                         ALLOCATE(fieldok(iim*jj_nb))
     990                        ALLOCATE(index2d(nbp_lon*jj_nb))
     991                        ALLOCATE(fieldok(nbp_lon*jj_nb))
    994992#ifndef CPP_IOIPSL_NO_OUTPUT
    995                         CALL histwrite(nid_files(iff),var%name,itau_iophy,Field2d,iim*jj_nb,index2d)
     993                        CALL histwrite(nid_files(iff),var%name,itau_iophy,Field2d,nbp_lon*jj_nb,index2d)
    996994#endif
    997995!#ifdef CPP_XIOS
     
    10491047                                 nfiles, vars_defined, clef_stations, &
    10501048                                 nid_files
     1049  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    10511050#ifdef CPP_XIOS
    10521051  USE xios, only: xios_send_field
    10531052#endif
    1054 
     1053  USE print_control_mod, ONLY: prt_level,lunout
    10551054
    10561055  IMPLICIT NONE
    1057   INCLUDE 'dimensions.h'
    1058   INCLUDE 'iniprint.h'
    10591056  include 'clesphys.h'
    10601057
     
    10671064!$OMP THREADPRIVATE(firstx)
    10681065    REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp
    1069     REAL :: Field3d(iim,jj_nb,SIZE(field,2))
     1066    REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2))
    10701067    INTEGER :: ip, n, nlev, nlevx
    10711068    INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d
     
    10951092  ELSE
    10961093    !Et sinon on.... écrit
    1097     IF (SIZE(field,1)/=klon) CALL abort_gcm('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
     1094    IF (SIZE(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
    10981095    nlev=SIZE(field,2)
    10991096    if (nlev.eq.klev+1) then
     
    11191116          CALL xios_send_field(var%name, Field3d(:,:,1:nlevx))
    11201117#else
    1121         CALL abort_gcm ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
     1118        CALL abort_physic ('iophy','cannot have ok_all_xml = .T. without CPP_XIOS defined' ,1)
    11221119#endif
    11231120      ELSE 
     
    11331130                  write(lunout,*)'histwrite3d_phy: call xios_send_field for ', &
    11341131                                  trim(var%name), ' with iim jjm nlevx = ', &
    1135                                   iim,jj_nb,nlevx
     1132                                  nbp_lon,jj_nb,nlevx
    11361133                endif
    11371134                CALL xios_send_field(var%name, Field3d(:,:,1:nlevx))
     
    11401137#endif
    11411138                IF (.NOT.clef_stations(iff)) THEN
    1142                         ALLOCATE(index3d(iim*jj_nb*nlev))
    1143                         ALLOCATE(fieldok(iim*jj_nb,nlev))
     1139                        ALLOCATE(index3d(nbp_lon*jj_nb*nlev))
     1140                        ALLOCATE(fieldok(nbp_lon*jj_nb,nlev))
    11441141
    11451142#ifndef CPP_IOIPSL_NO_OUTPUT
    1146                         CALL histwrite(nid_files(iff),var%name,itau_iophy,Field3d,iim*jj_nb*nlev,index3d)
     1143                        CALL histwrite(nid_files(iff),var%name,itau_iophy,Field3d,nbp_lon*jj_nb*nlev,index3d)
    11471144#endif
    11481145
     
    11961193                                is_sequential, klon_mpi_begin, klon_mpi_end, &
    11971194                                jj_nb, klon_mpi
     1195  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    11981196  USE xios, only: xios_send_field
    1199 
     1197  USE print_control_mod, ONLY: prt_level,lunout
    12001198
    12011199  IMPLICIT NONE
    1202   INCLUDE 'dimensions.h'
    1203   INCLUDE 'iniprint.h'
    12041200
    12051201    CHARACTER(LEN=*), INTENT(IN) :: field_name
     
    12081204    REAL,DIMENSION(klon_mpi) :: buffer_omp
    12091205    INTEGER, allocatable, DIMENSION(:) :: index2d
    1210     REAL :: Field2d(iim,jj_nb)
     1206    REAL :: Field2d(nbp_lon,jj_nb)
    12111207
    12121208    INTEGER :: ip
     
    12161212
    12171213    !Et sinon on.... écrit
    1218     IF (SIZE(field)/=klon) CALL abort_gcm('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon',1)
     1214    IF (SIZE(field)/=klon) CALL abort_physic('iophy::histwrite2d_xios','Field first DIMENSION not equal to klon',1)
    12191215   
    12201216    CALL Gather_omp(field,buffer_omp)   
     
    12271223    !IF(.NOT.clef_stations(iff)) THEN
    12281224    IF (.TRUE.) THEN
    1229         ALLOCATE(index2d(iim*jj_nb))
    1230         ALLOCATE(fieldok(iim*jj_nb))
     1225        ALLOCATE(index2d(nbp_lon*jj_nb))
     1226        ALLOCATE(fieldok(nbp_lon*jj_nb))
    12311227
    12321228
     
    12681264                                jj_nb, klon_mpi
    12691265  USE xios, only: xios_send_field
    1270 
     1266  USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
     1267  USE print_control_mod, ONLY: prt_level,lunout
    12711268
    12721269  IMPLICIT NONE
    1273   INCLUDE 'dimensions.h'
    1274   INCLUDE 'iniprint.h'
    12751270
    12761271    CHARACTER(LEN=*), INTENT(IN) :: field_name
     
    12781273
    12791274    REAL,DIMENSION(klon_mpi,SIZE(field,2)) :: buffer_omp
    1280     REAL :: Field3d(iim,jj_nb,SIZE(field,2))
     1275    REAL :: Field3d(nbp_lon,jj_nb,SIZE(field,2))
    12811276    INTEGER :: ip, n, nlev
    12821277    INTEGER, ALLOCATABLE, DIMENSION(:) :: index3d
     
    12861281
    12871282    !Et on.... écrit
    1288     IF (SIZE(field,1)/=klon) CALL abort_gcm('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
     1283    IF (SIZE(field,1)/=klon) CALL abort_physic('iophy::histwrite3d','Field first DIMENSION not equal to klon',1)
    12891284    nlev=SIZE(field,2)
    12901285
     
    12991294    !IF (.NOT.clef_stations(iff)) THEN
    13001295    IF(.TRUE.)THEN
    1301         ALLOCATE(index3d(iim*jj_nb*nlev))
    1302         ALLOCATE(fieldok(iim*jj_nb,nlev))
     1296        ALLOCATE(index3d(nbp_lon*jj_nb*nlev))
     1297        ALLOCATE(fieldok(nbp_lon*jj_nb,nlev))
    13031298        CALL xios_send_field(field_name, Field3d(:,:,1:nlev))
    13041299                       
Note: See TracChangeset for help on using the changeset viewer.