Skip to content

Toberumono/Namelist-Parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Namelist Parser A library for reading from and writing to Namelist files (Particularly those used by WRF).

##Usage

See the this project's wiki for usage examples.

###Compiling There are a two main options for compiling this library:

  1. With Homebrew or Linuxbrew
  • Pros:
    • Makes updating incredibly easy
    • Automatically installs Apache Ant
    • Handles automatic dependency tracking (for a lot of software)
  • Cons:
  1. Without Homebrew or Linuxbrew
  • Pros:
  • Cons:
    • Manually setting up Ant can be a pain
    • Updating the software and libraries is harder

####Required Software (these are all command line utilities)
Note: Software that is installed as a part of the setup instructions is not included.

Note: If you do not have the needed software, or are not sure, see Getting the Required Software for instructions on how to get the software.

####Getting the Required Software

####Compiling With Homebrew/Linuxbrew Any "run" instruction means, "copy and paste the following into Terminal and hit enter".

  1. Run brew tap Toberumono/tap
  2. Run brew install namelist-parser
  3. All done!

####Compiling Without Homebrew/Linuxbrew Any "run" instruction means, "copy and paste the following into Terminal and hit enter".

  1. Create the directory that you want to contain the .jar file
  2. Run one of the following:
  • For upgradeable builds, run:

    op="$(pwd)" && tg="Namelist-Parser" && git clone "https://github.com/Toberumono/$tg.git" && cd "./$tg" && git checkout "$(git describe)" && ant; cd "$op"; unset op tg
    • This is the recommended option.

    • It clones the repository and then checks out the most recent tagged commit (aka the most recent release)

    • To update, cd into the directory with the .jar file and run:

      op="$(pwd)" && tg="Namelist-Parser" && cd "./$tg" && git fetch && git checkout "$(git describe)" && ant; cd "$op"; unset op tg
  • For one-time builds, run:

    op="$(pwd)" && tg="Namelist-Parser" && url="https://github.com/Toberumono/$tg" && mkdir "./$tg" && curl -#fSL "$url/archive/$(git ls-remote --tags $url.git | grep -oE '([0-9]+\.)*[0-9]+$' | sort -g | tail -1).tar.gz" | tar -xz --strip-components 1 -C "./$tg" && cd "./$tg" && ant; cd "$op" && rm -rf "$tg"; unset op tg url
    • This will get the most recent tagged release only.
    • While this is not recommended, it is still perfectly safe - it just makes updating a bit trickier.
  • If you really want the cutting edge, possibly broken version, run:

    op="$(pwd)" && tg="Namelist-Parser" && git clone "https://github.com/Toberumono/$tg.git" && cd "./$tg" && ant; cd "$op"; unset op tg
    • If you do not know how to update to the latest version after running this, don't run it.
    • This is not recommended mainly because it is not safe - unless you are willing to do some debugging, avoid this option.
  1. All done!