Changeset 3081
- Timestamp:
- Oct 11, 2023, 12:36:59 PM (15 months ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r3073 r3081 1824 1824 Chemistry: correction missing initialisation 1825 1825 Add escape values in outputs 1826 1827 == 11/10/2023 == YJ 1828 Move mu0 (cosinus of solar zenith angle) calculation out of callrad 1829 This was a issue for photochemistry because mu0 was updated only iradia times -
trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90
r2987 r3081 903 903 !--------------------------------- 904 904 905 ! Compute local stellar zenith angles 906 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 907 if (tlocked) then 908 ! JL14 corrects tidally resonant (and inclined) cases. nres=omega_rot/omega_orb 909 ztim1=SIN(declin) 910 ztim2=COS(declin)*COS(zlss) 911 ztim3=COS(declin)*SIN(zlss) 912 913 call stelang(ngrid,sinlon,coslon,sinlat,coslat, & 914 ztim1,ztim2,ztim3,mu0,fract, flatten) 915 916 elseif (diurnal) then 917 ztim1=SIN(declin) 918 ztim2=COS(declin)*COS(2.*pi*(zday-.5)) 919 ztim3=-COS(declin)*SIN(2.*pi*(zday-.5)) 920 921 call stelang(ngrid,sinlon,coslon,sinlat,coslat, & 922 ztim1,ztim2,ztim3,mu0,fract, flatten) 923 else if(diurnal .eqv. .false.) then 924 925 call mucorr(ngrid,declin,latitude,mu0,fract,10000.,rad,flatten) 926 ! WARNING: this function appears not to work in 1D 927 928 if ((ngrid.eq.1).and.(global1d)) then ! Fixed zenith angle 'szangle' in 1D simulations w/ globally-averaged sunlight. 929 mu0 = cos(pi*szangle/180.0) 930 endif 931 932 endif 933 905 934 if (callrad) then 906 935 if( mod(icount-1,iradia).eq.0.or.lastcall) then 907 908 ! Compute local stellar zenith angles909 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~910 if (tlocked) then911 ! JL14 corrects tidally resonant (and inclined) cases. nres=omega_rot/omega_orb912 ztim1=SIN(declin)913 ztim2=COS(declin)*COS(zlss)914 ztim3=COS(declin)*SIN(zlss)915 916 call stelang(ngrid,sinlon,coslon,sinlat,coslat, &917 ztim1,ztim2,ztim3,mu0,fract, flatten)918 919 elseif (diurnal) then920 ztim1=SIN(declin)921 ztim2=COS(declin)*COS(2.*pi*(zday-.5))922 ztim3=-COS(declin)*SIN(2.*pi*(zday-.5))923 924 call stelang(ngrid,sinlon,coslon,sinlat,coslat, &925 ztim1,ztim2,ztim3,mu0,fract, flatten)926 else if(diurnal .eqv. .false.) then927 928 call mucorr(ngrid,declin,latitude,mu0,fract,10000.,rad,flatten)929 ! WARNING: this function appears not to work in 1D930 931 if ((ngrid.eq.1).and.(global1d)) then ! Fixed zenith angle 'szangle' in 1D simulations w/ globally-averaged sunlight.932 mu0 = cos(pi*szangle/180.0)933 !print*,'acosz=',mu0,', szangle=',szangle934 endif935 936 endif937 936 938 937 ! Eclipse incoming sunlight (e.g. Saturn ring shadowing).
Note: See TracChangeset
for help on using the changeset viewer.