Changeset 3468 for LMDZ6/trunk
- Timestamp:
- Mar 14, 2019, 5:43:22 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/orografi_strato.F90
r2897 r3468 1819 1819 USE mod_phys_lmdz_para 1820 1820 USE mod_grid_phy_lmdz 1821 USE geometry_mod 1821 1822 IMPLICIT NONE 1822 1823 … … 1832 1833 INTEGER jk 1833 1834 REAL zpr, ztop, zsigt, zpm1r 1834 REAL :: pplay_glo(klon_glo, nlev)1835 REAL :: paprs_glo(klon_glo, nlev+1)1835 INTEGER :: cell,ij,nstra_tmp,nktopg_tmp 1836 REAL :: current_dist, dist_min,dist_min_glo 1836 1837 1837 1838 ! * 1. SET THE VALUES OF THE PARAMETERS … … 1848 1849 ! old ZSIGT=0.85 1849 1850 1850 CALL gather(pplay, pplay_glo) 1851 CALL bcast(pplay_glo) 1852 CALL gather(paprs, paprs_glo) 1853 CALL bcast(paprs_glo) 1854 1855 DO jk = 1, nlev 1856 zpm1r = pplay_glo(klon_glo/2+1, jk)/paprs_glo(klon_glo/2+1, 1) 1857 IF (zpm1r>=zsigt) THEN 1858 nktopg = jk 1859 END IF 1860 zpm1r = pplay_glo(klon_glo/2+1, jk)/paprs_glo(klon_glo/2+1, 1) 1861 IF (zpm1r>=ztop) THEN 1862 nstra = jk 1863 END IF 1864 END DO 1865 1851 1852 !ym Take the point at equator close to (0,0) coordinates. 1853 dist_min=360 1854 cell=-1 1855 DO ij=1,klon 1856 current_dist=sqrt(longitude_deg(ij)**2+latitude_deg(ij)**2) 1857 current_dist=current_dist*(1+(1e-10*ind_cell_glo(ij))/klon_glo) ! For point unicity 1858 IF (dist_min>current_dist) THEN 1859 dist_min=current_dist 1860 cell=ij 1861 ENDIF 1862 ENDDO 1863 1864 CALL reduce_min(dist_min,dist_min_glo) 1865 IF (dist_min/=dist_min_glo) cell=-1 1866 !ym in future find the point at equator close to (0,0) coordinates. 1867 1868 nktopg_tmp=nktopg 1869 nstra_tmp=nstra 1870 1871 IF (cell/=-1) THEN 1872 1873 DO jk = 1, nlev 1874 zpm1r = pplay(cell+1, jk)/paprs(cell+1, 1) 1875 IF (zpm1r>=zsigt) THEN 1876 nktopg_tmp = jk 1877 END IF 1878 IF (zpm1r>=ztop) THEN 1879 nstra_tmp = jk 1880 END IF 1881 END DO 1882 ELSE 1883 nktopg_tmp=0 1884 nstra_tmp=0 1885 ENDIF 1886 1887 CALL reduce_sum(nktopg_tmp,nktopg) 1888 CALL bcast(nktopg) 1889 CALL reduce_sum(nstra_tmp,nstra) 1890 CALL bcast(nstra) 1891 1866 1892 ! inversion car dans orodrag on compte les niveaux a l'envers 1867 1893 nktopg = nlev - nktopg + 1
Note: See TracChangeset
for help on using the changeset viewer.