Changeset 1382
- Timestamp:
- Mar 4, 2015, 10:03:37 AM (10 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r1381 r1382 2158 2158 http://www.lmd.jussieu.fr/~lmdz/planets/mars/datadir 2159 2159 or /u/lmdz/WWW/planets/mars/datadir for local users. 2160 2161 == 04/03/2015 == FF+EM 2162 - Some cleanup in iniorbit.F -
trunk/LMDZ.MARS/libf/phymars/datareadnc.F
r1381 r1382 113 113 write(*,*) 'datareadnc: opening file surface.nc' 114 114 115 datafile="/u/ forget/WWW/datagcm/datafile" ! default path to surface.nc115 datafile="/u/lmdz/WWW/planets/mars/datadir" ! default path to surface.nc 116 116 call getin("datadir",datafile) ! but users may specify another path 117 117 -
trunk/LMDZ.MARS/libf/phymars/iniorbit.F
r1226 r1382 1 1 SUBROUTINE iniorbit 2 2 $ (paphelie,pperiheli,pyear_day,pperi_day,pobliq) 3 use planete_h 4 USE comcstfi_h 3 use planete_h, only: aphelie, periheli, year_day, peri_day, 4 & obliquit, unitastr, e_elips, p_elips, 5 & timeperi 6 use comcstfi_h, only: pi 5 7 IMPLICIT NONE 6 8 7 c======================================================================= 8 c 9 c Auteur: 10 c ------- 11 c Frederic Hourdin 22 Fevrier 1991 12 c 13 c Objet: 14 c ------ 15 c Initialisation du sous programme orbite qui calcule 16 c a une date donnee de l'annee de duree year_day commencant 17 c a l'equinoxe de printemps et dont le perihelie se situe 18 c a la date peri_day, la distance au soleil et la declinaison. 19 c 20 c Interface: 21 c ---------- 22 c - Doit etre appele avant d'utiliser orbite. 23 c - initialise une partie du common planete.h 24 c 25 c Arguments: 26 c ---------- 27 c 28 c Input: 29 c ------ 30 c aphelie \ aphelie et perihelie de l'orbite 31 c periheli / en millions de kilometres. 32 c 33 c======================================================================= 9 !======================================================================= 10 ! Initialisation of orbital parameters (stored in planete_h module) 11 !======================================================================= 34 12 35 c----------------------------------------------------------------------- 36 c Declarations: 37 c ------------- 13 ! Arguments: 14 ! ---------- 38 15 39 c Arguments: 40 c ---------- 16 REAL,INTENT(IN) :: paphelie,pperiheli,pyear_day,pperi_day,pobliq 41 17 42 REAL paphelie,pperiheli,pyear_day,pperi_day,pobliq 43 44 c Local: 45 c ------ 18 ! Local: 19 ! ------ 46 20 47 21 REAL zxref,zanom,zz,zx0,zdx 48 22 INTEGER iter 49 23 50 c-----------------------------------------------------------------------24 !----------------------------------------------------------------------- 51 25 52 26 pi=2.*asin(1.) … … 58 32 peri_day=pperi_day 59 33 60 PRINT*,' Perihelie en Mkm ',periheli61 PRINT*,' Aphelise en Mkm ',aphelie62 PRINT*,' obliquite en degres :',obliquit63 unitastr=149.597927 34 PRINT*,'iniorbit: Perihelion in Mkm ',periheli 35 PRINT*,'iniorbit: Aphelion in Mkm ',aphelie 36 PRINT*,'iniorbit: Obliquity in degrees :',obliquit 37 unitastr=149.597927 ! 1 UA, in Mkm 64 38 e_elips=(aphelie-periheli)/(periheli+aphelie) 65 39 p_elips=0.5*(periheli+aphelie)*(1-e_elips*e_elips)/unitastr 66 40 67 print*,' e_elips',e_elips68 print*,' p_elips',p_elips41 print*,'iniorbit: e_elips',e_elips 42 print*,'iniorbit: p_elips',p_elips 69 43 70 c-----------------------------------------------------------------------71 c calcul de l'angle polaire et de la distance au soleil:72 c-------------------------------------------------------44 !----------------------------------------------------------------------- 45 ! compute polar angle and distance to the Sun: 46 ! ------------------------------------------------------- 73 47 74 c calcul de l'zanomalie moyenne 48 ! compute mean anomaly zanom 75 49 76 50 zz=(year_day-pperi_day)/year_day 77 51 zanom=2.*pi*(zz-nint(zz)) 78 52 zxref=abs(zanom) 79 PRINT*,' zanom ',zanom53 PRINT*,'iniorbit: zanom ',zanom 80 54 81 c resolution de l'equation horaire zx0 - e * sin (zx0) = zxref 82 c methode de Newton 55 ! solve equation zx0 - e * sin (zx0) = zxref for eccentric anomaly zx0 56 ! using Newton method 83 57 84 58 zx0=zxref+e_elips*sin(zxref) 85 DO 110iter=1,10059 DO iter=1,100 86 60 zdx=-(zx0-e_elips*sin(zx0)-zxref)/(1.-e_elips*cos(zx0)) 87 if(abs(zdx).le.(1.e-12)) goto 12061 if(abs(zdx).le.(1.e-12)) exit 88 62 zx0=zx0+zdx 89 110 continue 90 120 continue 63 ENDDO 64 91 65 zx0=zx0+zdx 92 66 if(zanom.lt.0.) zx0=-zx0 93 PRINT*,'zx0 ',zx0 94 95 c zteta est la longitude solaire 67 PRINT*,'iniorbit: zx0 ',zx0 96 68 97 69 timeperi=2.*atan(sqrt((1.+e_elips)/(1.-e_elips))*tan(zx0/2.)) 98 PRINT*,'longitude solaire du perihelie timeperi = ',timeperi 70 PRINT*,'iniorbit: Perihelion solar long. Ls (deg)=', 71 & 360.-timeperi*180./pi 99 72 100 RETURN101 73 END -
trunk/LMDZ.MARS/libf/phymars/planete_h.F90
r1226 r1382 2 2 IMPLICIT NONE 3 3 4 REAL aphelie 5 REAL periheli 6 REAL year_day 7 REAL peri_day 8 REAL obliquit 4 REAL aphelie ! Aphelion, in Mkm 5 REAL periheli ! Perihelion, in Mkm 6 REAL year_day ! number of days in the year 7 REAL peri_day ! date of perihelion, in days 8 REAL obliquit ! obliquity of the planet, in degrees 9 9 REAL lmixmin 10 10 REAL emin_turb 11 11 REAL coefvis 12 12 REAL coefir 13 REAL timeperi 14 REAL e_elips 13 REAL timeperi ! angle of the perihelion, in rad 14 REAL e_elips ! orbit eccentricity 15 15 REAL p_elips 16 REAL unitastr 16 REAL unitastr ! Astronomical unit AU, in Mkm 17 17 18 18 END MODULE planete_h
Note: See TracChangeset
for help on using the changeset viewer.