CO2 data reading error

Hi,

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.

Hi Beiyao

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.

David

Hi David,

Thanks for the reply.

The namelist directory is

/home/users/byxu/grid_run

And the CO2 concentration is read from prescribed_data.nml

Thanks again.
Beiyao

Hi Beiyao

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.

David

Hi David,

Thanks for your advice.

MAXVAL(co2_tmp) = -3.4028235E+38
MINVAL(co2_tmp) = 3.4028235E+38
co2_tmp(1) = 4.7619557E-24

The value printed looked not right, and the max and min value of CO2 data should be 0.0006 and 0.0004 respectively.

Beiyao

Hi Beiyao

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

{MPI Task 7} [INFO] init_model_grid: Selected grid contains 0 land points

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.

David

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.