- Timestamp:
- Apr 25, 2016, 7:36:22 PM (9 years ago)
- Location:
- trunk/tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/module_ForInterpolate.F90
r715 r716 197 197 END SUBROUTINE CoarselonlatFind 198 198 199 SUBROUTINE CoarseInterpolate( dimx, dimy, projlon, projlat, Ninpts, lonvs, latvs, percen, mindiff,&200 ivar, newvar, newvarin, newvarinpt, newvarindiff)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 … … 270 270 newvarinpt(iv) = 1 271 271 newvarindiff(iv) = mindiffLl 272 PRINT *,'Lluis iv:', newvarin(ilonlat(1),ilonlat(2)), ' localized:', newvarinpt(iv), &273 ' values:', newvar(ilonlat(1),ilonlat(2)), ' invalues:', ivar(iv), ' mindist:', &274 newvarindiff(iv), ' point:',ilonlat272 ! PRINT *,'Lluis iv:', newvarin(ilonlat(1),ilonlat(2)), ' localized:', newvarinpt(iv), & 273 ! ' values:', newvar(ilonlat(1),ilonlat(2)), ' invalues:', ivar(iv), ' mindist:', & 274 ! newvarindiff(iv), ' point:',ilonlat 275 275 ELSE 276 276 PRINT *,TRIM(ErrWarnMsg('err')) … … 282 282 283 283 ! IF (MOD(iv,Ninpts1) == 0) newnc.sync() 284 ELSE 285 PRINT *,TRIM(ErrWarnMsg('err')) 286 PRINT *,' ' // TRIM(fname) // ': for point #', iv,' lon,lat in incomplet map:', lonvs(iv), & 287 ' ,', latvs(iv), ' there is not a set of lon,lat in the completed map closer than: ', & 288 mindiff, ' !!' 289 PRINT *,' found minimum difference:', mindiffLl 290 STOP 284 ! ELSE 285 ! Because doing boxes and Goode is not conitnuos, we should jump this error message 286 ! PRINT *,TRIM(ErrWarnMsg('err')) 287 ! PRINT *,' ' // TRIM(fname) // ': for point #', iv,' lon,lat in incomplet map:', lonvs(iv), & 288 ! ' ,', latvs(iv), ' there is not a set of lon,lat in the completed map closer than: ', & 289 ! mindiff, ' !!' 290 ! PRINT *,' found minimum difference:', mindiffLl 291 ! STOP 291 292 END IF 292 293 END IF -
trunk/tools/nc_var.py
r706 r716 35 35 'maskvar', \ 36 36 'ncreplace', 'ncstepdiff', 'netcdf_concatenation', 'netcdf_fold_concatenation', \ 37 'Partialmap_Entiremap', ' remapnn',\37 'Partialmap_Entiremap', 'Partialmap_EntiremapFor', 'remapnn', \ 38 38 'seasmean', 'sellonlatbox', 'sellonlatlevbox', 'selvar', 'setvar_asciivalues', \ 39 39 'sorttimesmat', 'spacemean', 'SpatialWeightedMean', 'statcompare_files', 'submns', \ … … 210 210 elif oper == 'Partialmap_Entiremap': 211 211 ncvar.Partialmap_Entiremap(opts.values, opts.ncfile, opts.varname) 212 elif oper == 'Partialmap_EntiremapFor': 213 ncvar.Partialmap_EntiremapFor(opts.values, opts.ncfile, opts.varname) 212 214 elif oper == 'seasmean': 213 215 ncvar.seasmean(timename, opts.ncfile, opts.varname) -
trunk/tools/nc_var_tools.py
r714 r716 19227 19227 varn= name of the variable 19228 19228 """ 19229 import module_ForInterpolate as fin 19229 19230 import numpy.ma as ma 19230 19231 import subprocess as sub … … 19350 19351 lonmap = olon[:] 19351 19352 latmap = olat[:] 19352 projlon = olon[:] 19353 projlat = olat[:] 19353 projlon = olon[:].astype('float64') 19354 projlat = olat[:].astype('float64') 19354 19355 omapvals = oproj.variables['ptid'] 19355 19356 Ntotvals = omapvals.shape[0] * omapvals.shape[1] … … 19494 19495 iri = ir 19495 19496 ire = ir + fracs + 1 19496 print iri,',',ire 19497 percendone(iri,Ninpts,0.5,'done:') 19498 lonvss = lonvs[iri:ire].astype('float64') 19499 latvss = latvs[iri:ire].astype('float64') 19500 ovars = ovar[iri:ire].astype('float64') 19501 19497 19502 newvar,newvarin,newvarinpt,newvarindiff = \ 19498 19503 fin.module_forinterpolate.coarseinterpolate(projlon, projlat, \ 19499 lonvs[iri:ire], latvs[iri:ire], fracd, mindiff, ivar, Nmaplon, \ 19500 Nmaplat, fracs) 19504 lonvss, latvss, np.float64(fracd), np.float64(mindiff), ovars) 19501 19505 newnc.sync() 19502 19506
Note: See TracChangeset
for help on using the changeset viewer.