Compilation Error Solved Manually provokes a Runtime Error

Posts related to the installation of WRF Chemistry

Compilation Error Solved Manually provokes a Runtime Error

Postby rafapedro » Tue Oct 27, 2009 1:57 pm

Hello, I am e new user of WRF-Chem 3.1.1. I have never used any version of WRF before.
I was not able to compile WRFChem and made small changes in 2 *.F files. The, compilation was succesfull, but I ended up with a Runtime error when executing wrf.exe for the Exercise_1 test case. Here I highlight what I have done:

1) I have compiled WRF/Chem on Ubuntu 9.04 (64 bits) with gfortran using options 12 (sm and gfortran) and 1 for basic nesting. I am using WRFChem Version 3.1.1, with KPP.
2) I have installed sed, flex and byacc.
3) The first time I've got some errors, on the compilation of module_isrpia.F, especifically in the declaration statement of the variable ERRMSGI. I found the solution on wrfforum (viewtopic.php?f=5&t=1132), and I changed the file as suggested (in the declaration of variables):
! CHARACTER ERRMSGI*40(NERRMX)
CHARACTER(len=40), DIMENSION(NERRMX) :: ERRMSGI
4) As stated in the forum help, after solving the problem with isripia, a second problem arises in module_phot_fastj.F. There is a compilation error in line 740. I think that the problem is that gfortran does not recognize the internal cosine function in degrees (cosd(sza)). Then, I changed the file to convert the sza in degrees to radians:
! cos_sza = cosd(sza)
pi_fastj=3.141592653589793D0 ! declared as real*8 (copied from another routine in file)
pi180=pi_fastj/180.d0 ! declared as real*8 (copied from another routine in file)
sza_rad=sza*pi180 ! declared as real
cos_sza = cos(sza_rad)
In this way, I was able to compile and generate the ndown, real and wrf.exe. And also the convert_emiss.exe. Are those changes I performed correct?

5) the problem is that after compiling wrfchem with all those changes, I tried to go on exercise_1 of the tutorial (using NEI05 data). Everything worked fine until I run the wrf.exe file. The errors I obteined are related to a negative actinic flux, so I think the way I solved the cosd(sza) sentence is not working properly:

sentey@sentey-desktop:~/Modelos/WRF/WRFV3_Chem_KPP/test/em_real$ ./wrf.exe
Namelist dfi_control not found in namelist.input. Using registry defaults for variables in dfi_control
Namelist tc not found in namelist.input. Using registry defaults for variables in tc
Namelist scm not found in namelist.input. Using registry defaults for variables in scm
Namelist fire not found in namelist.input. Using registry defaults for variables in fire
WRF V3.1.1 MODEL
*************************************
Parent domain
ids,ide,jds,jde 1 40 1 40
ims,ime,jms,jme -4 45 -4 45
ips,ipe,jps,jpe 1 40 1 40
*************************************
DYNAMICS OPTION: Eulerian Mass Coordinate
alloc_space_field: domain 1 , 184601012 bytes allocated
med_initialdata_input: calling input_model_input
INPUT LandUse = "USGS"
LANDUSE TYPE = "USGS" FOUND 33 CATEGORIES 2 SEASONS WATER CATEGORY = 16 SNOW CATEGORY = 24
INITIALIZE THREE Noah LSM RELATED TABLES
LANDUSE TYPE = USGS FOUND 27 CATEGORIES
INPUT SOIL TEXTURE CLASSIFICAION = STAS
SOIL TEXTURE CLASSIFICATION = STAS FOUND 19 CATEGORIES
*********************************************************************
* PROGRAM: WRF/CHEM VERSION 3.1.1 *
* *
* PLEASE REPORT ANY BUGS TO WRF/CHEM HELP at *
* *
* wrfchemhelp.gsd@noaa.gov *
* *
*********************************************************************
Timing for Writing wrfout_d01_2008-07-14_12:00:00 for domain 1: 0.36900 elapsed seconds.
mediation_integrate: med_read_wrf_chem_emissions: Open file wrfchemi_12z_d01
HOURLY EMISSIONS UPDATE TIME 0.0 0.0
mediation_integrate: med_read_wrf_chem_emissions: Read emissions for time 2008-07-14_12:00:00
**WARNING** Time in input file not being checked **WARNING**
Timing for processing lateral boundary for domain 1: 0.01400 elapsed seconds.
WRF NUMBER OF TILES FROM OMP_GET_MAX_THREADS = 4
WRF NUMBER OF TILES = 4
FASTJ neg actinic flux k j FFF(K,J) 7 8 -0.366913E+15
FASTJ neg actinic flux k j FFF(K,J) 7 9 -0.802436E+15
FASTJ neg actinic flux k j FFF(K,J) 7 10 -0.121193E+16
FASTJ neg actinic flux k j FFF(K,J) 7 11 -0.156112E+16
FASTJ neg actinic flux k j FFF(K,J) 7 12 -0.184140E+16
FASTJ neg actinic flux k j FFF(K,J) 7 13 -0.208862E+16
FASTJ neg actinic flux k j FFF(K,J) 7 14 -0.230272E+16
FASTJ neg actinic flux k j FFF(K,J) 7 15 -0.248310E+16
FASTJ neg actinic flux k j FFF(K,J) 7 16 -0.263097E+16
FASTJ neg actinic flux k j FFF(K,J) 7 17 -0.274819E+16
FASTJ neg actinic flux k j FFF(K,J) 7 18 -0.283650E+16
FASTJ neg actinic flux k j FFF(K,J) 7 19 -0.289751E+16
FASTJ neg actinic flux k j FFF(K,J) 7 20 -0.293288E+16
FASTJ neg actinic flux k j FFF(K,J) 7 21 -0.294434E+16
FASTJ neg actinic flux k j FFF(K,J) 7 22 -0.293355E+16
FASTJ neg actinic flux k j FFF(K,J) 7 23 -0.290197E+16
FASTJ neg actinic flux k j FFF(K,J) 7 24 -0.285078E+16
FASTJ neg actinic flux k j FFF(K,J) 7 25 -0.278086E+16
FASTJ neg actinic flux k j FFF(K,J) 7 26 -0.269274E+16
FASTJ neg actinic flux k j FFF(K,J) 7 27 -0.258630E+16
FASTJ neg actinic flux k j FFF(K,J) 7 28 -0.246085E+16
FASTJ neg actinic flux k j FFF(K,J) 7 29 -0.231522E+16
FASTJ neg actinic flux k j FFF(K,J) 7 30 -0.214737E+16
FASTJ neg actinic flux k j FFF(K,J) 7 31 -0.195430E+16
FASTJ neg actinic flux k j FFF(K,J) 7 32 -0.173248E+16
FASTJ neg actinic flux k j FFF(K,J) 7 33 -0.147860E+16
FASTJ neg actinic flux k j FFF(K,J) 7 34 -0.119050E+16
FASTJ neg actinic flux k j FFF(K,J) 7 35 -0.868832E+15
FASTJ neg actinic flux k j FFF(K,J) 7 36 -0.519635E+15
FASTJ neg actinic flux k j FFF(K,J) 7 37 -0.158227E+15
At line 482 of file module_phot_fastj.f90
Fortran runtime error: End of record
sentey@sentey-desktop:~/Modelos/WRF/WRFV3_Chem_KPP/test/em_real$


Can someone give me some help on how to solve this problem??
Thank you very much!!!

rafa
rafapedro
 
Posts: 2
Joined: Fri Oct 09, 2009 3:37 pm

Re: Compilation Error Solved Manually provokes a Runtime Err

Postby amt1204 » Tue Feb 21, 2017 3:49 pm

It may not help your runtime error, and you may have already figured it out, but you shouldn't use shared memory to run WRF-Chem. OpenMP is a shared memory resource, and WRF-Chem uses a lot of memory. It also says in the User guide not to use the shared memory option.
amt1204
 
Posts: 9
Joined: Mon Dec 22, 2014 9:57 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 1 guest