Changeset 5896


Ignore:
Timestamp:
Dec 2, 2025, 4:32:09 PM (13 hours ago)
Author:
yann meurdesoif
Message:

GPU port of surf_ocean

YM

Location:
LMDZ6/branches/PBLSURF_GPUPORT/libf
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phy_common/mod_phys_lmdz_mpi_data.f90

    r5268 r5896  
    4646  INTEGER,SAVE :: MPI_REAL_LMDZ   ! MPI_REAL8
    4747
     48!  PRIVATE : print_module_data
    4849CONTAINS
    4950 
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phy_common/mod_phys_lmdz_omp_data.F90

    r5291 r5896  
    2121!$OMP  THREADPRIVATE(is_north_pole_phy, is_south_pole_phy)
    2222
     23!  PRIVATE : print_module_data
    2324CONTAINS
    2425 
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/albedo.f90

    r5868 r5896  
    22module albedo
    33
    4   USE clesphys_mod_h
    5   USE yomcst_mod_h
    64IMPLICIT NONE
    75
     
    97
    108  SUBROUTINE alboc(klon, rjour, rlat, albedo)
    11     USE clesphys_mod_h
     9!$gpum horizontal klon
     10!    USE clesphys_mod_h
     11    USE yomcst_mod_h, ONLY : r_incl
     12    USE orbite_mod, ONLY : orbite
     13    IMPLICIT NONE
    1214    ! ======================================================================
    1315    ! Auteur(s): Z.X. Li (LMD/CNRS) (adaptation du GCM du LMD)
     
    122124  ! =====================================================================
    123125  SUBROUTINE alboc_cd(klon, rmu0, albedo)
     126!$gpum horizontal klon
     127  IMPLICIT NONE
    124128
    125129    ! Auteur(s): Z.X. Li (LMD/CNRS)
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/calcul_fluxs_mod.f90

    r5889 r5896  
    141141    dflux_s = 0.
    142142    dflux_l = 0.
    143     if (PRESENT(lat_prec_liq)) lat_prec_liq = 0.
    144     if (PRESENT(lat_prec_sol)) lat_prec_sol = 0.
     143    DO i=1, knon
     144      if (PRESENT(lat_prec_liq)) lat_prec_liq(i) = 0.
     145      if (PRESENT(lat_prec_sol)) lat_prec_sol(i) = 0.
     146    ENDDO
    145147!
    146148! zx_qs = qsat en kg/kg
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/limit_read_mod.f90

    r5889 r5896  
    9090       knon, knindex, &
    9191       rugos_out, alb_out)
     92!$gpum horizontal knon klon
    9293!
    9394! This subroutine is called from surf_land_bucket.
     
    9596! then this routine will call limit_read_tot.
    9697!
    97     USE dimphy
    98     USE surface_data
     98    USE surface_data, ONLY: type_ocean, version_ocean
    9999
    100100! Input arguments
     
    116116!****************************************************************************************
    117117
    118 IF (type_ocean == 'couple'.OR. &
     118    IF (type_ocean == 'couple'.OR. &
    119119         (type_ocean == 'slab' .AND. version_ocean == 'sicINT')) THEN
    120120       ! limit.nc has not yet been read. Do it now!
     121!$gpum nocall
    121122       CALL limit_read_tot(itime, dtime, jour, is_modified)
    122123    END IF
     
    132133
    133134  SUBROUTINE limit_read_sst(knon, knindex, sst_out)
     135!$gpum horizontal knon klon
    134136!
    135137! This subroutine returns the sea surface temperature already read from limit.nc.
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/o3_chem_m.f90

    r5390 r5896  
    2222    use mod_grid_phy_lmdz, only: nbp_lev
    2323    use nrtype, only: pi
     24    use orbite_mod, only : zenang, orbite
    2425
    2526    integer, intent(in):: julien ! jour julien, 1 <= julien <= 360
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/ocean_albedo.f90

    r5868 r5896  
    22! $Id$
    33!
     4MODULE ocean_albedo_mod
     5
     6CONTAINS
    47
    58SUBROUTINE ocean_albedo(knon,zrmu0,knindex,pwind,SFRWL,alb_dir_new,alb_dif_new)
     9!$gpum horizontal knon klon
     10
    611!!
    712!!****  *ALBEDO_RS14* 
     
    4348!            ------------
    4449!
    45 USE ocean_albedo_para
     50USE ocean_albedo_para, ONLY : nnwl, xakwl, xakrefm, xakachl, xakaw3, xakbw, xaw440, xfrwl, xrwc   
    4651USE phys_state_var_mod, ONLY : chl_con
    47 USE clesphys_mod_h
     52USE clesphys_mod_h, ONLY: nsw, ok_chlorophyll
    4853!
    4954!
     
    254259
    255260END SUBROUTINE ocean_albedo
     261
     262END MODULE ocean_albedo_mod
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/ocean_forced_mod.F90

    r5889 r5896  
    2929#endif           
    3030       )
     31!$gpum horizontal knon klon
     32
    3133!
    3234! This subroutine treats the "open ocean", all grid points that are not entierly covered
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/orbite.f90

    r5285 r5896  
    33
    44! ======================================================================
     5MODULE orbite_mod
     6
     7
     8CONTAINS
     9
    510SUBROUTINE orbite(xjour, longi, dist)
    611  USE yomcst_mod_h
     
    297302  RETURN
    298303END SUBROUTINE zenith
     304
     305END MODULE orbite_mod
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/physiq_mod.F90

    r5868 r5896  
    398398       USE phys_output_write_spl_mod, ONLY: phys_output_write_spl
    399399       USE phytracr_spl_mod, ONLY: phytracr_spl_out_init, phytracr_spl
     400       USE orbite_mod, ONLY : zenang, angle
    400401       USE s2s, ONLY : s2s_initialize, s2s_finalize
    401402    IMPLICIT NONE
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/s2s.F90

    r5764 r5896  
    22  MODULE s2s
    33    USE s2s_mod
     4    INTEGER, PUBLIC, PARAMETER :: s2s_str_maxlen = 256
    45  END MODULE s2s
    56#else
     
    89  MODULE s2s
    910 
    10     PRIVATE
    11     PUBLIC s2s_initialize, s2s_finalize, s2s_gpu_activated, s2s_register_activated
     11   PRIVATE
     12    INTEGER, PARAMETER :: s2s_str_maxlen = 256
     13
     14    PUBLIC s2s_initialize, s2s_finalize, s2s_gpu_activated, s2s_register_activated, s2s_str_maxlen
    1215
    1316  CONTAINS
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/surf_ocean_mod.F90

    r5868 r5896  
    3030#endif               
    3131        &       )
     32!$gpum horizontal knon klon
    3233
    3334    use albedo, only: alboc, alboc_cd
     
    3940    USE ocean_cpl_mod, ONLY    : ocean_cpl_noice
    4041    USE indice_sol_mod, ONLY : nbsrf, is_oce
     42    USE ocean_albedo_mod, ONLY : ocean_albedo
    4143#ifdef ISO
    4244    USE infotrac_phy, ONLY : ntraciso=>ntiso,niso
     
    175177    INTEGER               :: i, k
    176178    REAL                  :: tmp
    177     REAL, PARAMETER       :: cepdu2=(0.1)**2
     179    REAL, PARAMETER       :: cepdu2=(0.1)*(0.1)
    178180    REAL, DIMENSION(knon) :: alb_eau, z0_lim
    179181    REAL, DIMENSION(knon) :: radsol
     
    188190    REAL, DIMENSION(knon) :: yrlat ! compressed latitude
    189191    !**************************************************************************
     192!$gpum nocall checksum
    190193
    191194#ifdef ISO
     
    245248    SELECT CASE(type_ocean)
    246249    CASE('couple')
     250!$gpum nocall
    247251       CALL ocean_cpl_noice( &
    248252            swnet, lwnet, alb1, &
     
    259263
    260264    CASE('slab')
     265!$gpum nocall
    261266       CALL ocean_slab_noice( &
    262267            itime, dtime, jour, knon, knindex, &
     
    403408!ym not porting to GPU for now     
    404409       if (type_ocean /= 'couple') sss(:knon) = 35.
     410!$gpum nocall
    405411       call bulk_flux(tkt, tks, taur, dter, dser, t_int, s_int, ds_ns, dt_ns, &
    406412            u = windsp(:knon), t_ocean_1 = tsurf_new(:knon), s1 = sss(:knon), &
  • LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/surface_data.f90

    r5662 r5896  
    33!
    44MODULE surface_data
    5 
     5  USE s2s, ONLY : s2s_str_maxlen
    66  IMPLICIT NONE
    77
     
    1515  !$OMP THREADPRIVATE(type_veget)
    1616
    17   CHARACTER(len=6), SAVE :: type_ocean    ! force/slab/couple
     17  CHARACTER(len=s2s_str_maxlen), SAVE :: type_ocean    ! force/slab/couple
    1818  !$OMP THREADPRIVATE(type_ocean)
    1919
     
    6363  ! if type_ocean=couple : version_ocean=opa8 ou nemo
    6464  ! if type_ocean=slab   : version_ocean=sicOBS or sicINT or sicNO
    65   CHARACTER(len=6), SAVE :: version_ocean
     65  CHARACTER(len=s2s_str_maxlen), SAVE :: version_ocean
    6666  !$OMP THREADPRIVATE(version_ocean)
    6767
Note: See TracChangeset for help on using the changeset viewer.