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

update positive attribute for all flux variables #25

Merged
merged 1 commit into from
Apr 5, 2024
Merged

Conversation

larsbuntemeyer
Copy link
Contributor

@larsbuntemeyer larsbuntemeyer commented Apr 5, 2024

closes #21 #14

updating positive attribute for all flux variables (units == "W m-2")

i did:

import pandas as pd

df = pd.read_csv("CORDEX-CMIP6/data-request.csv", dtype={"positive": str})

df.loc[(df.standard_name.str.contains('|'.join(['upwelling', 'upward']))) & (df.units == "W m-2"), "positive"] = "up"
df.loc[(df.standard_name.str.contains('|'.join(['downwelling', 'downward']))) & (df.units == "W m-2"), "positive"] = "down"

the following variables are update:

f"up: {list(df[df.positive == 'up'].out_name.unique())}", f"down: {list(df[df.positive == 'down'].out_name.unique())}"
("up: ['rsus', 'rlus', 'hfls', 'hfss', 'rsuscs', 'rluscs']",
 "down: ['rsds', 'rlds', 'rsdsdir', 'rsdscs', 'rldscs']")

@larsbuntemeyer larsbuntemeyer merged commit 5e9df06 into main Apr 5, 2024
@larsbuntemeyer larsbuntemeyer deleted the positive branch April 5, 2024 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

consistent positive attribute
1 participant