CDEPS icon indicating copy to clipboard operation
CDEPS copied to clipboard

CDEPS fails when all fields are not connected

Open uturuncoglu opened this issue 3 years ago • 0 comments
trafficstars

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.

uturuncoglu avatar Jun 30 '22 20:06 uturuncoglu