Changeset 5968 for LMDZ6/trunk


Ignore:
Timestamp:
Dec 19, 2025, 11:46:41 AM (2 weeks ago)
Author:
yann meurdesoif
Message:

GPU port of surf_ocean
Merge of commit r5896
YM

Location:
LMDZ6/trunk/libf/phylmd
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/albedo.f90

    r5942 r5968  
    22MODULE albedo
    33
    4   USE clesphys_mod_h
    5   USE yomcst_mod_h
    6   IMPLICIT NONE
     4IMPLICIT NONE
    75
    8 CONTAINS
     6contains
    97
    108  SUBROUTINE alboc(klon, rjour, rlat, albedo)
    11     USE clesphys_mod_h
    12     USE orbite_mod, ONLY: orbite
     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
    1314    ! ======================================================================
    1415    ! Auteur(s): Z.X. Li (LMD/CNRS) (adaptation du GCM du LMD)
     
    123124  ! =====================================================================
    124125  SUBROUTINE alboc_cd(klon, rmu0, albedo)
     126!$gpum horizontal klon
     127  IMPLICIT NONE
    125128
    126129    ! Auteur(s): Z.X. Li (LMD/CNRS)
     
    159162  END SUBROUTINE alboc_cd
    160163
    161 END MODULE albedo
     164end module albedo
  • LMDZ6/trunk/libf/phylmd/calcul_fluxs_mod.f90

    r5965 r5968  
    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/trunk/libf/phylmd/limit_read_mod.f90

    r5965 r5968  
    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/trunk/libf/phylmd/o3_chem_m.f90

    r5837 r5968  
    2222    use mod_grid_phy_lmdz, only: nbp_lev
    2323    use nrtype, only: pi
    24     USE orbite_mod, ONLY: orbite, zenang
     24    use orbite_mod, only : zenang, orbite
    2525
    2626    integer, intent(in):: julien ! jour julien, 1 <= julien <= 360
  • LMDZ6/trunk/libf/phylmd/ocean_albedo.f90

    r5942 r5968  
    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/trunk/libf/phylmd/ocean_forced_mod.F90

    r5965 r5968  
    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/trunk/libf/phylmd/s2s.F90

    r5764 r5968  
    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/trunk/libf/phylmd/surf_ocean_mod.F90

    r5942 r5968  
    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/trunk/libf/phylmd/surface_data.f90

    r5662 r5968  
    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.