Changeset 1326


Ignore:
Timestamp:
Aug 19, 2014, 12:42:32 AM (10 years ago)
Author:
jleconte
Message:

18/08/2014 == JL

  • corrected insolation calculation in locked and inclined case (proper calculation of sub solar longitude and declination)
Location:
trunk/LMDZ.GENERIC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/README

    r1325 r1326  
    10451045== 18/08/2014 == JL
    10461046- fixed variable type declaration bug in ave_stelspec
     1047- corrected insolation calculation in locked and inclined case (proper calculation of sub solar longitude and declination)
  • trunk/LMDZ.GENERIC/libf/phystd/comsaison_h.F90

    r1315 r1326  
    66       integer isaison
    77       logical callsais
    8        real dist_star,declin
     8       real dist_star,declin,right_ascen
    99
    1010       real, allocatable, dimension(:) :: mu0,fract
    11 !$OMP THREADPRIVATE(isaison,callsais,dist_star,declin,mu0,fract)
    1211
    1312       end module comsaison_h
  • trunk/LMDZ.GENERIC/libf/phystd/orbite.F

    r1308 r1326  
    1       subroutine orbite(pls,pdist_star,pdecli)
    2      
    3       use planete_mod, only: p_elips, e_elips, timeperi, obliquit
     1      subroutine orbite(pls,pdist_star,pdecli,pright_ascenc)
    42      implicit none
    53
     
    1917!     pdist_star    Distance Star-Planet in UA
    2018!     pdecli        declinaison ( in radians )
     19!     pright_ascenc right ascension ( in radians )
    2120!
    2221!=======================================================================
     
    2524c   -------------
    2625
    27 !#include "planete.h"
     26#include "planete.h"
    2827#include "comcstfi.h"
    2928
     
    3130c ----------
    3231
    33       REAL pday,pdist_star,pdecli,pls,i
     32      REAL pday,pdist_star,pdecli,pright_ascenc,pls,i
    3433
    3534c-----------------------------------------------------------------------
     
    4544      pdecli = asin (sin(pls)*sin(obliquit*pi/180.))
    4645
    47 c ********************* version after 01/01/2000 *******
     46c********************* version after 01/01/2000 *******
    4847c     i=obliquit*pi/180.
    4948c     pdecli=asin(sin(pls)*sin(i)/sqrt(sin(pls)**2+
     
    5150c ******************************************************
    5251
     52c right ascencion
     53      If((pls.lt.pi/2.d0)) then
     54         pright_ascenc= atan(tan(pls)*cos(obliquit*pi/180.))
     55      else if((pls.gt.pi/2.d0).and.(pls.lt.3.d0*pi/2.d0)) then
     56         pright_ascenc= pi+atan(tan(pls)*cos(obliquit*pi/180.))
     57      else if((pls.gt.3.d0*pi/2.d0)) then
     58         pright_ascenc= 2.d0*pi+atan(tan(pls)*cos(obliquit*pi/180.))
     59      else if (Abs(pls-pi/2.d0).le.1.d-10) then
     60         pright_ascenc= pi/2.d0
     61      else
     62         pright_ascenc=-pi/2.d0
     63      end if
     64         
    5365      RETURN
    5466      END
  • trunk/LMDZ.GENERIC/libf/phystd/physiq.F90

    r1315 r1326  
    235235
    236236      real zls                       ! solar longitude (rad)
     237      real zlss                      ! sub solar point longitude (rad)
    237238      real zday                      ! date (time since Ls=0, in martian days)
    238239      real zzlay(ngrid,nlayer)   ! altitude at the middle of the layers
     
    250251      real zdtdif(ngrid,nlayer)                       ! (K/s)
    251252      real zdvadj(ngrid,nlayer),zduadj(ngrid,nlayer)  ! (m.s-2)
     253      real zdvtid(ngrid,nlayer),zdutid(ngrid,nlayer)  ! (m.s-2)
    252254      real zdhadj(ngrid,nlayer)                           ! (K/s)
    253255      real zdtgw(ngrid,nlayer)                            ! (K/s)
     
    844846!          Compute local stellar zenith angles
    845847!          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    846            call orbite(zls,dist_star,declin)
     848           call orbite(zls,dist_star,declin,right_ascen)
    847849
    848850           if (tlocked) then
     851! JL14 corrects tidally resonant (and inclined) cases. nres=omega_rot/omega_orb
     852              zlss=Mod(-(2.*pi*(zday/year_day)*nres - right_ascen),2.*pi)
    849853              ztim1=SIN(declin)
    850 !              ztim2=COS(declin)*COS(2.*pi*(zday/year_day) - zls*nres)
    851 !              ztim3=-COS(declin)*SIN(2.*pi*(zday/year_day) - zls*nres)
    852 ! JL12 corrects tidally resonant cases. nres=omega_rot/omega_orb
    853               ztim2=COS(declin)*COS(2.*pi*(zday/year_day)*nres - zls)
    854               ztim3=-COS(declin)*SIN(2.*pi*(zday/year_day)*nres - zls)
     854              ztim2=COS(declin)*COS(zlss)
     855              ztim3=COS(declin)*SIN(zlss)
     856
    855857
    856858              call stelang(ngrid,sinlon,coslon,sinlat,coslat,    &
     
    858860
    859861           elseif (diurnal) then
    860                ztim1=SIN(declin)
    861                ztim2=COS(declin)*COS(2.*pi*(zday-.5))
    862                ztim3=-COS(declin)*SIN(2.*pi*(zday-.5))
    863 
    864                call stelang(ngrid,sinlon,coslon,sinlat,coslat,    &
     862              zlss=-2.*pi*(zday-.5)
     863              ztim1=SIN(declin)
     864              ztim2=COS(declin)*COS(2.*pi*(zday-.5))
     865              ztim3=-COS(declin)*SIN(2.*pi*(zday-.5))
     866
     867              call stelang(ngrid,sinlon,coslon,sinlat,coslat,    &
    865868               ztim1,ztim2,ztim3,mu0,fract, flatten)
    866869           else if(diurnal .eqv. .false.) then
     
    20672070
    20682071        call writediagfi(ngrid,"Ls","solar longitude","deg",0,zls*180./pi)
     2072        call writediagfi(ngrid,"Lss","sub solar longitude","deg",0,zlss*180./pi)
     2073        call writediagfi(ngrid,"RA","right ascension","deg",0,right_ascen*180./pi)
     2074        call writediagfi(ngrid,"Declin","solar declination","deg",0,declin*180./pi)
    20692075        call writediagfi(ngrid,"tsurf","Surface temperature","K",2,tsurf)
    20702076        call writediagfi(ngrid,"ps","Surface pressure","Pa",2,ps)
Note: See TracChangeset for help on using the changeset viewer.