Ignore:
Timestamp:
10/19/17 10:32:52 (7 years ago)
Author:
dubos
Message:

devel : fix halo issues with computation of energy fluxes

Location:
codes/icosagcm/devel/src/diagnostics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • codes/icosagcm/devel/src/diagnostics/diagflux.F90

    r594 r595  
    150150    INTEGER :: ij, l, ij_omp_begin_ext, ij_omp_end_ext 
    151151    Rd = kappa*cpp 
    152     CALL distrib_level(ij_end_ext-ij_begin_ext+1,ij_omp_begin_ext,ij_omp_end_ext) 
    153     ij_omp_begin_ext = ij_omp_begin_ext+ij_begin_ext-1 
    154     ij_omp_end_ext = ij_omp_end_ext+ij_begin_ext-1 
     152    ! even if loops are of the _ext variant, we still need halo exchanges before reconstructing fluxes at cell centers 
     153    ! => loop over interior region 
     154    CALL distrib_level(ij_end-ij_begin+1,ij_omp_begin_ext,ij_omp_end_ext) 
     155    ij_omp_begin_ext = ij_omp_begin_ext+ij_begin-1 
     156    ij_omp_end_ext = ij_omp_end_ext+ij_begin-1 
    155157#include "../kernels/energy_fluxes.k90" 
    156158  END SUBROUTINE compute_diagflux_energy 
  • codes/icosagcm/devel/src/diagnostics/observable.f90

    r594 r595  
    167167          CALL output_field("massflux_lon",f_buf_ulon) 
    168168          CALL output_field("massflux_lat",f_buf_ulat) 
     169 
     170          CALL transfert_request(f_epotfluxt,req_e1_vect)  
    169171          CALL flux_centered_lonlat(1./(itau_out*dt) , f_epotfluxt, f_buf_ulon, f_buf_ulat) 
    170172          CALL output_field("epot_t", f_epot) 
    171173          CALL output_field("epotflux_lon",f_buf_ulon) 
    172174          CALL output_field("epotflux_lat",f_buf_ulat) 
     175 
     176          CALL transfert_request(f_ekinfluxt,req_e1_vect)  
    173177          CALL flux_centered_lonlat(1./(itau_out*dt) , f_ekinfluxt, f_buf_ulon, f_buf_ulat) 
    174178          CALL output_field("ekin_t", f_ekin) 
    175179          CALL output_field("ekinflux_lon",f_buf_ulon) 
    176180          CALL output_field("ekinflux_lat",f_buf_ulat) 
     181 
     182          CALL transfert_request(f_enthalpyfluxt,req_e1_vect)  
    177183          CALL flux_centered_lonlat(1./(itau_out*dt) , f_enthalpyfluxt, f_buf_ulon, f_buf_ulat) 
    178184          CALL output_field("enthalpy_t", f_enthalpy) 
    179185          CALL output_field("enthalpyflux_lon",f_buf_ulon) 
    180186          CALL output_field("enthalpyflux_lat",f_buf_ulat) 
     187 
    181188          CALL qflux_centered_lonlat(1./(itau_out*dt) , f_qfluxt, f_qfluxt_lon, f_qfluxt_lat) 
    182189          CALL output_field("qmass_t", f_qmasst) 
Note: See TracChangeset for help on using the changeset viewer.