I am running JULES using historical CO2 concentration, however, it keeps showing the same error when I try to use yearly CO2 concentration data instead of constant:
[FATAL ERROR] populate_var: All land points must have same CO2 concetration
I have checked the CO2 data file for several times, it has the same value for the entire running grid.
The directory of the data is:
/gws/nopw/j04/mohc_shared/isimip-jules/isimip3b/jules_ancils/co2/historical/isimip3b_co2_historical_1850_2014.nc
The code in JULES is:
CASE ( ‘co2_mmr’ )
IF ( PRESENT(cube) ) THEN
cube_land = map_to_land(cube)
CALL cube_get_data(cube_land, co2_tmp)
IF ((MAXVAL(co2_tmp) /= co2_tmp(1)) .OR. &
(MINVAL(co2_tmp) /= co2_tmp(1))) THEN
CALL log_fatal("populate_var", &
"All land points must have same CO2 concetration")
END IF
co2_mmr = co2_tmp(1)
ELSE
co2_mmr = const_val
END IF
I appreciate it if anyone could give me some advice.
I’ve checked the netCDF file, and co2_mmr is indeed spatially constant at all times. This suggests that either JULES is reading the wrong file or it’s reading the file wrong. I suggest double checking the suite to make sure that co2_mmr is specified correctly. If you point me towards the suite, I can check it too.
I’ve had a look at your suite and some relevant parts of the code and it’s still a mystery to me why things are going wrong.
I think the time has come to gather more information by adding some jules_print statements to populate_var.inc. If you’ve never done this before, you can see several examples in src/initialisation/standalone/initial_conditions/calc_fit_fsat.inc. I suggest adding statements to print out MAXVAL(co2_tmp), MINVAL(co2_tmp), and co2_tmp(1) immediately before the log_fatal statement.
Or you could try running JULES under a debugger and getting it to stop immediately before the log_fatal statement so that you can examine co2_tmp, but I’ve never used a debugger under MPI on JASMIN, so can’t advise.
I think I understand what is going on. The large negative MAXVAL and the large positive MINVAL are a sign that the array co2_tmp is empty. This is a land-point array and contains different points for each of the MPI tasks. In your case one of the tasks has no land points, as can be seen from your log file jules.41039014.log, which contains the line
This is consistent with your land-sea mask file /home/users/byxu/data/jules_ancils/mask_latlon2d.nc, which contains no land south of 60degS.
JULES shouldn’t crash like this in these circumstances, and I’ll report it as a bug.
Meanwhile you can work around the problem by changing the number of MPI tasks and thus changing the way JULES decomposes the global grid. Based on a quick look at the function decompose_domain in module parallel_mod, I believe that if you reduce the number of tasks to 7, JULES will use 7 N-S strips instead of 8 E-W bands and thus every task should get some land points. Let me know if you need advice on how to set the number of MPI tasks.