JanStreffing / cmpitool

A lightweight tool to characterize and compare the ability of a climate model to simulate the recend decades
GNU General Public License v3.0
2 stars 4 forks source link

Library #15

Closed JanStreffing closed 1 year ago

JanStreffing commented 1 year ago

This major MR transforms cmpitool into a library.

On the user side the tool becomes quite small. See example.py:

from cmpitool import (cmpitool ,cmpisetup)

variable, region, climate_model, siconc, tas, clt, pr, rlut, uas, vas, ua, zg, zos, tos, mlotst, thetao, so = cmpisetup()
model_path='/p/project/chhb19/streffing1/software/cmpi-tool/input/'
models=[    
        climate_model(name='EC-Earth3',    variables=[siconc, tas, clt, pr, rlut, uas, vas, ua, zg, zos, tos, mlotst, thetao, so]),
        climate_model(name='AWI-CM1-MR',   variables=[        tas, clt, pr, rlut, uas, vas, ua, zg, zos, tos, mlotst, thetao, so]),
    ]

cmpitool(model_path, models, seasons=['JJA', 'DJF'])

read the doc documentation follows.

JanStreffing commented 1 year ago

Some descriptions need updating still.