- Timestamp:
- Jul 15, 2025, 2:43:41 PM (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/recomp_orb_param_mod.F90
r3742 r3850 31 31 ! Input Variables 32 32 !-------------------------------------------------------- 33 real, intent(in) :: i_myear ! Number of simulated Martian years33 real, intent(in) :: i_myear ! Number of simulated Martian years 34 34 real, intent(in) :: i_myear_leg ! Number of iterations of the PEM 35 35 … … 62 62 Lsp = lsperi*180./pi ! We convert in degree 63 63 64 print*, year_bp_ini,i_myear,i_myear_leg 65 64 66 write(*,*) 'recomp_orb_param, Old year =', Year - i_myear_leg 65 67 write(*,*) 'recomp_orb_param, Old obl. =', obliquit … … 69 71 70 72 found_year = .false. 71 do ilask = last_ilask,2,-1 72 xa = yearlask(ilask) 73 xb = yearlask(ilask - 1) 74 if (xa <= Year .and. Year < xb) then 75 ! Obliquity 76 if (var_obl) then 77 ya = obllask(ilask) 78 yb = obllask(ilask - 1) 79 obliquit = (Year - xa)*(yb - ya)/(xb - xa) + ya 73 if (Year < 0.) then 74 do ilask = last_ilask,2,-1 75 xa = yearlask(ilask) 76 xb = yearlask(ilask - 1) 77 if (xa <= Year .and. Year < xb) then 78 ! Obliquity 79 if (var_obl) then 80 ya = obllask(ilask) 81 yb = obllask(ilask - 1) 82 obliquit = (Year - xa)*(yb - ya)/(xb - xa) + ya 83 endif 84 85 ! Eccentricity 86 if (var_ecc) then 87 ya = ecclask(ilask) 88 yb = ecclask(ilask - 1) 89 e_elips = (Year - xa)*(yb - ya)/(xb - xa) + ya 90 endif 91 92 ! Lsp 93 if (var_lsp) then 94 ya = lsplask(ilask) 95 yb = lsplask(ilask - 1) 96 if (abs(yb - ya) > 300.) then ! If modulo is "crossed" through the interval 97 if (ya < yb) then ! Lsp should be decreasing 98 ya = ya + 360. 99 else ! Lsp should be increasing 100 yb = yb + 360. 101 endif 102 endif 103 Lsp = modulo((Year - xa)*(yb - ya)/(xb - xa) + ya,360.) 104 endif 105 found_year = .true. 106 exit ! The loop is left as soon as the right interval is found 80 107 endif 81 82 ! Eccentricity 83 if (var_ecc) then 84 ya = ecclask(ilask) 85 yb = ecclask(ilask - 1) 86 e_elips = (Year - xa)*(yb - ya)/(xb - xa) + ya 87 endif 88 89 ! Lsp 90 if (var_lsp) then 91 ya = lsplask(ilask) 92 yb = lsplask(ilask - 1) 93 if (abs(yb - ya) > 300.) then ! If modulo is "crossed" through the interval 94 if (ya < yb) then ! Lsp should be decreasing 95 ya = ya + 360. 96 else ! Lsp should be increasing 97 yb = yb + 360. 98 endif 99 endif 100 Lsp = modulo((Year - xa)*(yb - ya)/(xb - xa) + ya,360.) 101 endif 102 found_year = .true. 103 exit ! The loop is left as soon as the right interval is found 104 endif 105 enddo 108 enddo 109 else if (Year >= 0 .and. Year < 100.) then ! For present orbital characteristics 110 if (var_obl) obliquit = 25.19 111 if (var_ecc) e_elips = 0.0934 112 if (var_lsp) Lsp = 251. 113 found_year = .true. 114 endif 106 115 107 116 if (.not. found_year) error stop 'The new year could not be found in the file "obl_ecc_lsp.asc".' 117 118 write(*,*) 'recomp_orb_param, New obl. =', obliquit 119 write(*,*) 'recomp_orb_param, New ecc. =', e_elips 120 write(*,*) 'recomp_orb_param, New Lsp =', Lsp 108 121 109 122 halfaxe = 227.94 … … 118 131 #endif 119 132 120 write(*,*) 'recomp_orb_param, New obl. =', obliquit121 write(*,*) 'recomp_orb_param, New ecc. =', e_elips122 write(*,*) 'recomp_orb_param, New Lsp =', Lsp123 124 133 END SUBROUTINE recomp_orb_param 125 134
Note: See TracChangeset
for help on using the changeset viewer.