Changeset 5889 for LMDZ6/branches/PBLSURF_GPUPORT/libf
- Timestamp:
- Nov 27, 2025, 6:44:57 PM (4 weeks ago)
- Location:
- LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd
- Files:
-
- 15 edited
-
Ocean_skin/esat_m.f90 (modified) (1 diff)
-
Ocean_skin/sens_heat_rain_m.F90 (modified) (1 diff)
-
albsno.f90 (modified) (3 diffs)
-
calbeta.f90 (modified) (3 diffs)
-
calcul_fluxs_mod.f90 (modified) (3 diffs)
-
fonte_neige_mod.F90 (modified) (1 diff)
-
limit_read_mod.f90 (modified) (1 diff)
-
ocean_forced_mod.F90 (modified) (7 diffs)
-
ocean_slab_mod.f90 (modified) (2 diffs)
-
pbl_surface_mod.F90 (modified) (2 diffs)
-
soil.f90 (modified) (4 diffs)
-
surf_land_bucket_hetero_mod.F90 (modified) (1 diff)
-
surf_land_bucket_mod.F90 (modified) (1 diff)
-
surf_landice_mod.F90 (modified) (1 diff)
-
surf_seaice_mod.F90 (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/Ocean_skin/esat_m.f90
r5268 r5889 5 5 contains 6 6 7 elemental real function esat(T, P)8 7 elemental real function esat(T, P) 8 implicit none 9 9 ! Saturation vapor pressure of water in Pa. Buck, 1981, 10 10 ! J. Appl. Meteor. 20, 1527-1532, equation (8). 11 12 11 real, intent(in):: T ! temperature, in K 13 12 real, intent(in):: P ! air pressure, in Pa 13 real :: esat 14 14 15 15 !-------------------------------------------------------------------- -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/Ocean_skin/sens_heat_rain_m.F90
r5274 r5889 27 27 USE yomcst_mod_h, ONLY: eps_w 28 28 #endif 29 29 real :: sens_heat_rain 30 30 real, intent(in):: rain ! rain mass flux, in kg m-2 s-1 31 31 real, intent(in):: t ! air temperature at 10 m, in K -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/albsno.f90
r5282 r5889 2 2 ! $Header$ 3 3 ! 4 MODULE albsno_mod 5 6 CONTAINS 7 4 8 SUBROUTINE albsno(klon, knon, dtime, agesno, alb_neig_grid, precip_snow) 5 9 !$gpum horizontal knon klon 6 10 USE clesphys_mod_h 7 11 IMPLICIT NONE … … 28 32 REAL :: as 29 33 REAL, DIMENSION(klon,nvm) :: veget 30 REAL, DIMENSION(nvm) ,SAVE :: init, decay31 !$OMP THREADPRIVATE(init, decay)34 REAL, DIMENSION(nvm) :: init 35 REAL, DIMENSION(nvm) :: decay 32 36 33 DATA init /0.55, 0.14, 0.18, 0.29, 0.15, 0.15, 0.14, 0./34 DATA decay/0.30, 0.67, 0.63, 0.45, 0.40, 0.14, 0.06, 1./35 37 !**************************************************************************************** 38 init = (/0.55, 0.14, 0.18, 0.29, 0.15, 0.15, 0.14, 0./) 39 decay = (/0.30, 0.67, 0.63, 0.45, 0.40, 0.14, 0.06, 1./) 36 40 37 41 if (albsno0>=0.) then … … 61 65 62 66 END SUBROUTINE albsno 67 68 END MODULE albsno_mod -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/calbeta.f90
r5868 r5889 2 2 ! $Header$ 3 3 ! 4 MODULE calbeta_mod 5 6 CONTAINS 7 4 8 SUBROUTINE calbeta(dtime,indice,knon,snow,qsol, & 5 9 vbeta,vcal,vdif) 6 10 !$gpum horizontal knon 7 11 USE flux_arp_mod_h 8 12 USE dimphy … … 96 100 END SUBROUTINE calbeta 97 101 102 END MODULE calbeta_mod 98 103 99 104 … … 111 116 112 117 113 -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/calcul_fluxs_mod.f90
r5868 r5889 15 15 tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & 16 16 sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol, rhoa) 17 17 !$gpum horizontal knon 18 18 USE indice_sol_mod 19 19 use sens_heat_rain_m, only: sens_heat_rain … … 104 104 CHARACTER (len = 20) :: modname = 'calcul_fluxs' 105 105 LOGICAL :: fonte_neige 106 LOGICAL, SAVE :: check = .FALSE. 107 !$OMP THREADPRIVATE(check) 106 LOGICAL, PARAMETER :: check = .FALSE. 108 107 109 108 ! End definition … … 281 280 p1lay, t1lay, & 282 281 flux_u1, flux_v1) 283 282 !$gpum horizontal knon 284 283 USE clesphys_mod_h 285 284 USE yomcst_mod_h 286 USE dimphy285 USE dimphy 287 286 288 287 -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/fonte_neige_mod.F90
r5868 r5889 237 237 #endif 238 238 & ) 239 239 !$gpum horizontal knon 240 240 USE indice_sol_mod 241 241 #ifdef ISO -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/limit_read_mod.f90
r5868 r5889 151 151 !GG 152 152 SUBROUTINE limit_read_hice(knon, knindex, hice_out) 153 !$gpum horizontal knon klon 153 154 ! 154 155 ! This subroutine returns the sea surface temperature already read from limit.nc. -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/ocean_forced_mod.F90
r5868 r5889 43 43 USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 44 44 use config_ocean_skin_m, only: activate_ocean_skin 45 USE calbeta_mod, ONLY : calbeta 46 45 47 #ifdef ISO 46 48 USE infotrac_phy, ONLY: ntiso,niso … … 310 312 #endif 311 313 ) 314 !$gpum horizontal knon klon 312 315 ! 313 316 ! This subroutine treats the ocean where there is ice. … … 329 332 USE fonte_neige_mod, ONLY : fonte_neige 330 333 USE indice_sol_mod 334 USE albsno_mod, ONLY : albsno 335 USE soil_mod, ONLY : soil 336 USE calbeta_mod, ONLY : calbeta 331 337 USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o 332 338 #ifdef ISO … … 412 418 ! Local variables 413 419 !**************************************************************************************** 414 LOGICAL :: check=.FALSE.420 LOGICAL,PARAMETER :: check=.FALSE. 415 421 INTEGER :: i, j 416 422 REAL :: zfra … … 470 476 471 477 ! albedo and radiation parameters 472 INTEGER , SAVE:: iflag_sic_albedo478 INTEGER :: iflag_sic_albedo 473 479 ! albedo old or NEMO 474 480 REAL :: alb_sno_dry!=rn_alb_sdry !dry snow albedo … … 492 498 ! ice (not snow). Should be visible only, not NIR 493 499 REAL :: pen_ext !=si_pen_ext !extinction length of penetrating shortwave (m-1) 500 REAl :: lon(knon), lat(knon) ! for indexation 494 501 495 502 ! HF from ocean below ice … … 535 542 IF (soil_model) THEN 536 543 ! update tsoil and calculate soilcap and soilflux 544 lon(1:knon) = longitude(knindex(1:knon)) 545 lat(1:knon) = latitude(knindex(1:knon)) 537 546 CALL soil(dtime, is_sic, knon, snow, tsurf_tmp, qsol, & 538 & lon gitude(knindex(1:knon)), latitude(knindex(1:knon)), tsoil,soilcap, soilflux)547 & lon, lat, tsoil,soilcap, soilflux) 539 548 cal(1:knon) = RCPD / soilcap(1:knon) 540 549 radsol(1:knon) = radsol(1:knon) + soilflux(1:knon) -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/ocean_slab_mod.f90
r5868 r5889 352 352 USE slab_heat_transp_mod, ONLY: divgrad_phy,slab_ekman1,slab_ekman2,slab_gmdiff 353 353 USE mod_phys_lmdz_para 354 USE calbeta_mod, ONLY : calbeta 355 354 356 355 357 … … 691 693 USE clesphys_mod_h 692 694 USE yomcst_mod_h 693 USE calcul_fluxs_mod 695 USE calcul_fluxs_mod 696 USE calbeta_mod, ONLY : calbeta 697 694 698 695 699 -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/pbl_surface_mod.F90
r5885 r5889 113 113 USE climb_qbs_mod, ONLY : climb_qbs_init 114 114 USE yamada_c_mod, ONLY : yamada_c_init 115 USE soil_mod, ONLY : soil_init 115 116 116 117 IMPLICIT NONE … … 272 273 CALL climb_qbs_init 273 274 CALL yamada_c_init 275 CALL soil_init 274 276 275 277 END SUBROUTINE pbl_surface_init -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/soil.f90
r5868 r5889 2 2 ! $Header$ 3 3 ! 4 SUBROUTINE soil(ptimestep, indice, knon, snow, ptsrf, qsol, & 5 lon, lat, ptsoil, pcapcal, pfluxgrd) 6 7 USE yomcst_mod_h 8 USE dimphy 9 USE mod_phys_lmdz_para 10 USE indice_sol_mod 11 USE print_control_mod, ONLY: lunout 4 MODULE soil_mod 12 5 USE dimsoil_mod_h, ONLY: nsoilmx 13 USE comsoil_mod_h 14 IMPLICIT NONE 15 16 !======================================================================= 17 ! 18 ! Auteur: Frederic Hourdin 30/01/92 19 ! ------- 20 ! 21 ! Object: Computation of : the soil temperature evolution 22 ! ------- the surfacic heat capacity "Capcal" 23 ! the surface conduction flux pcapcal 24 ! 25 ! Update: 2021/07 : soil thermal inertia, formerly a constant value, 26 ! ------ can also be now a function of soil moisture (F Cheruy's idea) 27 ! depending on iflag_inertie, read from physiq.def via conf_phys_m.F90 28 ! ("Stage L3" Eve Rebouillat, with E Vignon, A Sima, F Cheruy) 29 ! 30 ! Method: Implicit time integration 31 ! ------- 32 ! Consecutive ground temperatures are related by: 33 ! T(k+1) = C(k) + D(k)*T(k) (*) 34 ! The coefficients C and D are computed at the t-dt time-step. 35 ! Routine structure: 36 ! 1) C and D coefficients are computed from the old temperature 37 ! 2) new temperatures are computed using (*) 38 ! 3) C and D coefficients are computed from the new temperature 39 ! profile for the t+dt time-step 40 ! 4) the coefficients A and B are computed where the diffusive 41 ! fluxes at the t+dt time-step is given by 42 ! Fdiff = A + B Ts(t+dt) 43 ! or Fdiff = F0 + Capcal (Ts(t+dt)-Ts(t))/dt 44 ! with F0 = A + B (Ts(t)) 45 ! Capcal = B*dt 46 ! 47 ! Interface: 48 ! ---------- 49 ! 50 ! Arguments: 51 ! ---------- 52 ! ptimestep physical timestep (s) 53 ! indice sub-surface index 54 ! snow(klon) snow 55 ! ptsrf(klon) surface temperature at time-step t (K) 56 ! qsol(klon) soil moisture (kg/m2 or mm) 57 ! lon(klon) longitude in radian 58 ! lat(klon) latitude in radian 59 ! ptsoil(klon,nsoilmx) temperature inside the ground (K) 60 ! pcapcal(klon) surfacic specific heat (W*m-2*s*K-1) 61 ! pfluxgrd(klon) surface diffusive flux from ground (Wm-2) 62 ! 63 !======================================================================= 64 ! Arguments 65 ! --------- 66 REAL, INTENT(IN) :: ptimestep 67 INTEGER, INTENT(IN) :: indice, knon !, knindex 68 REAL, DIMENSION(knon), INTENT(IN) :: snow 69 REAL, DIMENSION(knon), INTENT(IN) :: ptsrf 70 REAL, DIMENSION(knon), INTENT(IN) :: qsol 71 REAL, DIMENSION(knon), INTENT(IN) :: lon 72 REAL, DIMENSION(knon), INTENT(IN) :: lat 73 74 REAL, DIMENSION(knon,nsoilmx), INTENT(INOUT) :: ptsoil 75 REAL, DIMENSION(knon), INTENT(OUT) :: pcapcal 76 REAL, DIMENSION(knon), INTENT(OUT) :: pfluxgrd 77 78 !----------------------------------------------------------------------- 79 ! Local variables 80 ! --------------- 81 INTEGER :: ig, jk, ierr 82 REAL :: min_period,dalph_soil 83 REAL, DIMENSION(nsoilmx) :: zdz2 84 REAL :: z1s 85 REAL, DIMENSION(knon) :: ztherm_i 86 REAL, DIMENSION(knon,nsoilmx,nbsrf) :: C_coef, D_coef 87 88 ! Local saved variables 89 ! --------------------- 6 PRIVATE 7 90 8 REAL, SAVE :: lambda 91 9 !$OMP THREADPRIVATE(lambda) 92 10 REAL, DIMENSION(nsoilmx), SAVE :: dz1, dz2 93 11 !$OMP THREADPRIVATE(dz1,dz2) 94 LOGICAL, SAVE :: firstcall=.TRUE. 95 !$OMP THREADPRIVATE(firstcall) 96 12 LOGICAL, SAVE :: is_initialized=.FALSE. 13 !$OMP THREADPRIVATE(is_initialized) 14 15 PUBLIC :: soil_init, soil 16 17 CONTAINS 18 19 SUBROUTINE soil_init 20 USE dimsoil_mod_h, ONLY: nsoilmx 21 USE print_control_mod, ONLY: lunout 22 USE mod_phys_lmdz_para 23 IMPLICIT NONE 24 REAL :: min_period,dalph_soil 25 INTEGER :: ig, jk, ierr 97 26 !----------------------------------------------------------------------- 98 27 ! Depthts: … … 107 36 !----------------------------------------------------------------------- 108 37 109 IF (firstcall) THEN110 38 !----------------------------------------------------------------------- 111 39 ! ground levels 112 40 ! grnd=z/l where l is the skin depth of the diurnal cycle: 113 41 !----------------------------------------------------------------------- 42 IF (.NOT. is_initialized) THEN 114 43 115 44 min_period=1800. ! en secondes … … 154 83 ENDDO 155 84 156 firstcall =.FALSE.85 is_initialized=.TRUE. 157 86 END IF 87 88 END SUBROUTINE soil_init 89 90 SUBROUTINE soil(ptimestep, indice, knon, snow, ptsrf, qsol, & 91 lon, lat, ptsoil, pcapcal, pfluxgrd) 92 !$gpum horizontal knon klon 93 USE yomcst_mod_h 94 USE dimphy 95 USE mod_phys_lmdz_para 96 USE indice_sol_mod 97 USE print_control_mod, ONLY: lunout 98 USE dimsoil_mod_h, ONLY: nsoilmx 99 USE comsoil_mod_h 100 IMPLICIT NONE 101 102 !======================================================================= 103 ! 104 ! Auteur: Frederic Hourdin 30/01/92 105 ! ------- 106 ! 107 ! Object: Computation of : the soil temperature evolution 108 ! ------- the surfacic heat capacity "Capcal" 109 ! the surface conduction flux pcapcal 110 ! 111 ! Update: 2021/07 : soil thermal inertia, formerly a constant value, 112 ! ------ can also be now a function of soil moisture (F Cheruy's idea) 113 ! depending on iflag_inertie, read from physiq.def via conf_phys_m.F90 114 ! ("Stage L3" Eve Rebouillat, with E Vignon, A Sima, F Cheruy) 115 ! 116 ! Method: Implicit time integration 117 ! ------- 118 ! Consecutive ground temperatures are related by: 119 ! T(k+1) = C(k) + D(k)*T(k) (*) 120 ! The coefficients C and D are computed at the t-dt time-step. 121 ! Routine structure: 122 ! 1) C and D coefficients are computed from the old temperature 123 ! 2) new temperatures are computed using (*) 124 ! 3) C and D coefficients are computed from the new temperature 125 ! profile for the t+dt time-step 126 ! 4) the coefficients A and B are computed where the diffusive 127 ! fluxes at the t+dt time-step is given by 128 ! Fdiff = A + B Ts(t+dt) 129 ! or Fdiff = F0 + Capcal (Ts(t+dt)-Ts(t))/dt 130 ! with F0 = A + B (Ts(t)) 131 ! Capcal = B*dt 132 ! 133 ! Interface: 134 ! ---------- 135 ! 136 ! Arguments: 137 ! ---------- 138 ! ptimestep physical timestep (s) 139 ! indice sub-surface index 140 ! snow(klon) snow 141 ! ptsrf(klon) surface temperature at time-step t (K) 142 ! qsol(klon) soil moisture (kg/m2 or mm) 143 ! lon(klon) longitude in radian 144 ! lat(klon) latitude in radian 145 ! ptsoil(klon,nsoilmx) temperature inside the ground (K) 146 ! pcapcal(klon) surfacic specific heat (W*m-2*s*K-1) 147 ! pfluxgrd(klon) surface diffusive flux from ground (Wm-2) 148 ! 149 !======================================================================= 150 ! Arguments 151 ! --------- 152 REAL, INTENT(IN) :: ptimestep 153 INTEGER, INTENT(IN) :: indice, knon !, knindex 154 REAL, DIMENSION(knon), INTENT(IN) :: snow 155 REAL, DIMENSION(knon), INTENT(IN) :: ptsrf 156 REAL, DIMENSION(knon), INTENT(IN) :: qsol 157 REAL, DIMENSION(knon), INTENT(IN) :: lon 158 REAL, DIMENSION(knon), INTENT(IN) :: lat 159 160 REAL, DIMENSION(knon,nsoilmx), INTENT(INOUT) :: ptsoil 161 REAL, DIMENSION(knon), INTENT(OUT) :: pcapcal 162 REAL, DIMENSION(knon), INTENT(OUT) :: pfluxgrd 163 164 !----------------------------------------------------------------------- 165 ! Local variables 166 ! --------------- 167 INTEGER :: ig, jk, ierr 168 REAL, DIMENSION(nsoilmx) :: zdz2 169 REAL :: z1s 170 REAL, DIMENSION(knon) :: ztherm_i 171 REAL, DIMENSION(knon,nsoilmx,nbsrf) :: C_coef, D_coef 172 158 173 159 174 … … 351 366 352 367 END SUBROUTINE soil 368 369 END MODULE soil_mod -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/surf_land_bucket_hetero_mod.F90
r5876 r5889 41 41 USE surf_param_mod, ONLY: eff_surf_param, average_surf_var 42 42 USE cdrag_mod 43 USE albsno_mod, ONLY : albsno 44 USE calbeta_mod, ONLY : calbeta 43 45 44 46 #ifdef ISO -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/surf_land_bucket_mod.F90
r5868 r5889 47 47 USE yomcst_mod_h 48 48 USE dimsoil_mod_h, ONLY: nsoilmx 49 USE albsno_mod, ONLY : albsno 50 USE soil_mod, ONLY : soil 51 USE calbeta_mod, ONLY : calbeta 52 49 53 !**************************************************************************************** 50 54 ! Bucket calculations for surface. -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/surf_landice_mod.F90
r5868 r5889 58 58 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INLANDSIS 59 59 USE dimsoil_mod_h, ONLY: nsoilmx 60 USE albsno_mod, ONLY : albsno 61 USE soil_mod, ONLY : soil 62 USE calbeta_mod, ONLY : calbeta 63 60 64 61 65 -
LMDZ6/branches/PBLSURF_GPUPORT/libf/phylmd/surf_seaice_mod.F90
r5868 r5889 31 31 #endif 32 32 & ) 33 !$gpum horizontal knon klon 33 34 34 35 USE dimphy … … 150 151 !**************************************************************************************** 151 152 IF (type_ocean == 'couple') THEN 152 153 !$gpum nocall 153 154 CALL ocean_cpl_ice( & 154 155 rlon, rlat, swnet, lwnet, alb1, & … … 165 166 166 167 ELSE IF (type_ocean == 'slab'.AND.version_ocean=='sicINT') THEN 168 !$gpum nocall 167 169 CALL ocean_slab_ice( & 168 170 itime, dtime, jour, knon, knindex, & … … 176 178 177 179 ELSE ! type_ocean=force or slab +sicOBS or sicNO 180 178 181 IF (is_master) WRITE(lunout,*) "******* CHECKSUM ==> ocean_forced IN *******" 182 !$gpum nocall checksum 179 183 CALL checksum("itime", itime) 180 184 CALL checksum("dtime", dtime)
Note: See TracChangeset
for help on using the changeset viewer.
