Open CaptainMiao123 opened 2 years ago
Hi, your command lines are correct and it is hard to answer your question on why some of your files return NA values for the coordinates you specified. The only explanation is that your netCDF files may be stored differently or may be corrupted. One way to investigate this is to use a loop with the function summary.ncdf4
which will return the summary of the NC files content such as dimensions, variable names and check some of the attributes whether they exist or not.
I think the reason why you get NA
values is because you retrieved a region too small and with a boundary too close to the coordinate that you wanted to interpolate. The GCM data is fairly coarse and you need valid data on all four grid points around it. If you try lon=c(100,110),lat=c(24,36)
, I think you may get better results.
I just tried to station the retrieved NC data first and then regrid it, and got every station-scaled value surprisingly! I think my experience may be useful for future users so I share my results here and remain open to further discuss!
It all goes well using the newest version 1.10.3 of esd R package untill I regrid the NC file to some specific stations. It bothered me a lot since for a specific station location the regrid function of some NC file returns NA while others not.