Changeset 672 for trunk/LMDZ.MARS/libf


Ignore:
Timestamp:
May 25, 2012, 3:43:44 PM (13 years ago)
Author:
tnavarro
Message:

change perihelion date in solar longitude for any orbit, not only present day one

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/tabfi.F

    r669 r672  
    445445          if(ierr.ne.0) goto 1160
    446446          write(*,*)
    447           write(*,*) ' peri_ls asked :',peri_ls
    448           call lsp2solp(peri_ls,peri_day)
    449           write(*,*) ' peri_day (new value):',peri_day
     447          write(*,*) 'peri_ls asked:',peri_ls
     448          write(*,*) 'for aphelion =',aphelie
     449          write(*,*) 'perihelion =',periheli
     450          write(*,*) 'and',year_day,'sols/year'
     451          call lsp2solp(peri_ls,peri_day,aphelie,periheli,year_day)
     452          write(*,*) 'peri_day (new value):',peri_day
    450453
    451454
     
    549552!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    550553! gives sol at perihelion for ls at perihelion (for precession cycles)
    551       subroutine lsp2solp(lsp,solp)
     554      subroutine lsp2solp(lsp,solp,aphelie,periheli,year_day)
    552555
    553556      implicit none
     
    555558      real lsp     ! Input: ls at perihelion
    556559      real solp    ! Output: sol at perihelion
    557      
     560      real aphelie,periheli,year_day ! Input: parameters
     561 
    558562!  Local:
    559563      double precision zx0 ! eccentric anomaly at Ls=0
    560       double precision year_day
    561564      double precision e_elips
    562565      double precision pi,degrad
    563566     
    564       parameter (year_day=668.6d0) ! number of sols in a martian year
    565       parameter (e_elips=0.0934d0)  ! eccentricity of orbit
    566567      parameter (pi=3.14159265358979d0)
    567568      parameter (degrad=57.2957795130823d0)
    568      
     569
     570      e_elips=(aphelie-periheli)/(aphelie+periheli)     
    569571      zx0 = -2.0*datan(dtan(0.5*lsp/degrad)
    570572     .          *dsqrt((1.-e_elips)/(1.+e_elips)))
Note: See TracChangeset for help on using the changeset viewer.