[msschem] Not all hsecs are being offered by the client

Issue #163 resolved
Andreas Hilboll created an issue

[This replaces https://bitbucket.org/andreas-h/mss/issues/1]

In my setup, I add the following two data sources to the nwpaccess in the settings:

"CAMSglb": mslib.mswms.dataaccess.MSSChemDataAccess(
        os.path.join(_datapath, "msschem", "cams_global"),
        "CAMSglb", "cams-global", "ml"),

"CAMSregENS": mslib.mswms.dataaccess.MSSChemDataAccess(
        os.path.join(_datapath, "msschem", "cams_regional"),
        "CAMSregENS", "cams-regional", "al"),

I also have the following two horizontal plot styles:

(mpl_hsec_styles.HS_MSSChemStyle_AL_NO2_mconc, ["CAMSregENS"]),
(mpl_hsec_styles.HS_MSSChemStyle_ML_NO2_mfrac, ["CAMSglb"]),

Everything works fine, as long as I don't add the following vertical plot style:

(mpl_vsec_styles.VS_MSSChemStyle_ML_NO2_mfrac, ["CAMSglb"]),

As soon as I also have this vertical layer activated, the client only offers the CAMSregENS hsec, and not the CAMSglb hsec.

However, I checked the WMS offer from the server (using the View functionality of the client), and the offers in both situations are idential (ok, except for the added vsec style).

I'm a bit at a loss here. Since the WMS offer from the server seems identical, I don't know where to look in my server code, and I haven't touched the client, so far ...

I uploaded some test data (2.5G) to OneDrive.

Comments (7)

  1. Joern Ungermann

    This should help:

    --- a/mslib/mswms/mpl_vsec_styles.py
    +++ b/mslib/mswms/mpl_vsec_styles.py
    @@ -1544,7 +1544,7 @@ def make_msschem_class(entity, nam, vert, units, scale, add_data=None, add_conto
             add_contours = []
    
         class fnord(VS_MSSChemStyle):
    -        name = entity + "_" + vert
    +        name = "VS_" + entity + "_" + vert
             dataname = entity
             ###units, unit_scale = Targets.get_unit(dataname)
             units = units
    

    Each offered layer need to have a unique "name" otherwise the client cannot distinguish them.

  2. Log in to comment