Changeset 3974
- Timestamp:
- Nov 21, 2025, 4:28:06 PM (8 weeks ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
LMDZ.COMMON/libf/evolution/pem.F90 (modified) (2 diffs)
-
LMDZ.MARS/changelog.txt (modified) (6 diffs)
-
LMDZ.MARS/deftank/run.def.1d (modified) (1 diff)
-
LMDZ.MARS/libf/phymars/phyetat0_mod.F90 (modified) (1 diff)
-
LMDZ.MARS/libf/phymars/physiq_mod.F (modified) (2 diffs)
-
LMDZ.MARS/libf/phymars/planete_h.F90 (modified) (2 diffs)
-
LMDZ.MARS/libf/phymars/tabfi.F (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3967 r3974 86 86 use tracer_mod, only: noms, igcm_h2o_ice, igcm_co2, mmol, igcm_h2o_vap ! Tracer names and molar masses 87 87 use mod_phys_lmdz_para, only: is_parallel, is_sequential, is_mpi_root, is_omp_root, is_master 88 use planete_h, only: aphelie, periheli, year_day, peri_day, obliquit, iniorbit89 88 use surfini_mod, only: surfini 90 89 use comcstfi_h, only: mugaz … … 597 596 ! I_i Compute orbit criterion 598 597 !------------------------ 599 call iniorbit(aphelie,periheli,year_day,peri_day,obliquit)600 601 598 n_myear_leg = Max_iter_pem 602 599 if (evol_orbit_pem) call orbit_param_criterion(i_myear,n_myear_leg) -
trunk/LMDZ.MARS/changelog.txt
r3969 r3974 4092 4092 4093 4093 == 07/07/2023 == JBC 4094 Minor fix for initialization of tracers indices and rework of "atm_wat_profile" in testphys1d.F.4094 Minor fix for initialization of tracers indices and rework of 'atm_wat_profile' in "testphys1d.F". 4095 4095 4096 4096 == 10/07/2023 == EM … … 4154 4154 4155 4155 == 31/07/2023 == JBC 4156 Addition in 1D of relaxation towards a profile for atmospheric water. It needs the flag "atm_wat_tau"(real):4156 Addition in 1D of relaxation towards a profile for atmospheric water. It needs the flag 'atm_wat_tau' (real): 4157 4157 - atm_wat_tau < 0. -> no relaxation (default); 4158 - atm_wat_tau >= 0. -> relaxation towards the value "atm_wat_profile" with relaxation time "atm_wat_tau".4158 - atm_wat_tau >= 0. -> relaxation towards the value "atm_wat_profile" with relaxation time 'atm_wat_tau'. 4159 4159 4160 4160 == 07/08/2023 == EM … … 4163 4163 4164 4164 == 09/08/2023 == JBC 4165 Small fixes to be able to run the Mars PCM 1D without "water".4165 Small fixes to be able to run the Mars PCM 1D without 'water'. 4166 4166 4167 4167 == 14/08/2023 == JBC 4168 Related to commit r3026: improvement of error message in initracer.F (now it gives correctly the only identified tracers) + one small correction to run PCM 1D without water.4168 Related to commit r3026: improvement of error message in "initracer.F" (now it gives correctly the only identified tracers) + one small correction to run PCM 1D without 'water'. 4169 4169 4170 4170 == 8/09/2023 == JBC 4171 In testphys1D.F, "dtphys" was renamed into a local variable "dttestphys" because "dtphys" is also a variable of time_phylmdz_mod.F90. Thus, it could have been modified by the physics through the module (for ex. by tabfi.Fwhen reading startfi.nc) and affect the dynamics which is prohibited.4171 In testphys1D.F, 'dtphys' was renamed into a local variable 'dttestphys' because 'dtphys' is also a variable of "time_phylmdz_mod.F90". Thus, it could have been modified by the physics through the module (for ex. by "tabfi.F" when reading startfi.nc) and affect the dynamics which is prohibited. 4172 4172 Some code cleaning in regards of tests in 1D. 4173 4173 … … 4265 4265 - Correction of a bug in "writediagfi.F": the case of using the 1D model with parallelization was not anticipated so that the "diagfi.nc" file was filled with NaNf; 4266 4266 - Addition of the file "start1D.txt" as an example in the directory deftank/; 4267 - Some "cosmetic"modifications in "improvedclouds_mod.F", "write_output_mod.F90" and "testphys1d.F90".4267 - Some cosmetic modifications in "improvedclouds_mod.F", "write_output_mod.F90" and "testphys1d.F90". 4268 4268 4269 4269 == 22/10/2023 == EM … … 4863 4863 4864 4864 == 12/06/2025 == JBC 4865 Move paleoclimate variables from time-independent to time-dependent writing of "st ratfi.nc".4865 Move paleoclimate variables from time-independent to time-dependent writing of "startfi.nc". 4866 4866 4867 4867 == 16/06/2025 == JM … … 5003 5003 Bug fix: threadsave statement missing on variable save "isample". Could fail 5004 5004 when writting diagfi. 5005 5006 == 21/11/2025 == JBC 5007 Simplification of the orbital parameters initialization (resolve ticket #109): removing redundant actions in subroutine 'iniorbit' in regard of what is done in "tabfi.F" and moving the subroutine 'lsp2solp' from "tabfi.F" to "planete_h.F90" + some cleanings. -
trunk/LMDZ.MARS/deftank/run.def.1d
r3943 r3974 54 54 # Prescription of atmospheric water vapour profile defined in file "profile_ref_h2o_vap" (kg/kg) 55 55 ctrl_h2ovap=.false. 56 # Relaxation time (s) . If <0 then no time relaxation i.e. forcing56 # Relaxation time (s) towards atmospheric water vapour profile. If <0 then no time relaxation i.e. forcing 57 57 relaxtime_h2ovap=-1. 58 58 # Prescription of atmospheric water ice profile defined in file "profile_ref_h2o_ice" (kg/kg) 59 59 ctrl_h2oice=.false. 60 # Relaxation time (s) . If <0 then no time relaxation i.e. forcing60 # Relaxation time (s) towards atmospheric water ice profile. If <0 then no time relaxation i.e. forcing 61 61 relaxtime_h2oice=-1. 62 62 # hybrid vertical coordinate ? (.true. for hybrid and .false. for sigma levels) -
trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90
r3964 r3974 35 35 use comcstfi_h, only: pi 36 36 use geometry_mod, only: latitude 37 use soil_settings_mod, only: soil_settings 38 use tabfi_mod, only: tabfi 39 use callkeys_mod, only: startphy_file, rdstorm, hdo 40 use callkeys_mod, only: CLFvarying, CLFfixval 37 use soil_settings_mod, only: soil_settings 38 use tabfi_mod, only: tabfi 39 use callkeys_mod, only: startphy_file, rdstorm, hdo, CLFvarying, CLFfixval 41 40 42 41 implicit none -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r3918 r3974 85 85 use turb_mod, only: q2, wstar, ustar, sensibFlux, 86 86 & zmax_th, hfmax_th, turb_resolved 87 use planete_h, only: aphelie, periheli, year_day, peri_day, 88 & obliquit 89 use planete_h, only: iniorbit 87 use planete_h, only: obliquit 90 88 use orbite_mod, only: orbite 91 89 USE comcstfi_h, only: r, cpp, mugaz, g, rcp, pi, rad … … 718 716 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 719 717 CALL surfini(ngrid,nslope,qsurf) 720 CALL iniorbit(aphelie,periheli,year_day,peri_day,obliquit) 718 721 719 c initialize soil 722 720 c ~~~~~~~~~~~~~~~ -
trunk/LMDZ.MARS/libf/phymars/planete_h.F90
r3095 r3974 1 1 MODULE planete_h 2 IMPLICIT NONE 2 3 implicit none 3 4 4 5 REAL,SAVE :: aphelie ! Aphelion, in Mkm … … 23 24 24 25 CONTAINS 26 !----------------------------------------------------------------------- 27 ! Gives sol at perihelion for ls at perihelion (for precession cycles) 28 SUBROUTINE lsp2solp(lsp,solp) 29 30 use comcstfi_h, only: pi 31 32 implicit none 33 34 ! Arguments: 35 real, intent(in) :: lsp ! ls at perihelion 36 real, intent(out) :: solp ! sol at perihelion 37 38 ! Locals: 39 real :: zx0 ! eccentric anomaly at Ls=0 40 real, parameter :: degrad = 180.d0/pi 41 42 ! Compute orbit geometrical parameters 43 e_elips = (aphelie - periheli)/(aphelie + periheli) 44 zx0 = -2.0*datan(dtan(0.5*lsp/degrad)*dsqrt((1. - e_elips)/(1. + e_elips))) 45 if (zx0 <= 0.) zx0 = zx0 + 2.*pi 46 47 ! Compute sol at perihelion 48 solp = year_day*(1. - (zx0 - e_elips*dsin(zx0))/(2.*pi)) 49 50 END SUBROUTINE lsp2solp 51 52 !----------------------------------------------------------------------- 53 ! Initialize orbital parameters 54 SUBROUTINE iniorbit() 55 56 use comcstfi_h, only: pi 57 58 implicit none 59 60 ! Locals: 61 character(8), parameter :: myname = "iniorbit" 62 real :: zxref, zanom, zz, zx0, zdx 63 integer :: iter 64 65 ! Info about orbital values 66 write(*,*)myname,': Aphelion in Mkm =',aphelie 67 write(*,*)myname,': Perihelion in Mkm =',periheli 68 write(*,*)myname,': Number of days in the year =',year_day 69 write(*,*)myname,': Date of perihelion in days =',peri_day 70 write(*,*)myname,': Obliquity in degrees =',obliquit 71 72 ! Compute orbit geometrical parameters 73 e_elips = (aphelie - periheli)/(aphelie + periheli) 74 p_elips = 0.5*(periheli + aphelie)*(1. - e_elips*e_elips)/unitastr 75 write(*,*)myname,': Orbit eccentricity =',e_elips 76 write(*,*)myname,': Ellipse semi-latus rectum =',p_elips 25 77 26 SUBROUTINE iniorbit(paphelie,pperiheli,pyear_day,pperi_day,pobliq) 27 use comcstfi_h, only: pi 28 IMPLICIT NONE 29 ! initialize orbital parameters 30 31 REAL,INTENT(IN) :: paphelie,pperiheli,pyear_day,pperi_day,pobliq 78 ! Compute mean anomaly zanom 79 zz = (year_day - peri_day)/year_day 80 zanom = 2.*pi*(zz - nint(zz)) 81 zxref = abs(zanom) 82 write(*,*)myname,': zanom =',zanom 32 83 33 CHARACTER(LEN=8),PARAMETER :: myname="iniorbit" 34 REAL :: zxref,zanom,zz,zx0,zdx 35 INTEGER :: iter 36 37 ! copy over input values 38 aphelie =paphelie 39 periheli=pperiheli 40 year_day=pyear_day 41 obliquit=pobliq 42 peri_day=pperi_day 43 44 write(*,*)myname,': Perihelion in Mkm ',periheli 45 write(*,*)myname,': Aphelion in Mkm ',aphelie 46 write(*,*)myname,': Obliquity in degrees :',obliquit 47 48 ! compute orbit geometrical parameters 49 e_elips=(aphelie-periheli)/(periheli+aphelie) 50 p_elips=0.5*(periheli+aphelie)*(1-e_elips*e_elips)/unitastr 51 52 write(*,*)myname,': e_elips',e_elips 53 write(*,*)myname,': p_elips',p_elips 54 55 ! compute mean anomaly zanom 56 57 zz=(year_day-pperi_day)/year_day 58 zanom=2.*pi*(zz-nint(zz)) 59 zxref=abs(zanom) 60 write(*,*)myname,': zanom ',zanom 61 62 ! solve equation zx0 - e * sin (zx0) = zxref for eccentric anomaly zx0 84 ! Solve equation zx0 - e * sin (zx0) = zxref for eccentric anomaly zx0 63 85 ! using Newton method 64 86 65 zx0 =zxref+e_elips*sin(zxref)66 DO iter =1,10067 zdx =-(zx0-e_elips*sin(zx0)-zxref)/(1.-e_elips*cos(zx0))68 if (abs(zdx).le.(1.e-12)) exit69 zx0 =zx0+zdx87 zx0 = zxref + e_elips*sin(zxref) 88 DO iter = 1,100 89 zdx = -(zx0 - e_elips*sin(zx0) - zxref)/(1. - e_elips*cos(zx0)) 90 if (abs(zdx).le.(1.e-12)) exit 91 zx0 = zx0 + zdx 70 92 ENDDO 71 93 72 zx0 =zx0+zdx73 if (zanom.lt.0.) zx0=-zx074 write(*,*)myname,': zx0',zx094 zx0 = zx0 + zdx 95 if (zanom < 0.) zx0 = -zx0 96 write(*,*)myname,': Eccentric anomaly zx0 =',zx0 75 97 76 lsperi =-2.*atan(sqrt((1.+e_elips)/(1.-e_elips))*tan(zx0/2.))98 lsperi = -2.*atan(sqrt((1. + e_elips)/(1. - e_elips))*tan(zx0/2.)) 77 99 lsperi = modulo(lsperi,2.*pi) 78 write(*,*)myname,': Perihelion solar long. Ls (deg)=', & 79 lsperi*180./pi 100 write(*,*)myname,': Perihelion solar long. Ls (deg) =', lsperi*180./pi 80 101 81 102 END SUBROUTINE iniorbit -
trunk/LMDZ.MARS/libf/phymars/tabfi.F
r3902 r3974 61 61 use time_phylmdz_mod, only: daysec, dtphys 62 62 use planete_h, only: aphelie, emin_turb, lmixmin, obliquit, 63 & peri_day, periheli, year_day 63 & peri_day, periheli, year_day, 64 & lsp2solp, iniorbit 65 64 66 implicit none 65 67 … … 460 462 write(*,*) 'perihelion =',periheli 461 463 write(*,*) 'and',year_day,'sols/year' 462 call lsp2solp(peri_ls,peri_day ,aphelie,periheli,year_day)464 call lsp2solp(peri_ls,peri_day) 463 465 write(*,*) 'peri_day (new value):',peri_day 464 466 … … 543 545 544 546 c----------------------------------------------------------------------- 547 c Initialization of orbital parameters 548 c----------------------------------------------------------------------- 549 call iniorbit() 550 551 c----------------------------------------------------------------------- 545 552 c Case when using a start file from before March 1996 (without iceradius... 546 553 c----------------------------------------------------------------------- … … 555 562 end if 556 563 557 c-----------------------------------------------------------------------558 564 END SUBROUTINE tabfi 559 565 560 561 562 563 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!564 ! gives sol at perihelion for ls at perihelion (for precession cycles)565 subroutine lsp2solp(lsp,solp,aphelie,periheli,year_day)566 567 implicit none568 ! Arguments:569 real lsp ! Input: ls at perihelion570 real solp ! Output: sol at perihelion571 real aphelie,periheli,year_day ! Input: parameters572 573 ! Local:574 double precision zx0 ! eccentric anomaly at Ls=0575 double precision e_elips576 double precision pi,degrad577 578 parameter (pi=4.d0*atan(1.d0))579 parameter (degrad=180.d0/pi)580 581 e_elips=(aphelie-periheli)/(aphelie+periheli)582 zx0 = -2.0*datan(dtan(0.5*lsp/degrad)583 . *dsqrt((1.-e_elips)/(1.+e_elips)))584 if (zx0 .le. 0.) zx0 = zx0 + 2.*pi585 586 solp = year_day*(1.-(zx0-e_elips*dsin(zx0))/(2.*pi))587 588 589 end subroutine lsp2solp590 591 592 566 END MODULE tabfi_mod 593
Note: See TracChangeset
for help on using the changeset viewer.
