Fortran What is causing issues with WRF and Fortran compilation?

  • Thread starter Thread starter EternalLive
  • Start date Start date
  • Tags Tags
    Fortran
AI Thread Summary
The discussion revolves around compilation issues encountered while working with WRF (Weather Research and Forecasting) and Fortran. The user initially faced an error related to an illegal assignment operation involving an external procedure, which was later resolved. However, subsequent compilation attempts revealed multiple "kind mismatch" errors in the arguments passed to the subroutine `set_geo_vf`. The user is struggling to identify the cause of these mismatches, despite analyzing the subroutine and the variables involved. The errors indicate that the types of the arguments do not match the expected types in the subroutine definition. The user seeks assistance in resolving these compilation issues, emphasizing the urgency as it hampers their programming progress.
EternalLive
Messages
4
Reaction score
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
Is mw previously defined as a parameter?
 
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...)
 
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
 
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)

!
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Replies
2
Views
9K
Replies
9
Views
9K
Replies
1
Views
3K
Replies
3
Views
14K
Replies
25
Views
10K
Replies
3
Views
12K
Back
Top