Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem compiling FORTRAN 90 code

Status
Not open for further replies.

ndawson33

Technical User
Jun 7, 2011
3
US
Hello,

I am working on a wrf model that uses FORTRAN 90. I have inserted a new code to compute temperatures at 30cm. When I compile I get the error:

Code:
PGF90-S-0186-Argument missing for formal argument kts(module_surface_driver.f90: 972)

Code:
PGF90-S-0186-Argument missing for formal argument kts(module_surface_driver.f90: 1113)

Here are the lines of code the error references to:

Code:
CALL SFCDIAGS(hfx,qfx,tsk,qsfc,chs2,chs30,cqs2,t2,t30,th2,q2, &
                     psfc,cp,r_d,rcp, &
                     ids,ide, jds,jde, kds,kde, &
                     ims,ime, jms,jme, kms,kme, &
             i_start(ij),i_end(ij), j_start(ij),j_end(ij), kts,kte )


Code:
CALL SFCDIAGS(HFX,QFX,TSK,QSFC,CHS2,CHS30,CQS2,T2,T30,TH2,Q2, &
                     PSFC,CP,R_d,RCP, &
                     ids,ide, jds,jde, kds,kde, &
                     ims,ime, jms,jme, kms,kme, &
             i_start(ij),i_end(ij), j_start(ij),j_end(ij), kts,kte )

I added the variables CHS30 and T30 to the subroutine SFCDIAGS and the subroutine SFCDIAGS correctly compiled. But I get the above errors when I try to compile with CHS30 and T30 in the two above lines of code in the surface driver module.

 
What does the definition of SFCDIAGS look like? Just the interface definition will do.
 
SFCDIAGS is a small subroutine that computes three variables. I added an equation to compute 30 centimeter temperatures and added two new parameters (t30 and chs30). SFCDIAGS gets called up from the surface driver to compute the variables as input for other subroutines in the surface_driver.f module.

I attached the SFCDIAGS subroutine as a .txt if you want a look at it. The SFCDIAGS module compiled correctly.
 
 http://www.mediafire.com/?cfoyyswvcr2aocc
Could it be that when you added the two new arguments to the subroutine, the line got longer than 72 characters? or does one of your compilation flags allow for line to extend all the way to 132 columns?
 
I figured out the problem. I was trying to edit the code in the .f90 files. I should have edited the .F files.
 
Well done you, it is always the simple ones that get us.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top