Changeset 2561 in lmdz_wrf
- Timestamp:
- May 28, 2019, 2:56:00 PM (6 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/module_scientific.f90
r2555 r2561 2629 2629 ! Filling with the points of all the space with .TRUE. 2630 2630 Npts = COUNT(boolmat) 2631 PRINT *, dx, dy, 'Lluis Npts:', Npts, 'Nppt:', Nppt2632 2631 2633 2632 IF (ALLOCATED(points)) DEALLOCATE(points) -
trunk/tools/nc_var_tools.py
r2542 r2561 29391 29391 getvarybndst = ydimvarbnds2D.transpose() 29392 29392 29393 print 'ref:', dxref, dyref29394 print 'Lluis looking for:', reflon, 'lat.', reflat29395 for j in range(dyref):29396 print 'Lluis ref lat.', yslice2D[:,j,0]29397 print 'Lluis get lon.', getlon[0,:]29398 print 'Lluis get lat.', getlat[:,0]29399 for i in range(dxget):29400 print i,'Lluis get lat.', xdimvarbnds2D[:,0,i]29401 for j in range(dyget):29402 print j,'Lluis get lat.', ydimvarbnds2D[:,j,0]29403 29404 29393 Ngridsint, gridsint, areas2Dt, areast, percenst = \ 29405 29394 fsci.module_scientific.grid_spacepercen(xcavals=reflont, \ … … 29644 29633 newdim = onewnc.createDimension('coord',2) 29645 29634 29635 print ' Lluis dims ', dn+'Ngrid', 'Srgrid', Srgrid 29636 29646 29637 newvar = onewnc.createVariable(dn+'Ngrid','i', tuple(Srgrid)) 29647 29638 if Ngridsin.shape[1] == 1: … … 29773 29764 dxyB = osliceinB.shape[1] 29774 29765 29766 print 'Lluis dims osliceNB', osliceNB.dimensions, 'osliceNA', osliceNA.dimensions 29767 29768 29775 29769 Srgrid = list(osliceNB.dimensions) + list(osliceNA.dimensions) 29776 29770 Sigrid = ['coord', dn+'gridin'] + Srgrid … … 29804 29798 inpointsB = inpB.transpose() 29805 29799 29800 print 'Lluis here 00' 29801 29806 29802 # Remembering that it is python (C-like...) 29807 29803 inpointsA = inpointsA-1 … … 29819 29815 if not gen.searchInlist(onewnc.dimensions, dn+'gridin'): 29820 29816 newdim = onewnc.createDimension(dn+'gridin', maxNpointsAB) 29817 29818 print 'Lluis file creation' 29819 29820 print 'Lluis shapes: newvar', newvar.shape, 'NpointsAB', NpointsAB.shape, 'Srgrid', Srgrid 29821 29821 29822 29822 newvar = onewnc.createVariable(dn+'Ngrid','i', tuple(Srgrid)) … … 29826 29826 newvar.setncattr('coordinates',' '.join(Srgrid[::-1])) 29827 29827 29828 print 'Lluis file creation 1' 29829 29828 29830 innewvar = onewnc.createVariable(dn+'gridin', 'i', tuple(Sigrid), \ 29829 29831 fill_value=gen.fillValueI) … … 29832 29834 innewvar.setncattr('coordinates',' '.join(Srgrid[::-1])) 29833 29835 29836 print 'Lluis file creation 2' 29837 29834 29838 aanewvar = onewnc.createVariable(dn+'area','f',tuple(Srgrid), \ 29835 29839 fill_value=gen.fillValueF) … … 29838 29842 aanewvar.setncattr('coordinates',' '.join(Srgrid[::-1])) 29839 29843 29844 print 'Lluis file creation 3' 29845 29840 29846 anewvar = onewnc.createVariable(dn+'gridarea','f',tuple(Spgrid), \ 29841 29847 fill_value=gen.fillValueF) … … 29844 29850 anewvar.setncattr('coordinates',' '.join(Spgrid[::-1])) 29845 29851 29852 print 'Lluis file creation 4' 29853 29846 29854 pnewvar = onewnc.createVariable(dn+'gridpercen','f',tuple(Spgrid), \ 29847 29855 fill_value=gen.fillValueF) … … 29850 29858 pnewvar.setncattr('coordinates',' '.join(Spgrid[::-1])) 29851 29859 29852 jjA = 10 29853 iiA = 2 29854 jjB = 0 29855 iiB = 4 29860 print 'Lluis prior to... dyA, dxA, dyB, dxB', dyA, dxA, dyB, dxB 29861 29856 29862 for jA in range(dyA): 29857 29863 for iA in range(dxA): … … 29890 29896 #onewnc.close() 29891 29897 #quit() 29898 29899 print 'Lluis here !!' 29892 29900 29893 29901 if Nnewslcs >= 3:
Note: See TracChangeset
for help on using the changeset viewer.