Skip to main content
Add rioxarray tag; removed TIA
Source Link
Vince
  • 20.3k
  • 16
  • 48
  • 65

I have to use a .nc file as input in a model and such model requires projection_x_coordinate and projection_y_coordinate as variables but I don't have them. Is it possible to create them using pyproj, for instance? (file available here). My projparams are:

{'a': 6371229,
 'b': 6371229,
 'proj': 'stere',
 'lat_ts': 60.0,
 'lat_0': 90.0,
 'lon_0': 264.0}

My first idea was to use the information of the number of points (Nx in the file), the horizontal resolution (Dx) and the first points (e.g. latitudeOfFirstGridPointInDegrees) to create the desired variables but I don't know if it is the right thing to do.

Thank you in advance.

I have to use a .nc file as input in a model and such model requires projection_x_coordinate and projection_y_coordinate as variables but I don't have them. Is it possible to create them using pyproj, for instance? (file available here). My projparams are:

{'a': 6371229,
 'b': 6371229,
 'proj': 'stere',
 'lat_ts': 60.0,
 'lat_0': 90.0,
 'lon_0': 264.0}

My first idea was to use the information of the number of points (Nx in the file), the horizontal resolution (Dx) and the first points (e.g. latitudeOfFirstGridPointInDegrees) to create the desired variables but I don't know if it is the right thing to do.

Thank you in advance.

I have to use a .nc file as input in a model and such model requires projection_x_coordinate and projection_y_coordinate as variables but I don't have them. Is it possible to create them using pyproj, for instance? (file available here). My projparams are:

{'a': 6371229,
 'b': 6371229,
 'proj': 'stere',
 'lat_ts': 60.0,
 'lat_0': 90.0,
 'lon_0': 264.0}

My first idea was to use the information of the number of points (Nx in the file), the horizontal resolution (Dx) and the first points (e.g. latitudeOfFirstGridPointInDegrees) to create the desired variables but I don't know if it is the right thing to do.

Source Link

Creating (x,y) coordinates in .nc from .grib2

I have to use a .nc file as input in a model and such model requires projection_x_coordinate and projection_y_coordinate as variables but I don't have them. Is it possible to create them using pyproj, for instance? (file available here). My projparams are:

{'a': 6371229,
 'b': 6371229,
 'proj': 'stere',
 'lat_ts': 60.0,
 'lat_0': 90.0,
 'lon_0': 264.0}

My first idea was to use the information of the number of points (Nx in the file), the horizontal resolution (Dx) and the first points (e.g. latitudeOfFirstGridPointInDegrees) to create the desired variables but I don't know if it is the right thing to do.

Thank you in advance.