在R中将csv转换为netcdf

时间:2018-10-02 13:02:33

标签: r netcdf

我有一个.csv文件,其标题为“ time01”,“纬度”,“经度”和“来回”。该文件包含每个网格的每日数据。现在,我想将坐标范围从68E-98E和5N-40N转换为netcdf。实际数据为31天,但在这里,我仅提供了从2009-01-01到2009-01-09的9天数据,但是

time01      lat     lon     frp
2009-01-01  30.037  80.572  38.5
2009-01-01  23.671  85.008  7.2
2009-01-01  22.791  86.206  11.4
2009-01-01  23.755  86.421  5.6
2009-01-01  23.673  86.088  4.2
2009-01-01  23.768  86.392  8.4
2009-01-01  23.789  86.243  7.8
2009-01-01  23.805  86.327  6.4
2009-01-01  23.682  86.085  7.8
2009-01-01  23.68   86.095  5.7
2009-01-01  21.194  81.41   19
2009-01-01  16.95   81.912  8
2009-01-01  16.952  81.898  11.5
2009-01-01  16.899  81.682  10.6
2009-01-01  12.994  79.651  16.1
2009-01-01  9.2 77.603  14.5
2009-01-01  12.291  77.346  20.5
2009-01-01  17.996  79.708  13.9
2009-01-01  17.998  79.718  29.6
2009-01-01  16.61   81.266  6.6
2009-01-01  16.499  81.2    6.8
2009-01-01  19.505  81.784  22.4
2009-01-01  18.322  80.555  7.7
2009-01-01  19.506  81.794  28.2
2009-01-01  21.081  81.957  8.7
2009-01-01  21.223  82.127  9.4
2009-01-01  20.918  81.025  6.3
2009-01-01  19.861  82.123  9.3
2009-01-01  20.62   75.049  11.6
2009-01-01  21.222  82.116  12
2009-01-01  21.608  82.338  8.3
2009-01-01  21.61   82.349  8.1
2009-01-01  21.655  84.081  8.4
2009-01-01  21.733  81.195  28.4
2009-01-01  21.819  81.84   6.2
2009-01-01  21.879  82.941  6.6
2009-01-01  21.731  81.185  18.3
2009-01-01  21.122  75.809  10.4
2009-01-01  21.218  76.557  8.2
2009-01-01  22.931  77.455  8.4
2009-01-01  22.843  77.541  17.7
2009-01-01  22.863  78.898  8.3
2009-01-01  22.865  78.907  9.5
2009-01-01  22.509  78.014  5.6
2009-01-01  22.797  86.204  13.3
2009-01-01  22.966  77.269  5.6
2009-01-01  24.201  82.714  14.5
2009-01-01  23.395  79.717  5.2
2009-01-01  24.148  82.617  7.9
2009-01-01  28.97   77.428  5.6
2009-01-01  27.017  78.44   7.1
2009-01-01  27.343  80.791  4.4
2009-01-01  25.525  75.636  9.8
2009-01-01  29.051  78.111  3.9
2009-01-01  27.942  79.886  3.5
2009-01-01  27.748  79.197  5.5
2009-01-01  27.475  79.347  3.8
2009-01-01  27.365  80.038  7.5
2009-01-01  27.977  80.812  4.4
2009-01-01  27.747  79.187  3.1
2009-01-01  28.088  78.201  4
2009-01-01  28.984  78.087  19.9
2009-01-01  28.221  79.156  3.7
2009-01-01  27.936  78.827  3.7
2009-01-01  28.068  78.521  5.8
2009-01-01  28.976  78.099  11.6
2009-01-01  28.291  77.638  3.5
2009-01-01  28.077  78.059  5.2
2009-01-01  28.272  78.134  7.6
2009-01-01  28.929  78.031  3.3
2009-01-01  28.29   77.628  5.8
2009-01-01  28.461  77.791  3.7
2009-01-01  31.102  77.904  6.7
2009-01-01  31.101  77.893  6.6
2009-01-01  31.104  77.914  6.1
2009-01-01  31.761  76.649  3.4
2009-01-01  31.063  78.018  8.5
2009-01-01  30.812  78.466  5.8
2009-01-01  30.659  78.019  6.1
2009-01-01  30.663  78.317  5.3
2009-01-01  30.604  78.496  5
2009-01-01  29.403  77.487  3.5
2009-01-01  29.997  76.889  12.8
2009-01-01  29.531  78.65   5.3
2009-01-01  29.027  77.563  3.5
2009-01-01  29.061  77.351  4.2
2009-01-01  29.033  77.604  3.8
2009-01-01  29.012  77.587  4.2
2009-01-01  29.101  77.688  6.8
2009-01-01  29.103  77.698  3.1
2009-01-01  29.074  77.825  12.6
2009-01-01  29.076  77.835  4
2009-01-01  29.057  77.578  5.7
2009-01-01  29.241  78.951  6.3
2009-01-01  28.992  77.203  5.7
2009-01-01  29.103  77.511  4.2
2009-01-01  29.66   79.697  5
2009-01-01  28.998  76.334  5.9
2009-01-01  29.175  77.758  4.8
2009-01-01  29  76.345  11.5
2009-01-01  29.164  77.43   10.5
2009-01-01  29.155  77.432  4
2009-01-01  29.181  77.542  5.4
2009-01-01  29.332  77.438  13.2
2009-01-01  29.303  77.365  3.5
2009-01-01  29.273  77.35   5.2
2009-01-01  29.184  77.374  3.7
2009-01-01  29.237  77.483  3.3
2009-01-01  29.349  77.56   3.3
2009-01-01  29.398  77.394  3.4
2009-01-01  29.401  77.477  3.6
2009-01-01  29.67   79.277  5.2
2009-01-01  29.415  77.506  6.6
2009-01-01  29.574  77.971  3.5
2009-01-01  29.455  77.271  3.1
2009-01-01  29.449  77.419  3.5
2009-01-01  29.64   77.527  3.4
2009-01-01  29.906  79.683  5.8
2009-01-01  29.543  77.248  4
2009-01-01  28.255  97.043  13.3
2009-01-01  28.192  97.064  16.3
2009-01-01  28.256  97.052  18.9
2009-01-01  14.045  75.67   5.6
2009-01-01  16.56   74.755  5.6
2009-01-01  16.368  75.517  17.9
2009-01-01  16.37   75.528  6.2
2009-01-01  15.954  75.028  7.6
2009-01-01  17.194  74.213  5.8
2009-01-01  17.499  74.089  14.3
2009-01-01  23.681  86.096  7.4
2009-01-01  23.682  86.086  8.9
2009-01-01  23.771  86.401  8.1
2009-01-01  22.33   82.669  8.3
2009-01-02  28.186  97.063  14.7
2009-01-02  25.758  94.841  14.8
2009-01-02  24.748  94.051  25.4
2009-01-02  24.759  94.035  22.7
2009-01-02  30.86   78.628  7.3
2009-01-02  30.804  78.505  10
2009-01-02  31.203  78.237  8.5
2009-01-02  30.665  78.318  5.4
2009-01-02  30.426  78.063  9.4
2009-01-02  28.583  80.455  6.8
2009-01-02  25.971  76.999  14.4
2009-01-02  28.139  80.48   8.3
2009-01-02  24.733  78.11   6.4
2009-01-02  24.145  82.617  7.6
2009-01-02  24.199  82.722  10.3
2009-01-02  23.418  79.289  6.2
2009-01-02  23.69   79.46   7.2
2009-01-02  22.321  69.88   36.7
2009-01-02  22.322  69.887  32.9
2009-01-02  22.324  69.867  12
2009-01-02  21.254  76.657  9.9
2009-01-02  18.547  74.569  8.6
2009-01-02  21.379  74.723  7.6
2009-01-02  18.549  74.559  6
2009-01-02  19.026  73.457  5.5
2009-01-02  21.584  72.944  8.5
2009-01-02  18.429  74.69   9.4
2009-01-02  18.427  74.699  5.4
2009-01-02  17.983  74.964  13
2009-01-02  17.756  75.316  62.8
2009-01-02  17.747  75.314  5.5
2009-01-02  17.755  75.325  67.3
2009-01-02  17.746  75.324  5.2
2009-01-02  17.024  77.158  8.9
2009-01-02  12.94   76.346  3.6
2009-01-02  14.03   75.442  7.2
2009-01-02  14.039  75.443  9.2
2009-01-02  12.741  76.376  4.7
2009-01-02  12.152  76.847  7.1
2009-01-02  12.349  76.579  6.6
2009-01-02  22.789  86.213  14.3
2009-01-02  23.362  91.398  5.8
2009-01-02  27.137  95.573  23.2
2009-01-02  27.903  96.198  7.6
2009-01-02  27.876  96.331  8.8
2009-01-02  27.136  95.561  26.8
2009-01-02  28.169  97.031  47.1
2009-01-02  28.18   97.031  30
2009-01-02  25.379  94.2    4.4
2009-01-02  25.297  92.62   4.1
2009-01-02  25.493  92.633  6.8
2009-01-02  25.267  92.731  8.2
2009-01-02  24.814  94.032  3.7
2009-01-02  23.88   91.35   23.6
2009-01-02  25.764  94.834  19.1
2009-01-02  25.762  94.823  10
2009-01-02  25.754  94.835  12.2
2009-01-02  25.544  93.922  5.7
2009-01-02  25.545  93.932  7.2
2009-01-02  26.081  94.447  50.4
2009-01-02  26  94.237  10.3
2009-01-02  26.082  94.457  54.4
2009-01-02  26.038  94.383  6
2009-01-02  26.922  94.412  4.7
2009-01-02  27.091  95.523  31.2
2009-01-02  26.575  94.909  7.8
2009-01-02  26.081  94.371  8
2009-01-02  26.126  94.429  28.7
2009-01-02  27.093  95.535  62.7
2009-01-02  27.066  95.564  41.9
2009-01-02  27.067  95.576  25.9
2009-01-02  26.741  94.657  5.2
2009-01-02  26.945  94.442  10.2
2009-01-02  26.723  95.095  5.9
2009-01-02  26.711  94.69   24.6
2009-01-02  26.712  94.701  13.1
2009-01-02  27.081  95.524  50.3
2009-01-02  26.875  95.256  18.9
2009-01-02  26.949  95.701  28
2009-01-02  27.083  95.536  148.6
2009-01-02  26.885  95.255  13.1
2009-01-02  17.256  73.805  19.4
2009-01-02  14.458  75.149  12.7
2009-01-02  14.382  75.179  29
2009-01-02  14.384  75.194  14.3
2009-01-02  17.797  75.468  19.5
2009-01-02  18.522  74.372  11.7
2009-01-02  19.471  74.682  16.7
2009-01-02  19.867  73.77   13.8
2009-01-02  22.093  74.895  22.4
2009-01-02  23.238  70.078  12.2
2009-01-02  21.657  71.634  6.3
2009-01-02  22.326  69.735  20.5
2009-01-02  22.091  74.876  17.3
2009-01-02  23.77   86.394  9.9
2009-01-02  22.335  82.664  10
2009-01-02  23.795  86.242  6.5
2009-01-03  26.738  95.19   101.8
2009-01-03  26.74   95.178  92.4
2009-01-03  26.926  94.4    5.3
2009-01-03  26.919  95.396  17.9
2009-01-03  27.462  95.472  5.3
2009-01-03  26.604  94.841  31.5
2009-01-03  26.73   95.176  92.3
2009-01-03  26.731  95.183  282.6
2009-01-03  26.733  95.171  14
2009-01-03  26.728  95.188  198.1
2009-01-03  26.725  95.201  24
2009-01-03  26.606  94.827  66.8
2009-01-03  26.59   95.038  200.4
2009-01-03  26.592  95.026  332
2009-01-03  26.58   95.036  33.1
2009-01-03  26.582  95.023  39.6
2009-01-03  26.464  94.993  32.6
2009-01-03  26.598  94.818  49
2009-01-03  26.605  94.835  39.1
2009-01-03  26.472  95.008  14.2
2009-01-03  26.595  94.833  248.5
2009-01-03  26.593  94.846  32.5
2009-01-03  26.75   93.437  5.9
2009-01-03  26.585  94.831  15.1
2009-01-03  26.462  95.007  169.1
2009-01-03  24.847  94.039  5.8
2009-01-03  24.903  94.018  6
2009-01-03  22.064  88.126  4.1
2009-01-03  23.765  86.394  8.8
2009-01-03  23.794  86.242  9.1
2009-01-03  22.792  86.204  15.1
2009-01-03  22.797  86.211  6.3
2009-01-03  17.649  82.549  15.2
2009-01-03  18.028  83.305  11.9
2009-01-03  26.571  95.016  69.5
2009-01-03  26.554  95.022  70.5
2009-01-03  26.567  95.023  122
2009-01-03  26.573  94.795  126.4
2009-01-03  26.581  94.829  87.8
2009-01-03  27.169  95.636  79.1
2009-01-03  26.583  94.826  98.9
2009-01-03  26.575  94.789  89.5
2009-01-03  27.049  95.554  174
2009-01-03  26.601  94.824  74.7
2009-01-03  27.043  95.565  215.6
2009-01-03  27.003  95.54   74.1
2009-01-03  27.161  95.636  63.2
2009-01-03  20.811  70.696  14.8
2009-01-03  21.028  70.314  12.8
2009-01-03  16.92   81.579  9.7
2009-01-03  16.921  81.589  19.7
2009-01-03  17.639  82.551  6.3
2009-01-03  17.025  81.661  13.6
2009-01-03  18.925  84.451  5.7
2009-01-03  17.648  82.55   8
2009-01-03  21.145  79.257  8.6
2009-01-03  21.036  80.534  6.6
2009-01-03  21.034  80.523  12.1
2009-01-03  20.915  81.705  11.3
2009-01-03  20.793  81.214  5.4
2009-01-03  20.935  82.53   7.2
2009-01-03  20.75   81.538  4.4
2009-01-03  19.24   73.212  37.7
2009-01-03  18.247  73.233  54
2009-01-03  19.224  73.215  38.7
2009-01-03  19.234  73.217  61
2009-01-03  22.789  86.208  8.1
2009-01-03  21.896  81.738  28.1
2009-01-03  21.898  81.748  6.7
2009-01-03  21.965  83.226  11.8
2009-01-03  21.916  83.008  8.3
2009-01-03  24.144  82.749  4.8
2009-01-03  24.144  82.619  5.9
2009-01-03  23.502  79.217  27.2
2009-01-03  23.449  83.977  7
2009-01-03  23.504  79.229  9.9
2009-01-03  23.677  80.883  8.3
2009-01-03  22.541  78.06   13.4
2009-01-03  22.905  79.4    27.5
2009-01-03  22.907  79.412  55.2
2009-01-03  23.788  86.241  8.5
2009-01-03  24.205  82.723  3.9
2009-01-03  26.734  91.051  34.8
2009-01-03  25.339  83.562  6.2
2009-01-03  25.345  83.604  4.5
2009-01-03  24.203  82.713  8.1
2009-01-03  26.729  91.047  37.2
2009-01-03  27.489  79.98   3.6
2009-01-03  27.335  82.211  4.5
2009-01-03  27.055  82.58   3.5
2009-01-03  26.618  81.432  4.1
2009-01-03  26.616  81.422  3.1
2009-01-03  27.411  84.093  6.6
2009-01-03  27.142  82.476  5.9
2009-01-03  27.14   82.465  4.8
2009-01-03  27.548  80.001  5.1
2009-01-03  29.693  78.041  4.5
2009-01-03  29.08   78.697  4.4
2009-01-03  29.423  78.646  4.4
2009-01-03  30.167  78.96   6.6
2009-01-03  16.85   74.487  7.7
2009-01-03  14.49   75.963  5.3
2009-01-03  14.016  75.685  5.2
2009-01-03  14.488  75.954  7.5
2009-01-03  16.777  74.678  9.8
2009-01-03  16.05   75.423  4.9
2009-01-03  14.553  75.957  9.6
2009-01-03  16.553  74.653  6.4
2009-01-03  16.024  74.937  5.6
2009-01-03  16.328  75.683  5.7
2009-01-03  16.278  75.345  12.1
2009-01-03  16.326  75.674  5.5
2009-01-03  16.28   75.354  12.7
2009-01-03  19.012  76.563  13.7
2009-01-03  18.129  74.156  12.9
2009-01-03  21.482  76.479  17.4
2009-01-03  23.774  86.394  6.8
2009-01-03  23.796  86.245  7.4
2009-01-04  24.204  82.718  10
2009-01-04  27.454  80.675  9.9
2009-01-04  24.148  82.755  5.7
2009-01-04  21.237  82.138  12.4
2009-01-04  22.331  82.669  7.1
2009-01-04  22.951  78.939  6.7
2009-01-04  24.232  77.153  4.9
2009-01-04  18.949  78.514  4.3
2009-01-04  19.235  77.355  8.1
2009-01-04  20.101  80.64   6.4
2009-01-04  20.003  81.531  7.8
2009-01-04  19.246  76.203  4.7
2009-01-04  18.647  74.71   7.6
2009-01-04  17.715  81.883  21.5
2009-01-04  18.056  75.023  11.1
2009-01-04  17.454  78.463  8.5
2009-01-04  18.022  75.128  8.4
2009-01-04  16.27   75.476  10.7
2009-01-04  16.669  73.538  9.4
2009-01-04  17.324  74.061  9.4
2009-01-04  16.582  74.994  6.2
2009-01-04  16.028  79.044  9.4
2009-01-04  14.129  75.848  6.7
2009-01-04  13.837  75.71   5.3
2009-01-04  13.199  79.451  10.1
2009-01-04  12.591  76.433  4.4
2009-01-04  12.886  75.662  14.5
2009-01-04  9.853   78.415  8.1
2009-01-04  11.841  78.131  9.1
2009-01-04  12.25   76.812  5.3
2009-01-04  10.017  78.233  5.2
2009-01-04  11.525  77.476  6.7
2009-01-04  26.955  94.66   5.6
2009-01-04  25.287  92.521  11.7
2009-01-04  25.289  92.533  13.7
2009-01-04  25.269  92.79   10.4
2009-01-04  26.954  94.65   5.4
2009-01-04  26.868  92.141  16.3
2009-01-04  26.703  91.121  6.9
2009-01-04  27.14   95.548  6.1
2009-01-04  27.183  95.597  18.6
2009-01-04  27.394  94.821  3.2
2009-01-04  26.704  91.062  9.2
2009-01-04  26.702  91.048  35.2
2009-01-04  27.461  95.476  5
2009-01-04  28.172  97.058  7.2
2009-01-04  27.412  94.637  4.9
2009-01-04  27.5    94.734  4.4
2009-01-04  28.131  95.726  11.8
2009-01-04  28.14   95.724  7.2
2009-01-04  9.406   76.562  5.7
2009-01-04  9.353   77.406  10
2009-01-04  10.819  75.955  6.8
2009-01-04  9.602   76.929  8.2
2009-01-04  10.015  76.975  9.1
2009-01-04  9.413   76.564  7.9
2009-01-04  10.96   76.178  7.1
2009-01-04  12.702  76.616  9.9
2009-01-04  12.169  77.27   9.7
2009-01-04  12.424  75.071  13
2009-01-04  12.318  77.168  18.6
2009-01-04  12.32   77.179  6.4
2009-01-04  12.342  77.342  9.9
2009-01-04  12.892  75.661  11
2009-01-04  12.891  75.651  19.8
2009-01-04  14.305  75.496  8.3
2009-01-04  13.769  75.214  9.4
2009-01-04  14.296  75.497  12.4
2009-01-04  14.175  75.43   13.3
2009-01-04  14.036  75.425  49.1
2009-01-04  14.121  75.846  9.5
2009-01-04  16.852  74.502  7.9
2009-01-04  16.459  75.619  9.2
2009-01-04  18.289  75.066  12.3
2009-01-04  21.597  74.211  11.6
2009-01-04  21.571  74.277  19.5
2009-01-04  19.288  77.234  18.5
2009-01-04  18.652  73.817  7.1
2009-01-04  19.397  73.156  7.7
2009-01-04  19.368  73.347  8.6
2009-01-04  19.398  73.166  19.6
2009-01-04  22.959  77.206  11.7
2009-01-04  23.77   86.397  7.3
2009-01-05  26.745  95.228  230.6
2009-01-05  26.588  93.024  2.9
2009-01-05  25.964  92.677  4.2
2009-01-05  26.747  95.217  35.7
2009-01-05  26.744  95.238  24.5
2009-01-05  26.736  95.226  7.1
2009-01-05  25.307  92.768  6.1
2009-01-05  23.723  93.1    8
2009-01-05  21.969  73.088  10
2009-01-05  17.644  75.061  72.9
2009-01-05  17.654  75.045  23.7
2009-01-05  17.648  75.037  32.2
2009-01-05  17.64   75.042  30.1
2009-01-05  17.636  75.066  22.4
2009-01-05  18.011  82.91   8.1
2009-01-05  19.023  81.909  19.7
2009-01-05  21.833  82.367  8
2009-01-05  21.552  81.361  11.3
2009-01-05  21.619  82.44   7
2009-01-05  23.792  86.239  5.9
2009-01-05  22.794  86.205  7.3
2009-01-05  23.768  86.395  8
2009-01-05  23.752  86.418  6.4
2009-01-05  23.679  86.093  5.3
2009-01-05  22.104  80.102  10.1
2009-01-05  24.932  93.888  30.1
2009-01-05  24.931  93.896  29.4
2009-01-05  26.725  93.45   119.7
2009-01-05  26.386  91.242  12.3
2009-01-05  25.348  92.547  17.2
2009-01-05  26.144  94.657  80.3
2009-01-05  25.343  92.54   21.6
2009-01-05  26.151  94.658  93.1
2009-01-05  25.535  93.924  25.1
2009-01-05  24.2    82.721  6.4
2009-01-05  26.068  94.404  31.9
2009-01-05  24.144  82.617  4.9
2009-01-05  26.056  94.414  33.3
2009-01-05  24.203  82.715  7.5
2009-01-05  26.727  93.442  119
2009-01-05  26.729  93.472  30.4
2009-01-05  26.706  90.819  46.5
2009-01-05  26.684  90.841  116.3
2009-01-05  26.831  82.842  9.2
2009-01-05  27.617  80.635  5.2
2009-01-05  27.297  80.743  5.4
2009-01-05  27.513  82.706  7.7
2009-01-05  27.43   80.742  5.5
2009-01-05  27.615  80.622  7.2
2009-01-05  27.994  78.846  5.4
2009-01-05  27.649  80.402  4.9
2009-01-05  27.825  79.764  9.7
2009-01-05  31.311  75.341  13.6
2009-01-05  16.592  74.572  29.4
2009-01-05  16.592  74.578  28.4
2009-01-05  15.779  74.887  35.4
2009-01-05  18.569  74.177  10.1
2009-01-06  26.59   94.879  313.1
2009-01-06  26.593  94.888  216.5
2009-01-06  26.574  94.875  108.6
2009-01-06  25.682  92.467  19.5
2009-01-06  24.142  82.754  5.1
2009-01-06  21.66   82.824  13.6
2009-01-06  21.661  82.815  8.5
2009-01-06  20.82   74.163  16.1
2009-01-06  22.327  82.559  3.8
2009-01-06  21.79   83.897  6
2009-01-06  17.403  80.686  39.2
2009-01-06  17.295  81.669  9.8
2009-01-06  18.761  74.608  16
2009-01-06  17.402  80.696  19.5
2009-01-06  17.296  80.979  4.8
2009-01-06  16.634  75.353  27
2009-01-06  16.682  80.954  6.3
2009-01-06  17.109  81.061  4.7
2009-01-06  16.859  81.379  5
2009-01-06  18.85   83.45   9.7
2009-01-06  18.877  76.451  22.7
2009-01-06  14.658  79.603  6.7
2009-01-06  11.671  79.31   5.2
2009-01-06  11.872  78.935  5.7
2009-01-06  25.211  94.516  21.3
2009-01-06  25.152  94.427  10.3
2009-01-06  26.949  95.115  7.2
2009-01-06  26.936  95.468  10.8
2009-01-06  26.871  95.257  7.4
2009-01-06  26.873  95.586  102.5
2009-01-06  26.591  94.885  42.6
2009-01-06  26.106  94.522  22.1
2009-01-06  26.095  94.522  19.2
2009-01-06  26.588  94.866  62
2009-01-06  26.491  94.726  33.8
2009-01-06  25.954  92.111  32.1
2009-01-06  26.493  94.739  42.6
2009-01-06  26.59   94.878  121.5
2009-01-06  26.578  94.868  166.2
2009-01-06  26.874  95.597  69.1
2009-01-06  26.795  95.24   21.7
2009-01-06  26.587  94.86   17.1
2009-01-06  26.589  94.872  101.5
2009-01-06  26.797  95.253  12.2
2009-01-06  26.436  93.768  3.7
2009-01-06  26.788  95.318  12.1
2009-01-06  27.119  95.574  9.5
2009-01-06  27.121  95.585  7.9
2009-01-06  12.313  77.19   7.1
2009-01-06  12.321  77.309  10.3
2009-01-06  14.307  75.701  6.6
2009-01-06  13.419  76.682  4.2
2009-01-06  12.312  77.181  6.3
2009-01-06  14.029  75.444  11.1
2009-01-06  13.417  76.673  10.7
2009-01-06  13.907  79.809  12.2
2009-01-06  18.393  73.348  8.2
2009-01-06  18.139  73.311  11.3
2009-01-06  15.668  73.812  13.8
2009-01-06  18.732  78.048  19.6
2009-01-06  16.099  75.417  5.4
2009-01-06  17.735  75.321  18.4
2009-01-06  17.711  77.496  17.9
2009-01-06  18.063  73.473  13.4
2009-01-06  18.105  74.345  5.4
2009-01-06  18.046  74.501  7.2
2009-01-06  18.559  74.298  12.3
2009-01-06  18.689  74.796  7.1
2009-01-06  18.558  74.288  9.3
2009-01-06  19.273  75.969  16.8
2009-01-06  19.194  77.198  13.5
2009-01-06  18.799  73.124  13
2009-01-06  22.183  72.793  11.8
2009-01-06  21.56   74.081  8.9
2009-01-06  21.298  74.997  12.1
2009-01-06  19.474  74.684  10.8
2009-01-06  21.243  77.127  17.5
2009-01-06  20.29   73.796  10.7
2009-01-06  19.391  73.302  6
2009-01-06  19.531  74.326  11.1
2009-01-06  19.389  73.291  9.2
2009-01-06  19.682  75.095  8
2009-01-06  22.196  75.883  12.6
2009-01-06  22.198  75.893  8.3
2009-01-06  21.486  73.3    18.4
2009-01-06  24.651  73.848  5.9
2009-01-06  27.367  79.811  12.1
2009-01-06  27.364  79.817  9.9
2009-01-06  28.453  76.883  7.6
2009-01-06  28.299  77.743  5.8
2009-01-06  30.525  76.275  7.7
2009-01-06  29.257  75.721  8.5
2009-01-06  30.226  77.207  8.1
2009-01-06  30.06   76.727  9.6
2009-01-06  31.069  76.231  5.6
2009-01-06  31.146  75.763  9
2009-01-06  31.147  75.775  12.5
2009-01-06  31.134  75.924  4.4
2009-01-06  31.134  75.919  4.9
2009-01-06  31.901  75.538  5.9
2009-01-06  31.668  75.879  4.4
2009-01-06  31.94   75.679  4.6
2009-01-06  16.41   75.43   19.9
2009-01-06  21.107  72.643  15.2
2009-01-07  26.763  95.358  5.3
2009-01-07  26.421  94.951  46.2
2009-01-07  26.768  95.364  73.1
2009-01-07  26.77   95.353  69
2009-01-07  26.778  95.365  22.2
2009-01-07  26.776  95.376  12.1
2009-01-07  26.422  94.94   11.5
2009-01-07  26.485  94.793  34.4
2009-01-07  26.486  94.781  23.2
2009-01-07  26.537  94.694  6.7
2009-01-07  26.527  94.692  52.2
2009-01-07  25.275  92.782  9.9
2009-01-07  25.259  93.844  9.3
2009-01-07  30.094  76.846  8.9
2009-01-07  30.255  76.869  7.3
2009-01-07  29.017  79.432  28.5
2009-01-07  29.518  77.312  5.3
2009-01-07  22.145  73.41   6
2009-01-07  22.186  75.544  11.3
2009-01-07  21.905  72.763  13.5
2009-01-07  21.907  72.754  24.1
2009-01-07  21.366  73.141  5
2009-01-07  21.908  72.683  9.5
2009-01-07  21.58   72.953  5.2
2009-01-07  21.092  73.243  8.1
2009-01-07  20.958  70.452  6.3
2009-01-07  19.125  74.061  11.1
2009-01-07  16.354  75.191  17.5
2009-01-07  18.73   74.148  6.2
2009-01-07  22.76   86.239  6.1
2009-01-07  23.545  93.341  7.8
2009-01-07  21.353  83.216  10.4
2009-01-07  24.638  93.827  7.9
2009-01-07  24.644  93.821  15
2009-01-07  25.706  92.896  8.4
2009-01-07  26.479  94.798  44.3
2009-01-07  26.521  94.829  38.1
2009-01-07  26.466  94.798  40.3
2009-01-07  26.074  94.388  21.4
2009-01-07  26.477  94.779  90.2
2009-01-07  26.496  94.704  23.3
2009-01-07  26.466  94.791  62.3
2009-01-07  26.479  94.792  72.7
2009-01-07  26.508  94.831  22.5
2009-01-07  26.477  94.771  81.5
2009-01-07  26.258  88.947  5
2009-01-07  26.87   94.42   15.1
2009-01-07  26.871  94.425  15.5
2009-01-07  26.774  95.444  436.6
2009-01-07  26.875  95.571  24.7
2009-01-07  26.627  93.189  60.1
2009-01-07  26.356  91.241  8.1
2009-01-07  26.765  95.35   20.3
2009-01-07  27.491  81.984  12.7
2009-01-07  26.814  92.201  8.3
2009-01-07  26.678  91.053  6.2
2009-01-07  27.494  82.001  10.1
2009-01-07  26.677  91.04   6.3
2009-01-07  27.359  83.661  17.4
2009-01-07  26.748  91.126  4.9
2009-01-07  26.696  90.781  6.3
2009-01-07  26.741  91.153  43.7
2009-01-07  26.719  91.144  5.9
2009-01-07  26.742  91.166  17.7
2009-01-07  28.892  80.026  14
2009-01-07  21.903  72.74   33.6
2009-01-07  19.007  76.422  12.7
2009-01-07  16.351  75.214  18.9
2009-01-07  16.353  75.197  21
2009-01-07  16.859  81.582  6.1
2009-01-07  21.904  72.759  32.2
2009-01-07  21.907  72.757  21.3
2009-01-08  30.002  78.98   22.7
2009-01-08  22.792  86.209  4.2
2009-01-08  23.67   84.998  4.8
2009-01-08  23.77   86.398  8.7
2009-01-08  23.793  86.243  7.6
2009-01-08  20.871  85.86   6.4
2009-01-08  21.196  81.415  20.3
2009-01-08  21.194  81.408  8.5
2009-01-08  21.192  81.421  15.4
2009-01-08  26.482  94.737  221.1
2009-01-08  26.482  94.871  61.8
2009-01-08  26.485  94.887  71
2009-01-08  26.473  94.89   172.4
2009-01-08  26.469  94.872  126.3
2009-01-08  26.483  94.73   268.5
2009-01-08  26.487  94.751  24.9
2009-01-08  26.478  94.716  76.8
2009-01-08  26.785  95.129  100.7
2009-01-08  26.789  95.148  38.5
2009-01-08  27.031  95.25   16.8
2009-01-08  26.915  95.581  38.8
2009-01-08  27.027  95.267  11.5
2009-01-08  27.024  95.247  10
2009-01-08  16.628  81.06   5.6
2009-01-08  14.053  75.793  12.3
2009-01-08  16.685  81.159  7.3
2009-01-08  17.266  80.762  11
2009-01-08  17.283  73.85   20.8
2009-01-08  17.267  80.772  7.5
2009-01-08  17.257  80.764  8.2
2009-01-08  17.893  78.051  19.5
2009-01-08  16.45   73.655  26.3
2009-01-08  16.842  76.677  10.9
2009-01-08  16.356  73.643  23.6
2009-01-08  17.2    73.85   16.2
2009-01-08  17.35   78.616  6.1
2009-01-08  18.022  80.044  7.7
2009-01-08  18.11   74.648  21.8
2009-01-08  18.273  79.928  6
2009-01-08  18.603  80.603  5.7
2009-01-08  19.125  78.855  7.3
2009-01-08  19.331  77.248  7.6
2009-01-08  22.041  73.044  27.6
2009-01-08  21.237  75.046  19.5
2009-01-08  22.042  73.049  30
2009-01-08  21.335  74.83   10.7
2009-01-08  21.275  75.16   5.6
2009-01-08  21.333  74.825  7.3
2009-01-08  25.861  78.206  8.3
2009-01-08  25.323  77.064  5
2009-01-08  28.158  79.637  5.8
2009-01-08  27.664  77.464  5.5
2009-01-08  25.221  72.899  23.6
2009-01-08  25.86   78.196  6.8
2009-01-08  25.788  77.674  4
2009-01-08  28.268  80.298  5
2009-01-08  29.703  77.445  10.8
2009-01-08  29.641  77.463  6.2
2009-01-08  29.325  77.706  4.7
2009-01-08  29.446  77.52   4.3
2009-01-08  29.208  77.591  5.1
2009-01-08  28.856  78.401  5.9
2009-01-08  28.696  78.165  5.3
2009-01-08  28.584  79.97   9.7
2009-01-08  28.465  78.29   5.1
2009-01-08  29.107  77.319  3.9
2009-01-08  29.126  79.243  17.3
2009-01-08  28.747  77.112  3.4
2009-01-08  28.884  77.442  10.6
2009-01-08  29.242  78.931  6.4
2009-01-08  28.98   78.088  5
2009-01-08  28.978  78.077  5.5
2009-01-08  29.184  76.357  14.1
2009-01-08  29.308  77.378  4.1
2009-01-08  30.175  77.2    6.2
2009-01-08  29.898  77.122  5
2009-01-08  29.891  77.129  11.1
2009-01-08  29.702  77.434  5.7
2009-01-08  29.734  77.331  5.5
2009-01-08  30.452  77.07   9.7
2009-01-08  30.453  77.081  4.6
2009-01-08  30.806  76.764  7.8
2009-01-08  31.543  78.043  12.1
2009-01-08  30.815  76.763  7.8
2009-01-08  31.675  75.607  4
2009-01-08  31.804  75.042  6.4
2009-01-08  31.932  74.721  5.4
2009-01-08  28.172  97.067  18.7
2009-01-08  14.02   75.681  9.7
2009-01-08  16.696  74.567  13
2009-01-08  18.564  74.522  9.5
2009-01-08  16.726  74.644  9.7
2009-01-08  16.727  74.649  10.7
2009-01-08  21.906  72.685  6.9
2009-01-08  21.154  72.733  7.1
2009-01-08  22.801  86.222  14.7
2009-01-08  22.803  86.209  32.5
2009-01-08  23.77   86.398  8.5
2009-01-08  22.793  86.215  13.2
2009-01-08  21.195  81.419  9.5
2009-01-09  26.49   94.91   40
2009-01-09  26.752  95.338  58.2
2009-01-09  26.11   94.537  26.1
2009-01-09  26.488  94.93   7.7
2009-01-09  30.184  80.271  14.8
2009-01-09  28.296  79.685  4.9
2009-01-09  28.825  79.065  6.6
2009-01-09  19.245  75.052  5.8
2009-01-09  21.114  75.44   4.5
2009-01-09  21.151  76.444  18.3
2009-01-09  21.153  76.434  15
2009-01-09  22.219  75.995  6.8
2009-01-09  20.759  73.15   6.9
2009-01-09  20.099  73.713  10.3
2009-01-09  19.149  76.256  8.9
2009-01-09  20.09   73.712  9.9
2009-01-09  18.552  77.03   7.3
2009-01-09  18.702  73.563  4.6
2009-01-09  18.703  73.553  4.8
2009-01-09  18.656  73.814  3.6

因此,请您提供一些信息,以了解如何在R中将其转换为netcdf。

1 个答案:

答案 0 :(得分:0)

软件包ncdf4将帮助您实现这一目标。这是documentation,用于通过定义数据框的尺寸和变量来创建netCDF文件。

这是我尝试创建3维netCDF的示例代码。

使用的数据:

lat,long,time
41,-109,6
40,-107,18
39,-105,6
41,-103,18
40,-109,6
39,-107,18

示例代码:

library(ncdf4)

#Collect individual columns
xvals <- df$long
yvals <- df$lat
time <- df$time

#Create dimension definition
lon_dim <- ncdim_def("longitude", "degrees_east", xvals)
lat_dim <- ncdim_def("latitude", "degrees_north", yvals)
time_dim <- ncdim_def("time","h",unique(time))

#Define new variable and append with 0
mv =  1.e30
frp <- ncvar_def("frp", "frp", list(lon1,lat2,time_dim), mv)
frp

#Create a netCDF file
ncnew = nc_create("C:\\Users\\Desktop\\my_nc.nc", frp)
ncnew

您可以使用ncvar_put函数添加frp的值。该文档干净准确。应该会有所帮助。希望这能回答您的问题。