Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • autosubmit autosubmit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 338
    • Issues 338
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 21
    • Merge requests 21
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • autosubmitautosubmit
  • Issues
  • #289
Closed
Open
Issue created Dec 11, 2017 by Etienne Tourigny@etourignDeveloper

check for unitialized AS variables

When a variable is uninitialized in the AS configuration, there is currently no way to detect it and this leads to unexpected results.

for example this code snippet :

[[ "%LPJG_CONFIG%" = *[!\ ]* ]] && lpjg=%LPJG_CONFIG% || lpjg=""

leads to the following result if LPJG_CONFIG is not defined:

lpjg=%LPJG_CONFIG%

whereas I would like lpjg="" as a result.

For the NFIXYR variable in auto-ecearth we use this workaround in test_model but it only works because we expect it to be a number, so it would not work in this case where we expect a string.

    if [[ -z $NFIXYR  ]]; then
        echo $error_NFIXYR && get_out=true
    else
        if !(( $NFIXYR >= 0 )); then  echo $error_NFIXYR; get_out=true; fi
    fi

Can I please have a fast answer @dmanubens @lbatista ? Thanks

Edited Dec 11, 2017 by Etienne Tourigny
Assignee
Assign to
Time tracking