ESCOMP / CAM-SIMA

Community Atmosphere Model - System for Integrated Modeling of the Atmosphere
3 stars 12 forks source link

Add new errmsg length constant to ccpp_kinds #216

Closed peverwhee closed 1 year ago

peverwhee commented 1 year ago

Issue Type

Code Clean-up

Issue Description

From @cacraigucar 's comment on #206 :

Based off of Dom's response in the CCPP meeting notes, I think we need to augment our src/utils/ccpp_kinds.F90 to add a CCPP specific errmsg length (like we did with introducing kind_phys) In this case, our errmsg length could default to SHR_KIND_CX in ccpp_kinds.F90, but if the length of errmsg needed to be increased, we wouldn't need to change the other places where the model is using SHR_KIND_CX as well.

Will this change answers?

No

Will you be implementing this yourself?

Any Software Engineer can do this

gold2718 commented 1 year ago

I'm confused. This issue refers to "src/utils/ccpp_kinds.F90". Up until now, that file does not exist in CAMDEN. A file with the same name is generated by the CCPP Framework so at least, I think this issue belongs there.

nusbaume commented 1 year ago

I just wanted to note here that after talking with NOAA it sounds like their error message length is set by the errmsg variable in the ccpp_t DDT in ccpp_types.F90. Does capgen use this DDT anywhere? If so we can likely just extract the character length from that DDT variable. Otherwise we might need to discuss how to best handle this with NOAA more as we start the unification process (which could be done in a CCPP framework issue).

gold2718 commented 1 year ago

Does capgen use this DDT anywhere?

No, this module is only used by the prebuild version. For capgen, I think this should be added to the generated ccpp_kinds.F90 file.

For the record, the only files capgen uses from that (<root>/src) directory are ccpp_constituent_prop_mod.[meta,F90] and the hash-table modules.

nusbaume commented 1 year ago

@gold2718 Thanks for letting me know! In that case I would vote to just make an issue in the framework to add this new "errmsg" kind to ccpp_kinds whenever we get the opportunity.

peverwhee commented 1 year ago

@gold2718 @nusbaume thanks for the discussion and, yes, this should be a framework issue: https://github.com/NCAR/ccpp-framework/issues/466