Changeset 2872 for LMDZ5/trunk


Ignore:
Timestamp:
May 5, 2017, 1:49:39 PM (8 years ago)
Author:
Laurent Fairhead
Message:

Follow-up to revision 2538: actually sending the heat fluxes associated
with solid and liquid precipitations over ocean and seaice to the coupler
LF

Location:
LMDZ5/trunk/libf/phylmd
Files:
3 edited

Legend:

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

    r2545 r2872  
    5252  REAL, ALLOCATABLE, DIMENSION(:,:), SAVE   :: cpl_windsp
    5353  !$OMP THREADPRIVATE(cpl_windsp)
     54  REAL, ALLOCATABLE, DIMENSION(:,:), SAVE   :: cpl_sens_rain, cpl_sens_snow
     55  !$OMP THREADPRIVATE(cpl_sens_rain, cpl_sens_snow)
    5456  REAL, ALLOCATABLE, DIMENSION(:,:), SAVE   :: cpl_taumod
    5557  !$OMP THREADPRIVATE(cpl_taumod)
     
    9092  REAL, ALLOCATABLE, DIMENSION(:,:), SAVE   :: cpl_windsp2D
    9193  !$OMP THREADPRIVATE(cpl_windsp2D)
     94  REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE   :: cpl_sens_rain2D, cpl_sens_snow2D
     95  !$OMP THREADPRIVATE(cpl_sens_rain2D, cpl_sens_snow2D)
    9296  REAL, ALLOCATABLE, DIMENSION(:,:), SAVE   :: cpl_atm_co22D
    9397  !$OMP THREADPRIVATE(cpl_atm_co22D)
     
    169173    sum_error = sum_error + error
    170174    ALLOCATE(cpl_taumod(klon,2), stat = error)
     175    sum_error = sum_error + error
     176    ALLOCATE(cpl_sens_rain(klon,2), stat = error)
     177    sum_error = sum_error + error
     178    ALLOCATE(cpl_sens_snow(klon,2), stat = error)
    171179    sum_error = sum_error + error
    172180    ALLOCATE(cpl_rriv2D(nbp_lon,jj_nb), stat=error)
     
    531539  SUBROUTINE cpl_send_ocean_fields(itime, knon, knindex, &
    532540       swdown, lwdown, fluxlat, fluxsens, &
    533        precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy, windsp)
     541       precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy, windsp,&
     542       sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
    534543!
    535544! This subroutine cumulates some fields for each time-step during a coupling
     
    552561    REAL, DIMENSION(klon), INTENT(IN)       :: evap, tsurf, fder, albsol
    553562    REAL, DIMENSION(klon), INTENT(IN)       :: taux, tauy, windsp
     563    REAL, DIMENSION(klon), INTENT(IN)       :: sens_prec_liq, sens_prec_sol
     564    REAL, DIMENSION(klon), INTENT(IN)       :: lat_prec_liq, lat_prec_sol
    554565
    555566! Local variables
     
    583594       cpl_tauy(1:knon,cpl_index) = 0.0
    584595       cpl_windsp(1:knon,cpl_index) = 0.0
     596       cpl_sens_rain(1:knon,cpl_index) = 0.0
     597       cpl_sens_snow(1:knon,cpl_index) = 0.0
    585598       cpl_taumod(1:knon,cpl_index) = 0.0
    586599       IF (carbon_cycle_cpl) cpl_atm_co2(1:knon,cpl_index) = 0.0
     
    614627       cpl_windsp(ig,cpl_index) = cpl_windsp(ig,cpl_index) + &
    615628            windsp(ig)      / REAL(nexca)
     629       cpl_sens_rain(ig,cpl_index) = cpl_sens_rain(ig,cpl_index) + &
     630            sens_prec_liq(ig)      / REAL(nexca)
     631       cpl_sens_snow(ig,cpl_index) = cpl_sens_snow(ig,cpl_index) + &
     632            sens_prec_sol(ig)      / REAL(nexca)
    616633       cpl_taumod(ig,cpl_index) =   cpl_taumod(ig,cpl_index) + &
    617634          SQRT ( taux(ig)*taux(ig)+tauy(ig)*tauy(ig) ) / REAL (nexca)
     
    654671          sum_error = sum_error + error
    655672          ALLOCATE(cpl_windsp2D(nbp_lon,jj_nb), stat=error)
     673          sum_error = sum_error + error
     674          ALLOCATE(cpl_sens_rain2D(nbp_lon,jj_nb,2), stat=error)
     675          sum_error = sum_error + error
     676          ALLOCATE(cpl_sens_snow2D(nbp_lon,jj_nb,2), stat=error)
    656677          sum_error = sum_error + error
    657678          ALLOCATE(cpl_taumod2D(nbp_lon,jj_nb,2), stat=error)
     
    706727            knon, knindex)
    707728
     729       CALL gath2cpl(cpl_sens_rain(:,cpl_index), cpl_sens_rain2D(:,:,cpl_index), &
     730            knon, knindex)
     731
     732       CALL gath2cpl(cpl_sens_snow(:,cpl_index), cpl_sens_snow2D(:,:,cpl_index), &
     733            knon, knindex)
     734
    708735       CALL gath2cpl(cpl_taumod(:,cpl_index), cpl_taumod2D(:,:,cpl_index), &
    709736            knon, knindex)
     
    722749       pctsrf, lafin, rlon, rlat, &
    723750       swdown, lwdown, fluxlat, fluxsens, &
    724        precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy)
     751       precip_rain, precip_snow, evap, tsurf, fder, albsol, taux, tauy,&
     752       sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
    725753!
    726754! This subroutine cumulates some fields for each time-step during a coupling
     
    746774    REAL, DIMENSION(klon), INTENT(IN)       :: albsol, taux, tauy
    747775    REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf
     776    REAL, DIMENSION(klon), INTENT(IN)       :: sens_prec_liq, sens_prec_sol
     777    REAL, DIMENSION(klon), INTENT(IN)       :: lat_prec_liq, lat_prec_sol
    748778    LOGICAL, INTENT(IN)                     :: lafin
    749779
     
    778808       cpl_taux(1:knon,cpl_index) = 0.0
    779809       cpl_tauy(1:knon,cpl_index) = 0.0
     810       cpl_sens_rain(1:knon,cpl_index) = 0.0
     811       cpl_sens_snow(1:knon,cpl_index) = 0.0
    780812       cpl_taumod(1:knon,cpl_index) = 0.0
    781813    ENDIF
     
    806838       cpl_tauy(ig,cpl_index) = cpl_tauy(ig,cpl_index) + &
    807839            tauy(ig)        / REAL(nexca)     
     840       cpl_sens_rain(ig,cpl_index) = cpl_sens_rain(ig,cpl_index) + &
     841            sens_prec_liq(ig)      / REAL(nexca)
     842       cpl_sens_snow(ig,cpl_index) = cpl_sens_snow(ig,cpl_index) + &
     843            sens_prec_sol(ig)      / REAL(nexca)
    808844       cpl_taumod(ig,cpl_index) = cpl_taumod(ig,cpl_index) + &
    809845            SQRT ( taux(ig)*taux(ig)+tauy(ig)*tauy(ig) ) / REAL(nexca)
     
    839875          sum_error = sum_error + error
    840876          ALLOCATE(cpl_windsp2D(nbp_lon,jj_nb), stat=error)
     877          sum_error = sum_error + error
     878          ALLOCATE(cpl_sens_rain2D(nbp_lon,jj_nb,2), stat=error)
     879          sum_error = sum_error + error
     880          ALLOCATE(cpl_sens_snow2D(nbp_lon,jj_nb,2), stat=error)
    841881          sum_error = sum_error + error
    842882          ALLOCATE(cpl_taumod2D(nbp_lon,jj_nb,2), stat=error)
     
    889929
    890930       CALL gath2cpl(cpl_tauy(:,cpl_index), cpl_tauy2D(:,:,cpl_index), &
     931            knon, knindex)
     932
     933       CALL gath2cpl(cpl_sens_rain(:,cpl_index), cpl_sens_rain2D(:,:,cpl_index), &
     934            knon, knindex)
     935
     936       CALL gath2cpl(cpl_sens_snow(:,cpl_index), cpl_sens_snow2D(:,:,cpl_index), &
    891937            knon, knindex)
    892938
     
    10781124    tab_flds(:,:,ids_nsfice) = cpl_nsol2D(:,:,2)
    10791125    tab_flds(:,:,ids_dflxdt) = cpl_fder2D(:,:,2)
     1126    tab_flds(:,:,ids_qraioc) = cpl_sens_rain2D(:,:,1)
     1127    tab_flds(:,:,ids_qsnooc) = cpl_sens_snow2D(:,:,1)
     1128    tab_flds(:,:,ids_qraiic) = cpl_sens_rain2D(:,:,2)
     1129    tab_flds(:,:,ids_qsnoic) = cpl_sens_snow2D(:,:,2)
    10801130   
    10811131    IF (version_ocean=='nemo') THEN
     
    12791329    DEALLOCATE(cpl_taux2D, cpl_tauy2D, cpl_windsp2D, cpl_taumod2D, stat=error )
    12801330    sum_error = sum_error + error
     1331    DEALLOCATE(cpl_sens_rain2D, cpl_sens_snow2D, stat=error)
     1332    sum_error = sum_error + error
     1333
    12811334   
    12821335    IF (carbon_cycle_cpl) THEN
  • LMDZ5/trunk/libf/phylmd/oasis.F90

    r2545 r2872  
    5555  INTEGER, PARAMETER :: ids_atmco2 = 24
    5656  INTEGER, PARAMETER :: ids_taumod = 25
    57   INTEGER, PARAMETER :: maxsend    = 25  ! Maximum number of fields to send
     57  INTEGER, PARAMETER :: ids_qraioc = 26
     58  INTEGER, PARAMETER :: ids_qsnooc = 27
     59  INTEGER, PARAMETER :: ids_qraiic = 28
     60  INTEGER, PARAMETER :: ids_qsnoic = 29
     61  INTEGER, PARAMETER :: maxsend    = 29  ! Maximum number of fields to send
    5862 
    5963  ! Id for fields received from ocean
     
    177181            infosend(ids_atmco2)%action = .TRUE. ; infosend(ids_atmco2)%name = 'COATMCO2'
    178182        ENDIF
     183        infosend(ids_qraioc)%action = .TRUE. ; infosend(ids_qraioc)%name = 'COQRAIOC'
     184        infosend(ids_qsnooc)%action = .TRUE. ; infosend(ids_qsnooc)%name = 'COQSNOOC'
     185        infosend(ids_qraiic)%action = .TRUE. ; infosend(ids_qraiic)%name = 'COQRAIIC'
     186        infosend(ids_qsnoic)%action = .TRUE. ; infosend(ids_qsnoic)%name = 'COQSNOIC'
    179187       
    180188    ELSE IF (version_ocean=='opa8') THEN
  • LMDZ5/trunk/libf/phylmd/ocean_cpl_mod.F90

    r2545 r2872  
    191191    CALL cpl_send_ocean_fields(itime, knon, knindex, &
    192192         swnet, lwnet, fluxlat, fluxsens, &
    193          precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1, windsp&
    194          )
    195 !         ,sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
     193         precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1, windsp,&
     194         sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
    196195   
    197196
     
    353352       pctsrf, lafin, rlon, rlat, &
    354353       swnet, lwnet, fluxlat, fluxsens, &
    355        precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1 &
    356        )
    357 !      ,sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
     354       precip_rain, precip_snow, evap, tsurf_new, fder_new, alb1, flux_u1, flux_v1,&
     355       sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol)
    358356
    359357 
Note: See TracChangeset for help on using the changeset viewer.