ESCOMP / ESCOMP/CDEPS

CDEPS fails when all fields are not connected

Open
#172 0 comments 0 reactions 1 assignee Claimed by @uturuncoglu View on GitHub
enhancement
Dominant language
Fortran
Stars
32
Forks
68
Avg merge
5d 13h
Merged PRs (30d)
2

Description

I am testing CDEPS with generic driver and the configuration only involves DATM+LND components. The LND component does not require all the fields that are provided by the DATM and this causes issue in CDEPS side and `dshr_state_getfldptr` calls fails. https://github.com/ESCOMP/CDEPS/blob/d62218d4daf53004b0a9696ec73df2e7663ce191/datm/datm_datamode_clmncep_mod.F90#L269
We introduced a way in those calls to return null pointer without any issue and introducing checking in the data mode was solving the issue but I think it is not a generic solution and requires extensive code changes in all the supported data modes due to the link among the fields that are provided (i.e. surface pressure requires to calculate the humidity etc.). So, my propose is to add new option to *_in configuration file to allow adding all the provided fields to state. This can be easily done in the `dshr_fldlist_mod.F90` by adding a logic. https://github.com/ESCOMP/CDEPS/blob/d62218d4daf53004b0a9696ec73df2e7663ce191/dshr/dshr_fldlist_mod.F90#L56
I have already tested an if I add all the available fields that is coming from data component independent of their connection status my configuration works with any modification in the individual data mods. Anyway, please let me know what do you think @mvertens @jedwards4b. We could set the default to `false` etc. and does not change anything in the exiting applications but the new option will give flexibility to other applications without worrying about connected fields.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.