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

Frequency preferences cannot be changed #65

Open
iremisikcetin opened this issue Jul 8, 2024 · 1 comment
Open

Frequency preferences cannot be changed #65

iremisikcetin opened this issue Jul 8, 2024 · 1 comment

Comments

@iremisikcetin
Copy link

iremisikcetin commented Jul 8, 2024

Hello all,

@KatharinaBuelow

I am calculating calm days. But need to obtain seasonal results.

I would like to use freq='QS-DEC'. However, index calculator always give annual outputs. I also tried freq="QS," but the output is still annual.

Could you help me solve the issue.

Best regards.
Irem

CODE

proc = xcalc.processing("CMD", preproc_obj=preproc, thresh = 4, sfcWind='sfcWind', freq='QS-DC')
calms= proc.proc

import numpy as np
print(calms)

type(calms)

Print the time stamps

xcalc_dd_time_stamps = calms.coords["time"].values

Convert to numpy.datetime64

np_dates = np.array([np.datetime64(date.isoformat()) for date in xcalc_dd_time_stamps])
np_dates

#OUTPUT OF THE TIME STEPS:

array(['1976-07-02T00:00:00', '1977-07-02T12:00:00',
'1978-07-02T12:00:00', '1979-07-02T12:00:00',
'1980-07-02T00:00:00', '1981-07-02T12:00:00',
'1982-07-02T12:00:00', '1983-07-02T12:00:00',
'1984-07-02T00:00:00', '1985-07-02T12:00:00',
'1986-07-02T12:00:00', '1987-07-02T12:00:00',
'1988-07-02T00:00:00', '1989-07-02T12:00:00',

@iremisikcetin iremisikcetin changed the title Frequency preferences do not change Frequency preferences cannot be changed Jul 8, 2024
@iremisikcetin iremisikcetin changed the title Frequency preferences cannot be changed Frequency preferences cannot be changed Jul 8, 2024
@KatharinaBuelow
Copy link
Contributor

Dear Irem,
I also wrote you a teams
You should use the
index_calculation
https://codebase.helmholtz.cloud/gerics_infrastructure/index_calculation

then it is work with the command line for example for era5:
index_calculation -p ERA5 create_scripts -idx CMD -intake /work/ch0636/eddy/pool/intake-esm_catalogues/ERA5.json -scrpt_dir /scratch/g/g300047/index_calculation -out_dir /work/ch0636/g300047/index_calculation -ofreq sem -submit
well you need to adjust the directories to your needs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants