WCRP-CORDEX / data-request-table

Machine readable data request tables
MIT License
0 stars 0 forks source link

update positive attribute for all flux variables #25

Closed larsbuntemeyer closed 3 months ago

larsbuntemeyer commented 3 months ago

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']")