ESMValGroup / ESMValCore

ESMValCore: A community tool for pre-processing data from Earth system models in CMIP and running analysis scripts.
https://www.esmvaltool.org
Apache License 2.0
42 stars 38 forks source link

Using .json custom table #2364

Open MartinCussacMF opened 6 months ago

MartinCussacMF commented 6 months ago

Is your feature request related to a problem? Please describe. Here at CNRM we have a few "personal" CMOR tables written in json format (example attached). I tried to use them as custom tables in my recipes playing with option like cmor_path in the config-developer.yml file but unsuccessfully. I would like to know if it is possible or easy to implement the possibility to use such files as custom tables in esmvalcore (I understood from the documentation that the CMIP5 .dat format was in use for custom tables).

Would you be able to help out? I have some time to help out but I have basic/intermediate knowledge of python and a beginner with esmvaltool.

CNRM_HOMP39Amon.json

ehogan commented 6 months ago

Hi @MartinCussacMF :wave: Welcome to ESMValTool! ๐Ÿฅณ I have managed to use bespoke CMOR tables by editing the config-developer.yml file. After following the instructions at ESMValTool documentation: Custom CMOR tables did you update the config_developer_file option in the ESMValTool user configuration file (config_user.yml) to use this new config-developer.yml file? ๐Ÿ˜Š

MartinCussacMF commented 6 months ago

Hi @ehogan ! Thanks for the quick reply. I did update my config_user.yml to use the correct config-developer.yml file. I'm joining a copy of both of them maybe so you can maybe spot the mistake.

config-user.yml.txt config-developer.yml.txt

ehogan commented 6 months ago

Thanks @MartinCussacMF! Is the problem related to the fact that cmor_path in the config-developer.yml file is not under the custom: section (described in the documentation I linked to in my previous comment)? There are some commented out lines at the top of the config-developer.yml file with an example, if that's helpful? Would it be possible for you to try using the custom: section and let me know if that works, please? ๐Ÿ˜Š

MartinCussacMF commented 6 months ago

Thanks a lots @ehogan I managed to get it working by moving the cmor_path to the custom: section and renaming my files from CNRM_HOMP39Amon.json to CMOR_HOMP39Amon.json. I suggest modifying the documentation ESMValTool documentation: Custom CMOR tables, especially the following phrase, which seem to imply that only the CMIP5 .dat files are possible as custom tables.

Custom tables in this directory need to follow the naming convention `CMOR{shortname}.dat` and need to be given in CMIP5 format.

ehogan commented 6 months ago

Thanks a lots @ehogan I managed to get it working by moving the cmor_path to the custom: section and renaming my files from CNRM_HOMP39Amon.json to CMOR_HOMP39Amon.json.

Yay! ๐Ÿฅณ

I suggest modifying the documentation ESMValTool documentation: Custom CMOR tables, especially the following phrase, which seem to imply that only the CMIP5 .dat files are possible as custom tables.

Custom tables in this directory need to follow the naming convention `CMOR{shortname}.dat` and need to be given in CMIP5 format.

Good shout! ๐ŸŽ‰ Might you be interested in creating a PR for this? ๐Ÿค” ๐Ÿคž Let me know if not and I'll give it a go ๐Ÿ˜Š

MartinCussacMF commented 6 months ago

Sure thing, I'll give it a try !

ehogan commented 6 months ago

Brilliant, thank you! ๐Ÿ˜ There is some documentation available at Contributions are very welcome, and do let me know if you have any questions ๐Ÿ˜Š

MartinCussacMF commented 6 months ago

Hi @ehogan ! My contribution is ready, but I'm having trouble pushing my branch for the PR, is there any thing needed for me to be able to do this ? I'm getting the following error :

remote: Permission to ESMValGroup/ESMValCore.git denied to MartinCussacMF.
fatal: unable to access 'https://github.com/ESMValGroup/ESMValCore.git/': The requested URL returned error: 403
ehogan commented 6 months ago

Hi @ehogan ! My contribution is ready, but I'm having trouble pushing my branch for the PR, is there any thing needed for me to be able to do this ? I'm getting the following error :

remote: Permission to ESMValGroup/ESMValCore.git denied to MartinCussacMF.
fatal: unable to access 'https://github.com/ESMValGroup/ESMValCore.git/': The requested URL returned error: 403

@axel-lauer, would it be possible for you to add @MartinCussacMF to the ESMValTool development team, please? ๐Ÿ˜Š

axel-lauer commented 6 months ago

@MartinCussacMF, could you please drop me a short email so I can send you our official welcome email?

MartinCussacMF commented 6 months ago

@axel-lauer, sure thing, to what email adress may i send it to ?

axel-lauer commented 6 months ago

@MartinCussacMF please use the address shown here: https://github.com/ESMValGroup/ESMValTool/blob/main/esmvaltool/config-references.yml#L50

MartinCussacMF commented 6 months ago

Done ! I got the welcome mail thank you. Is there anything more to do to be able to push my own branches ?

axel-lauer commented 6 months ago

Hi Martin,

I think once you accepted the GitHub invitation to join the ESMValTool development team, you should be able to create branches in the repository and also to push changes to your branches. The GitHub invitation is an automated email, so maybe also check your spam folder if you have not received anything yet.

Best regards, Axel

Von: Martin Cussac @.> Gesendet: Montag, 11. Mรคrz 2024 15:10 An: ESMValGroup/ESMValCore @.> Cc: Lauer, Axel @.>; Mention @.> Betreff: Re: [ESMValGroup/ESMValCore] Using .json custom table (Issue #2364)

Done ! I got the welcome mail thank you. Is there anything more to do to be able to push my own branches ?

โ€” Reply to this email directly, view it on GitHubhttps://github.com/ESMValGroup/ESMValCore/issues/2364#issuecomment-1988534028, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGBRJXZKOYNYE5MPQ6HXN5LYXW3LHAVCNFSM6AAAAABEJJQO7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBYGUZTIMBSHA. You are receiving this because you were mentioned.Message ID: @.**@.>>

MartinCussacMF commented 6 months ago

I missed the emai sorryl... Looks good, PR to follow.