I would like to access data of several variables from the CAMS global reanalysis (EAC4) dataset. Ideally, I would like to only download data for about 2000 specific points with lat/long coordinates over multiple years. I know ecCodes has the functionality of only extracting the data point that is closest to some user-specified point from a previously downloaded .grib file. However, I would still need to download a lot of unnecessary data. Is there any way to only download data for these points of interest or data that is closest to them? I hope this will significantly reduce ressources required for my machine and hopefully reduce stress on your end aswell. 


2 Comments

  1. I have the same problem and I have decided to solve it by making my area limits be a small square around the point I want.

    If I make my size small enough, I only get onpe point returned but I am not sure this is a valid way to do it.


    As in my function gets a lat and lon value and then does:

    box_size=0.25 # dimension of the box we will get the data from. in degrees lat and long
    limits = [lon+box_size/2,lat+box_size/2,lon-box_size/2,lat-box_size/2]

    and then I make sure that my lat and lon values are not the wrong side of 180 and 90:
    if limits[1]>180: limits[1]=-1*(limits[1]-180)# make sure the values for the latitude are within +-180deg.
    elif limits[1] < -180: limits[1] = 360- limits[1]
    if limits[3]>180: limits[3]=-1*(limits[3]-180)
    elif limits[3] < -180: limits[3] = 360- limits[3]

    if limits[0]>90: limits[0]=90# make sure the values for the longitude are within +-90deg.
    elif limits[0] < -90: limits[0] = -90
    if limits[2]>90: limits[2]=90
    elif limits[2] < -90: limits[2] = -90


  2. If this is correct/valid, what is the smallest box_size, I can get away with?