Ignore:
Timestamp:
Aug 21, 2015, 9:23:13 AM (9 years ago)
Author:
Ehouarn Millour
Message:

Physics/dynamics separation: get rid of all the 'include "temps.h"' in the physics; variables in module time_phylmdz_mod must be used instead. Also added JD_cur, JH_cur and JD_ref in module phys_cal_mod, in preparation for having physics handle its calendar internally.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/cpl_mod.F90

    r2311 r2344  
    2424  USE oasis
    2525  USE write_field_phy
    26   USE control_mod
    27 
     26!  USE control_mod
     27  USE time_phylmdz_mod, ONLY: day_step_phy
    2828 
    2929! Global attributes
     
    102102    USE surface_data
    103103    USE indice_sol_mod
     104    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
     105    USE time_phylmdz_mod, ONLY: annee_ref, day_ini, itau_phy, itaufin_phy
    104106    USE print_control_mod, ONLY: lunout
    105 
    106     INCLUDE "dimensions.h"
    107     INCLUDE "temps.h"
    108107
    109108! Input arguments
     
    121120    INTEGER                           :: npas ! only for OASIS2
    122121    REAL                              :: zjulian
    123     REAL, DIMENSION(iim,jjm+1)        :: zx_lon, zx_lat
     122    REAL, DIMENSION(nbp_lon,nbp_lat)  :: zx_lon, zx_lat
    124123    CHARACTER(len = 20)               :: modname = 'cpl_init'
    125124    CHARACTER(len = 80)               :: abort_message
     
    131130!*************************************************************************************
    132131     
    133     npas = itaufin/ iphysiq
     132    npas = itaufin_phy
    134133!    nexca = 86400 / dtime
    135134    nexca = t_coupl / dtime
     
    172171    ALLOCATE(cpl_taumod(klon,2), stat = error)
    173172    sum_error = sum_error + error
    174     ALLOCATE(cpl_rriv2D(iim,jj_nb), stat=error)
    175     sum_error = sum_error + error
    176     ALLOCATE(cpl_rcoa2D(iim,jj_nb), stat=error)
    177     sum_error = sum_error + error
    178     ALLOCATE(cpl_rlic2D(iim,jj_nb), stat=error)
    179     sum_error = sum_error + error
    180     ALLOCATE(read_sst(iim, jj_nb), stat = error)
    181     sum_error = sum_error + error
    182     ALLOCATE(read_sic(iim, jj_nb), stat = error)
    183     sum_error = sum_error + error
    184     ALLOCATE(read_sit(iim, jj_nb), stat = error)
    185     sum_error = sum_error + error
    186     ALLOCATE(read_alb_sic(iim, jj_nb), stat = error)
    187     sum_error = sum_error + error
    188     ALLOCATE(read_u0(iim, jj_nb), stat = error)
    189     sum_error = sum_error + error
    190     ALLOCATE(read_v0(iim, jj_nb), stat = error)
     173    ALLOCATE(cpl_rriv2D(nbp_lon,jj_nb), stat=error)
     174    sum_error = sum_error + error
     175    ALLOCATE(cpl_rcoa2D(nbp_lon,jj_nb), stat=error)
     176    sum_error = sum_error + error
     177    ALLOCATE(cpl_rlic2D(nbp_lon,jj_nb), stat=error)
     178    sum_error = sum_error + error
     179    ALLOCATE(read_sst(nbp_lon, jj_nb), stat = error)
     180    sum_error = sum_error + error
     181    ALLOCATE(read_sic(nbp_lon, jj_nb), stat = error)
     182    sum_error = sum_error + error
     183    ALLOCATE(read_sit(nbp_lon, jj_nb), stat = error)
     184    sum_error = sum_error + error
     185    ALLOCATE(read_alb_sic(nbp_lon, jj_nb), stat = error)
     186    sum_error = sum_error + error
     187    ALLOCATE(read_u0(nbp_lon, jj_nb), stat = error)
     188    sum_error = sum_error + error
     189    ALLOCATE(read_v0(nbp_lon, jj_nb), stat = error)
    191190    sum_error = sum_error + error
    192191
    193192    IF (carbon_cycle_cpl) THEN
    194        ALLOCATE(read_co2(iim, jj_nb), stat = error)
     193       ALLOCATE(read_co2(nbp_lon, jj_nb), stat = error)
    195194       sum_error = sum_error + error
    196195       ALLOCATE(cpl_atm_co2(klon,2), stat = error)
     
    230229       idayref = day_ini
    231230       CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian)
    232        CALL gr_fi_ecrit(1,klon,iim,jjm+1,rlon,zx_lon)
    233        DO i = 1, iim
     231       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlon,zx_lon)
     232       DO i = 1, nbp_lon
    234233          zx_lon(i,1) = rlon(i+1)
    235           zx_lon(i,jjm+1) = rlon(i+1)
     234          zx_lon(i,nbp_lat) = rlon(i+1)
    236235       ENDDO
    237        CALL gr_fi_ecrit(1,klon,iim,jjm+1,rlat,zx_lat)
     236       CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,rlat,zx_lat)
    238237       clintocplnam="cpl_atm_tauflx"
    239        CALL histbeg(clintocplnam, iim,zx_lon(:,1),jjm+1,zx_lat(1,:),&
    240             1,iim,1,jjm+1, itau_phy,zjulian,dtime,nhoridct,nidct)
     238       CALL histbeg(clintocplnam,nbp_lon,zx_lon(:,1),nbp_lat,zx_lat(1,:),&
     239            1,nbp_lon,1,nbp_lat, itau_phy,zjulian,dtime,nhoridct,nidct)
    241240! no vertical axis
    242241       CALL histdef(nidct, 'tauxe','tauxe', &
    243             "-",iim, jjm+1, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)
     242            "-",nbp_lon,nbp_lat, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)
    244243       CALL histdef(nidct, 'tauyn','tauyn', &
    245             "-",iim, jjm+1, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)
     244            "-",nbp_lon,nbp_lat, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)
    246245       CALL histdef(nidct, 'tmp_lon','tmp_lon', &
    247             "-",iim, jjm+1, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)
     246            "-",nbp_lon,nbp_lat, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)
    248247       CALL histdef(nidct, 'tmp_lat','tmp_lat', &
    249             "-",iim, jjm+1, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)
     248            "-",nbp_lon,nbp_lat, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)
    250249       DO jf=1,maxsend
    251250         IF (infosend(i)%action) THEN
    252251             CALL histdef(nidct, infosend(i)%name ,infosend(i)%name , &
    253                 "-",iim, jjm+1, nhoridct, 1, 1, 1, -99, 32, "inst", dtime,dtime)
     252                "-",nbp_lon,nbp_lat,nhoridct,1,1,1,-99,32,"inst",dtime,dtime)
    254253         ENDIF
    255254       END DO
     
    258257       
    259258       clfromcplnam="cpl_atm_sst"
    260        CALL histbeg(clfromcplnam, iim,zx_lon(:,1),jjm+1,zx_lat(1,:),1,iim,1,jjm+1, &
     259       CALL histbeg(clfromcplnam,nbp_lon,zx_lon(:,1),nbp_lat,zx_lat(1,:),1,nbp_lon,1,nbp_lat, &
    261260            0,zjulian,dtime,nhoridcs,nidcs)
    262261! no vertical axis
     
    264263         IF (inforecv(i)%action) THEN
    265264             CALL histdef(nidcs,inforecv(i)%name ,inforecv(i)%name , &
    266                 "-",iim, jjm+1, nhoridcs, 1, 1, 1, -99, 32, "inst", dtime,dtime)
     265                "-",nbp_lon,nbp_lat,nhoridcs,1,1,1,-99,32,"inst",dtime,dtime)
    267266         ENDIF
    268267       END DO
     
    297296    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
    298297    USE indice_sol_mod
    299 
    300     INCLUDE "temps.h"
     298    USE time_phylmdz_mod, ONLY: start_time, itau_phy
     299    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
     300
    301301    INCLUDE "YOMCST.h"
    302     INCLUDE "dimensions.h"
    303302
    304303! Arguments
     
    313312    INTEGER                                 :: j, i, time_sec
    314313    INTEGER                                 :: itau_w
    315     INTEGER, DIMENSION(iim*(jjm+1))         :: ndexcs
     314    INTEGER, DIMENSION(nbp_lon*nbp_lat)     :: ndexcs
    316315    CHARACTER(len = 20)                     :: modname = 'cpl_receive_frac'
    317316    CHARACTER(len = 80)                     :: abort_message
    318317    REAL, DIMENSION(klon)                   :: read_sic1D
    319     REAL, DIMENSION(iim,jj_nb,maxrecv)      :: tab_read_flds
     318    REAL, DIMENSION(nbp_lon,jj_nb,maxrecv)      :: tab_read_flds
    320319    REAL, DIMENSION(klon,nbsrf)             :: pctsrf_old
    321320    REAL, DIMENSION(klon_mpi)               :: rlon_mpi, rlat_mpi
    322     REAL, DIMENSION(iim, jj_nb)             :: tmp_lon, tmp_lat
    323     REAL, DIMENSION(iim, jj_nb)             :: tmp_r0
     321    REAL, DIMENSION(nbp_lon,jj_nb)             :: tmp_lon, tmp_lat
     322    REAL, DIMENSION(nbp_lon,jj_nb)             :: tmp_r0
    324323
    325324!*************************************************************************************
     
    345344       IF (is_sequential) THEN
    346345          ndexcs(:) = 0
    347           itau_w = itau_phy + itime + start_time * day_step / iphysiq
     346          itau_w = itau_phy + itime + start_time * day_step_phy
    348347          DO i = 1, maxrecv
    349348            IF (inforecv(i)%action) THEN
    350                 CALL histwrite(nidcs,inforecv(i)%name,itau_w,tab_read_flds(:,:,i),iim*(jjm+1),ndexcs)
     349                CALL histwrite(nidcs,inforecv(i)%name,itau_w,tab_read_flds(:,:,i),nbp_lon*(nbp_lat),ndexcs)
    351350            ENDIF
    352351          END DO
     
    373372! Transform the currents from cartesian to spheric coordinates
    374373! tmp_r0 should be zero
    375           CALL geo2atm(iim, jj_nb, tab_read_flds(:,:,idr_curenx), &
     374          CALL geo2atm(nbp_lon, jj_nb, tab_read_flds(:,:,idr_curenx), &
    376375             tab_read_flds(:,:,idr_cureny), tab_read_flds(:,:,idr_curenz), &
    377376               tmp_lon, tmp_lat, &
     
    542541    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send
    543542    USE indice_sol_mod
    544     INCLUDE "dimensions.h"
     543    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    545544
    546545! Input arguments
     
    635634       IF (.NOT. ALLOCATED(cpl_sols2D)) THEN
    636635          sum_error = 0
    637           ALLOCATE(cpl_sols2D(iim,jj_nb,2), stat=error)
    638           sum_error = sum_error + error
    639           ALLOCATE(cpl_nsol2D(iim,jj_nb,2), stat=error)
    640           sum_error = sum_error + error
    641           ALLOCATE(cpl_rain2D(iim,jj_nb,2), stat=error)
    642           sum_error = sum_error + error
    643           ALLOCATE(cpl_snow2D(iim,jj_nb,2), stat=error)
    644           sum_error = sum_error + error
    645           ALLOCATE(cpl_evap2D(iim,jj_nb,2), stat=error)
    646           sum_error = sum_error + error
    647           ALLOCATE(cpl_tsol2D(iim,jj_nb,2), stat=error)
    648           sum_error = sum_error + error
    649           ALLOCATE(cpl_fder2D(iim,jj_nb,2), stat=error)
    650           sum_error = sum_error + error
    651           ALLOCATE(cpl_albe2D(iim,jj_nb,2), stat=error)
    652           sum_error = sum_error + error
    653           ALLOCATE(cpl_taux2D(iim,jj_nb,2), stat=error)
    654           sum_error = sum_error + error
    655           ALLOCATE(cpl_tauy2D(iim,jj_nb,2), stat=error)
    656           sum_error = sum_error + error
    657           ALLOCATE(cpl_windsp2D(iim,jj_nb), stat=error)
    658           sum_error = sum_error + error
    659           ALLOCATE(cpl_taumod2D(iim,jj_nb,2), stat=error)
     636          ALLOCATE(cpl_sols2D(nbp_lon,jj_nb,2), stat=error)
     637          sum_error = sum_error + error
     638          ALLOCATE(cpl_nsol2D(nbp_lon,jj_nb,2), stat=error)
     639          sum_error = sum_error + error
     640          ALLOCATE(cpl_rain2D(nbp_lon,jj_nb,2), stat=error)
     641          sum_error = sum_error + error
     642          ALLOCATE(cpl_snow2D(nbp_lon,jj_nb,2), stat=error)
     643          sum_error = sum_error + error
     644          ALLOCATE(cpl_evap2D(nbp_lon,jj_nb,2), stat=error)
     645          sum_error = sum_error + error
     646          ALLOCATE(cpl_tsol2D(nbp_lon,jj_nb,2), stat=error)
     647          sum_error = sum_error + error
     648          ALLOCATE(cpl_fder2D(nbp_lon,jj_nb,2), stat=error)
     649          sum_error = sum_error + error
     650          ALLOCATE(cpl_albe2D(nbp_lon,jj_nb,2), stat=error)
     651          sum_error = sum_error + error
     652          ALLOCATE(cpl_taux2D(nbp_lon,jj_nb,2), stat=error)
     653          sum_error = sum_error + error
     654          ALLOCATE(cpl_tauy2D(nbp_lon,jj_nb,2), stat=error)
     655          sum_error = sum_error + error
     656          ALLOCATE(cpl_windsp2D(nbp_lon,jj_nb), stat=error)
     657          sum_error = sum_error + error
     658          ALLOCATE(cpl_taumod2D(nbp_lon,jj_nb,2), stat=error)
    660659          sum_error = sum_error + error
    661660         
    662661          IF (carbon_cycle_cpl) THEN
    663              ALLOCATE(cpl_atm_co22D(iim,jj_nb), stat=error)
     662             ALLOCATE(cpl_atm_co22D(nbp_lon,jj_nb), stat=error)
    664663             sum_error = sum_error + error
    665664          END IF
     
    733732    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
    734733    USE indice_sol_mod
    735     INCLUDE "dimensions.h"
     734    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    736735
    737736! Input arguments
     
    820819       IF (.NOT. ALLOCATED(cpl_sols2D)) THEN
    821820          sum_error = 0
    822           ALLOCATE(cpl_sols2D(iim,jj_nb,2), stat=error)
    823           sum_error = sum_error + error
    824           ALLOCATE(cpl_nsol2D(iim,jj_nb,2), stat=error)
    825           sum_error = sum_error + error
    826           ALLOCATE(cpl_rain2D(iim,jj_nb,2), stat=error)
    827           sum_error = sum_error + error
    828           ALLOCATE(cpl_snow2D(iim,jj_nb,2), stat=error)
    829           sum_error = sum_error + error
    830           ALLOCATE(cpl_evap2D(iim,jj_nb,2), stat=error)
    831           sum_error = sum_error + error
    832           ALLOCATE(cpl_tsol2D(iim,jj_nb,2), stat=error)
    833           sum_error = sum_error + error
    834           ALLOCATE(cpl_fder2D(iim,jj_nb,2), stat=error)
    835           sum_error = sum_error + error
    836           ALLOCATE(cpl_albe2D(iim,jj_nb,2), stat=error)
    837           sum_error = sum_error + error
    838           ALLOCATE(cpl_taux2D(iim,jj_nb,2), stat=error)
    839           sum_error = sum_error + error
    840           ALLOCATE(cpl_tauy2D(iim,jj_nb,2), stat=error)
    841           sum_error = sum_error + error
    842           ALLOCATE(cpl_windsp2D(iim,jj_nb), stat=error)
    843           sum_error = sum_error + error
    844           ALLOCATE(cpl_taumod2D(iim,jj_nb,2), stat=error)
     821          ALLOCATE(cpl_sols2D(nbp_lon,jj_nb,2), stat=error)
     822          sum_error = sum_error + error
     823          ALLOCATE(cpl_nsol2D(nbp_lon,jj_nb,2), stat=error)
     824          sum_error = sum_error + error
     825          ALLOCATE(cpl_rain2D(nbp_lon,jj_nb,2), stat=error)
     826          sum_error = sum_error + error
     827          ALLOCATE(cpl_snow2D(nbp_lon,jj_nb,2), stat=error)
     828          sum_error = sum_error + error
     829          ALLOCATE(cpl_evap2D(nbp_lon,jj_nb,2), stat=error)
     830          sum_error = sum_error + error
     831          ALLOCATE(cpl_tsol2D(nbp_lon,jj_nb,2), stat=error)
     832          sum_error = sum_error + error
     833          ALLOCATE(cpl_fder2D(nbp_lon,jj_nb,2), stat=error)
     834          sum_error = sum_error + error
     835          ALLOCATE(cpl_albe2D(nbp_lon,jj_nb,2), stat=error)
     836          sum_error = sum_error + error
     837          ALLOCATE(cpl_taux2D(nbp_lon,jj_nb,2), stat=error)
     838          sum_error = sum_error + error
     839          ALLOCATE(cpl_tauy2D(nbp_lon,jj_nb,2), stat=error)
     840          sum_error = sum_error + error
     841          ALLOCATE(cpl_windsp2D(nbp_lon,jj_nb), stat=error)
     842          sum_error = sum_error + error
     843          ALLOCATE(cpl_taumod2D(nbp_lon,jj_nb,2), stat=error)
    845844          sum_error = sum_error + error
    846845
    847846          IF (carbon_cycle_cpl) THEN
    848              ALLOCATE(cpl_atm_co22D(iim,jj_nb), stat=error)
     847             ALLOCATE(cpl_atm_co22D(nbp_lon,jj_nb), stat=error)
    849848             sum_error = sum_error + error
    850849          END IF
     
    913912! (it is done in cpl_send_seaice_fields).
    914913!
    915     INCLUDE "dimensions.h"
     914    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    916915
    917916! Input arguments
     
    925924! Local variables
    926925!*************************************************************************************
    927     REAL, DIMENSION(iim,jj_nb)             :: rriv2D
    928     REAL, DIMENSION(iim,jj_nb)             :: rcoa2D
     926    REAL, DIMENSION(nbp_lon,jj_nb)             :: rriv2D
     927    REAL, DIMENSION(nbp_lon,jj_nb)             :: rcoa2D
    929928
    930929!*************************************************************************************
     
    972971!
    973972
    974     INCLUDE "dimensions.h"
     973    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    975974
    976975! Input varibales
     
    983982! Local varibales
    984983!*************************************************************************************
    985     REAL, DIMENSION(iim,jj_nb)             :: rlic2D
     984    REAL, DIMENSION(nbp_lon,jj_nb)             :: rlic2D
    986985
    987986!*************************************************************************************
     
    10271026    USE carbon_cycle_mod, ONLY : carbon_cycle_cpl
    10281027    USE indice_sol_mod
     1028    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
     1029    USE time_phylmdz_mod, ONLY: start_time, itau_phy
    10291030! Some includes
    1030 !*************************************************************************************
    1031     INCLUDE "temps.h"
    1032     INCLUDE "dimensions.h"
    1033    
     1031!   
    10341032! Input arguments
    10351033!*************************************************************************************
     
    10451043    INTEGER                                              :: itau_w
    10461044    INTEGER                                              :: time_sec
    1047     INTEGER, DIMENSION(iim*(jjm+1))                      :: ndexct
     1045    INTEGER, DIMENSION(nbp_lon*(nbp_lat))                      :: ndexct
    10481046    REAL                                                 :: Up, Down
    1049     REAL, DIMENSION(iim, jj_nb)                          :: tmp_lon, tmp_lat
    1050     REAL, DIMENSION(iim, jj_nb, 4)                       :: pctsrf2D
    1051     REAL, DIMENSION(iim, jj_nb)                          :: deno
     1047    REAL, DIMENSION(nbp_lon, jj_nb)                          :: tmp_lon, tmp_lat
     1048    REAL, DIMENSION(nbp_lon, jj_nb, 4)                       :: pctsrf2D
     1049    REAL, DIMENSION(nbp_lon, jj_nb)                          :: deno
    10521050    CHARACTER(len = 20)                                  :: modname = 'cpl_send_all'
    10531051    CHARACTER(len = 80)                                  :: abort_message
    10541052   
    10551053! Variables with fields to coupler
    1056     REAL, DIMENSION(iim, jj_nb)                          :: tmp_taux
    1057     REAL, DIMENSION(iim, jj_nb)                          :: tmp_tauy
    1058     REAL, DIMENSION(iim, jj_nb)                          :: tmp_calv
     1054    REAL, DIMENSION(nbp_lon, jj_nb)                          :: tmp_taux
     1055    REAL, DIMENSION(nbp_lon, jj_nb)                          :: tmp_tauy
     1056    REAL, DIMENSION(nbp_lon, jj_nb)                          :: tmp_calv
    10591057! Table with all fields to send to coupler
    1060     REAL, DIMENSION(iim, jj_nb, maxsend)                 :: tab_flds
     1058    REAL, DIMENSION(nbp_lon, jj_nb, maxsend)                 :: tab_flds
    10611059    REAL, DIMENSION(klon_mpi)                            :: rlon_mpi, rlat_mpi
    10621060
     
    11121110
    11131111      DO j = 1, jj_nb
    1114          tmp_calv(:,j) = DOT_PRODUCT (cpl_rlic2D(1:iim,j), &
    1115               pctsrf2D(1:iim,j,is_lic)) / REAL(iim)
     1112         tmp_calv(:,j) = DOT_PRODUCT (cpl_rlic2D(1:nbp_lon,j), &
     1113              pctsrf2D(1:nbp_lon,j,is_lic)) / REAL(nbp_lon)
    11161114      ENDDO
    11171115   
     
    11331131         
    11341132         IF (.NOT. is_north_pole .AND. ii_begin /=1) THEN
    1135             Up=Up+tmp_calv(iim,1)
     1133            Up=Up+tmp_calv(nbp_lon,1)
    11361134            tmp_calv(:,1)=Up
    11371135         ENDIF
    11381136         
    1139          IF (.NOT. is_south_pole .AND. ii_end /= iim) THEN
     1137         IF (.NOT. is_south_pole .AND. ii_end /= nbp_lon) THEN
    11401138            Down=Down+tmp_calv(1,jj_nb)
    11411139            tmp_calv(:,jj_nb)=Down       
     
    12261224    IF (is_sequential) THEN
    12271225       IF (is_north_pole) tmp_lon(:,1)     = tmp_lon(:,2)
    1228        IF (is_south_pole) tmp_lon(:,jjm+1) = tmp_lon(:,jjm)
     1226       IF (is_south_pole) tmp_lon(:,nbp_lat) = tmp_lon(:,nbp_lat-1)
    12291227    ENDIF
    12301228     
     
    12321230    IF (is_sequential) THEN
    12331231       ndexct(:) = 0
    1234        itau_w = itau_phy + itime + start_time * day_step / iphysiq
    1235        CALL histwrite(nidct,'tauxe',itau_w,tmp_taux,iim*(jjm+1),ndexct)
    1236        CALL histwrite(nidct,'tauyn',itau_w,tmp_tauy,iim*(jjm+1),ndexct)
    1237        CALL histwrite(nidct,'tmp_lon',itau_w,tmp_lon,iim*(jjm+1),ndexct)
    1238        CALL histwrite(nidct,'tmp_lat',itau_w,tmp_lat,iim*(jjm+1),ndexct)
     1232       itau_w = itau_phy + itime + start_time * day_step_phy
     1233       CALL histwrite(nidct,'tauxe',itau_w,tmp_taux,nbp_lon*(nbp_lat),ndexct)
     1234       CALL histwrite(nidct,'tauyn',itau_w,tmp_tauy,nbp_lon*(nbp_lat),ndexct)
     1235       CALL histwrite(nidct,'tmp_lon',itau_w,tmp_lon,nbp_lon*(nbp_lat),ndexct)
     1236       CALL histwrite(nidct,'tmp_lat',itau_w,tmp_lat,nbp_lon*(nbp_lat),ndexct)
    12391237    ENDIF
    12401238
     
    12421240! cartesian 3D coordinates
    12431241!$OMP MASTER
    1244     CALL atm2geo (iim, jj_nb, tmp_taux, tmp_tauy, tmp_lon, tmp_lat, &
     1242    CALL atm2geo (nbp_lon, jj_nb, tmp_taux, tmp_tauy, tmp_lon, tmp_lat, &
    12451243         tab_flds(:,:,ids_tauxxu), tab_flds(:,:,ids_tauyyu), tab_flds(:,:,ids_tauzzu) )
    12461244   
     
    12571255        DO j=1,maxsend
    12581256          IF (infosend(j)%action) CALL histwrite(nidct,infosend(j)%name, itau_w, &
    1259              tab_flds(:,:,j),iim*(jjm+1),ndexct)
     1257             tab_flds(:,:,j),nbp_lon*(nbp_lat),ndexct)
    12601258        ENDDO
    12611259    ENDIF
     
    13111309!   champ_out    champ sur la grille 'gatherd'
    13121310!
    1313     INCLUDE "dimensions.h"
     1311    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    13141312
    13151313! Input
    13161314    INTEGER, INTENT(IN)                       :: knon
    1317     REAL, DIMENSION(iim,jj_nb), INTENT(IN)    :: champ_in
     1315    REAL, DIMENSION(nbp_lon,jj_nb), INTENT(IN)    :: champ_in
    13181316    INTEGER, DIMENSION(klon), INTENT(IN)      :: knindex
    13191317
     
    13301328   
    13311329
    1332 ! Transform from 2 dimensions (iim,jj_nb) to 1 dimension (klon)
     1330! Transform from 2 dimensions (nbp_lon,jj_nb) to 1 dimension (klon)
    13331331!$OMP MASTER
    13341332    CALL Grid2Dto1D_mpi(champ_in,temp_mpi)
     
    13601358!   champ_out    champ sur la grille 2D
    13611359!
    1362     INCLUDE "dimensions.h"
     1360    USE mod_grid_phy_lmdz, ONLY : nbp_lon, nbp_lat
    13631361   
    13641362! Input arguments
     
    13701368! Output arguments
    13711369!*************************************************************************************
    1372     REAL, DIMENSION(iim,jj_nb), INTENT(OUT) :: champ_out
     1370    REAL, DIMENSION(nbp_lon,jj_nb), INTENT(OUT) :: champ_out
    13731371
    13741372! Local variables
     
    13861384    ENDDO
    13871385
    1388 ! Transform from 1 dimension (klon) to 2 dimensions (iim,jj_nb)
     1386! Transform from 1 dimension (klon) to 2 dimensions (nbp_lon,jj_nb)
    13891387    CALL gather_omp(temp_omp,temp_mpi)
    13901388
Note: See TracChangeset for help on using the changeset viewer.