Skip to content

shieldfull does not build with gfortran compiler #377

@laurenchilutti

Description

@laurenchilutti

Describe the bug
When I compile with GNU's fortran compiler, I get the following errors related to instances where the _DBL_ and _RL_ macros are used with line continuation character &

/ncrc/home1/Lauren.Chilutti/SHiELD_dev/SHiELD_SRC//GFDL_atmos_cubed_sphere/driver/SHiELDFULL/include/atmosphere.inc:86:86:
   86 |              tref(i,j) = _DBL_(_RL_(Atm(mygrid)%pt(i,j,kr) * (Atm(mygrid)%delp(i,j,kr)/ &
      |                                                                                      1
Error: Expected a right parenthesis in expression at (1)
/ncrc/home1/Lauren.Chilutti/SHiELD_dev/SHiELD_SRC//GFDL_atmos_cubed_sphere/driver/SHiELDFULL/include/atmosphere.inc:147:105:

  147 |               wm(i,j) = wm(i,j) + _DBL_(_RL_(Atm(mygrid)%delp(i,j,k) * ( Atm(mygrid)%q(i,j,k,sphum)   +  &
      |                                                                                                         1
Error: Syntax error in expression at (1)
/ncrc/home1/Lauren.Chilutti/SHiELD_dev/SHiELD_SRC//GFDL_atmos_cubed_sphere/driver/SHiELDFULL/include/atmosphere.inc:86:86:

   86 |              tref(i,j) = _DBL_(_RL_(Atm(mygrid)%pt(i,j,kr) * (Atm(mygrid)%delp(i,j,kr)/ &
      |                                                                                      1
Error: Expected a right parenthesis in expression at (1)
/ncrc/home1/Lauren.Chilutti/SHiELD_dev/SHiELD_SRC//GFDL_atmos_cubed_sphere/driver/SHiELDFULL/include/atmosphere.inc:147:105:

  147 |               wm(i,j) = wm(i,j) + _DBL_(_RL_(Atm(mygrid)%delp(i,j,k) * ( Atm(mygrid)%q(i,j,k,sphum)   +  &
      |                                                                                                         1
Error: Syntax error in expression at (1)

To Reproduce
compile ./COMPILE shieldfull gnu

Expected behavior
successful build - executable found in the /bin directory

System Environment
Describe the system environment, include:
Gaea c5 with gcc-native/13.2

Additional context
If I allow everything to go on one really long line it compiles.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions