USDA-ARS-NWRC / awsm

Automated Water Supply Model (AWSM) was developed at the USDA Agricultural Research Service. AWSM was designed to streamline the workflow used to forecast the water supply of multiple water basins.
Other
9 stars 2 forks source link

snow.nc and em.nc projection information #44

Closed scotthavens closed 4 years ago

scotthavens commented 5 years ago

The SMRF outputs can be loaded into QGIS but the snow.nc and em.nc files cannot. This seems to point to something wrong with the projection information of the output files.

micahjohnson150 commented 5 years ago

What version of QGIS are you using? We have found recently QGIS 3 will not load some netcdfs.

micahjohnson150 commented 5 years ago

I just tested both smrf outputs (air_temp) and a snow.nc in QGIS 2 with success.

scotthavens commented 5 years ago

QGIS 3 does not work with snow or em, but does work with SMRF outputs.

KayleeGross commented 5 years ago

I have QGIS 3 and it just loaded in a topo, an air_temp and a snow.nc. Prior to today we were unable to get topo.nc's to load. Not sure what changed.

Here is my QGIS about info.


QGIS version | 3.6.1-Noosa | QGIS code revision | 93e761d
-- | -- | -- | --
Compiled against Qt | 5.9.5 | Running against Qt | 5.9.5
Compiled against GDAL/OGR | 2.2.3 | Running against GDAL/OGR | 2.2.3
Compiled against GEOS | 3.6.2-CAPI-1.10.2 | Running against GEOS | 3.6.2-CAPI-1.10.2 4d2925d6
PostgreSQL Client Version | 10.6 (Ubuntu 10.6-0ubuntu0.18.04.1) | SpatiaLite Version | 4.3.0a
QWT Version | 6.1.3 | QScintilla2 Version | 2.10.2
PROJ.4 Version | 493
micahjohnson150 commented 5 years ago

@scotthavens could you post your about QGIS too?

scotthavens commented 5 years ago

I'm on Windows, so already at a disadvantage

image

micahjohnson150 commented 5 years ago

Hmmm the big change I see is GDAL 2.2.3 vs 2.4.1. All the work to date with netcdf and projections has been done using <= 2.3.0

You should have the gdal executables available through the command prompt. Could you try: gdalinfo snow.nc and post the output here? Also could you provide the dates for the model data you're using so I can experiment with it too?

scotthavens commented 5 years ago

Yeah... Don't know how to do that on Windows. I'll maybe roll back to the LTS QGIS.

I was looking at the San Joaquin model runs for 01-21-2019. Both data and runs, with the data netcdf's working.

micah-prime commented 5 years ago

I think it's the file, not your QGIS. The old SJ run (on blizzard) didn't have the projection added until later in the year, so the early file are missing it. The projection is added automatically when we push to the geoserver, so at least that still worked.

If it's from the new run on albedo and you pulled this morning, that was the day that crashed, so there is probably no real data in that file. Either way, it sounds like the data was out to get you.

micahjohnson150 commented 4 years ago

Messing around with this, using 3.4 Madeira:

  1. I can load in SMRF outputs.
  2. I can't load in AWSM outputs as its outputted.
  3. If i remove all but projection and a single variable from the snow file (e.g. ncks -v thickness,projection snow.nc test.nc) I can load it in.

I found some tickets relating to multivariable issues discussed about year ago (https://issues.qgis.org/issues/21783) . As it stands right now the projection information is being added the same way as in smrf using spatialnc in the awsm code. Doubly confirmed by ncdump -h.

I will keep digging to see what the fix was if any. In the meantime if you were wanting to make figures you could use the kitchen sink command above

scotthavens commented 4 years ago

Just tested with the awsm_test_cases output and I am able to pull them into QGIS 3.8 on Windows. I have to expand the netcdf file with the small arrow and it shows all the variables in the netcdf. Then I can load that into QGIS.

There must be something with the 3.6 version I was using before.

@micahjohnson150 try the method I just described to see if it works with the older QGIS versions.

micahjohnson150 commented 4 years ago

Hey scott, I am tentatively maxed out at 3.4 here. I am trying to figure out a work around but it seems to be open issues related to 16.04. So I may not be able to test this the same way at the moment..

scotthavens commented 4 years ago

This appears to be a QGIS problem and not a netcdf problem at the moment. We can reopen if this is not the case for other GIS platforms.