Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMS problem with OpenDAP (and NetCDF files) with uneven latitude and/or longitude #316

Open
MarcoAlbaETT opened this issue Nov 10, 2023 · 6 comments

Comments

@MarcoAlbaETT
Copy link

Hi,
I've some NetCDF files with uneven latitude and/or longitude.
When I'll try to display these file via WMS , this is the result:
image

I've tried different configuration, all with the same results:

The OpenDAP service used in ncWMS or Panoply is displaying the data in the right way.
Using the file in Panoply is also working as expected

There is a way to display these type of data in the right way?

Thanks

Marco

@maartenplieger
Copy link
Member

Hi Marco,

We have developed support for irregular grids, see https://github.com/KNMI/adaguc-server/releases

This might help with what you want! Can you try?

@maartenplieger
Copy link
Member

This is related to #174

@MarcoAlbaETT
Copy link
Author

Hi!
I've tried two different configuration

1)
I've used this configiuration:

<?xml version="1.0" encoding="UTF-8" ?>
<Configuration>	
<Legend name="rainbow" type="colorRange">
<palette index="0" red="0" green="0" blue="255"/>
<palette index="80" red="0" green="255" blue="255"/>
<palette index="120" red="0" green="255" blue="0"/>
<palette index="160" red="255" green="255" blue="0"/>
<palette index="240" red="255" green="0" blue="0"/>
</Legend>
<Style name="rainbow">
<Legend fixedclasses="true" tickinterval="500"
tickround="1">rainbow</Legend>
<Min>0</Min>
<Max>30</Max>
</Style>	
  <Layer type="database">
    <FilePath>https://prod-erddap.emodnet-physics.eu/erddap/griddap/INSITU_GLO_PHY_TS_OA_MY_013_052</FilePath>  
    <Variable>TEMP</Variable>
   <Styles>rainbow</Styles>
<Dimension name="time" default="max">time</Dimension>
  </Layer>
</Configuration>

where latitude is uneven and longitude is even

adaguc-server-updatedatasets.sh output is:

> docker exec -i -t my-adaguc-server /adaguc/adaguc-server-updatedatasets.sh INSITU_GLO_PHY_TS_OA_MY_013_052
Using adagucserver from  /adaguc/adaguc-server-master
Using config from /adaguc/adaguc-server-config.xml

*** Starting update for /data/adaguc-datasets/INSITU_GLO_PHY_TS_OA_MY_013_052
[D:000:pid96: adagucserverEC/CDBFileScanner.cpp:951 CDBFileScanner]               ==> *** Starting update layer [TEMP] ***
[D:001:pid96: adagucserverEC/CDBFileScanner.cpp:849 CDBFileScanner]             The database contains 1 files
[D:002:pid96: adagucserverEC/CDBFileScanner.cpp:859 CDBFileScanner]             Comparing lists
[D:003:pid96: adagucserverEC/CDBFileScanner.cpp:862 CDBFileScanner]             Found 0 files in DB which are missing
[D:004:pid96: adagucserverEC/CDBFileScanner.cpp:1069 CDBFileScanner]              ==> *** Finished update layer [TEMP] ***
[D:005:pid96: adagucserverEC/CRequest.cpp:3514 CRequest]                        ***** Finished DB Update *****

and the WMS result is:
image

2)
using this configuration:

<?xml version="1.0" encoding="UTF-8" ?>
<Configuration>
<Legend name="rainbow" type="colorRange">
<palette index="0" red="0" green="0" blue="255"/>
<palette index="80" red="0" green="255" blue="255"/>
<palette index="120" red="0" green="255" blue="0"/>
<palette index="160" red="255" green="255" blue="0"/>
<palette index="240" red="255" green="0" blue="0"/>
</Legend>
<Style name="rainbow">
<Legend fixedclasses="true" tickinterval="500"
tickround="1">rainbow</Legend>
<Min>0</Min>
<Max>30</Max>
</Style>
  <Layer type="database">
    <FilePath>https://prod-erddap.emodnet-physics.eu/erddap/griddap/MULTIOBS_GLO_PHY_SSS_L4_MY_015_015</FilePath>
    <Variable>sss</Variable>
   <Styles>rainbow</Styles>
<Dimension name="time" default="max">time</Dimension>
  </Layer>
</Configuration>

adaguc-server-updatedatasets.sh output is::

> docker exec -i -t my-adaguc-server /adaguc/adaguc-server-updatedatasets.sh MULTIOBS_GLO_PHY_SSS_L4_MY_015_015
Using adagucserver from  /adaguc/adaguc-server-master
Using config from /adaguc/adaguc-server-config.xml

*** Starting update for /data/adaguc-datasets/MULTIOBS_GLO_PHY_SSS_L4_MY_015_015
[D:000:pid138: adagucserverEC/CDBFileScanner.cpp:951 CDBFileScanner]              ==> *** Starting update layer [sss] ***
[D:001:pid138: adagucserverEC/CConvertLatLonGrid.cpp:99 CConvertLatLonGrid]     Note: Irregular grid encountered
[D:002:pid138: adagucserverEC/CConvertLatLonGrid.cpp:126 CConvertLatLonGrid]    Adding 2D latlon grids
[D:003:pid138: adagucserverEC/CConvertLatLonGrid.cpp:167 CConvertLatLonGrid]    Making latitude and longitude grids
[D:004:pid138: adagucserverEC/CDBFileScanner.cpp:496 CDBFileScanner]            Removing autoConfigureDimensions [t20240215t170046223_dlr98t79kvocpdcomlh6_sss] and [t20240215t170046223_dlr98t79kvocpdcomlh6]
[D:005:pid138: adagucserverEC/CDBFileScanner.cpp:542 CDBFileScanner]            Scan https://prod-erddap.emodnet-physics.eu/erddap/griddap/MULTIOBS_GLO_PHY_SSS_L4_MY_015_015
/adaguc/adaguc-server-updatedatasets.sh: line 26:   138 Killed                  ${ADAGUC_PATH}/bin/adagucserver --updatedb --config ${ADAGUC_CONFIG},${filename} ${ADAGUC_VERBOSE}

and the WMS service is not available:
image

I hope my configurations are correct.

Please feel free to use the two endpoints
https://prod-erddap.emodnet-physics.eu/erddap/griddap/INSITU_GLO_PHY_TS_OA_MY_013_052
https://prod-erddap.emodnet-physics.eu/erddap/griddap/MULTIOBS_GLO_PHY_SSS_L4_MY_015_015
if you want to test yourself

I've built the docker image using the 2.19.0 release

Thanks

Marco

@ernstdevreede
Copy link
Collaborator

I found a small bug in the detection of irregular grids, which fails with this data. I'll fix this.

It is very hard to test our code with the URL's you've provided, as the emodnet server is either very, very slow or is severely throttling access from our network. This seems to lead to errors in our code (prbably tnetwork timeouts).
Is that slow performance normal or is there something else wrong?

@MarcoAlbaETT
Copy link
Author

Hi!
I've asked out IT department to check our server performance (internally is working fine).

for the dataset INSITU_GLO_PHY_TS_OA_MY_013_052, the same result is available using one of the nc files like:
https://prod-erddap.emodnet-physics.eu/erddap/files/INSITU_GLO_PHY_TS_OA_MY_013_052/INSITU_GLO_PHY_TS_OA_MY_013_052_TEMP/2022/OA_CORA5.2_20220115_fld_TEMP.nc

For the MULTIOBS_GLO_PHY_SSS_L4_MY_015_015 dataset the result is fine using one of the nc files like:
https://prod-erddap.emodnet-physics.eu/erddap/files/MULTIOBS_GLO_PHY_SSS_L4_MY_015_015/cmems_obs-mob_glo_phy-sss_my_multi-oi_P1W/2022/CATDS_CSF4O1_20220103T000000_20220109T235959_342_2.nc

thanks

@ernstdevreede
Copy link
Collaborator

ernstdevreede commented Feb 20, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants