Changeset 2260 in lmdz_wrf
- Timestamp:
- Dec 17, 2018, 2:31:30 PM (6 years ago)
- Location:
- trunk/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/diag_tools.py
r2223 r2260 1370 1370 return var1, var2, vardims, varvdims 1371 1371 1372 def Forcompute_range_faces(lon, lat, hgt, ds , face, dsfilt, dsnewrng, hvalleyrng,\1373 dimns, dimvns):1372 def Forcompute_range_faces(lon, lat, hgt, dsx, dsy, ds, face, dsfilt, dsnewrng, \ 1373 hvalleyrng, dimns, dimvns): 1374 1374 """ Function to compute faces [uphill, valley, downhill] of sections of a mountain 1375 1375 rage, along a given face … … 1378 1378 [lat]= latitude values (assuming [y,x]) [degrees north] 1379 1379 [hgt]= height values (assuming [y,x]) [m] 1380 [dsx]= distance between grid points along x-axis (assuming [y,x]) [m] 1381 [dsy]= distance between grid points along y-axis (assuming [y,x]) [m] 1380 1382 [ds]= distance between grid points (assuming [y,x]) [m] 1381 1383 face= which face (axis along which produce slices) to use to compute the … … 1403 1405 rnghgtmaxt, ptrnghgtmaxt = \ 1404 1406 fdin.module_fordiagnostics.compute_range_faces(lon=lon[:].transpose(), \ 1405 lat=lat[:].transpose(), hgt=hgt[:].transpose(), dist=ds[:].transpose(),\1406 face=face, dsfilt=dsfilt, dsnewrange=dsnewrng, hvalrng=hvalleyrng, d1=dx,\1407 d 2=dy)1407 lat=lat[:].transpose(), hgt=hgt[:].transpose(), xdist=ds[:].transpose(), \ 1408 ydist=ds[:].transpose(), dist=ds[:].transpose(), face=face, dsfilt=dsfilt, \ 1409 dsnewrange=dsnewrng, hvalrng=hvalleyrng, d1=dx, d2=dy) 1408 1410 print 'Finished!' 1409 1411 hgtmax = hgtmaxt.transpose() -
trunk/tools/diagnostics.py
r2257 r2260 817 817 orogmax, ptorogmax, dhgt, peaks, valleys, origfaces, diagout, diagoutd, \ 818 818 diagoutvd, rng, rngorogmax, ptrngorogmax= diag.Forcompute_range_faces(lon, \ 819 lat, hgt, WRFd s, face, dsfilt, dsnewrange, hvalleyrange, dnamesvar,\820 d vnamesvar)819 lat, hgt, WRFdx, WRFdy, WRFds, face, dsfilt, dsnewrange, hvalleyrange, \ 820 dnamesvar, dvnamesvar) 821 821 822 822 # Removing the nonChecking variable-dimensions from the initial list -
trunk/tools/module_ForDiagnostics.f90
r2223 r2260 949 949 END SUBROUTINE compute_fog_FRAML50 950 950 951 SUBROUTINE compute_range_faces(d1, d2, lon, lat, hgt, dist, face, dsfilt, dsnewrange, hvalrng,&952 h gtmax, pthgtmax, derivhgt, peaks, valleys, origfaces, filtfaces, ranges, rangeshgtmax,&951 SUBROUTINE compute_range_faces(d1, d2, lon, lat, hgt, xdist, ydist, dist, face, dsfilt, dsnewrange, & 952 hvalrng, hgtmax, pthgtmax, derivhgt, peaks, valleys, origfaces, filtfaces, ranges, rangeshgtmax, & 953 953 ptrangeshgtmax) 954 954 ! Subroutine to compute faces [uphill, valleys, downhill] of a mountain range along a given face … … 958 958 INTEGER, INTENT(in) :: d1, d2 959 959 REAL(r_k), INTENT(in) :: dsfilt, dsnewrange, hvalrng 960 REAL(r_k), DIMENSION(d1,d2), INTENT(in) :: lon, lat, hgt, dist960 REAL(r_k), DIMENSION(d1,d2), INTENT(in) :: lon, lat, hgt, xdist, ydist, dist 961 961 CHARACTER(len=*) :: face 962 962 REAL(r_k), DIMENSION(d1,d2), INTENT(out) :: derivhgt, hgtmax, rangeshgtmax … … 1002 1002 DO j=1, d2 1003 1003 !PRINT *,'Lluis:', j-1, '***' 1004 CALL var_range_faces(d1, lon(:,j), lat(:,j), hgt(:,j), dist(:,j), dsfilt, dsnewrange, hvalrng,& 1005 hgtmax1, pthgtmax1, derivhgt(:,j), Npeaks, ipeaks1, Nvalleys, ivalleys1, origfaces(:,j), & 1006 filtfaces(:,j), Nranges, ranges1, rangeshgtmax1, irangeshgtmax1) 1004 CALL var_range_faces(d1, lon(:,j), lat(:,j), hgt(:,j), xdist(:,j), dsfilt, & 1005 dsnewrange, hvalrng, hgtmax1, pthgtmax1, derivhgt(:,j), Npeaks, ipeaks1, & 1006 Nvalleys, ivalleys1, origfaces(:,j), filtfaces(:,j), Nranges, ranges1, & 1007 rangeshgtmax1, irangeshgtmax1) 1007 1008 hgtmax(:,j) = hgtmax1 1008 1009 pthgtmax(pthgtmax1,j) = 1 … … 1021 1022 ELSE IF (TRIM(face) == 'SN') THEN 1022 1023 DO i=1, d1 1023 CALL var_range_faces(d2, lon(i,:), lat(i,:), hgt(i,:), dist(i,:), dsfilt, dsnewrange, hvalrng,& 1024 hgtmax1, pthgtmax1, derivhgt(i,:), Npeaks, ipeaks2, Nvalleys, ivalleys2, origfaces(i,:), & 1025 filtfaces(i,:), Nranges, ranges2, rangeshgtmax2, irangeshgtmax2) 1024 CALL var_range_faces(d2, lon(i,:), lat(i,:), hgt(i,:), ydist(i,:), dsfilt, & 1025 dsnewrange, hvalrng, hgtmax1, pthgtmax1, derivhgt(i,:), Npeaks, ipeaks2, & 1026 Nvalleys, ivalleys2, origfaces(i,:), filtfaces(i,:), Nranges, ranges2, & 1027 rangeshgtmax2, irangeshgtmax2) 1026 1028 hgtmax(i,:) = hgtmax1 1027 1029 pthgtmax(i,pthgtmax1) = 1 … … 1049 1051 END SUBROUTINE compute_range_faces 1050 1052 1053 SUBROUTINE compute_Koeppen_Geiger_climates(dx, dy, dt, pr, tas, climatesI, climatesS, climlegend) 1054 ! Subroutine to compute the Koeppen-Geiger climates after: 1055 ! Kottek et al., Meteorologische Zeitschrift, Vol. 15, No. 3, 259-263 1056 1057 IMPLICIT NONE 1058 1059 INTEGER, INTENT(in) :: dx, dy, dt 1060 REAL(r_k), DIMENSION(dx, dy, dt), INTENT(in) :: pr, tas 1061 INTEGER, DIMENSION(dy, dt), INTENT(out) :: climatesI 1062 CHARACTER(LEN=3), DIMENSION(dy, dt), INTENT(out) :: climatesS 1063 CHARACTER(LEN=1000), INTENT(out) :: climlegend 1064 1065 ! Local 1066 INTEGER :: i,j 1067 1068 1069 1070 1071 END SUBROUTINE compute_Koeppen_Geiger_climates 1072 1051 1073 END MODULE module_ForDiagnostics
Note: See TracChangeset
for help on using the changeset viewer.