Changeset 5927 for LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90
- Timestamp:
- Dec 12, 2025, 5:26:10 PM (6 weeks ago)
- File:
-
- 1 edited
-
LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90 (modified) (29 diffs)
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90
r5894 r5927 34 34 USE config_ocean_skin_m, ONLY : activate_ocean_skin 35 35 #ifdef ISO 36 USE infotrac_phy, ONLY: niso,ntraciso=>ntiso 36 USE infotrac_phy, ONLY: niso,ntraciso=>ntiso 37 USE phys_local_var_mod, ONLY: Rsol !! SN soil isotope ratio for LMDZORISO 37 38 #endif 38 39 … … 61 62 62 63 #ifdef ISO 63 REAL, ALLOCATABLE, DIMENSION(:,:,:), PRIVATE,SAVE :: xtsnow ! snow at surface64 REAL, ALLOCATABLE, DIMENSION(:,:,:), SAVE :: xtsnow ! snow at surface 64 65 !$OMP THREADPRIVATE(xtsnow) 65 REAL, ALLOCATABLE, DIMENSION(:,:), PRIVATE, SAVE :: Rland_ice ! snow at surface66 REAL, ALLOCATABLE, DIMENSION(:,:), SAVE :: Rland_ice ! ice bucket bellow snowpack 66 67 !$OMP THREADPRIVATE(Rland_ice) 67 REAL, ALLOCATABLE, DIMENSION(:,:), PRIVATE, SAVE :: Roce ! snow at surface68 REAL, ALLOCATABLE, DIMENSION(:,:), PRIVATE, SAVE :: Roce 68 69 !$OMP THREADPRIVATE(Roce) 69 70 #endif … … 91 92 !GG 92 93 ! SUBROUTINE pbl_surface_init(fder_rst, snow_rst, qsurf_rst, ftsoil_rst) 93 SUBROUTINE pbl_surface_init(fder_rst, snow_rst, qsurf_rst, ftsoil_rst, hice_rst, tice_rst,bilg_cumul_rst)94 SUBROUTINE pbl_surface_init(fder_rst, snow_rst, qsurf_rst, ftsoil_rst, hice_rst, tice_rst, bilg_cumul_rst) 94 95 !GG 95 96 … … 234 235 235 236 #ifdef ISO 236 SUBROUTINE pbl_surface_init_iso(xtsnow_rst,Rland_ice_rst )237 SUBROUTINE pbl_surface_init_iso(xtsnow_rst,Rland_ice_rst,Rsol_rst) 237 238 238 239 ! This routine should be called after the restart file has been read. … … 251 252 ! Input variables 252 253 !**************************************************************************************** 253 REAL, DIMENSION(niso,klon, nbsrf), INTENT(IN) :: xtsnow_rst254 REAL, DIMENSION(niso,klon), INTENT(IN) :: Rland_ice_rst 254 REAL, DIMENSION(niso,klon, nbsrf), INTENT(IN) :: xtsnow_rst 255 REAL, DIMENSION(niso,klon), INTENT(IN) :: Rland_ice_rst, Rsol_rst 255 256 256 257 ! Local variables … … 259 260 CHARACTER(len=80) :: abort_message 260 261 CHARACTER(len = 20) :: modname = 'pbl_surface_init' 261 integeri,ixt262 INTEGER :: i,ixt 262 263 263 264 !**************************************************************************************** … … 277 278 xtsnow(:,:,:) = xtsnow_rst(:,:,:) 278 279 Rland_ice(:,:) = Rland_ice_rst(:,:) 280 Rsol(:,:) = Rsol_rst(:,:) 279 281 Roce(:,:) = 0.0 280 282 … … 283 285 CALL iso_verif_egalite_vect2D( & 284 286 & xtsnow,snow, & 285 & 'pbl_surface_mod 170',niso,klon,nbsrf)287 & 'pbl_surface_mod 286',niso,klon,nbsrf) 286 288 DO i=1,klon 287 289 IF (iso_eau >= 0) THEN 288 290 CALL iso_verif_egalite(Rland_ice(iso_eau,i),1.0, & 289 & 'pbl_surf_mod 177') 291 & 'pbl_surf_mod 290') 292 CALL iso_verif_egalite(Rsol(iso_eau,i),1.0, & 293 & 'pbl_surf_mod 292') 290 294 ENDIF 291 295 ENDDO … … 371 375 !!! 372 376 #ifdef ISO 373 & ,xtrain_f, xtsnow_f,xt, &377 & ,xtrain_f,xtsnow_f,xt, & 374 378 & wake_dlxt,zxxtevap,xtevap, & 375 379 & d_xt,d_xt_w,d_xt_x, & 376 380 & xtsol,dflux_xt,zxxtsnow,zxfluxxt,flux_xt, & 377 & h1_diag,runoff_diag,xtrunoff_diag & 381 & h1_diag,runoff_diag,xtrunoff_diag, & 382 & xtriverflow,xtcoastalflow & 378 383 #endif 379 384 & ) … … 458 463 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, carbon_cycle_tr, level_coupling_esm 459 464 USE carbon_cycle_mod, ONLY : co2_send, nbcf_out, fields_out, yfields_out, cfname_out 460 use hbtm_mod, only: hbtm465 USE hbtm_mod, ONLY : hbtm 461 466 USE indice_sol_mod 462 467 USE time_phylmdz_mod, ONLY : day_ini,annee_ref,itau_phy … … 464 469 USE print_control_mod, ONLY : prt_level,lunout 465 470 #ifdef ISO 466 USE isotopes_mod, ONLY: Rdefault,iso_eau471 USE isotopes_mod, ONLY: Rdefault,iso_eau 467 472 #ifdef ISOVERIF 468 USE isotopes_verif_mod473 USE isotopes_verif_mod 469 474 #endif 470 475 #ifdef ISOTRAC 471 USE isotrac_mod, only: index_iso472 #endif 473 #endif 474 USE dimpft_mod_h476 USE isotrac_mod, ONLY: index_iso 477 #endif 478 #endif 479 USE dimpft_mod_h 475 480 USE flux_arp_mod_h 476 481 USE compbl_mod_h 477 482 USE yoethf_mod_h 478 USE clesphys_mod_h483 USE clesphys_mod_h 479 484 USE ioipsl_getin_p_mod, ONLY : getin_p 480 use phys_state_var_mod, only: ds_ns, dt_ns, delta_sst, delta_sal, dter, &485 USE phys_state_var_mod, ONLY : ds_ns, dt_ns, delta_sst, delta_sal, dter, & 481 486 dser, dt_ds, zsig, zmea, & 482 487 frac_tersrf, z0m_tersrf, ratio_z0m_z0h_tersrf, albedo_tersrf !AM 483 use phys_output_var_mod, only: tkt, tks, taur, sss484 use lmdz_blowing_snow_ini, only: zeta_bs485 use wxios_mod, ONLY: missing_val_xios => missing_val, using_xios486 USE netcdf, only: missing_val_netcdf => nf90_fill_real487 USE dimsoil_mod_h, ONLY : nsoilmx488 USE surf_param_mod, ONLY : eff_surf_param !AM488 USE phys_output_var_mod, ONLY : tkt, tks, taur, sss 489 USE lmdz_blowing_snow_ini, ONLY : zeta_bs 490 USE wxios_mod, ONLY : missing_val_xios => missing_val, using_xios 491 USE netcdf, ONLY : missing_val_netcdf => nf90_fill_real 492 USE dimsoil_mod_h, ONLY : nsoilmx 493 USE surf_param_mod, ONLY : eff_surf_param !AM 489 494 490 495 USE yomcst_mod_h 491 IMPLICIT NONE 496 497 IMPLICIT NONE 492 498 493 499 INCLUDE "FCTTRE.h" … … 619 625 #ifdef ISO 620 626 REAL, DIMENSION(ntraciso,klon), INTENT(OUT) :: zxxtevap ! water vapour flux at surface, positiv upwards 621 REAL, DIMENSION(ntraciso,klon, klev), INTENT(OUT) :: d_xt ! change in water vapour627 REAL, DIMENSION(ntraciso,klon, klev), INTENT(OUT) :: d_xt ! change in water vapour 622 628 REAL, DIMENSION(klon), INTENT(OUT) :: runoff_diag 623 629 REAL, DIMENSION(niso,klon), INTENT(OUT) :: xtrunoff_diag 630 REAL, DIMENSION(niso,klon), INTENT(OUT) :: xtriverflow ! PRSN LMDZORISO variables 631 REAL, DIMENSION(niso,klon), INTENT(OUT) :: xtcoastalflow ! PRSN Fin 624 632 REAL, DIMENSION(ntraciso,klon,klev), INTENT(OUT) :: d_xt_w 625 633 REAL, DIMENSION(ntraciso,klon,klev), INTENT(OUT) :: d_xt_x … … 794 802 REAL, DIMENSION(niso,klon) :: yxtrunoff_diag 795 803 REAL, DIMENSION(niso,klon) :: yRland_ice 804 REAL, DIMENSION(niso,klon) :: yxtriverflow 805 REAL, DIMENSION(niso,klon) :: yxtcoastalflow 806 REAL, DIMENSION(niso,klon) :: yRsol 796 807 #endif 797 808 REAL, DIMENSION(klon) :: ysolsw, ysollw … … 804 815 REAL, DIMENSION(klon) :: y_dflux_t, y_dflux_q 805 816 #ifdef ISO 806 REAL, DIMENSION(ntraciso,klon) :: y_flux_xt1807 REAL, DIMENSION(ntraciso,klon) :: y_dflux_xt817 REAL, DIMENSION(ntraciso,klon) :: y_flux_xt1 818 REAL, DIMENSION(ntraciso,klon) :: y_dflux_xt 808 819 #endif 809 820 REAL, DIMENSION(klon) :: y_flux_u1, y_flux_v1 … … 1197 1208 DO i=1,klon 1198 1209 DO ixt=1,niso 1199 CALL iso_verif_noNaN(xtsol(ixt,i),'pbl_surface 608')1210 CALL iso_verif_noNaN(xtsol(ixt,i),'pbl_surface 1209') 1200 1211 ENDDO 1201 1212 ENDDO … … 1205 1216 IF (iso_eau >= 0) THEN 1206 1217 CALL iso_verif_egalite_choix(Rland_ice(iso_eau,i),1.0, & 1207 & 'pbl_surf_mod 585',errmax,errmaxrel)1218 & 'pbl_surf_mod 1216',errmax,errmaxrel) 1208 1219 CALL iso_verif_egalite_choix(xtsnow_f(iso_eau,i),snow_f(i), & 1209 & 'pbl_surf_mod 594',errmax,errmaxrel)1220 & 'pbl_surf_mod 1218',errmax,errmaxrel) 1210 1221 IF (iso_verif_egalite_choix_nostop(xtsol(iso_eau,i),qsol(i), & 1211 & 'pbl_surf_mod 596',errmax,errmaxrel) == 1) THEN1222 & 'pbl_surf_mod 1220',errmax,errmaxrel) == 1) THEN 1212 1223 WRITE(*,*) 'i=',i 1213 1224 STOP … … 1215 1226 DO nsrf=1,nbsrf 1216 1227 CALL iso_verif_egalite_choix(xtsnow(iso_eau,i,nsrf),snow(i,nsrf), & 1217 & 'pbl_surf_mod 598',errmax,errmaxrel)1228 & 'pbl_surf_mod 1226',errmax,errmaxrel) 1218 1229 ENDDO 1219 1230 ENDIF !IF (iso_eau >= 0) THEN … … 1223 1234 IF (iso_eau >= 0) THEN 1224 1235 CALL iso_verif_egalite_choix(xt(iso_eau,i,k),q(i,k), & 1225 & 'pbl_surf_mod 595',errmax,errmaxrel)1236 & 'pbl_surf_mod 1234',errmax,errmaxrel) 1226 1237 ENDIF !IF (iso_eau >= 0) THEN 1227 1238 ENDDO !DO i=1,knon … … 1460 1471 flux_xt = 0.0 1461 1472 yRland_ice = 0.0 1473 yrunoff_diag = 0.0 1474 yxtrunoff_diag = 0.0 1475 yxtriverflow = 0.0 1476 yxtcoastalflow = 0.0 1477 yRsol = 0.0 1462 1478 ! d_xt = 0.0 1463 1479 y_dflux_xt = 0.0 … … 1821 1837 !IF (nsrf == is_lic) THEN 1822 1838 DO ixt=1,niso 1823 yRland_ice(ixt,j)= Rland_ice(ixt,i) 1839 yRland_ice(ixt,j) = Rland_ice(ixt,i) 1840 yxtriverflow(ixt,j) = xtriverflow(ixt,i) 1841 yxtcoastalflow(ixt,j)= xtcoastalflow(ixt,i) 1842 yRsol(ixt,j) = Rsol(ixt,i) 1824 1843 ENDDO 1825 1844 !endif !IF (nsrf == is_lic) THEN … … 2586 2605 & ,yxtrain_f, yxtsnow_f,yxt1, & 2587 2606 & yxtsnow,yxtsol,yxtevap,h1, & 2588 & yrunoff_diag,yxtrunoff_diag,yRland_ice & 2607 & yrunoff_diag,yxtrunoff_diag,yRland_ice, & 2608 & yxtriverflow,yxtcoastalflow,yRsol & 2589 2609 #endif 2590 2610 & ) … … 2658 2678 ypsref, yu1, yv1, ygustiness, yrugoro, pctsrf, & 2659 2679 ysnow, yqsurf, yqsol,yqbs1, yagesno, & 2660 ytsoil, yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap, yicesub_lic, yfluxsens, yfluxlat, &2680 ytsoil, yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap, yicesub_lic, yfluxsens, yfluxlat, & 2661 2681 yfluxbs, ytsurf_new, y_dflux_t, y_dflux_q, & 2662 2682 yzmea, yzsig, ycldt, & … … 2696 2716 DO ixt=1,ntraciso 2697 2717 CALL iso_verif_noNaN(yxtevap(ixt,j), & 2698 & 'pbl_surface 1095a: apres surf_landice')2718 & 'pbl_surface 2716a: apres surf_landice') 2699 2719 ENDDO 2700 doixt=1,niso2701 calliso_verif_noNaN(yxtsol(ixt,j), &2702 & 'pbl_surface 1095b: apres surf_landice')2703 enddo2704 enddo2720 DO ixt=1,niso 2721 CALL iso_verif_noNaN(yxtsol(ixt,j), & 2722 & 'pbl_surface 2720b: apres surf_landice') 2723 ENDDO 2724 ENDDO 2705 2725 #endif 2706 2726 #ifdef ISOVERIF 2707 2727 !write(*,*) 'pbl_surface_mod 1060: sortie surf_landice' 2708 doj=1,knon2728 DO j=1,knon 2709 2729 IF (iso_eau >= 0) THEN 2710 2730 CALL iso_verif_egalite(yxtsnow(iso_eau,j), & 2711 & ysnow(j),'pbl_surf_mod 1064')2731 & ysnow(j),'pbl_surf_mod 2729') 2712 2732 ENDIF !if (iso_eau >= 0) THEN 2713 2733 ENDDO !DO i=1,klon … … 3464 3484 dflux_q(i) = dflux_q(i) + y_dflux_q(j)*ypct(j) 3465 3485 #ifdef ISO 3466 DO ixt=1,niso3467 xtsnow(ixt,i,nsrf) = yxtsnow(ixt,j)3468 ENDDO3469 DO ixt=1,ntraciso3470 xtevap(ixt,i,nsrf) = - flux_xt(ixt,i,1,nsrf)3471 dflux_xt(ixt,i) = dflux_xt(ixt,i) + y_dflux_xt(ixt,j)*ypct(j)3472 ENDDO3473 IF (nsrf == is_lic) THEN3474 3486 DO ixt=1,niso 3475 Rland_ice(ixt,i) = yRland_ice(ixt,j) 3476 ENDDO 3477 ENDIF !IF (nsrf == is_lic) THEN 3487 xtsnow(ixt,i,nsrf) = yxtsnow(ixt,j) 3488 ENDDO 3489 DO ixt=1,ntraciso 3490 xtevap(ixt,i,nsrf) = - flux_xt(ixt,i,1,nsrf) 3491 dflux_xt(ixt,i) = dflux_xt(ixt,i) + y_dflux_xt(ixt,j)*ypct(j) 3492 ENDDO 3493 IF (nsrf == is_lic) THEN 3494 DO ixt=1,niso 3495 Rland_ice(ixt,i) = yRland_ice(ixt,j) 3496 ENDDO 3497 ENDIF !IF (nsrf == is_lic) THEN 3498 IF (nsrf == is_ter) THEN 3499 DO ixt=1,niso 3500 xtriverflow(ixt,i) = yxtriverflow(ixt,j) 3501 xtcoastalflow(ixt,i)= yxtcoastalflow(ixt,j) 3502 Rsol(ixt,i) = yRsol(ixt,j) 3503 ENDDO 3504 ENDIF !IF (nsrf == is_ter) THEN 3478 3505 #ifdef ISOVERIF 3479 IF (iso_eau.gt.0) THEN 3480 call iso_verif_egalite_choix(Rland_ice(iso_eau,i),1.0, & 3481 & 'pbl_surf_mod 1230',errmax,errmaxrel) 3482 ENDIF !if (iso_eau.gt.0) then 3506 IF (iso_eau.GT.0) THEN 3507 CALL iso_verif_egalite_choix(Rland_ice(iso_eau,i),1.0, & 3508 & 'pbl_surf_mod 3506',errmax,errmaxrel) 3509 CALL iso_verif_egalite_choix(Rsol(iso_eau,i),1.0, & 3510 & 'pbl_surf_mod 3508',errmax,errmaxrel) 3511 ENDIF !if (iso_eau.gt.0) then 3483 3512 #endif 3484 3513 #endif … … 4409 4438 SUBROUTINE pbl_surface_final(fder_rst, snow_rst, qsurf_rst, ftsoil_rst & 4410 4439 #ifdef ISO 4411 ,xtsnow_rst,Rland_ice_rst &4440 ,xtsnow_rst,Rland_ice_rst,Rsol_rst & 4412 4441 #endif 4413 4442 ) … … 4431 4460 REAL, DIMENSION(niso,klon, nbsrf), INTENT(OUT) :: xtsnow_rst 4432 4461 REAL, DIMENSION(niso,klon), INTENT(OUT) :: Rland_ice_rst 4462 REAL, DIMENSION(niso,klon), INTENT(OUT) :: Rsol_rst 4433 4463 #endif 4434 4464 … … 4445 4475 xtsnow_rst(:,:,:) = xtsnow(:,:,:) 4446 4476 Rland_ice_rst(:,:) = Rland_ice(:,:) 4477 Rsol_rst(:,:) = Rsol(:,:) 4447 4478 #endif 4448 4479 … … 4464 4495 IF (ALLOCATED(xtsnow)) DEALLOCATE(xtsnow) 4465 4496 IF (ALLOCATED(Rland_ice)) DEALLOCATE(Rland_ice) 4497 IF (ALLOCATED(Rsol)) DEALLOCATE(Rsol) 4466 4498 IF (ALLOCATED(Roce)) DEALLOCATE(Roce) 4467 4499 #endif … … 4492 4524 ! Give default values where new fraction has appread 4493 4525 4494 USE compbl_mod_h4495 USE clesphys_mod_h4526 USE compbl_mod_h 4527 USE clesphys_mod_h 4496 4528 USE indice_sol_mod 4497 use phys_state_var_mod, only: delta_sal, ds_ns, dt_ns, delta_sst, dter, &4529 USE phys_state_var_mod, ONLY: delta_sal, ds_ns, dt_ns, delta_sst, dter, & 4498 4530 dser, dt_ds 4499 use config_ocean_skin_m, only: activate_ocean_skin4531 USE config_ocean_skin_m, ONLY: activate_ocean_skin 4500 4532 4501 4533 ! Input variables
Note: See TracChangeset
for help on using the changeset viewer.
