Skip to content

Consistency of fortran string lengths #49

@jedwards4b

Description

@jedwards4b

I ran into a problem with the filename_base string setting in fv3 model_configure:
The length of this string as declared in io/module_fv3_io_def.F90 is 255, however in testing
we have found the length to be limited to 80 characters. It is very difficult to pinpoint exactly where this restriction is introduced as there is no consistency in the declaration of string lengths in fv3 - in this particular case I found that this variable is used in module_fcst_grid_comp.F90 with length 128 and in fv3_cap.F90 (variable fcstItemNameList) with length 80.

I would like to propose that all character lengths be declared as
character(len=lenvar)
where lenvar is defined in a module of constants and that variables of the form
character(nn) or character(len=nn) where nn is integer be removed from the current code and banned from future contributions.

Metadata

Metadata

Labels

bugSomething isn't workingpost releaseissues that will be fixed after the release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions