Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Error compiling WRF after modifying module_sf_sfclay.F and associated files

stormsteiner23

New member
I am attempting to modify the way that the model calculates the upward heat flux and the latent heat flux in module_sf_sfclay.F (in WRF4.0). I wanted to modify the code so that the model would calculate the initial values of HFX and LH and keep them constant throughout the duration of the run instead of updating them. I do this by introducing new variables, HFX_constant, QFX_constant, and LH_constant as well as two logical variables that exit the loop if its not the first time step. However, after updating Registry.EM_COMMON and recompiling, the recompiling process does not execute properly and does not produce .exe files. I have read through the error lines in the compile log but I cannot figure out how to fix this issue.

Am I modifying the code wrong? Attached is the log.compile file and modified code file.
 

Attachments

  • module_sf_sfclay (1).F
    50.6 KB · Views: 6
  • log.compile.txt
    793.6 KB · Views: 3
It looks like you did not define the type for QFX_constant in SFCLAY1D where the type is then REAL, DIMENSION( ims:ime ), INTENT(INOUT)
 
It looks like you did not define the type for QFX_constant in SFCLAY1D where the type is then REAL, DIMENSION( ims:ime ), INTENT(INOUT)
I ended up doing this and I was still getting some errors, specifically around lines 914 and 915, where I have a logical variable set to .false. after ending the loop. For some reason, the error I am getting in the log file at this line is "Error: unclassifiable statement at (1)". As I am relatively new to Fortran, I'm not sure what exactly this means because I had defined the logical variable at the beginning of the file so that it was global in scope but this does not appear to have worked?
 
It appears that I have fixed my problem. I was unaware of how to define variables used only within a function (sfclay1d) and was using an implicit type that didn't make sense
 
Actually, scratch that. I appear to have a "points exceeding CFL=2 condition" in my log files after running wrf.exe and I can't figure out why. Even after lowering the time_step value. I have not had this issue with running the model with the specific domains and conditions prior to modifying the module_sf_sfclay.F file so I am not sure what I did wrong
 
Top