GithubHelp home page GithubHelp logo

Comments (9)

kenkehoe avatar kenkehoe commented on August 16, 2024

I've update my code to look for datastream as a global attribute. If one does not exist I add __datastream. This would allow viewing the required information from downstream tools and a way for the information to be added to the object without the need to add act hidden variables. My downstream tool will check for both datastream and __datastream.

from act.

kenkehoe avatar kenkehoe commented on August 16, 2024

I see the plotting routine was updated to not use the act object date range attributes, but it looks like it is still using the act object datastream attribute. I can set it using the act object setter method but I think we should not use that as it makes debugging the plot title more difficult.

from act.

AdamTheisen avatar AdamTheisen commented on August 16, 2024

@kenkehoe what are your thoughts on this? Still something we should update?

from act.

kenkehoe avatar kenkehoe commented on August 16, 2024

I think we should not require this information for any of our tools, and use try/except around them where we do use them. There may be a few more out there that should be updated. I recently ran into one looking for "site" that caused a problem.

from act.

AdamTheisen avatar AdamTheisen commented on August 16, 2024

It looks like it would be these lines here that we update to be under the attrs attribute if we were to update right?

arm_ds.act.file_dates = file_dates
arm_ds.act.file_times = file_times
is_arm_file_flag = check_arm_standards(arm_ds)

if is_arm_file_flag.NO_DATASTREAM is True:
    arm_ds.act.datastream = "act_datastream"
else:
    arm_ds.act.datastream = arm_ds.attrs["datastream"]
arm_ds.act.site = str(arm_ds.act.datastream)[0:3]
arm_ds.act.arm_standards_flag = is_arm_file_flag

@rcjackson @zssherman what do you think of making a change like this?

from act.

kenkehoe avatar kenkehoe commented on August 16, 2024

I'm actually more concerned about any of the plotting or other tools needing these attributes if the data is read in without the ACT reader. I think we should be careful getting these attributes in any of the downstream processes, and they should fail gracefully if used.

from act.

rcjackson avatar rcjackson commented on August 16, 2024

from act.

AdamTheisen avatar AdamTheisen commented on August 16, 2024

Just to confirm with @rcjackson, there are no major issues if I change the attributes currently stored in obj.act to be stored under the obj.attrs area with the rest of the attributes and then adjust the downstream code as needed correct? I will then work to adjust the codes to not require these. Sound ok?

from act.

AdamTheisen avatar AdamTheisen commented on August 16, 2024

Closing out. ACT attributes have been ported over to xarray attrs

from act.

Related Issues (20)

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.