0
votes

I have downloaded this file. 'https://www.esrl.noaa.gov/psd/repository/entry/get/hpbl.mon.mean.nc?entryid=synth%3Ae570c8f9-ec09-4e89-93b4-babd5651e7a9%3AL05BUlIvTW9udGhsaWVzL21vbm9sZXZlbC9ocGJsLm1vbi5tZWFuLm5j'

Now I want to open it.

library(raster)

file <- "~/Desktop/input/hpbl/hpbl.mon.mean.nc"

data <- raster(file)

I get the following warning: Warning message:

Warning message:In cbind(m[i, ], vals) : number of rows of result is not a multiple of vector length (arg 2).

But I cannot figure out why.

Thanks!

1

1 Answers

0
votes

The warning happens because the file has a small error in the description of the coordinate reference system ("grid_mapping" in ncdf speak). It has standard_parallel = 50 50 instead of standard_parallel = 50. You can ignore the warning. In future versions it will go away. In this case you can fix the CRS by setting it like this

crs(data) <- "+proj=lcc +x_0=5632642.22547 +y_0=4612545.65137 +lat_0=50 +lon_0=-107 +lat_1=50"