You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> cfile(tt)
warning : no file found for {'project': 'IGCM_OUT', 'simulation': 'CM5A2-VLR-pi-Par01', 'variable': 'flat', 'period': 6020-6099, 'domain': 'global', 'root': '/thredds/tgcc/store', 'login': 'p86mart', 'model': 'IPSLCM5A2', 'status': 'PROD', 'experiment': 'piControl', 'DIR': 'SRF', 'OUT': 'Analyse', 'ave_length': '*', 'frequency': 'monthly', 'clim_period': '????_????', 'clim_period_length': '*', 'filenameVar': 'histmth'}, at these data locations ...
This printed dictionary has no quote around the value of 'period'. A copy/paste in a python shell generates strange errors that can puzzle the error : it computes period=6020-6099=-79 and a strange error about erroneous date pops up !
Olivier
The text was updated successfully, but these errors were encountered:
It is not really a typo : period is stored as an object (and not a string), and it's print method prints a string representation of the period. But your use case shows that surrounding it with quotes could be helpful.
Le 15 décembre 2021 17:05:38 CET, Marti ***@***.***> a écrit :
I define a dataset with an error (the variable does not exists) :
```
>>> tt = ds ( **{'project': 'IGCM_OUT', 'simulation':
'CM5A2-VLR-pi-Par01', 'variable': 'flat', 'period': '6020-6099',
'domain': 'global', 'root': '/thredds/tgcc/store', 'login': 'p86mart',
'model': 'IPSLCM5A2', 'status': 'PROD', 'experiment': 'piControl',
'DIR': 'SRF', 'OUT': 'Analyse', 'ave_length': '*', 'frequency':
'monthly', 'clim_period': '????_????', 'clim_period_length': '*',
'filenameVar': 'histmth'} )
```
Then I run `cfile`
```
>>> cfile(tt)
warning : no file found for {'project': 'IGCM_OUT', 'simulation':
'CM5A2-VLR-pi-Par01', 'variable': 'flat', 'period': 6020-6099,
'domain': 'global', 'root': '/thredds/tgcc/store', 'login': 'p86mart',
'model': 'IPSLCM5A2', 'status': 'PROD', 'experiment': 'piControl',
'DIR': 'SRF', 'OUT': 'Analyse', 'ave_length': '*', 'frequency':
'monthly', 'clim_period': '????_????', 'clim_period_length': '*',
'filenameVar': 'histmth'}, at these data locations ...
```
This printed dictionary has no quote around the value of `'period'`. A
copy/paste in a python shell generates strange errors that can puzzle
the error : it computes `period=6020-6099=-79` and a strange error
about erroneous date pops up !
Olivier
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#234
I define a dataset with an error (the variable does not exists) :
Then I run
cfile
This printed dictionary has no quote around the value of
'period'
. A copy/paste in a python shell generates strange errors that can puzzle the error : it computesperiod=6020-6099=-79
and a strange error about erroneous date pops up !Olivier
The text was updated successfully, but these errors were encountered: