Open davidorme opened 2 years ago
Can you try a run using the "standard" input file I posted on the other issue thread and report back?
I think the issue is that it the lat and lon values are not read from the input file, but are allocated:
Presumably, that allocation either has a default 0 value or we've just seen it being allocated 'empty' memory.
At the moment, I think the coordstring
subsetting expects array indices, rather than allowing GMT strings with lat and long values ( e.g. -R-180/180/-90/90
). That would obviously require more logic to identify the index on lat and lon dimensions.
I think I've fixed this up:
calcpixels
and nearest
in coordsmod.f90
. nearest
to nearest_coords
to avoid shadowing an existing name and also added include_coords
as an alternative to ensure that provided GMT coordinates are included (where possible) within the the subset.lat
and lon
data is now read into two new vectors (all_lat
and all_lon
) and then the appropriate slice is extracted into the lat
and lon
vectors, given the subset indices.
The output netCDF file does not have the lat and lon coordinates set correctly. Using
xarray
inpython
to explore the data, I get this output:Actually - come to think of it
gdom
looks odd too!