Changeset 730 in lmdz_wrf
- Timestamp:
- Apr 26, 2016, 9:43:34 PM (9 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/module_ForInterpolate.F90
r729 r730 197 197 END SUBROUTINE CoarselonlatFind 198 198 199 SUBROUTINE CoarseInterpolate( inpts, projlon, projlat, lonvs, latvs, percen, mindiff, ivar, newvar,&200 newvarin , newvarinpt, newvarindiff, dimx, dimy, Ninpts)199 SUBROUTINE CoarseInterpolate(projlon, projlat, lonvs, latvs, percen, mindiff, ivar, newvar, newvarin, & 200 newvarinpt, newvarindiff, dimx, dimy, Ninpts) 201 201 ! Subroutine which finds the closest grid point within a projection throughout a first guest 202 202 ! approche from percentages of the whole domain … … 210 210 REAL(r_k), DIMENSION(dimx,dimy), INTENT(in) :: projlon, projlat 211 211 INTEGER, INTENT(in) :: Ninpts 212 INTEGER, DIMENSION(Ninpts), INTENT(in) :: inpts213 212 REAL(r_k), DIMENSION(Ninpts), INTENT(in) :: ivar, lonvs, latvs 214 213 REAL(r_k) :: mindiff, percen … … 230 229 231 230 !!!!!!! Variables 232 ! inpts: relative position of the values to interpolate233 231 ! dimx, dimy: dimension length of the target interpolation 234 232 ! proj[lon/lat]: longitudes and latitudes of the target interpolation … … 301 299 302 300 IF (ilonlat(1) >= 0 .AND. ilonlat(1) >= 0) THEN 303 newvar(ilonlat(1),ilonlat(2)) = ivar(i npts(iv))304 newvarin(ilonlat(1),ilonlat(2)) = i npts(iv)305 newvarinpt(i npts(iv)) = 1306 newvarindiff(i npts(iv)) = mindiffLl301 newvar(ilonlat(1),ilonlat(2)) = ivar(iv) 302 newvarin(ilonlat(1),ilonlat(2)) = iv 303 newvarinpt(iv) = 1 304 newvarindiff(iv) = mindiffLl 307 305 ! PRINT *,'Lluis iv:', newvarin(ilonlat(1),ilonlat(2)), ' localized:', newvarinpt(iv), & 308 306 ! ' values:', newvar(ilonlat(1),ilonlat(2)), ' invalues:', ivar(iv), ' mindist:', & -
trunk/tools/nc_var_tools.py
r729 r730 19740 19740 ovars = ovar[iri:ire].astype('float64') 19741 19741 19742 newvar,newvarin,newvarinpt ,newvarindiff =\19743 fin.module_forinterpolate.coarseinterpolate(p ts, projlon, projlat,\19742 newvar,newvarin,newvarinpt[pts],newvarindiff[pts] = \ 19743 fin.module_forinterpolate.coarseinterpolate(projlon, projlat, \ 19744 19744 lonvss, latvss, np.float64(fracd), np.float64(mindiff), ovars) 19745 19745 newnc.sync()
Note: See TracChangeset
for help on using the changeset viewer.