Changeset 4164
- Timestamp:
- Apr 2, 2026, 9:15:00 AM (5 days ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 10 edited
- 1 moved
-
changelog.txt (modified) (1 diff)
-
libf/phygeneric/condensation_generic_mod.F90 (modified) (1 diff)
-
libf/phygeneric/conduction.F90 (modified) (1 diff)
-
libf/phygeneric/convadj.F90 (modified) (1 diff)
-
libf/phygeneric/moistadj_generic.F90 (modified) (1 diff)
-
libf/phygeneric/molvis.F90 (modified) (1 diff)
-
libf/phygeneric/pcm_thermodynamics_mod.F90 (moved) (moved from trunk/LMDZ.GENERIC/libf/phygeneric/thermo_mod.F90) (6 diffs)
-
libf/phygeneric/physiq_mod.F90 (modified) (19 diffs)
-
libf/phygeneric/rad_correlatedk.F90 (modified) (1 diff)
-
libf/phygeneric/rain_generic.F90 (modified) (1 diff)
-
libf/phygeneric/vdif_kc.F (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/changelog.txt
r4146 r4164 2252 2252 Some fixes will be added as the model is tested in various configurations. 2253 2253 2254 == 02/04/2026 == 2255 Some changes following the "thermodynamics update": 2256 - bug fix on the size of pplev 2257 - renaming the module to something more explicit (thermo_mod.F90 => 2258 pcm_thermodynamics_mod.F90) and the Exner&potential temperature update 2259 routine "thermodynamics" => "thermodynamics_update" 2260 - some optimizations in "thermodynamics_update" : in the 'thermo_uni_ideal' 2261 case seting r(),cpp() and rcp() can be done at first call only. -
trunk/LMDZ.GENERIC/libf/phygeneric/condensation_generic_mod.F90
r4146 r4164 11 11 USE mod_phys_lmdz_para, only: is_master 12 12 use generic_tracer_index_mod, only: generic_tracer_index 13 use thermo_mod13 use pcm_thermodynamics_mod, only: cpp 14 14 use comcstfi_mod 15 15 IMPLICIT none -
trunk/LMDZ.GENERIC/libf/phygeneric/conduction.F90
r4146 r4164 8 8 tsurf,zzlev,zzlay,muvar,qvar,firstcall,zdtconduc) 9 9 10 use thermo_mod, only: cpp,r10 use pcm_thermodynamics_mod, only: cpp,r 11 11 use callkeys_mod, only: phitop_conduc,zztop,a_coeff,s_coeff,force_conduction 12 12 use conc_mod, only: lambda -
trunk/LMDZ.GENERIC/libf/phygeneric/convadj.F90
r4146 r4164 17 17 use callkeys_mod, only: tracer,water,generic_condensation, & 18 18 virtual_theta_correction, thermo_phy 19 use thermo_mod20 19 21 20 implicit none -
trunk/LMDZ.GENERIC/libf/phygeneric/moistadj_generic.F90
r4146 r4164 5 5 use tracer_h 6 6 use callkeys_mod, only: moist_convection_inhibition, thermo_phy, metallicity 7 use thermo_mod8 7 use comcstfi_mod 9 8 -
trunk/LMDZ.GENERIC/libf/phygeneric/molvis.F90
r4146 r4164 12 12 use conc_mod, only: lambda 13 13 use gases_h 14 use thermo_mod14 use pcm_thermodynamics_mod, only: cpp, r 15 15 16 16 !======================================================================= -
trunk/LMDZ.GENERIC/libf/phygeneric/pcm_thermodynamics_mod.F90
r4163 r4164 1 module thermo_mod1 module pcm_thermodynamics_mod 2 2 3 3 use comcstfi_mod, only: cppd_ref,cppv_ref,rd_ref, rcp_ref, mugaz_ref … … 12 12 contains 13 13 14 subroutine thermodynamics (thermo_phy, pplay, pplev, t, ngrid, nlayer, nq, q, iq, zh, zpopsk)15 CHARACTER( 64), INTENT(IN) :: thermo_phy ! flag16 REAL, INTENT(IN) :: pplay(ngrid,nlayer) ! pressure (Pa)17 REAL, INTENT(IN) :: pplev(ngrid,nlayer ) ! pressure (Pa)14 subroutine thermodynamics_update(thermo_phy, pplay, pplev, t, ngrid, nlayer, nq, q, iq, zh, zpopsk) 15 CHARACTER(LEN=*), INTENT(IN) :: thermo_phy ! flag 16 REAL, INTENT(IN) :: pplay(ngrid,nlayer) ! pressure (Pa) at mid-layer 17 REAL, INTENT(IN) :: pplev(ngrid,nlayer+1) ! pressure (Pa) at layer interfaces 18 18 REAL, INTENT(IN) :: t(ngrid,nlayer) ! temperature (K) 19 19 INTEGER, INTENT(IN) :: ngrid, nlayer,nq ! Number of cells, vertical layers and tracers … … 27 27 logical, save :: firstcall=.true. 28 28 !$OMP THREADPRIVATE(firstcall) 29 character(len=80),parameter :: myname = "thermodynamics_update" 29 30 30 31 if (firstcall) then … … 32 33 ALLOCATE(cpp(ngrid,nlayer)) 33 34 ALLOCATE(rcp(ngrid,nlayer)) 35 36 SELECT CASE (TRIM(thermo_phy)) 37 CASE('thermo_uni_ideal') 38 ! Ideal gas, homogeneous 39 r(:,:) = rd_ref 40 cpp(:,:) = cppd_ref 41 rcp(:,:) = rcp_ref 42 CASE DEFAULT 43 write(*,*) 'Bad selector for thermodynamics mod: <', TRIM(thermo_phy), '>' 44 call abort_physic(trim(myname),'Bad selector for thermodynamics mod!',1) 45 END SELECT 46 34 47 firstcall=.false. 35 endif 48 endif ! of if (firstcall) 36 49 37 50 SELECT CASE (TRIM(thermo_phy)) … … 39 52 CASE('thermo_uni_ideal') 40 53 ! Ideal gas 41 r(:,:) = rd_ref42 cpp(:,:) = cppd_ref43 rcp(:,:) = rcp_ref44 54 do l=1,nlayer 45 55 do ig=1,ngrid … … 51 61 write(*,*) 'Bad selector for thermodynamics mod: <', TRIM(thermo_phy), '>' 52 62 write(*,*) 'Option is <thermo_uni_ideal>' 53 call abort 63 call abort_physic(trim(myname),'Bad selector for thermodynamics mod!',1) 54 64 END SELECT 55 65 56 end subroutine thermodynamics 66 end subroutine thermodynamics_update 57 67 58 end module thermo_mod68 end module pcm_thermodynamics_mod -
trunk/LMDZ.GENERIC/libf/phygeneric/physiq_mod.F90
r4146 r4164 63 63 obliquit, nres, z0 64 64 use comcstfi_mod, only: pi, g, rcp_ref, rd_ref, rad, mugaz_ref, cppd_ref 65 use thermo_mod65 use pcm_thermodynamics_mod, only: thermodynamics_update, r, cpp 66 66 use time_phylmdz_mod, only: daysec 67 67 use callkeys_mod, only: albedo_spectral_mode, calladj, calldifv, & … … 855 855 igcm_generic_vap=1 856 856 endif 857 call thermodynamics (thermo_phy, pplay, pplev, pt, ngrid, nlayer, nq, pq, igcm_generic_vap, zh, zpopsk)857 call thermodynamics_update(thermo_phy, pplay, pplev, pt, ngrid, nlayer, nq, pq, igcm_generic_vap, zh, zpopsk) 858 858 859 859 ! ------------------------------------------------------ … … 1223 1223 1224 1224 ! Update thermodynamics 1225 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1225 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1226 1226 1227 1227 ! Test of energy conservation … … 1305 1305 1306 1306 ! Update thermodynamics 1307 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1307 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1308 1308 1309 1309 ! test energy conservation … … 1418 1418 1419 1419 ! Update thermodynamics 1420 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1420 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1421 1421 1422 1422 ENDIF ! end of 'calltherm' … … 1451 1451 1452 1452 ! Update thermodynamics 1453 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1453 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1454 1454 1455 1455 ! Test energy conservation … … 1505 1505 1506 1506 ! Update thermodynamics 1507 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1507 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1508 1508 1509 1509 ENDIF ! of IF (calllott_nonoro) … … 1534 1534 1535 1535 ! Update thermodynamics 1536 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1536 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1537 1537 1538 1538 ! test energy conservation … … 1589 1589 1590 1590 ! Update thermodynamics 1591 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1591 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1592 1592 1593 1593 ! Test energy conservation. … … 1629 1629 1630 1630 ! Update thermodynamics 1631 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1631 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1632 1632 1633 1633 ! Test energy conservation. … … 1679 1679 1680 1680 ! Update thermodynamics 1681 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1681 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1682 1682 1683 1683 ! Test energy conservation. … … 1765 1765 1766 1766 ! Update thermodynamics 1767 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1767 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1768 1768 1769 1769 END IF ! of IF (photochem) … … 1790 1790 1791 1791 ! Update thermodynamics 1792 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1792 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1793 1793 1794 1794 ! Test energy conservation. … … 1830 1830 1831 1831 ! Update thermodynamics 1832 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1832 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1833 1833 1834 1834 if(enertest)then … … 1892 1892 1893 1893 ! Update thermodynamics 1894 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1894 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1895 1895 1896 1896 ! Test energy conservation. … … 1980 1980 1981 1981 ! Update thermodynamics 1982 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)1982 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 1983 1983 1984 1984 ! Test water conservation … … 2042 2042 2043 2043 ! Update thermodynamics 2044 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)2044 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 2045 2045 2046 2046 endif … … 2162 2162 2163 2163 ! Update thermodynamics 2164 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)2164 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 2165 2165 2166 2166 endif! end of if 'tracer' … … 2486 2486 2487 2487 ! Update thermodynamics 2488 call thermodynamics (thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk)2488 call thermodynamics_update(thermo_phy, pplay, pplev, pt+pdt*ptimestep, ngrid, nlayer, nq, pq+pdq*ptimestep, igcm_generic_vap,zh,zpopsk) 2489 2489 2490 2490 endif ! of if (callthermos) -
trunk/LMDZ.GENERIC/libf/phygeneric/rad_correlatedk.F90
r4146 r4164 38 38 use tracer_h, only: constants_epsi_generic 39 39 use comcstfi_mod, only: pi, mugaz_ref 40 use thermo_mod, only: cpp40 use pcm_thermodynamics_mod, only: cpp 41 41 use callkeys_mod, only: varactive,diurnal,tracer,water,varfixed,satval, & 42 42 diagdtau,kastprof,strictboundcorrk,specOLR, & -
trunk/LMDZ.GENERIC/libf/phygeneric/rain_generic.F90
r4146 r4164 8 8 use aerosol_radius, only: aerosol_radius_h2o_liquid_ice_separate ! only used for precip_scheme_generic >=2 9 9 use tracer_h 10 use comcstfi_mod, only: g, cppc_ref 11 use thermo_mod10 use comcstfi_mod, only: g, cppc_ref, cppd_ref 11 use pcm_thermodynamics_mod, only: r 12 12 use generic_tracer_index_mod, only: generic_tracer_index 13 13 use callkeys_mod, only: thermo_phy,metallicity,evap_prec_generic,evap_coeff_generic, & -
trunk/LMDZ.GENERIC/libf/phygeneric/vdif_kc.F
r4146 r4164 5 5 use callkeys_mod, only: generic_condensation, 6 6 & virtual_theta_correction,thermo_phy 7 use thermo_mod, only: rcp7 use pcm_thermodynamics_mod, only: rcp 8 8 use tracer_h 9 9 IMPLICIT NONE
Note: See TracChangeset
for help on using the changeset viewer.
