Open avarf opened 2 years ago
same question as me
As of version 5.x, the TDS is only able to write CF-compliant datasets, which means it cannot write a subset of multiple feature types to a netcdf file. From the CF site: "the features contained within a collection must always be of the same type; and all the collections in a CF file must be of the same feature type"
I believe the request in question is attempting to subset both a timeseries feature and a timeseries profile feature at once, which the TDS can't do. The available workarounds are a) request the output in CSV or XML format b) split up the subset request by feature type (i.e. variables with a vertical dimension and variables without)
As of version 5.x, the TDS is only able to write CF-compliant datasets, which means it cannot write a subset of multiple feature types to a netcdf file. From the CF site: "the features contained within a collection must always be of the same type; and all the collections in a CF file must be of the same feature type"
I believe the request in question is attempting to subset both a timeseries feature and a timeseries profile feature at once, which the TDS can't do. The available workarounds are a) request the output in CSV or XML format b) split up the subset request by feature type (i.e. variables with a vertical dimension and variables without)
I tried requesting the csv file directly via a siphon request, but this causes lins overlap. Could you give me some ideas to get following data together? Bay the way, how can I get the variable list in the server?
error: Line #1099 (got 10 columns instead of 7) Line #1100 (got 10 columns instead of 7) Line #1101 (got 10 columns instead of 7) Line #1102 (got 10 columns instead of 7) Line #1103 (got 10 columns instead of 7)
query.accept('csv')
query.variables('Temperature_surface',
'Wind_speed_gust_surface',
'u-component_of_wind_isobaric',
'v-component_of_wind_isobaric',
'Total_cloud_cover_entire_atmosphere_Mixed_intervals_Average',
'Low_cloud_cover_low_cloud_Mixed_intervals_Average',
'Medium_cloud_cover_middle_cloud_Mixed_intervals_Average',
'High_cloud_cover_high_cloud_Mixed_intervals_Average',
'Total_cloud_cover_boundary_layer_cloud_Mixed_intervals_Average' ,
'Total_cloud_cover_convective_cloud',
'Downward_Short-Wave_Radiation_Flux_surface_Mixed_intervals_Average')
You can see the dataset.xml
document that includes all of the variables by changing the URL from dataset.html
to dataset.xml
, as in:
This is also accessible off the NCSS helper in siphon as list(ncss.metadata.variables)
.
Thanks so much for your advice, I will have a try
So while I think the original query will always have problems due to a mix of surface and profile variables, changing to request 'v-component_of_wind_height_above_ground', 'Liquid_Volumetric_Soil_Moisture_non_Frozen_depth_below_surface_layer'
, which have dimensions of time=373, height_above_ground2=7, lat=361, lon=720
and time=373, depth_below_surface_layer=4, lat=361, lon=720
, respectively, still yields
Server Error (400: NETCDF4 format not supported for ANY_POINT feature type.)
so I think something is off in the determination of what is an ANY_POINT
.
Also, it would be really good to improve the error message to something like: "Data queries that request a mix of timeseries and timeseries_profile types are not supported by netCDF returns. Make sure you don't ask for a combination of single-level and multi-level variables on your netcdf point request."
I am able to use the example in that link but I am getting the same error again. The issue is for some variables ( the server returns the forecast but for anything related to clouds it returns an error. For example query.variables('Temperature_surface', 'Wind_speed_gust_surface')
this works fine but query.variables('Low_cloud_cover_low_cloud_Mixed_intervals_Average')
returns server error Server Error (400: NETCDF4 format not supported for ANY_POINT feature type.)
.
I checked and all the cloud variables that I need and they are in the variable list but I am receiving error for them:
ncssvars = list(ncss.variables)
print('Total_cloud_cover_entire_atmosphere_Mixed_intervals_Average' in ncssvars)
print('Low_cloud_cover_low_cloud_Mixed_intervals_Average' in ncssvars)
print('Total_cloud_cover_convective_cloud' in ncssvars)
print('Downward_Short-Wave_Radiation_Flux_surface_Mixed_intervals_Average' in ncssvars)
# Output
True
True
True
True
Right, try doing the request for Low_cloud_cover_low_cloud_Mixed_intervals_Average
separately. The problem is that the surface fields result in a timeseries return, while the other ends up with a profile timeseries return. These cannot be returned in a single CF-compliant netCDF file.
Yes, if I break the query into many sub-queries that works. It took me a little time to find out which variables can be queried together without raising an error, now my code is like this:
query1.variables('Total_cloud_cover_entire_atmosphere_Mixed_intervals_Average', 'Medium_cloud_cover_middle_cloud_Mixed_intervals_Average', 'High_cloud_cover_high_cloud_Mixed_intervals_Average', 'Total_cloud_cover_boundary_layer_cloud_Mixed_intervals_Average','Low_cloud_cover_low_cloud_Mixed_intervals_Average','Downward_Short-Wave_Radiation_Flux_surface_Mixed_intervals_Average')
query2.variables('Total_cloud_cover_convective_cloud')
query3.variables('Temperature_surface', 'Wind_speed_gust_surface')
query4.variables('u-component_of_wind_isobaric', 'v-component_of_wind_isobaric')
I am using the pvlib library to get the GFS data but I am getting below error:
Based on the issue at https://github.com/pvlib/pvlib-python/issues/1522 this endpoint was working until a few days ago, was there any change in the API? How can I solve this issue?