Changeset 1429 for trunk/LMDZ.GENERIC
- Timestamp:
- May 22, 2015, 3:28:56 PM (10 years ago)
- Location:
- trunk/LMDZ.GENERIC/libf/phystd
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/phystd/physiq.F90
r1397 r1429 11 11 use watercommon_h, only : RLVTT, Psat_water,epsi 12 12 use gases_h, only: gnom, gfrac 13 use radcommon_h, only: sigma, eclipse,glat, grav13 use radcommon_h, only: sigma, glat, grav 14 14 use radii_mod, only: h2o_reffrad, co2_reffrad 15 15 use aerosol_mod, only: iaero_co2, iaero_h2o … … 441 441 !$OMP THREADPRIVATE(ice_initial,ice_min,ice_update) 442 442 443 ! included by MS to compute the daily average of rings shadowing444 integer, parameter :: nb_hours = 1536 ! set how many times per day are used445 real :: pas446 integer :: m447 ! temporary variables computed at each step of this average448 real :: ptime_day ! Universal time in sol fraction449 real :: tmp_zls,tmp_dist_star, tmp_declin, tmp_right_ascen ! tmp solar longitude, stellar dist, declin and RA450 real, dimension(:), allocatable :: tmp_fract ! day fraction of the time interval451 real, dimension(:), allocatable :: tmp_mu0 ! equivalent solar angle452 453 443 ! included by BC for slab ocean 454 444 real, dimension(:),allocatable,save :: pctsrf_sic … … 526 516 527 517 !! this is defined in radcommon_h 528 ALLOCATE(eclipse(ngrid))529 518 ALLOCATE(glat(ngrid)) 530 519 … … 873 862 874 863 !! Eclipse incoming sunlight (e.g. Saturn ring shadowing) 875 876 if(rings_shadow) then 877 write(*,*) 'Rings shadow activated' 878 if(diurnal .eqv. .false.) then ! we need to compute the daily average insolation 879 pas = 1./nb_hours 880 ptime_day = 0. 881 fract(:) = 0. 882 ALLOCATE(tmp_fract(ngrid)) 883 ALLOCATE(tmp_mu0(ngrid)) 884 tmp_fract(:) = 0. 885 eclipse(:) = 0. 886 tmp_mu0(:) = 0. 887 888 do m=1, nb_hours 889 ptime_day = m*pas 890 call stellarlong(pday+ptime_day,tmp_zls) 891 call orbite(tmp_zls,tmp_dist_star,tmp_declin,tmp_right_ascen) 892 ztim1=SIN(tmp_declin) 893 ztim2=COS(tmp_declin)*COS(2.*pi*(pday+ptime_day-.5)) 894 ztim3=-COS(tmp_declin)*SIN(2.*pi*(pday+ptime_day-.5)) 895 896 897 call stelang(ngrid,sinlon,coslon,sinlat,coslat, & 898 ztim1,ztim2,ztim3,tmp_mu0,tmp_fract, flatten) 899 900 call rings(ngrid, tmp_declin, ptime_day, rad, flatten, eclipse) 901 902 fract(:) = fract(:) + (1.-eclipse(:))*tmp_fract(:) !! fract prend en compte l'ombre des anneaux et l'alternance jour/nuit 903 enddo 904 905 DEALLOCATE(tmp_fract) 906 DEALLOCATE(tmp_mu0) 907 908 fract(:) = fract(:)/nb_hours 909 910 else 911 call rings(ngrid, declin, ptime, rad, 0., eclipse) 912 fract(:) = fract(:) * (1.-eclipse) 913 endif 914 else 915 eclipse(:) = 0.0 916 endif 864 865 if(rings_shadow) then 866 call call_rings(ngrid, ptime, pday, diurnal) 867 endif 868 917 869 918 870 if (corrk) then … … 934 886 935 887 ! standard callcorrk 936 937 938 939 888 940 889 if(ok_slab_ocean) then … … 2274 2223 !! this is defined in comsaison_h 2275 2224 IF ( ALLOCATED(mu0)) DEALLOCATE(mu0) 2276 2277 2225 IF ( ALLOCATED(fract)) DEALLOCATE(fract) 2278 2279 2280 !! this is defined in radcommon_h2281 IF ( ALLOCATED(eclipse)) DEALLOCATE(eclipse)2282 2226 2283 2227 !! this is defined in comsoil_h
Note: See TracChangeset
for help on using the changeset viewer.