Giter Club home page Giter Club logo

chemdyg's People

Contributors

golaz avatar hsiangheleellnl avatar rljacob avatar tangq avatar xylar avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chemdyg's Issues

Restructure code for zppy plugin

@hsiangheleellnl and @tangq: I'm working on modifying zppy plugins to load and use external python modules. But I think the ChemDyg code needs more restructuring before I can go any further.

I was able to install chemdyg in my conda development environment:

git clone [email protected]:E3SM-Project/ChemDyg.git
cd ChemDyg
pip install .

I can successfully load the module

python
>>> import chemdyg

However, I cannot import the top level function that zppy will need to call. That function should be called'chemdyg, but it currently called e3sm_chem_diags. Also, it needs to be importable using something like

from chemdyg import chemdyg

Putting input data on the E3SM input data server

This was discussed at the infrastructure group meeting and documented at this meeting notes page.

The suggestions are:

  • Use the centralized data repo at /lcrc/group/acme/public_html/diagnostics/observations/
  • Datasets to be distributed with mache to all machines.
  • Need to add time stamp in the input file names to differentiate versions

Consider separating python and bash files

It seems that ChemDyg followed the example of:
https://github.com/E3SM-Project/zppy/blob/c3f70dc8c814c36dcad5c380b1f86c8475a6192e/zppy/templates/e3sm_diags.bash
in creating python scripts within bash scripts.

This is not a very good software practice, since it's pretty confusing to debug and contribute to. Instead, zppy has a better example to work from:
https://github.com/E3SM-Project/zppy/blob/c3f70dc8c814c36dcad5c380b1f86c8475a6192e/zppy/templates/global_time_series.bash
https://github.com/E3SM-Project/zppy/blob/c3f70dc8c814c36dcad5c380b1f86c8475a6192e/zppy/templates/coupled_global.py

The bash script calls the python script:
https://github.com/E3SM-Project/zppy/blob/c3f70dc8c814c36dcad5c380b1f86c8475a6192e/zppy/templates/global_time_series.bash#L90
with several arguments. These arguments are then taken from the parameters array and copied into python variables:
https://github.com/E3SM-Project/zppy/blob/c3f70dc8c814c36dcad5c380b1f86c8475a6192e/zppy/templates/coupled_global.py#L491-L502

An even better practice would be to use the argparse package:
https://docs.python.org/3/library/argparse.html
Here is an example from e3sm_diags of how that can be used:
https://github.com/E3SM-Project/e3sm_diags/blob/833d9b2df0515565bf4150b20101e80dea647294/auxiliary_tools/metrics_checker.py#L21-L42

Once #1 is taken care of, I would be happy to provide an example for one of the existing .bash templates that you all could use to make similar changes to the others.

Can only have one www directory for a simulation

The www directory is assumed to be ${www}/${case}/e3sm_chem_diags/plots/ and hence will be overwritten if running chemdyg for different time periods of the same simulation. This causes problem when long (e.g., 500 years) simulations need to run diagnostics for a certain time interval (e.g., 50 years).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.