Changeset 2215 in lmdz_wrf
- Timestamp:
- Nov 6, 2018, 8:14:36 PM (6 years ago)
- Location:
- trunk/tools
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/diag_tools.py
r2214 r2215 1370 1370 return var1, var2, vardims, varvdims 1371 1371 1372 def Forcompute_range_faces(lon, lat, hgt, face, Nfilt, newrng, dimns, dimvns): 1372 def Forcompute_range_faces(lon, lat, hgt, ds, face, dsfilt, dsnewrng, hvalleyrng, \ 1373 dimns, dimvns): 1373 1374 """ Function to compute faces [uphill, valley, downhill] of sections of a mountain 1374 1375 rage, along a given face … … 1377 1378 [lat]= latitude values (assuming [y,x]) [degrees north] 1378 1379 [hgt]= height values (assuming [y,x]) [m] 1379 face= which face (axis along which produce slices) to use to compute the faces: WE, SN 1380 Nfilt= number of grid points to use to filter the topographic values 1381 newrng= number of grid points as distance to start a new mountain range 1380 [ds]= distance between grid points (assuming [y,x]) [m] 1381 face= which face (axis along which produce slices) to use to compute the 1382 faces: WE, SN 1383 dsfilt= distance to filter orography smaller scale of it [m] 1384 dsnewrng= distance to start a new mountain range [m] 1385 hvalleyrng: maximum height of a valley to mark change of range [m] 1382 1386 [dimns]= list of the name of the dimensions of [smois] 1383 1387 [dimvns]= list of the name of the variables with the values of the … … 1385 1389 """ 1386 1390 fname = 'Forcompute_range_faces' 1391 1392 print fname + 'Lluis:', dsfilt, dsnewrng, hvalleyrng 1387 1393 1388 1394 vardims = dimns[:] … … 1397 1403 ptrnghgtmaxt = \ 1398 1404 fdin.module_fordiagnostics.compute_range_faces(lon=lon[:].transpose(), \ 1399 lat=lat[:].transpose(), hgt=hgt[:].transpose(), face=face, nfilt=Nfilt, \ 1400 newrange=newrng, d1=dx, d2=dy) 1405 lat=lat[:].transpose(), hgt=hgt[:].transpose(), dist=ds[:].transpose(), \ 1406 face=face, dsfilt=dsfilt, dsnewrange=dsnewrng, hvalrng=hvalleyrng, d1=dx, \ 1407 d2=dy) 1408 print 'Finished!' 1401 1409 hgtmax = hgtmaxt.transpose() 1402 1410 pthgtmax = pthgtmaxt.transpose() -
trunk/tools/diagnostics.inf
r2206 r2215 34 34 psl, WRFpsl_ecmwf, PSFC@HGT@WRFt@WRFp@ZNU@ZNW 35 35 psl, WRFpsl_ptarget, WRFp@PSFC@WRFt@HGT@QVAPOR 36 rangefaces, range_faces, XLONG@XLAT@HGT@WRFdxdy@face:WE:10.:30.:200. 36 37 rvor, rvor, U@V 37 38 rvors, WRFrvors, U10@V10@WRFpos -
trunk/tools/diagnostics.py
r2214 r2215 104 104 'TStd', 'TSwds', 'TSwss', \ 105 105 'WRFbils', \ 106 'WRFclivi', 'WRFclwvi', 'WRFdens', 'WRF geop',\106 'WRFclivi', 'WRFclwvi', 'WRFdens', 'WRFdx', 'WRFdxdy', 'WRFdy', 'WRFgeop', \ 107 107 'WRFp', 'WRFtd', \ 108 108 'WRFpos', 'WRFprc', 'WRFprls', 'WRFrh', 'LMDZrh', 'LMDZrhs', \ 109 109 'WRFrhs', 'WRFrvors', \ 110 'WRFt', 'WRFtime', 'WRFua', 'WRFva', 'WRFwds', 'WRFwss', 'WRFheight', 'WRFz'] 110 'WRFt', 'WRFtime', 'WRFua', 'WRFva', 'WRFwds', 'WRFwss', 'WRFheight', 'WRFz', \ 111 'WRFzg'] 111 112 112 113 # diagnostics not to check their dependeny … … 165 166 WRFtime_compute = False 166 167 WRFz_compute = False 168 WRFdxdy_compute = False 167 169 168 170 # File creation … … 189 191 if dnv == 'WRFtime': WRFtime_compute = True 190 192 if dnv == 'WRFz':WRFz_compute = True 193 if dnv == 'WRFdxdy':WRFdxdy_compute = True 191 194 192 195 # diagnostics to compute … … 217 220 if gen.searchInlist(depvars, 'WRFtime'): WRFtime_compute = True 218 221 if gen.searchInlist(depvars, 'WRFz'): WRFz_compute = True 222 if gen.searchInlist(depvars, 'WRFdxdy'): WRFdxdy_compute = True 219 223 220 224 # Dictionary with the new computed variables to be able to add them … … 396 400 # Attributes of the variable 397 401 Vvals = gen.variables_values('WRFz') 398 dictcompvars['WRFz'] = {'name': Vvals[0], 'standard_name': Vvals[1], \ 402 dictcompvars['WRFz'] = {'name': Vvals[0], 'standard_name': Vvals[1], \ 403 'long_name': Vvals[4].replace('|',' '), 'units': Vvals[5]} 404 405 if WRFdxdy_compute: 406 print ' ' + main + ': Retrieving dxdy: real distance between grid points ' + \ 407 'from WRF as dx=(XLONG(i+1)-XLONG(i))*DX/MAPFAC_M, dy=(XLAT(j+1)-XLAT(i))*DY/'+\ 408 'MAPFAC_M, ds=sqrt(dx**2+dy**2)' 409 dimv = ncobj.variables['XLONG'].shape 410 WRFlon = ncobj.variables['XLONG'][0,:,:] 411 WRFlat = ncobj.variables['XLAT'][0,:,:] 412 WRFmapfac_m = ncobj.variables['MAPFAC_M'][0,:,:] 413 DX = ncobj.DX 414 DY = ncobj.DY 415 416 dimx = dimv[2] 417 dimy = dimv[1] 418 419 WRFdx = np.zeros((dimy,dimx), dtype=np.float) 420 WRFdy = np.zeros((dimy,dimx), dtype=np.float) 421 422 WRFdx[:,0:dimx-1]=(WRFlon[:,1:dimx]-WRFlon[:,0:dimx-1])*DX/WRFmapfac_m[:,0:dimx-1] 423 WRFdy[0:dimy-1,:]=(WRFlat[1:dimy,:]-WRFlat[0:dimy-1,:])*DY/WRFmapfac_m[0:dimy-1,:] 424 WRFds = np.sqrt(WRFdx**2 + WRFdy**2) 425 426 # Attributes of the variable 427 Vvals = gen.variables_values('WRFdx') 428 dictcompvars['WRFdx'] = {'name': Vvals[0], 'standard_name': Vvals[1], \ 429 'long_name': Vvals[4].replace('|',' '), 'units': Vvals[5]} 430 Vvals = gen.variables_values('WRFdy') 431 dictcompvars['WRFdy'] = {'name': Vvals[0], 'standard_name': Vvals[1], \ 432 'long_name': Vvals[4].replace('|',' '), 'units': Vvals[5]} 433 Vvals = gen.variables_values('WRFds') 434 dictcompvars['WRFds'] = {'name': Vvals[0], 'standard_name': Vvals[1], \ 399 435 'long_name': Vvals[4].replace('|',' '), 'units': Vvals[5]} 400 436 … … 681 717 ncvar.insert_variable(ncobj, 'hurs', diagout, diagoutd, diagoutvd, newnc) 682 718 683 # range_faces: LON, LAT, HGT, 'face:['WE'/'SN']:[Nptfilt]:[Nptnewrange]'719 # range_faces: LON, LAT, HGT, WRFdxdy, 'face:['WE'/'SN']:[dsfilt]:[dsnewrange]:[hvalleyrange]' 684 720 elif diagn == 'range_faces': 685 721 … … 687 723 var1 = ncobj.variables[depvars[1]][:] 688 724 var2 = ncobj.variables[depvars[2]][:] 689 face = depvars[3].split(':')[1] 690 Nptfilt = int(depvars[3].split(':')[2]) 691 Nptnewrange = int(depvars[3].split(':')[3]) 725 face = depvars[4].split(':')[1] 726 dsfilt = np.float(depvars[4].split(':')[2]) 727 dsnewrange = np.float(depvars[4].split(':')[3]) 728 hvalleyrange = np.float(depvars[4].split(':')[4]) 692 729 693 730 dnamesvar = list(ncobj.variables[depvars[0]].dimensions) … … 705 742 orogmax, ptorogmax, dhgt, peaks, valleys, origfaces, diagout, diagoutd, \ 706 743 diagoutvd, rngorogmax, ptrngorogmax = diag.Forcompute_range_faces(lon, lat,\ 707 hgt, face, Nptfilt, Nptnewrange, dnamesvar, dvnamesvar) 708 709 # Removing the nonChecking variable-dimensions from the initial list 710 varsadd = [] 711 diagoutvd = list(dvnames) 712 for nonvd in NONchkvardims: 713 if gen.searchInlist(dvnames,nonvd): diagoutvd.remove(nonvd) 714 varsadd.append(nonvd) 744 hgt, WRFds, face, dsfilt, dsnewrange, hvalleyrange, dnamesvar, dvnamesvar) 745 746 # Removing the nonChecking variable-dimensions from the initial list 747 varsadd = [] 748 diagoutvd = list(dvnames) 749 for nonvd in NONchkvardims: 750 if gen.searchInlist(dvnames,nonvd): diagoutvd.remove(nonvd) 751 varsadd.append(nonvd) 752 753 ncvar.insert_variable(ncobj, 'dx', WRFdx, diagoutd, diagoutvd, newnc) 754 ncvar.insert_variable(ncobj, 'dy', WRFdy, diagoutd, diagoutvd, newnc) 755 ncvar.insert_variable(ncobj, 'ds', WRFds, diagoutd, diagoutvd, newnc) 715 756 716 757 # adding variables to output file … … 748 789 ncvar.set_attribute(ovar, 'deriv', axis) 749 790 750 ncvar.insert_variable(ncobj, 'hgtderivdeg', dhgt, diagoutd, diagoutvd, \ 751 newnc) 752 ovar = newnc.variables['orogderivdeg'] 791 ncvar.insert_variable(ncobj, 'orogderiv', dhgt, diagoutd, diagoutvd, newnc) 792 ovar = newnc.variables['orogderiv'] 753 793 ncvar.set_attribute(ovar, 'deriv', axis) 754 794 … … 761 801 ovar = newnc.variables['rangefacesfilt'] 762 802 ncvar.set_attribute(ovar, 'face', face) 763 ncvar.set_attributek(ovar, ' grid_points_filter', Nptfilt, 'I')803 ncvar.set_attributek(ovar, 'dist_filter', dsfilt, 'F') 764 804 765 805 ncvar.insert_variable(ncobj, 'rangefaces', origfaces, diagoutd, diagoutvd, \ 766 newnc )806 newnc, fill=gen.fillValueI) 767 807 ovar = newnc.variables['rangefaces'] 768 808 ncvar.set_attribute(ovar, 'face', face) 809 ncvar.set_attributek(ovar, 'dist_newrange', dsnewrange, 'F') 810 ncvar.set_attributek(ovar, 'h_valley_newrange', hvalleyrange, 'F') 769 811 770 812 # mrso: total soil moisture SMOIS, DZS -
trunk/tools/module_ForDiagnostics.f90
r2214 r2215 949 949 END SUBROUTINE compute_fog_FRAML50 950 950 951 SUBROUTINE compute_range_faces(d1, d2, lon, lat, hgt, face, Nfilt, newrange, hgtmax, pthgtmax, &952 derivhgt, peaks, valleys, origfaces, filtfaces, rangeshgtmax, ptrangeshgtmax)951 SUBROUTINE compute_range_faces(d1, d2, lon, lat, hgt, dist, face, dsfilt, dsnewrange, hvalrng, & 952 hgtmax, pthgtmax, derivhgt, peaks, valleys, origfaces, filtfaces, rangeshgtmax, ptrangeshgtmax) 953 953 ! Subroutine to compute faces [uphill, valleys, downhill] of a mountain range along a given face 954 954 955 955 IMPLICIT NONE 956 956 957 INTEGER, INTENT(in) :: d1, d2, Nfilt, newrange 958 REAL(r_k), DIMENSION(d1,d2), INTENT(in) :: lon, lat, hgt 957 INTEGER, INTENT(in) :: d1, d2 958 REAL(r_k), INTENT(in) :: dsfilt, dsnewrange, hvalrng 959 REAL(r_k), DIMENSION(d1,d2), INTENT(in) :: lon, lat, hgt, dist 959 960 CHARACTER(len=*) :: face 960 961 REAL(r_k), DIMENSION(d1,d2), INTENT(out) :: derivhgt, hgtmax, rangeshgtmax … … 977 978 ! hgt: topograpical height [m] 978 979 ! face: which face (axis along which produce slices) to use to compute the faces: WE, SN 979 ! Nfilt: number of grid points to use to filter the topographic values 980 ! newrange: number of grid points as distance to start a new mountain range 980 ! dsfilt: distance to filter orography smaller scale of it [m] 981 ! dsnewrange: distance to start a new mountain range [m] 982 ! hvalrng: maximum height of a valley to mark change of range [m] 981 983 ! hgtmax: maximum height of the face [m] 982 984 ! pthgtmax: grid point of the maximum height [1] … … 994 996 valleys = 0 995 997 pthgtmax = 0 998 rangeshgtmax = fillVal64 996 999 IF (TRIM(face) == 'WE') THEN 997 1000 DO j=1, d2 998 CALL var_range_faces(d1, lon(:,j), lat(:,j), hgt(:,j), Nfilt, newrange, hgtmax1, pthgtmax1, & 999 derivhgt(:,j), Npeaks, ipeaks1, Nvalleys, ivalleys1, origfaces(:,j), filtfaces(:,j), & 1000 Nranges, ranges1, rangeshgtmax1, irangeshgtmax1) 1001 PRINT *,'Lluis:', j-1, '***' 1002 CALL var_range_faces(d1, lon(:,j), lat(:,j), hgt(:,j), dist(:,j), dsfilt, dsnewrange, hvalrng,& 1003 hgtmax1, pthgtmax1, derivhgt(:,j), Npeaks, ipeaks1, Nvalleys, ivalleys1, origfaces(:,j), & 1004 filtfaces(:,j), Nranges, ranges1, rangeshgtmax1, irangeshgtmax1) 1001 1005 hgtmax(:,j) = hgtmax1 1002 1006 pthgtmax(pthgtmax1,j) = 1 … … 1014 1018 ELSE IF (TRIM(face) == 'SN') THEN 1015 1019 DO i=1, d1 1016 CALL var_range_faces(d2, lon(i,:), lat(i,:), hgt(i,:), Nfilt, newrange, hgtmax1, pthgtmax1,&1017 derivhgt(i,:), Npeaks, ipeaks2, Nvalleys, ivalleys2, origfaces(i,:), filtfaces(i,:),&1018 Nranges, ranges2, rangeshgtmax2, irangeshgtmax2)1020 CALL var_range_faces(d2, lon(i,:), lat(i,:), hgt(i,:), dist(i,:), dsfilt, dsnewrange, hvalrng,& 1021 hgtmax1, pthgtmax1, derivhgt(i,:), Npeaks, ipeaks2, Nvalleys, ivalleys2, origfaces(i,:), & 1022 filtfaces(i,:), Nranges, ranges2, rangeshgtmax2, irangeshgtmax2) 1019 1023 hgtmax(i,:) = hgtmax1 1020 1024 pthgtmax(i,pthgtmax1) = 1 -
trunk/tools/module_ForDiagnosticsVars.f90
r2214 r2215 1580 1580 END SUBROUTINE var_fog_FRAML50 1581 1581 1582 SUBROUTINE var_range_faces(d, lon, lat, hgt, filt, newrange, hgtmax, ihgtmax, dhgt, Npeaks, ipeaks, & 1583 Nvalleys, ivalleys, faces0, faces, Nranges, ranges, rangeshgtmax, irangeshgtmax) 1582 SUBROUTINE var_range_faces(d, lon, lat, hgt, dist, filt, newrange, hvalleyrange, hgtmax, ihgtmax, & 1583 dhgt, Npeaks, ipeaks, Nvalleys, ivalleys, faces0, faces, Nranges, ranges, rangeshgtmax, & 1584 irangeshgtmax) 1584 1585 ! Subroutine to compute faces [uphill, valleys, downhill] of a monuntain range along a face 1585 1586 1586 1587 IMPLICIT NONE 1587 1588 1588 INTEGER, INTENT(in) :: d, filt, newrange 1589 REAL(r_k), DIMENSION(d), INTENT(in) :: lon, lat, hgt 1589 INTEGER, INTENT(in) :: d 1590 REAL(r_k), INTENT(in) :: filt, newrange, hvalleyrange 1591 REAL(r_k), DIMENSION(d), INTENT(in) :: lon, lat, hgt, dist 1590 1592 INTEGER, INTENT(out) :: ihgtmax, Npeaks, Nvalleys, Nranges 1591 1593 INTEGER, DIMENSION(d), INTENT(out) :: ipeaks, ivalleys, faces0, faces, & … … 1600 1602 INTEGER :: Nfaces, Nfaces1, Npeaks1, Nvalleys1 1601 1603 INTEGER :: fbeg, fend 1604 REAL(r_k) :: dd 1602 1605 INTEGER, DIMENSION(1) :: ihmax 1603 1606 INTEGER, DIMENSION(d) :: ddhgt, Ndhgt … … 1606 1609 REAL(r_k), DIMENSION(d) :: sortedpeaks 1607 1610 INTEGER, DIMENSION(d) :: isortedpeaks 1608 LOGICAL :: rangewithin, peakwithin, valleywithin 1611 LOGICAL :: firstvalley, rangewithin, peakwithin, & 1612 valleywithin 1609 1613 1610 1614 !!!!!!! Variables … … 1612 1616 ! lat: latitude [degrees north] 1613 1617 ! hgt: topograpical height [m] 1614 ! filt: number of grid points to use to filter the topographic values. used to define: 1618 ! dist: distance between grid points [m] 1619 ! filt: distance to use to filter the topographic values [m]. used to define: 1615 1620 ! the minimum length of a given section 1616 ! running mean filter1617 ! newrange: number of grid points as distance to start a new mountain range1621 ! newrange: distance to start a new mountain range [m] 1622 ! hvalleyrange: maximum height of a valley to mark change of range [m] 1618 1623 1619 1624 fname = 'var_range_faces' … … 1632 1637 1633 1638 ! range slope 1634 dLl = SQRT((lon(2:d)-lon(1:d-1))**2+(lat(2:d)-lat(1:d-1))**2)1635 1639 dhgt(1:d) = hgt(2:d) - hgt(1:d-1) 1636 dhgt = dhgt/d Ll1640 dhgt = dhgt/dist(1:d) 1637 1641 1638 1642 !PRINT *, 'slope:', dhgt … … 1643 1647 DO i=1, d-1 1644 1648 IF (dhgt(i) > 0.) THEN 1645 faces0(i) = 1 1649 IF (hgt(i) < hvalleyrange) THEN 1650 faces0(i) = fillValI 1651 ELSE 1652 faces0(i) = 1 1653 END IF 1646 1654 ELSE IF (dhgt(i) < 0.) THEN 1647 faces0(i) = -1 1655 IF (hgt(i) < hvalleyrange) THEN 1656 faces0(i) = fillValI 1657 ELSE 1658 faces0(i) = -1 1659 END IF 1648 1660 ELSE 1649 faces0(i) = 0 1661 IF (hgt(i) == zeroRK .AND. hgt(i+1) == zeroRK) THEN 1662 faces0(i) = fillValI 1663 ELSE 1664 faces0(i) = 0 1665 END IF 1650 1666 END IF 1651 1667 ! peaks … … 1686 1702 ! Defining quantitiy of ranges within the face 1687 1703 ! sorting peaks within the face and defining ranges as maximum peaks distanced > newrage 1688 sortedpeaks = peaks 1689 CALL SortR_K(sortedpeaks, Npeaks) 1690 isortedpeaks = 0 1691 DO i=1, Npeaks 1692 DO j=1, Npeaks 1693 IF (peaks(j) == sortedpeaks(i)) isortedpeaks(i) = ipeaks(j) 1704 1705 !sortedpeaks = peaks 1706 !CALL SortR_K(sortedpeaks, Npeaks) 1707 !isortedpeaks = 0 1708 !DO i=1, Npeaks 1709 ! DO j=1, Npeaks 1710 ! IF (peaks(j) == sortedpeaks(i)) isortedpeaks(i) = ipeaks(j) 1711 ! END DO 1712 !END DO 1713 1714 ranges = -1 1715 Nranges = 0 1716 l = 0 1717 DO i=1,d 1718 IF (hgt(i) >= hvalleyrange) THEN 1719 IF (Nranges == 0) THEN 1720 Nranges = 1 1721 ranges(1,Nranges) = i 1722 ELSE 1723 IF (ranges(2,Nranges) /= -1) THEN 1724 Nranges = Nranges + 1 1725 ranges(1,Nranges) = i 1726 END IF 1727 END IF 1728 ELSE 1729 IF ((ranges(1,Nranges) /= -1) .AND. (ranges(2,Nranges) == -1)) ranges(2,Nranges) = i-1 1730 END IF 1731 END DO 1732 IF (ranges(2,Nranges) == -1) ranges(2,Nranges) = d 1733 1734 ! Getting characteristics of ranges 1735 irangeshgtmax = -1 1736 rangeshgtmax = -1000. 1737 k = 1 1738 DO i=1, Nranges 1739 DO j=ranges(1,i), ranges(2,i) 1740 IF (hgt(j) > rangeshgtmax(i)) THEN 1741 irangeshgtmax(i) = j 1742 rangeshgtmax(i) = hgt(j) 1743 END IF 1694 1744 END DO 1695 1745 END DO 1696 1697 ranges = -11698 Nranges = 11699 ranges(1,Nranges) = ipeaks(1)1700 ranges(2,Nranges) = ipeaks(1)1701 irangeshgtmax(Nranges) = ipeaks(1)1702 rangeshgtmax(Nranges) = peaks(1)1703 IF (Npeaks >= 2) THEN1704 DO j=2, Npeaks1705 rangewithin = .FALSE.1706 IF (ranges(1,Nranges) - isortedpeaks(j) < newrange) THEN1707 ranges(2,Nranges) = ipeaks(j)1708 IF (peaks(j) > rangeshgtmax(Nranges)) THEN1709 rangeshgtmax(Nranges) = peaks(j)1710 irangeshgtmax(Nranges) = ipeaks(j)1711 END IF1712 ELSE1713 Nranges = Nranges + 11714 ranges(1,Nranges) = ipeaks(j)1715 ranges(2,Nranges) = ipeaks(j)1716 rangeshgtmax(Nranges) = peaks(j)1717 irangeshgtmax(Nranges) = ipeaks(j)1718 END IF1719 END DO1720 END IF1721 1746 !PRINT *, Nranges, ' _______' 1722 !DO i= , Nranges1723 ! 1747 !DO i=1, Nranges 1748 ! PRINT *,i,':', ranges(:,i),' max:', rangeshgtmax(i), ' ,', irangeshgtmax(i) 1724 1749 !END DO 1725 1750 … … 1743 1768 END IF 1744 1769 1770 ! Using defined ranges for the last refinement. 1771 ! Uphills after range maximum peak as valley: if dhgt[i] > 0. and i > rangemax --> face[i] = 0 1772 ! Downhills before range maximum peak as valley: if dhgt[i] < 0. and i < rangemax --> face[i] = 0 1773 ! face values before first range, removed: if dhgt[i] != 0. and i < range[1,1] --> face[i] = fillvalueI 1774 ! face values after last range, removed: if dhgt[i] != 0. and i < range[2,Nranges] --> face[i] = fillvalueI 1775 DO i=1,Nranges 1776 DO j=ranges(1,i), ranges(2,i) 1777 IF (dhgt(j) > 0. .AND. j > irangeshgtmax(i)) faces0(j) = 0 1778 IF (dhgt(j) < 0. .AND. j < irangeshgtmax(i)) faces0(j) = 0 1779 END DO 1780 END DO 1781 IF (dhgt(j) /= 0. .AND. j < ranges(1,1)) faces0(j) = fillValI 1782 IF (dhgt(j) /= 0. .AND. j > ranges(2,Nranges)) faces0(j) = fillValI 1783 1745 1784 ! classification using filt. 1746 1785 ! On that section of the hill smaller than the selected filter. Replace values by the ones from … … 1749 1788 ! faces0 = 0, 0, 1, 1, 1, 1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1 -1, -1, 0, 0 1750 1789 ! faces = 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1 -1, -1, 0, 0 1751 faces1 = faces0 1752 Nfaces1 = 1 1753 Npeaks1 = 0 1754 Nvalleys1 = 0 1755 Ndhgt1(1) = Ndhgt(1) 1756 DO i=2, Nfaces 1757 fbeg = SUM(Ndhgt(1:i-1)) 1758 fend = fbeg + Ndhgt(i) 1759 peakwithin = .FALSE. 1760 valleywithin = .FALSE. 1761 DO j=1, Npeaks 1762 IF (ipeaks(j) == fbeg) THEN 1763 k = j 1764 peakwithin = .TRUE. 1765 EXIT 1766 END IF 1767 END DO 1768 DO j=1, Nvalleys 1769 IF (ivalleys(j) == fbeg) THEN 1770 m = j 1771 valleywithin = .TRUE. 1772 EXIT 1773 END IF 1774 END DO 1775 1776 IF (Ndhgt(i) < filt) THEN 1777 PRINT *, 'Lluis replacing !!!', i, ':', fbeg, fend, '<>', faces0(fbeg-1) 1778 IF (faces0(fbeg) /= 0) faces1(fbeg:fend) = faces0(fbeg-1) 1779 Ndhgt1(Nfaces1) = Ndhgt1(Nfaces1) + fend - fbeg + 1 1780 peakwithin = .FALSE. 1781 valleywithin = .FALSE. 1782 ELSE 1783 Nfaces1 = Nfaces1 + 1 1784 Ndhgt1(Nfaces1) = Ndhgt(i) 1785 END IF 1786 1787 IF (peakwithin) THEN 1788 Npeaks1 = Npeaks1 + 1 1789 peaks1(Npeaks1) = peaks(k) 1790 END IF 1791 IF (valleywithin) THEN 1792 Nvalleys1 = Nvalleys1 + 1 1793 valleys1(Nvalleys1) = valleys(m) 1794 END IF 1795 END DO 1790 !!faces1 = faces0 1791 !!Nfaces1 = 1 1792 !!Npeaks1 = 0 1793 !!Nvalleys1 = 0 1794 !!Ndhgt1(1) = Ndhgt(1) 1795 !!DO i=2, Nfaces 1796 !! fbeg = SUM(Ndhgt(1:i-1)) 1797 !! fend = fbeg + Ndhgt(i) 1798 !! peakwithin = .FALSE. 1799 !! valleywithin = .FALSE. 1800 !! DO j=1, Npeaks 1801 !! IF (ipeaks(j) == fbeg) THEN 1802 !! k = j 1803 !! peakwithin = .TRUE. 1804 !! EXIT 1805 !! END IF 1806 !! END DO 1807 !! DO j=1, Nvalleys 1808 !! IF (ivalleys(j) == fbeg) THEN 1809 !! m = j 1810 !! valleywithin = .TRUE. 1811 !! EXIT 1812 !! END IF 1813 !! END DO 1814 1815 !! dd = SUM(dist(fbeg:fend)) 1816 !! IF (Ndhgt(i) < filt) THEN 1817 !! PRINT *, 'Lluis replacing !!!', i, ':', fbeg, fend, '<>', faces0(fbeg-1) 1818 !! IF (faces0(fbeg) /= 0) faces1(fbeg:fend) = faces0(fbeg-1) 1819 !! Ndhgt1(Nfaces1) = Ndhgt1(Nfaces1) + fend - fbeg + 1 1820 !! peakwithin = .FALSE. 1821 !! valleywithin = .FALSE. 1822 !! ELSE 1823 !! Nfaces1 = Nfaces1 + 1 1824 !! Ndhgt1(Nfaces1) = Ndhgt(i) 1825 !! END IF 1826 1827 !! IF (peakwithin) THEN 1828 !! Npeaks1 = Npeaks1 + 1 1829 !! peaks1(Npeaks1) = peaks(k) 1830 !! END IF 1831 !! IF (valleywithin) THEN 1832 !! Nvalleys1 = Nvalleys1 + 1 1833 !! valleys1(Nvalleys1) = valleys(m) 1834 !! END IF 1835 !!END DO 1796 1836 1797 1837 ! Introducing valleys between peaks lower than the highest peak in the section … … 1805 1845 END IF 1806 1846 1847 1848 ! Removing above sea points 1849 DO i=1, d-1 1850 IF (hgt(i) == zeroRK .AND. hgt(i+1) == zeroRK) dhgt(i) = fillVal64 1851 END DO 1852 1807 1853 !PRINT *, '# lon[0] lat[1] heights[2] slope[3] faces0[4] faces1[5] faces1[6] ddhgt[7]' 1808 1854 !DO i=1, d -
trunk/tools/variables_values.dat
r2213 r2215 123 123 dqwak, dqwak, wake_water_vapor_tendency, -3.e-7, 3.e-7, wake|water|vapor|tendency, kg/kg/s, seismic, $\partial_{t}{qv}^{wak}$, dtqvwak 124 124 LDQWAK, dqwak, wake_water_vapor_tendency, -3.e-7, 3.e-7, wake|water|vapor|tendency, kg/kg/s, seismic, $\partial_{t}{qv}^{wak}$, dtqvwak 125 ds, ds, horizontal_grid_distance, 0., 200., total|distance|between|grid|points, m, Reds, $ds$, ds 126 WRFds, ds, horizontal_grid_distance, 0., 200., total|distance|between|grid|points, m, Reds, $ds$, ds 125 127 dta, dta, tendency_air_temperature, -3.e-3, 3.e-3, tendency|of|air|temperature, K/s, seismic, $\partial_{t}{ta}$, dtta 126 128 tnt, dta, tendency_air_temperature, -3.e-3, 3.e-3, tendency|of|air|temperature, K/s, seismic, $\partial_{t}{ta}$, dtta … … 173 175 dvvdf, dvvdf, vertical_difussion_northward_wind_tendency, -3.e-3, 3.e-3, vertical|difussion|northward|wind|tendency, ms-2, seismic, $\partial_{t}{va}^{zdiff}$, dtvazdiff 174 176 LDVVDF, dvvdf, vertical_difussion_northward_wind_tendency, -3.e-3, 3.e-3, vertical|difussion|northward|wind|tendency, ms-2, seismic, $\partial_{t}{va}^{zdiff}$, dtvazdiff 177 dx, dx, eastward_horizontal_grid_distance, 0., 200., eastward|distance|between|grid|points, m, Reds, $dx$, dx 178 WRFdx, dx, eastward_horizontal_grid_distance, 0., 200., eastward|distance|between|grid|points, m, Reds, $dx$, dx 179 dy, dy, northward_horizontal_grid_distance, 0., 200., northward|distance|between|grid|points, m, Blues, $dy$, dy 180 WRFdy, dy, northward_horizontal_grid_distance, 0., 200., northward|distance|between|grid|points, m, Blues, $dy$, dy 175 181 etau, etau, etau, 0., 1, eta|values|on|half|(mass)|levels, -, reds, $\eta_{hm}$, eta_hm 176 182 ZNU, etau, etau, 0., 1, eta|values|on|half|(mass)|levels, -, reds, $\eta_{hm}$, eta_hm … … 296 302 HGT, orog, orography, 0., 3000., surface|altitude, m,terrain, $orog$, orog 297 303 HGT_M, orog, orography, 0., 3000., surface|altitude, m,terrain, $orog$, orog 304 orogderiv, orogderiv, orography_derivative_degrees, 0., 3000., derivative|along|degree|coordinate|of|surface|altitude, m m-1,seismic, $orog_{deri}$, orog_deriv 305 hgtderiv, orogderiv, orography_derivative_degrees, 0., 3000., derivative|along|degree|coordinate|of|surface|altitude, m m-1,seismic, $orog_{deri}$, orog_deriv 298 306 orogderivdeg, orogderivdeg, orography_derivative_degrees, 0., 3000., derivative|along|degree|coordinate|of|surface|altitude, mdeg-1,seismic, $orog_{deri}^{deg}$, orog_deriv_deg 299 307 hgtderivdeg, orogderivdeg, orography_derivative_degrees, 0., 3000., derivative|along|degree|coordinate|of|surface|altitude, mdeg-1,seismic, $orog_{deri}^{deg}$, orog_deriv_deg
Note: See TracChangeset
for help on using the changeset viewer.