Changeset 3940 for LMDZ6/trunk/libf/phylmdiso/phys_state_var_mod.F90
- Timestamp:
- Jun 15, 2021, 1:18:14 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmdiso/phys_state_var_mod.F90
r3927 r3940 1 1 ! 2 ! $Id: phys_state_var_mod.F90 3 496 2019-05-10 10:17:35Z jyg $2 ! $Id: phys_state_var_mod.F90 3888 2021-05-05 10:50:37Z jyg $ 3 3 ! 4 4 MODULE phys_state_var_mod … … 32 32 REAL, ALLOCATABLE, SAVE :: ftsol(:,:) 33 33 !$OMP THREADPRIVATE(ftsol) 34 REAL, ALLOCATABLE, SAVE :: beta_aridity(:,:) 35 !$OMP THREADPRIVATE(beta_aridity) 34 36 REAL,ALLOCATABLE,SAVE :: qsol(:),fevap(:,:),z0m(:,:),z0h(:,:),agesno(:,:) 35 37 !$OMP THREADPRIVATE(qsol,fevap,z0m,z0h,agesno) … … 47 49 !albedo SB >>> 48 50 REAL, ALLOCATABLE, SAVE :: falb_dif(:,:,:), falb_dir(:,:,:) 49 real, allocatable, save:: chl_con(:)51 REAL, ALLOCATABLE, SAVE :: chl_con(:) 50 52 !$OMP THREADPRIVATE(falb_dir,falb_dif,chl_con) 51 53 !albedo SB <<< … … 106 108 REAL, ALLOCATABLE, SAVE :: coefm(:,:,:) ! Kz momentum 107 109 !$OMP THREADPRIVATE(pbl_tke, coefh,coefm) 108 !nrlmd<109 REAL, ALLOCATABLE, SAVE :: delta_tsurf(:,:) ! Surface temperature difference inside-outside cold pool110 !$OMP THREADPRIVATE(delta_tsurf)111 !>nrlmd112 110 REAL, ALLOCATABLE, SAVE :: zmax0(:), f0(:) ! 113 111 !$OMP THREADPRIVATE(zmax0,f0) … … 294 292 REAL,ALLOCATABLE,SAVE :: wake_delta_pbl_TKE(:,:,:) 295 293 !$OMP THREADPRIVATE(wake_delta_pbl_TKE) 294 !nrlmd< 295 REAL, ALLOCATABLE, SAVE :: delta_tsurf(:,:) ! Surface temperature difference inside-outside cold pool 296 !$OMP THREADPRIVATE(delta_tsurf) 297 !>nrlmd 296 298 !>jyg 297 299 ! … … 442 444 !$OMP THREADPRIVATE(ccm) 443 445 444 !!! nrlmd le 10/04/2012445 446 REAL,SAVE,ALLOCATABLE :: ale_bl_trig(:) 446 447 !$OMP THREADPRIVATE(ale_bl_trig) 447 !!! fin nrlmd le 10/04/2012 448 449 REAL,SAVE,ALLOCATABLE :: ratqs_inter(:,:) 450 !$OMP THREADPRIVATE(ratqs_inter) 448 451 449 452 #ifdef ISO … … 462 465 !$OMP THREADPRIVATE(is_initialized) 463 466 464 CONTAINS 467 ! Ocean-atmosphere interface: 468 469 REAL, ALLOCATABLE, SAVE:: ds_ns(:) ! (klon) 470 ! "delta salinity near surface". Salinity variation in the 471 ! near-surface turbulent layer. That is subskin salinity minus 472 ! foundation salinity. In ppt. 473 474 REAL, ALLOCATABLE, SAVE:: dt_ns(:) ! (klon) 475 ! "delta temperature near surface". Temperature variation in the 476 ! near-surface turbulent layer. That is subskin temperature 477 ! minus foundation temperature. (Can be negative.) In K. 478 479 REAL, ALLOCATABLE, SAVE:: delta_sst(:) ! (klon) 480 ! Ocean-air interface temperature minus bulk SST, in 481 ! K. Allocated and defined only if activate_ocean_skin >= 1. 482 483 REAL, ALLOCATABLE, SAVE:: delta_sal(:) ! (klon) 484 ! Ocean-air interface salinity minus bulk salinity, in ppt 485 486 !$OMP THREADPRIVATE(delta_sal, ds_ns, dt_ns, delta_sst) 487 488 CONTAINS 465 489 466 490 !====================================================================== … … 473 497 #endif 474 498 USE indice_sol_mod 499 use config_ocean_skin_m, only: activate_ocean_skin 475 500 IMPLICIT NONE 476 501 … … 485 510 include "clesphys.h" 486 511 512 print*, 'is_initialized', is_initialized 487 513 IF (is_initialized) RETURN 488 514 is_initialized=.TRUE. 489 515 ALLOCATE(pctsrf(klon,nbsrf)) 490 516 ALLOCATE(ftsol(klon,nbsrf)) 517 ALLOCATE(beta_aridity(klon,nbsrf)) 491 518 ALLOCATE(qsol(klon),fevap(klon,nbsrf)) 492 519 ALLOCATE(z0m(klon,nbsrf+1),z0h(klon,nbsrf+1),agesno(klon,nbsrf)) … … 496 523 ALLOCATE(falb2(klon,nbsrf)) 497 524 !albedo SB >>> 525 print*, 'allocate falb' 498 526 ALLOCATE(falb_dir(klon,nsw,nbsrf),falb_dif(klon,nsw,nbsrf)) 527 print*, 'allocate falb good', falb_dir(1,1,1) 499 528 ALLOCATE(chl_con(klon)) 500 529 !albedo SB <<< … … 675 704 #endif 676 705 #endif 677 !!! nrlmd le 10/04/2012 706 678 707 ALLOCATE(ale_bl_trig(klon)) 679 !!! fin nrlmd le 10/04/2012 708 ALLOCATE(ratqs_inter(klon,klev)) 680 709 IF (ok_gwd_rando) THEN 681 allocate(du_gwd_rando(klon, klev))710 ALLOCATE(du_gwd_rando(klon, klev)) 682 711 du_gwd_rando(:,:)=0. 683 712 ENDIF … … 686 715 du_gwd_front(:,:) = 0 !ym missing init 687 716 ENDIF 688 END SUBROUTINE phys_state_var_init 717 if (activate_ocean_skin >= 1) ALLOCATE(delta_sal(klon), ds_ns(klon), & 718 dt_ns(klon), delta_sst(klon)) 719 720 END SUBROUTINE phys_state_var_init 689 721 690 722 !====================================================================== 691 SUBROUTINE phys_state_var_end 723 SUBROUTINE phys_state_var_end 724 ! Useful only for lmdz1d. 692 725 !USE dimphy 693 726 USE indice_sol_mod 727 use config_ocean_skin_m, only: activate_ocean_skin 694 728 IMPLICIT NONE 695 729 include "clesphys.h" 696 730 697 deallocate(pctsrf, ftsol, falb1, falb2) 698 deallocate(qsol,fevap,z0m,z0h,agesno) 731 DEALLOCATE(pctsrf, ftsol, falb1, falb2) 732 DEALLOCATE(beta_aridity) 733 DEALLOCATE(qsol,fevap,z0m,z0h,agesno) 699 734 !FC 700 deallocate(treedrg) 701 deallocate(rain_fall, snow_fall, solsw, solswfdiff, sollw, radsol, swradcorr) 702 deallocate(zmea, zstd, zsig, zgam) 703 deallocate(zthe, zpic, zval) 704 deallocate(rugoro, t_ancien, q_ancien, clwcon, rnebcon) 705 deallocate(qs_ancien, ql_ancien) 706 deallocate(prw_ancien, prlw_ancien, prsw_ancien) 707 deallocate(qtc_cv,sigt_cv) 708 deallocate(u_ancien, v_ancien) 709 deallocate(tr_ancien) !RomP 710 deallocate(ratqs, pbl_tke,coefh,coefm) 735 DEALLOCATE(treedrg) 736 DEALLOCATE(rain_fall, snow_fall, solsw, solswfdiff, sollw, radsol, swradcorr) 737 DEALLOCATE(zmea, zstd, zsig, zgam) 738 DEALLOCATE(zthe, zpic, zval) 739 DEALLOCATE(rugoro, t_ancien, q_ancien, clwcon, rnebcon) 740 DEALLOCATE(qs_ancien, ql_ancien) 741 DEALLOCATE(prw_ancien, prlw_ancien, prsw_ancien) 742 DEALLOCATE(qtc_cv,sigt_cv) 743 DEALLOCATE(u_ancien, v_ancien) 744 DEALLOCATE(tr_ancien) !RomP 745 DEALLOCATE(ratqs, pbl_tke,coefh,coefm) 746 DEALLOCATE(zmax0, f0) 747 DEALLOCATE(sig1, w01) 748 DEALLOCATE(entr_therm, fm_therm) 749 DEALLOCATE(detr_therm) 750 DEALLOCATE(clwcon0th, rnebcon0th) 751 ! radiation outputs 752 DEALLOCATE(swdnc0, swdn0, swdn) 753 DEALLOCATE(swupc0, swup0, swup) 754 DEALLOCATE(lwdnc0, lwdn0, lwdn) 755 DEALLOCATE(lwupc0, lwup0, lwup) 756 DEALLOCATE(SWdn200clr, SWdn200) 757 DEALLOCATE(SWup200clr, SWup200) 758 DEALLOCATE(LWdn200clr, LWdn200) 759 DEALLOCATE(LWup200clr, LWup200) 760 DEALLOCATE(LWdnTOA, LWdnTOAclr) 761 ! pressure level 762 DEALLOCATE(tsumSTD) 763 DEALLOCATE(usumSTD, vsumSTD) 764 DEALLOCATE(wsumSTD, phisumSTD) 765 DEALLOCATE(tnondef) 766 DEALLOCATE(qsumSTD, rhsumSTD) 767 DEALLOCATE(uvsumSTD) 768 DEALLOCATE(vqsumSTD) 769 DEALLOCATE(vTsumSTD) 770 DEALLOCATE(wqsumSTD) 771 DEALLOCATE(vphisumSTD) 772 DEALLOCATE(wTsumSTD) 773 DEALLOCATE(u2sumSTD) 774 DEALLOCATE(v2sumSTD) 775 DEALLOCATE(T2sumSTD) 776 DEALLOCATE(O3sumSTD) 777 DEALLOCATE(O3daysumSTD) 778 !IM beg 779 DEALLOCATE(wlevSTD,ulevSTD,vlevSTD,tlevSTD,qlevSTD,rhlevSTD,philevSTD) 780 DEALLOCATE(uvSTD,vqSTD,vTSTD,wqSTD,vphiSTD,wTSTD,u2STD,v2STD,T2STD,O3STD,O3daySTD) 781 !IM end 782 DEALLOCATE(seed_old) 783 DEALLOCATE(zuthe, zvthe) 784 DEALLOCATE(alb_neig) 785 DEALLOCATE(ema_cbmf) 786 DEALLOCATE(ema_pcb, ema_pct) 787 DEALLOCATE(Mipsh, Ma, qcondc) 788 DEALLOCATE(wd, sigd) 789 DEALLOCATE(cin, ALE, ALP) 790 DEALLOCATE(ftd, fqd) 791 DEALLOCATE(Ale_bl, Alp_bl) 792 DEALLOCATE(ale_wake) 793 DEALLOCATE(ale_bl_stat) 794 DEALLOCATE(lalim_conv, wght_th) 795 DEALLOCATE(wake_deltat, wake_deltaq) 796 DEALLOCATE(wake_s, awake_dens, wake_dens) 797 DEALLOCATE(wake_Cstar, wake_pe, wake_fip) 798 !jyg< 799 DEALLOCATE(wake_delta_pbl_TKE) 711 800 !nrlmd< 712 deallocate(delta_tsurf)801 DEALLOCATE(delta_tsurf) 713 802 !>nrlmd 714 deallocate(zmax0, f0)715 deallocate(sig1, w01)716 deallocate(entr_therm, fm_therm)717 deallocate(detr_therm)718 deallocate(clwcon0th, rnebcon0th)719 ! radiation outputs720 deallocate(swdnc0, swdn0, swdn)721 deallocate(swupc0, swup0, swup)722 deallocate(lwdnc0, lwdn0, lwdn)723 deallocate(lwupc0, lwup0, lwup)724 deallocate(SWdn200clr, SWdn200)725 deallocate(SWup200clr, SWup200)726 deallocate(LWdn200clr, LWdn200)727 deallocate(LWup200clr, LWup200)728 deallocate(LWdnTOA, LWdnTOAclr)729 ! pressure level730 deallocate(tsumSTD)731 deallocate(usumSTD, vsumSTD)732 deallocate(wsumSTD, phisumSTD)733 deallocate(tnondef)734 deallocate(qsumSTD, rhsumSTD)735 deallocate(uvsumSTD)736 deallocate(vqsumSTD)737 deallocate(vTsumSTD)738 deallocate(wqsumSTD)739 deallocate(vphisumSTD)740 deallocate(wTsumSTD)741 deallocate(u2sumSTD)742 deallocate(v2sumSTD)743 deallocate(T2sumSTD)744 deallocate(O3sumSTD)745 deallocate(O3daysumSTD)746 !IM beg747 deallocate(wlevSTD,ulevSTD,vlevSTD,tlevSTD,qlevSTD,rhlevSTD,philevSTD)748 deallocate(uvSTD,vqSTD,vTSTD,wqSTD,vphiSTD,wTSTD,u2STD,v2STD,T2STD,O3STD,O3daySTD)749 !IM end750 deallocate(seed_old)751 deallocate(zuthe, zvthe)752 deallocate(alb_neig)753 deallocate(ema_cbmf)754 deallocate(ema_pcb, ema_pct)755 deallocate(Mipsh, Ma, qcondc)756 deallocate(wd, sigd)757 deallocate(cin, ALE, ALP)758 deallocate(ftd, fqd)759 deallocate(Ale_bl, Alp_bl)760 deallocate(ale_wake)761 deallocate(ale_bl_stat)762 deallocate(lalim_conv, wght_th)763 deallocate(wake_deltat, wake_deltaq)764 deallocate(wake_s, awake_dens, wake_dens)765 deallocate(wake_Cstar, wake_pe, wake_fip)766 !jyg<767 deallocate(wake_delta_pbl_TKE)768 803 !>jyg 769 deallocate(pfrac_impa, pfrac_nucl)770 deallocate(pfrac_1nucl)771 deallocate(total_rain, nday_rain)772 deallocate(paire_ter)773 deallocate(albsol1, albsol2)804 DEALLOCATE(pfrac_impa, pfrac_nucl) 805 DEALLOCATE(pfrac_1nucl) 806 DEALLOCATE(total_rain, nday_rain) 807 DEALLOCATE(paire_ter) 808 DEALLOCATE(albsol1, albsol2) 774 809 !albedo SB >>> 775 deallocate(albsol_dir,albsol_dif,falb_dir,falb_dif,chl_con)810 DEALLOCATE(albsol_dir,albsol_dif,falb_dir,falb_dif,chl_con) 776 811 !albedo SB <<< 777 deallocate(wo)778 deallocate(clwcon0,rnebcon0)779 deallocate(heat, heat0)780 deallocate(cool, cool0)781 deallocate(heat_volc, cool_volc)782 deallocate(topsw, toplw)783 deallocate(sollwdown, sollwdownclr)784 deallocate(gustiness)785 deallocate(toplwdown, toplwdownclr)786 deallocate(topsw0,toplw0,solsw0,sollw0)787 deallocate(albpla)812 DEALLOCATE(wo) 813 DEALLOCATE(clwcon0,rnebcon0) 814 DEALLOCATE(heat, heat0) 815 DEALLOCATE(cool, cool0) 816 DEALLOCATE(heat_volc, cool_volc) 817 DEALLOCATE(topsw, toplw) 818 DEALLOCATE(sollwdown, sollwdownclr) 819 DEALLOCATE(gustiness) 820 DEALLOCATE(toplwdown, toplwdownclr) 821 DEALLOCATE(topsw0,toplw0,solsw0,sollw0) 822 DEALLOCATE(albpla) 788 823 !IM ajout variables CFMIP2/CMIP5 789 deallocate(heatp, coolp) 790 deallocate(heat0p, cool0p) 791 deallocate(radsolp, topswp, toplwp) 792 deallocate(albplap) 793 deallocate(solswp, solswfdiffp, sollwp) 794 deallocate(sollwdownp) 795 deallocate(topsw0p,toplw0p) 796 deallocate(solsw0p,sollw0p) 797 deallocate(lwdnc0p, lwdn0p, lwdnp) 798 deallocate(lwupc0p, lwup0p, lwupp) 799 deallocate(swdnc0p, swdn0p, swdnp) 800 deallocate(swupc0p, swup0p, swupp) 801 deallocate(cape) 802 deallocate(pbase,bbase) 803 deallocate(zqasc) 804 deallocate(ibas_con, itop_con) 805 deallocate(rain_con, snow_con) 806 deallocate(rlonPOS) 807 deallocate(newsst) 808 deallocate(ustar,u10m, v10m,wstar) 809 deallocate(topswad, solswad) 810 deallocate(topswai, solswai) 811 deallocate(tau_aero,piz_aero,cg_aero) 812 deallocate(tau_aero_sw_rrtm,piz_aero_sw_rrtm,cg_aero_sw_rrtm) 813 deallocate(tau_aero_lw_rrtm,piz_aero_lw_rrtm,cg_aero_lw_rrtm) 814 deallocate(ccm) 815 if (ok_gwd_rando) deallocate(du_gwd_rando) 816 if (.not. ok_hines .and. ok_gwd_rando) deallocate(du_gwd_front) 817 818 !!! nrlmd le 10/04/2012 819 deallocate(ale_bl_trig) 820 !!! fin nrlmd le 10/04/2012 824 DEALLOCATE(heatp, coolp) 825 DEALLOCATE(heat0p, cool0p) 826 DEALLOCATE(radsolp, topswp, toplwp) 827 DEALLOCATE(albplap) 828 DEALLOCATE(solswp, solswfdiffp, sollwp) 829 DEALLOCATE(sollwdownp) 830 DEALLOCATE(topsw0p,toplw0p) 831 DEALLOCATE(solsw0p,sollw0p) 832 DEALLOCATE(lwdnc0p, lwdn0p, lwdnp) 833 DEALLOCATE(lwupc0p, lwup0p, lwupp) 834 DEALLOCATE(swdnc0p, swdn0p, swdnp) 835 DEALLOCATE(swupc0p, swup0p, swupp) 836 DEALLOCATE(cape) 837 DEALLOCATE(pbase,bbase) 838 DEALLOCATE(zqasc) 839 DEALLOCATE(ibas_con, itop_con) 840 DEALLOCATE(rain_con, snow_con) 841 DEALLOCATE(rlonPOS) 842 DEALLOCATE(newsst) 843 DEALLOCATE(ustar,u10m, v10m,wstar) 844 DEALLOCATE(topswad, solswad) 845 DEALLOCATE(topswai, solswai) 846 DEALLOCATE(tau_aero,piz_aero,cg_aero) 847 DEALLOCATE(tau_aero_sw_rrtm,piz_aero_sw_rrtm,cg_aero_sw_rrtm) 848 DEALLOCATE(tau_aero_lw_rrtm,piz_aero_lw_rrtm,cg_aero_lw_rrtm) 849 DEALLOCATE(ccm) 850 if (ok_gwd_rando) DEALLOCATE(du_gwd_rando) 851 if (.not. ok_hines .and. ok_gwd_rando) DEALLOCATE(du_gwd_front) 852 DEALLOCATE(ale_bl_trig) 853 DEALLOCATE(ratqs_inter) 854 855 if (activate_ocean_skin >= 1) deALLOCATE(delta_sal, ds_ns, dt_ns, & 856 delta_sst) 821 857 822 858 #ifdef ISO 823 deallocate(xtsol,fxtevap)824 deallocate(xt_ancien,xtl_ancien,xts_ancien, fxtd, wake_deltaxt)825 deallocate(xtrain_fall, xtsnow_fall, xtrain_con, xtsnow_con)859 DEALLOCATE(xtsol,fxtevap) 860 DEALLOCATE(xt_ancien,xtl_ancien,xts_ancien, fxtd, wake_deltaxt) 861 DEALLOCATE(xtrain_fall, xtsnow_fall, xtrain_con, xtsnow_con) 826 862 #ifdef ISOTRAC 827 deallocate(bassin_map,boite_map)863 DEALLOCATE(bassin_map,boite_map) 828 864 #endif 829 865 #endif 830 866 is_initialized=.FALSE. 867 831 868 END SUBROUTINE phys_state_var_end 832 869
Note: See TracChangeset
for help on using the changeset viewer.