Changeset 1545
- Timestamp:
- May 2, 2016, 8:31:27 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DOC/chantiers/commit_importants.log
r1543 r1545 1718 1718 - removed "init_phys_lmdz.F90", "comgeomphy.F90"; adapted routines to use 1719 1719 geometry_mod (longitude, latitude, cell_area, etc.) 1720 1721 ********************** 1722 **** commit_v1545 **** 1723 ********************** 1724 Ehouarn: Adaptation wrt previous changes for Titan and Venus where 1725 longitude and latitude arrays (in phycommon/geometry_mod) were overwritten 1726 with values from startphy.nc files, where values are given in degrees. 1727 For the sake of homegeneity with other physics package, revert to "default" 1728 behaviour: longitude/latitude are in radians and longitude_deg/latitude_deg 1729 are in degrees. 1730 Also added checking in phyetat0 that the longitude/latitude read in the 1731 restartphy.nc files match the ones provided by the dynamics. -
trunk/LMDZ.TITAN/libf/phytitan/iophy.F90
r1530 r1545 29 29 USE ioipsl 30 30 implicit none 31 real,dimension(klon),intent(in) :: rlon 32 real,dimension(klon),intent(in) :: rlat 31 real,dimension(klon),intent(in) :: rlon ! longitudes, in degrees 32 real,dimension(klon),intent(in) :: rlat ! latitudes, in degrees 33 33 34 34 REAL,dimension(klon_glo) :: rlat_glo -
trunk/LMDZ.TITAN/libf/phytitan/muphys3D.F
r1543 r1545 65 65 use dimphy 66 66 c use radcommon_h, only : volume,rayon,vrat,drayon,dvolume 67 USE geometry_mod, only: latitude 67 USE geometry_mod, only: latitude ! in radians 68 68 69 69 IMPLICIT NONE -
trunk/LMDZ.TITAN/libf/phytitan/pg2.old
r1543 r1545 42 42 43 43 use dimphy 44 USE geometry_mod, ONLY: latitude 44 USE geometry_mod, ONLY: latitude_deg 45 45 #include "dimensions.h" 46 46 #include "microtab.h" … … 180 180 lati(1) = 0.5*RPI 181 181 DO ig=2,ngrid-1 182 lati(ig) = latitude (2+(ig-2)*iim)*RPI/180.182 lati(ig) = latitude_deg(2+(ig-2)*iim)*RPI/180. 183 183 ENDDO 184 184 lati(ngrid) = -0.5*RPI … … 197 197 c print*,"ENTREE PG2 PREMIER APPEL" 198 198 c print*,airetot,' airetot?= ',4.*RPI*RA*RA 199 c print*,1,latitude (1),aire(1),aire(1)/airetot,' aires'199 c print*,1,latitude_deg(1),aire(1),aire(1)/airetot,' aires' 200 200 c DO ig=2,ngrid-1 201 c print*,ig,latitude (2+(ig-2)*iim),aire(ig),aire(ig)/airetot,' aires'201 c print*,ig,latitude_deg(2+(ig-2)*iim),aire(ig),aire(ig)/airetot,' aires' 202 202 c ENDDO 203 c print*,ngrid,latitude (klon),aire(ngrid),aire(ngrid)/airetot,' aires'203 c print*,ngrid,latitude_deg(klon),aire(ngrid),aire(ngrid)/airetot,' aires' 204 204 c stop 205 205 -
trunk/LMDZ.TITAN/libf/phytitan/phyetat0.F90
r1543 r1545 13 13 USE iostart 14 14 USE infotrac 15 USE geometry_mod, only: latitude ,longitude15 USE geometry_mod, only: latitude_deg,longitude_deg 16 16 USE time_phylmdz_mod, only: itau_phy, raz_date 17 17 … … 33 33 integer :: i,isoil 34 34 CHARACTER(len=2) :: str2 35 REAL :: lon_startphy(klon), lat_startphy(klon) 35 36 36 37 ! les variables globales lues dans le fichier restart … … 75 76 ENDIF 76 77 77 ! read latitudes 78 call get_field("latitude",latitude,found) 79 IF (.not.found) THEN 80 PRINT*, 'phyetat0: Le champ <latitude> est absent' 81 CALL abort 82 ENDIF 83 84 ! read longitudes 85 call get_field("longitude",longitude,found) 86 IF (.not.found) THEN 87 PRINT*, 'phyetat0: Le champ <longitude> est absent' 88 CALL abort 89 ENDIF 78 ! read latitudes and make a sanity check (because already known from dyn) 79 call get_field("latitude",lat_startphy,found) 80 IF (.not.found) THEN 81 PRINT*, 'phyetat0: Le champ <latitude> est absent' 82 CALL abort 83 ENDIF 84 DO i=1,klon 85 IF (ABS(lat_startphy(i)-latitude_deg(i))>=0.01) THEN 86 WRITE(*,*) "phyetat0: Warning! Latitude discrepancy wrt startphy file:",& 87 " i=",i," lat_startphy(i)=",lat_startphy(i),& 88 " latitude_deg(i)=",latitude_deg(i) 89 CALL abort 90 ENDIF 91 ENDDO 92 93 ! read longitudes and make a sanity check (because already known from dyn) 94 call get_field("longitude",lon_startphy,found) 95 IF (.not.found) THEN 96 PRINT*, 'phyetat0: Le champ <longitude> est absent' 97 CALL abort 98 ENDIF 99 DO i=1,klon 100 IF (ABS(lon_startphy(i)-longitude_deg(i))>=0.01) THEN 101 WRITE(*,*) "phyetat0: Warning! Longitude discrepancy wrt startphy file:",& 102 " i=",i," lon_startphy(i)=",lon_startphy(i),& 103 " longitude_deg(i)=",longitude_deg(i) 104 CALL abort 105 ENDIF 106 ENDDO 90 107 91 108 ! read in other variables here ... … … 319 336 resch4(1) = 0. ! pole nord = 1 point 320 337 DO i=2,klon 321 if ((latitude (i).ge.75..and.latitude(i).le.85.).or. &322 (latitude (i).ge.-85.and.latitude(i).le.-75.)) then338 if ((latitude_deg(i).ge.75..and.latitude_deg(i).le.85.).or. & 339 (latitude_deg(i).ge.-85.and.latitude_deg(i).le.-75.)) then 323 340 resch4(i) = 2. 324 341 else … … 352 369 353 370 ! do some more initializations 354 call init_iophy_new(latitude ,longitude)371 call init_iophy_new(latitude_deg,longitude_deg) 355 372 356 373 end subroutine phyetat0 -
trunk/LMDZ.TITAN/libf/phytitan/phyredem.F90
r1543 r1545 12 12 put_var,put_field 13 13 USE infotrac 14 USE geometry_mod, only: longitude , latitude14 USE geometry_mod, only: longitude_deg, latitude_deg 15 15 USE time_phylmdz_mod, only: day_end, annee_ref, itau_phy, raz_date 16 16 … … 64 64 65 65 CALL put_field("longitude", & 66 "Longitudes de la grille physique",longitude )66 "Longitudes de la grille physique",longitude_deg) 67 67 68 68 CALL put_field("latitude", & 69 "Latitudes de la grille physique",latitude )69 "Latitudes de la grille physique",latitude_deg) 70 70 71 71 ! variables -
trunk/LMDZ.TITAN/libf/phytitan/physiq.F
r1543 r1545 58 58 USE infotrac 59 59 use dimphy 60 USE geometry_mod, ONLY: longitude, latitude, cell_area, dx, dy 60 USE geometry_mod, ONLY: longitude, latitude, ! in radians 61 & longitude_deg, latitude_deg, ! in degrees 62 & cell_area, dx, dy 61 63 use cpdet_mod, only: cpdet, t2tpot 62 64 USE mod_phys_lmdz_para, only : is_parallel,jj_nb … … 861 863 862 864 c dans zenang, Ls en degres ; dans mucorr, Ls en radians 863 call mucorr(klon,zls,latitude ,rmu0bar,fractbar)865 call mucorr(klon,zls,latitude_deg,rmu0bar,fractbar) 864 866 IF (cycle_diurne) THEN 865 867 zdtime=dtime*REAL(radpas) ! pas de temps du rayonnement (s) 866 CALL zenang(zlsdeg,gmtime,zdtime,latitude,longitude,rmu0,fract) 868 CALL zenang(zlsdeg,gmtime,zdtime,latitude_deg,longitude_deg, 869 & rmu0,fract) 867 870 ELSE 868 871 rmu0 = rmu0bar … … 917 920 $ paprs,pplay,ppk,radsol,falbe, 918 921 e solsw, sollw, sollwdown, fder, 919 e longitude , latitude, dx, dy,922 e longitude_deg, latitude_deg, dx, dy, 920 923 e debut, lafin, 921 924 s d_t_vdf,d_u_vdf,d_v_vdf,d_ts, … … 1368 1371 c A ADAPTER POUR VENUS ET TITAN!!! 1369 1372 c CALL lift_noro(klon,klev,dtime,paprs,pplay, 1370 c e latitude ,zmea,zstd,zpic,zgam,zthe,zpic,zval,1373 c e latitude_deg,zmea,zstd,zpic,zgam,zthe,zpic,zval, 1371 1374 c e igwd,idx,itest, 1372 1375 c e t_seri, u_seri, v_seri, … … 1425 1428 c==================================================================== 1426 1429 if (ballons.eq.1) then 1427 CALL ballon(30,pdtphys,rjourvrai,gmtime,latitude,longitude, 1430 CALL ballon(30,pdtphys,rjourvrai,gmtime, 1431 & latitude_deg,longitude_deg, 1428 1432 c C t,pplay,u,v,pphi) ! alt above surface (smoothed for GCM) 1429 1433 C t,pplay,u,v,zphi) ! alt above planet average radius … … 1459 1463 CALL aaam_bud (27,klon,klev,rjourvrai,gmtime, 1460 1464 C ra,rg,romega, 1461 C latitude ,longitude,pphis,1465 C latitude_deg,longitude_deg,pphis, 1462 1466 C zustrdr,zustrli,zustrcl, 1463 1467 C zvstrdr,zvstrli,zvstrcl, … … 1545 1549 c DO k = 1, klev 1546 1550 c DO i = 1, klon 1547 c mang(i,k) = RA*cos(latitude(i) *RPI/180.)1548 c . *(u_seri(i,k)+RA*cos(latitude(i) *RPI/180.)*ROMEGA)1551 c mang(i,k) = RA*cos(latitude(i)) 1552 c . *(u_seri(i,k)+RA*cos(latitude(i))*ROMEGA) 1549 1553 c . *cell_area(i)*(paprs(i,k)-paprs(i,k+1))/RG 1550 1554 c mangtot=mangtot+mang(i,k) -
trunk/LMDZ.TITAN/libf/phytitan/radtitan.F
r1543 r1545 33 33 USE infotrac 34 34 use dimphy 35 USE geometry_mod, ONLY: latitude 35 USE geometry_mod, ONLY: latitude ! in radians 36 36 USE optcld, only : iniqcld 37 37 use moyzon_mod, only:plevmoy … … 214 214 somcoslat=0. 215 215 do j=1,klon 216 coslat(j) = cos(latitude(j) *RPI/180.)216 coslat(j) = cos(latitude(j)) 217 217 somcoslat=somcoslat+coslat(j) 218 218 enddo -
trunk/LMDZ.VENUS/libf/phyvenus/iophy.F90
r1530 r1545 29 29 USE ioipsl 30 30 implicit none 31 real,dimension(klon),intent(in) :: rlon 32 real,dimension(klon),intent(in) :: rlat 31 real,dimension(klon),intent(in) :: rlon ! longitudes, in degrees 32 real,dimension(klon),intent(in) :: rlat ! latitudes, in degrees 33 33 34 34 REAL,dimension(klon_glo) :: rlat_glo -
trunk/LMDZ.VENUS/libf/phyvenus/nirco2abs.F
r1543 r1545 3 3 4 4 use dimphy 5 use geometry_mod, only: longitude , latitude5 use geometry_mod, only: longitude_deg, latitude_deg 6 6 use chemparam_mod, only: i_co2, i_o 7 7 c use compo_hedin83_mod2 … … 236 236 zday_int = (n-1)/float(nstep) 237 237 238 CALL zenang(0.,zday_int,RDAY/nstep,latitude,longitude, 239 s mu0_int,fract_int) 238 CALL zenang(0.,zday_int,RDAY/nstep, 239 & latitude_deg,longitude_deg, 240 & mu0_int,fract_int) 240 241 241 242 do ig=1,nlon -
trunk/LMDZ.VENUS/libf/phyvenus/phyetat0.F90
r1543 r1545 13 13 USE iostart 14 14 USE infotrac 15 use geometry_mod, only: longitude , latitude15 use geometry_mod, only: longitude_deg, latitude_deg 16 16 USE time_phylmdz_mod, only: itau_phy, raz_date 17 17 … … 33 33 integer :: i,isoil 34 34 CHARACTER(len=2) :: str2 35 REAL :: lon_startphy(klon), lat_startphy(klon) 35 36 36 37 ! les variables globales lues dans le fichier restart … … 64 65 ENDIF 65 66 66 ! read latitudes 67 call get_field("latitude",latitude,found) 68 IF (.not.found) THEN 69 PRINT*, 'phyetat0: Le champ <latitude> est absent' 70 CALL abort 71 ENDIF 72 73 ! read longitudes 74 call get_field("longitude",longitude,found) 75 IF (.not.found) THEN 76 PRINT*, 'phyetat0: Le champ <longitude> est absent' 77 CALL abort 78 ENDIF 67 ! read latitudes and make a sanity check (because already known from dyn) 68 call get_field("latitude",lat_startphy,found) 69 IF (.not.found) THEN 70 PRINT*, 'phyetat0: Le champ <latitude> est absent' 71 CALL abort 72 ENDIF 73 DO i=1,klon 74 IF (ABS(lat_startphy(i)-latitude_deg(i))>=0.01) THEN 75 WRITE(*,*) "phyetat0: Warning! Latitude discrepancy wrt startphy file:",& 76 " i=",i," lat_startphy(i)=",lat_startphy(i),& 77 " latitude_deg(i)=",latitude_deg(i) 78 CALL abort 79 ENDIF 80 ENDDO 81 82 ! read longitudes and make a sanity check (because already known from dyn) 83 call get_field("longitude",lon_startphy,found) 84 IF (.not.found) THEN 85 PRINT*, 'phyetat0: Le champ <longitude> est absent' 86 CALL abort 87 ENDIF 88 DO i=1,klon 89 IF (ABS(lon_startphy(i)-longitude_deg(i))>=0.01) THEN 90 WRITE(*,*) "phyetat0: Warning! Longitude discrepancy wrt startphy file:",& 91 " i=",i," lon_startphy(i)=",lon_startphy(i),& 92 " longitude_deg(i)=",longitude_deg(i) 93 CALL abort 94 ENDIF 95 ENDDO 79 96 80 97 ! read in other variables here ... … … 344 361 345 362 ! do some more initializations 346 call init_iophy_new(latitude ,longitude)363 call init_iophy_new(latitude_deg,longitude_deg) 347 364 348 365 end subroutine phyetat0 -
trunk/LMDZ.VENUS/libf/phyvenus/phyredem.F90
r1543 r1545 12 12 put_var,put_field 13 13 USE infotrac 14 use geometry_mod, only: longitude , latitude14 use geometry_mod, only: longitude_deg, latitude_deg 15 15 USE time_phylmdz_mod, only: day_end, annee_ref, itau_phy, raz_date 16 16 … … 62 62 63 63 CALL put_field("longitude", & 64 "Longitudes de la grille physique",longitude )64 "Longitudes de la grille physique",longitude_deg) 65 65 66 66 CALL put_field("latitude", & 67 "Latitudes de la grille physique",latitude )67 "Latitudes de la grille physique",latitude_deg) 68 68 69 69 ! variables -
trunk/LMDZ.VENUS/libf/phyvenus/physiq.F
r1543 r1545 58 58 USE infotrac 59 59 use dimphy 60 USE geometry_mod, only: longitude, latitude, cell_area, dx, dy 60 USE geometry_mod,only: longitude, latitude, ! in radians 61 & longitude_deg,latitude_deg, ! in degrees 62 & cell_area,dx,dy 61 63 USE mod_phys_lmdz_para, only : is_parallel,jj_nb 62 64 USE phys_state_var_mod ! Variables sauvegardees de la physique … … 665 667 DO k = 1, klev 666 668 DO i = 1, klon 667 ilat=(latitude (i)/5.625) + 17.669 ilat=(latitude_deg(i)/5.625) + 17. 668 670 delta_temp(i,k)=mat_dtemp(INT(ilat),k) 669 671 ENDDO … … 832 834 IF (cycle_diurne) THEN 833 835 zdtime=dtime*REAL(radpas) ! pas de temps du rayonnement (s) 834 CALL zenang(zlongi,gmtime,zdtime,latitude,longitude,rmu0,fract) 836 CALL zenang(zlongi,gmtime,zdtime,latitude_deg,longitude_deg, 837 & rmu0,fract) 835 838 ELSE 836 call mucorr(klon,zlongi,latitude ,rmu0,fract)839 call mucorr(klon,zlongi,latitude_deg,rmu0,fract) 837 840 ENDIF 838 841 … … 859 862 I debut,lafin,nqmax, 860 863 I nlon,nlev,dtime,paprs, 861 I latitude ,longitude,864 I latitude_deg,longitude_deg, 862 865 O tr_seri) 863 866 … … 869 872 DO k = 1, klev 870 873 DO i = 1, klon 871 ilat=(latitude (i)/5.625) + 17.872 ! PRINT*,INT(ilat),latitude (i),mat_dtemp(INT(ilat),k)874 ilat=(latitude_deg(i)/5.625) + 17. 875 ! PRINT*,INT(ilat),latitude_deg(i),mat_dtemp(INT(ilat),k) 873 876 delta_temp(i,k)=mat_dtemp(INT(ilat),k) 874 877 ENDDO … … 888 891 I nqmax, 889 892 I klon, 890 I latitude ,891 I longitude ,893 I latitude_deg, 894 I longitude_deg, 892 895 I nlev, 893 896 I dtime, … … 902 905 I nqmax, 903 906 I klon, 904 I latitude ,905 I longitude ,907 I latitude_deg, 908 I longitude_deg, 906 909 I nlev, 907 910 I dtime, … … 1032 1035 $ paprs,pplay,ppk,radsol,falbe, 1033 1036 e solsw, sollw, sollwdown, fder, 1034 e longitude , latitude, dx, dy,1037 e longitude_deg, latitude_deg, dx, dy, 1035 1038 e debut, lafin, 1036 1039 s d_t_vdf,d_u_vdf,d_v_vdf,d_ts, … … 1508 1511 c A ADAPTER POUR VENUS!!! 1509 1512 c CALL lift_noro(klon,klev,dtime,paprs,pplay, 1510 c e latitude ,zmea,zstd,zpic,zgam,zthe,zpic,zval,1513 c e latitude_deg,zmea,zstd,zpic,zgam,zthe,zpic,zval, 1511 1514 c e igwd,idx,itest, 1512 1515 c e t_seri, u_seri, v_seri, … … 1567 1570 c==================================================================== 1568 1571 if (ballons.eq.1) then 1569 CALL ballon(30,pdtphys,rjourvrai,gmtime*RDAY,latitude,longitude, 1572 CALL ballon(30,pdtphys,rjourvrai,gmtime*RDAY, 1573 & latitude_deg,longitude_deg, 1570 1574 c C t,pplay,u,v,pphi) ! alt above surface (smoothed for GCM) 1571 1575 C t,pplay,u,v,zphi) ! alt above planet average radius … … 1601 1605 CALL aaam_bud (27,klon,klev,rjourvrai,gmtime*RDAY, 1602 1606 C ra,rg,romega, 1603 C latitude ,longitude,pphis,1607 C latitude_deg,longitude_deg,pphis, 1604 1608 C zustrdr,zustrli,zustrcl, 1605 1609 C zvstrdr,zvstrli,zvstrcl, … … 1687 1691 c DO k = 1, klev 1688 1692 c DO i = 1, klon 1689 c mang(i,k) = RA*cos(latitude(i) *RPI/180.)1690 c . *(u_seri(i,k)+RA*cos(latitude(i) *RPI/180.)*ROMEGA)1693 c mang(i,k) = RA*cos(latitude(i)) 1694 c . *(u_seri(i,k)+RA*cos(latitude(i))*ROMEGA) 1691 1695 c . *cell_area(i)*(paprs(i,k)-paprs(i,k+1))/RG 1692 1696 c mangtot=mangtot+mang(i,k) -
trunk/LMDZ.VENUS/libf/phyvenus/radlwsw.F
r1543 r1545 27 27 c====================================================================== 28 28 use dimphy 29 USE geometry_mod, ONLY: latitude 29 USE geometry_mod, ONLY: latitude_deg 30 30 USE phys_state_var_mod, only: heat,cool,radsol, 31 31 . topsw,toplw,solsw,sollw,sollwdown,lwnet,swnet … … 164 164 lat=1 165 165 else 166 if (abs(latitude (j)).le.50.) then166 if (abs(latitude_deg(j)).le.50.) then 167 167 lat=1 168 elseif (abs(latitude (j)).le.60.) then168 elseif (abs(latitude_deg(j)).le.60.) then 169 169 lat=2 170 elseif (abs(latitude (j)).le.70.) then170 elseif (abs(latitude_deg(j)).le.70.) then 171 171 lat=3 172 elseif (abs(latitude (j)).le.80.) then172 elseif (abs(latitude_deg(j)).le.80.) then 173 173 lat=4 174 174 else -
trunk/LMDZ.VENUS/libf/phyvenus/radlwsw.NewtonCool
r1543 r1545 24 24 c====================================================================== 25 25 use dimphy 26 USE geometry_mod, ONLY: latitude 26 USE geometry_mod, ONLY: latitude ! in radians 27 27 USE phys_state_var_mod, only: heat,cool,radsol, 28 28 . topsw,toplw,solsw,sollw,sollwdown,lwnet,swnet … … 98 98 ztemp = tempCLee(level)*(1-fact)+tempCLee(level+1)*fact 99 99 zdt = dt_epCLee(level)*(1-fact)+dt_epCLee(level+1)*fact 100 c zt_eq(i,k) = ztemp + zdt*(cos(latitude(i) *RPI/180.)-2./RPI)101 zt_eq(i,k) = ztemp + zdt*(cos(latitude(i) *RPI/180.)-RPI/4.)100 c zt_eq(i,k) = ztemp + zdt*(cos(latitude(i))-2./RPI) 101 zt_eq(i,k) = ztemp + zdt*(cos(latitude(i))-RPI/4.) 102 102 103 103 enddo
Note: See TracChangeset
for help on using the changeset viewer.