What is causing issues with WRF and Fortran compilation?

  • Fortran
  • Thread starter EternalLive
  • Start date
  • Tags
    Fortran
In summary, the conversation discusses problems with WRF and Fortran in compiling a software. The result shows an illegal assignment operation to an external procedure. The conversation then delves into specific errors and mismatched arguments in the code, with the poster seeking help to resolve the issue.
  • #1
EternalLive
4
0
Dear all,

I am having some problems with WRF and Fortran. When I compile a software I got the following result:

PGF90-S-0072-Assignment operation illegal to external procedure vfnsew.



real (8) mm_vfnsew(mw,mw)
real (8) vfnsew, vf_n_s, vf_e_w, vfns_f, vfns_s, vff_ns, vfew_f, vfew_s, vff_ew

vfnsew(i,j) = mm_vfnsew(i,j)

How could I fix this problem?


EternalLive
 
Technology news on Phys.org
  • #2
Is mw previously defined as a parameter?
 
  • #3
Hi, minger

I had shown part of the software, but fortunately, I solved it. I am now facing other problems, for which I will post later...let me finish my compiling now (I am walking in circles with nobody whom to exchange opinions...)
 
  • #4
Hi minger,

Okay, after several attempts, I will show my problem. My compile.log shows the following error messages:

../external/esmf_time_f90 -I../external -I../frame -I../share -I../phys -I../inc -I../chem -r4 -i4 module_sf_urban.f90
-I../inc -I../chem -r4 -i4 module_SSSSS.f90
PGF90-S-0450-Argument number 1 to set_geo_vf: kind mismatch (module_SSSSS.f90: 5998)
PGF90-S-0450-Argument number 2 to set_geo_vf: kind mismatch (module_SSSSS.f90: 5998)
PGF90-S-0450-Argument number 3 to set_geo_vf: kind mismatch (module_SSSSS.f90: 5998)
PGF90-S-0450-Argument number 4 to set_geo_vf: kind mismatch (module_SSSSS.f90: 5998)
PGF90-S-0450-Argument number 5 to set_geo_vf: kind mismatch (module_SSSSS.f90: 5998)
PGF90-S-0450-Argument number 6 to set_geo_vf: kind mismatch (module_SSSSS.f90: 5998)
PGF90-S-0450-Argument number 7 to set_geo_vf: kind mismatch (module_sf_urban.f90: 5998)
PGF90-S-0450-Argument number 8 to set_geo_vf: kind mismatch (module_SSSSS.f90: 5998)
PGF90-S-0450-Argument number 9 to set_geo_vf: kind mismatch (module_SSSSSn.f90: 5998)
PGF90-S-0450-Argument number 10 to set_geo_vf: kind mismatch (module_SSSSS.f90: 5998)
PGF90-S-0450-Argument number 11 to set_geo_vf: kind mismatch (module_SSSSS.f90: 5998)
PGF90-S-0450-Argument number 12 to set_geo_vf: kind mismatch (module_SSSSS.f90: 5998)
0 inform, 0 warnings, 12 severes, 0 fatal for "XXXXX"

call set_geo_vf (m_pindex, m_findex,vfnsew,vf_n_s,vf_e_w,vfns_f, &
vfns_s, vff_ns, vfew_f,vfew_s, vff_ew, vf_f_s)

subroutine set_geo_vf (mm_pindex, mm_findex, vfnsew, vf_n_s, vf_e_w, vfns_f, vfns_s, vff_ns, &
vfew_f, vfew_s, vff_ew, vf_f_s)Dear minger, do you have any hint? It is hampering my program at this moment...

Thanks in advance
 
  • #5
Okay, can someone give me a hint?

I have the following problem: my compile.report shows problems from arguments numbers 3 to 11, of kind mismatch, e.g.

PGF90-S-0450-Argument number 9 to set_geo_vf: kind mismatch (module_sf_noahlsm.f90: 5680)

However, by analizing the subroutine and the variables, the problematic variables are depicted. So, what is hampering the compilation? I cannot understand, because I tried several changes without any result so far...


subroutine summ_ini (ims,ime,jms,jme, PINDEX_SUMM, FINDEX_SUMM, VFNSEW_SUMM, VF_N_S_SUMM, VF_E_W_SUMM, VFNS_F_SUMM, VFNS_S_SUMM, VFF_NS_SUMM, VFEW_F_SUMM, VFEW_S_SUMM, VFF_EW_SUMM, VF_F_S_SUMM, TIN_SUMM, T_VEG_SUMM, T_VEG_SUMM1, TTS_F_SUMM, TTS_N_SUMM, TTS_S_SUMM, TTS_E_SUMM, TTS_W_SUMM, TTS_R_SUMM)

implicit none

real (8) ::m_pindex, m_findex
real (8) m_vf_f_s
! real, dimension(1:mw,1:mw),intent (inout) :: m_vfnsew
real, dimension(1:mw,1:mw) :: m_vfnsew
! real :: m_vfnsew (1:mw, 1:mw)
! real (8) :: m_vfnsew
real, dimension(1:mw,1:mw) :: m_vf_n_s
real, dimension(1:mw,1:mw) :: m_vf_e_w
real, dimension(1:mw) :: m_vfns_f
real, dimension(1:mw) :: m_vfns_s
real, dimension(1:mw) :: m_vff_ns
real, dimension(1:mw) :: m_vfew_f
real, dimension(1:mw) :: m_vfew_s
real, dimension(1:mw) :: m_vff_ew

!
INTEGER, INTENT(IN) :: ims,ime,jms,jme
INTEGER I,J,K

!-------------------------------------------------
! summ related variables are added to declaration
!-------------------------------------------------
! input variables surface_driver --> lsm
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: PINDEX_SUMM
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: FINDEX_SUMM
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: VF_F_S_SUMM
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: VFNSEW_SUMM
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: VF_N_S_SUMM
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: VF_E_W_SUMM
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: VFNS_F_SUMM
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: VFNS_S_SUMM
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: VFF_NS_SUMM
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: VFEW_F_SUMM
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: VFEW_S_SUMM
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: VFF_EW_SUMM


! state variable surface_driver <--> lsm <--> summ

REAL, DIMENSION( ims:ime,jms:jme ),INTENT(INOUT):: TIN_SUMM
REAL, DIMENSION( ims:ime,jms:jme ),INTENT(INOUT):: T_VEG_SUMM
REAL, DIMENSION( ims:ime,jms:jme ),INTENT(INOUT):: T_VEG_SUMM1

REAL, DIMENSION(ims:ime, 1:kdiv+1, jms:jme),INTENT(INOUT):: TTS_F_SUMM
REAL, DIMENSION(ims:ime, 1:idiv+1, jms:jme),INTENT(INOUT):: TTS_N_SUMM
REAL, DIMENSION(ims:ime, 1:idiv+1, jms:jme),INTENT(INOUT):: TTS_S_SUMM
REAL, DIMENSION(ims:ime, 1:idiv+1, jms:jme),INTENT(INOUT):: TTS_E_SUMM
REAL, DIMENSION(ims:ime, 1:idiv+1, jms:jme),INTENT(INOUT):: TTS_W_SUMM
REAL, DIMENSION(ims:ime, 1:idiv+1, jms:jme),INTENT(INOUT):: TTS_R_SUMM
!
!
! *** view factors ***
DO I=ims,ime
DO J=jms,jme

VFNSEW_SUMM(I,J) = 0.0
VF_N_S_SUMM(I,J) = 0.0
VF_E_W_SUMM(I,J) = 0.0
VFNS_F_SUMM(I,J) = 0.0
VFNS_S_SUMM(I,J) = 0.0
VFF_NS_SUMM(I,J) = 0.0
VFEW_F_SUMM(I,J) = 0.0
VFEW_S_SUMM(I,J) = 0.0
VFF_EW_SUMM(I,J) = 0.0
VF_F_S_SUMM(I,J) = 0.0

IF (PINDEX_SUMM(I,J) > 0.146) THEN

m_pindex = PINDEX_SUMM(I,J)
m_findex = FINDEX_SUMM(I,J)
!

call set_geo_vf (m_pindex, m_findex, m_vfnsew, m_vf_n_s, m_vf_e_w, m_vfns_f, &
m_vfns_s, m_vff_ns, m_vfew_f, m_vfew_s, m_vff_ew, m_vf_f_s)

!
 

What is WRF and how is it used in scientific research?

WRF stands for Weather Research and Forecasting model, which is a numerical weather prediction system used by scientists to simulate and predict atmospheric conditions. It is widely used in various fields of research, including meteorology, air quality, and climate studies.

What are some common problems encountered when using WRF?

Some common problems with WRF include issues with data assimilation, model initialization, and parameterization schemes. Other problems may arise from errors in the input data or improper configuration of the model.

Why is Fortran the preferred language for WRF?

Fortran is a high-level programming language that is well-suited for scientific and numerical computing. It allows for efficient handling of large data sets and complex mathematical operations, making it the preferred language for WRF and other weather and climate models.

How can I troubleshoot errors in my WRF simulations?

If you encounter errors or unexpected results in your WRF simulations, it is important to carefully review and validate your input data and configuration settings. It may also be helpful to consult the WRF community forums or seek assistance from experienced users.

Are there any resources available for learning more about WRF and Fortran?

Yes, there are numerous online resources available for learning about WRF and Fortran, including official documentation, tutorials, and user forums. There are also workshops and training courses offered by organizations such as the National Center for Atmospheric Research (NCAR) and the WRF Users' Workshops.

Similar threads

  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
17
Views
6K
  • Programming and Computer Science
Replies
2
Views
8K
  • Programming and Computer Science
Replies
1
Views
2K
  • Programming and Computer Science
Replies
9
Views
9K
  • Programming and Computer Science
Replies
4
Views
3K
  • Programming and Computer Science
Replies
25
Views
10K
  • Programming and Computer Science
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
0
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
Back
Top