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

xsl stylesheet update for spatial representation info vertical and temporal #25

Open
salme146 opened this issue Dec 29, 2022 · 0 comments

Comments

@salme146
Copy link

I find that the axisDimensionProperties always misses the vertical resolution for my dataset.

     <gmd:axisDimensionProperties>
        <gmd:MD_Dimension>
           <gmd:dimensionName>
              <gmd:MD_DimensionNameTypeCode codeList="http://www.ngdc.noaa.gov/metadata/published/xsd/schema/resources/Codelist/gmxCodelists.xml#MD_DimensionNameTypeCode"codeListValue="vertical">vertical</gmd:MD_DimensionNameTypeCode>
           </gmd:dimensionName>
           <gmd:dimensionSize>
              <gco:Integer>16</gco:Integer>
           </gmd:dimensionSize>
           <gmd:resolution gco:nilReason="missing"/>.   <------MISSING
        </gmd:MD_Dimension>
     </gmd:axisDimensionProperties>

so I hardcoded it into my version of the xsl stylesheet (around line 300)

<xsl:if test="count($verticalVariableName)">
<xsl:call-template name="writeDimension">
<xsl:with-param name="dimensionType" select="'vertical'"/>
<xsl:with-param name="dimensionUnits" select="'meter'"/> <---HERE



<xsl:with-param name="dimensionResolution" select=" '0.01' "/>. <--- HERE
<xsl:with-param name="dimensionSize" select="/nc:netcdf/nc:dimension[contains(@name,$verticalVariableName)]/@Length"/>
</xsl:call-template>
</xsl:if>

I did the same thing for the temporal dimension

                        <xsl:if test="count($timeVariableName)">
                            <xsl:call-template name="writeDimension">
                                <xsl:with-param name="dimensionType" select="'time'"/>
                                <!--<xsl:with-param name="dimensionUnits" select="$temporalUnits[1]"/>-->
                                <xsl:with-param name="dimensionUnits" select="'seconds'"/>
                                <xsl:with-param name="dimensionResolution" select=" '3600' "/>
                                <!--<xsl:with-param name="dimensionResolution" select="$timeResolution[1]"/-->>
                                <xsl:with-param name="dimensionSize" select="/nc:netcdf/nc:dimension[contains(@name,$timeVariableName)]/@length"/>
                            </xsl:call-template>
                        </xsl:if>

I imagine this could be hard coded into the yaml file, however I am finding it hard to figure out the workflow for the spatial representation info.

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

1 participant