Trying to change the spinup (u-cs854)

Hi, I am running a suite that is spun up from 1850-2014, but in 1974 they remove 99% of trees. I tried to do this by spinning up 1850-1973, and then spinning up 1974-2014 with the following initial_conditions.nml:

[namelist:jules_initial]
dump_file=.true.
file=‘$OUTPUT_FOLDER/jules_triffidC_JULES-ES-like_topT_irrF_spinup.dump.19731229.82800.nc’
l_broadcast_soilt=.false.
nvars=20
total_snow=.true.
tpl_name=‘’
const_val=0.00063 0.0 0.0015 0.0 0.00561 0.87806 0.0013 0.0009 0.0 0.0 0.0 0.022 0.09 0.0 0.0 0. 0.0
use_file=.false.,19*.true.
var=‘frac’,‘rgrain’,‘canopy’,‘snow_tile’,‘sthuf’,‘t_soil’,‘lai’,
=‘tstar_tile’,‘cs’,‘gs’,‘zw’,‘canht’,‘sthzw’,‘sthu_irr’,
=‘n_inorg’,‘ns’,‘substr_ch4’,‘mic_ch4’,‘mic_act_ch4’,
=‘acclim_ch4’
var_name=20*‘’

(This is for 13 PFTs where the frac in the dump file is
0.0619 0.0 0.1499 0.0 0.5512 0.1942 0.0003 0.0002 0. 0. 0. 0.0048 0.0019 0.0 0.0 0. 0.0
All I did is multiply the tree fracs by 0.01 and scaled the others up as necessary. If there is a way to automate this that would be amazing!)

However I get this error term:
[FATAL ERROR] init_ic: Land ice points and soil points are mutually exclusive
Rank 0 [Tue Mar 28 13:40:13 2023] [c3-0c0s14n1] application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
[FAIL] $RUN_JULES # return-code=134

And this is the end of the job.out file:
[INFO] file_ncdf_open: Opening file /home/d03/ahussain/roses/u-cs854/output_data/jules_triffidC_JULES-ES-like_topT_irrF_spinup.dump.19731229.82800.nc for reading
[INFO] file_ncdf_close: Closing file /home/d03/ahussain/roses/u-cs854/output_data/jules_triffidC_JULES-ES-like_topT_irrF_spinup.dump.19731229.82800.nc
[INFO] init_ic: Number of soil points = 1

Could anyone please help me? Either with a better way to achieve what I want (remove 99% of trees in 1974) or fixing the ice points/soil points error?

Thank you!

Ayesha

PS. If I change the const_val to const_val=0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,1,0 (ie just soil) then the model runs, but obviously with everything staying as bare soil.

Hi Ayesha
Do you need commas between the 17 numbers? Your bare soil const_val has commas but your 99% deforested doesn’t.
Patrick

Hi again Ayesha:
Also, you have use_file with 19 true’s. Most or all of them should false’s.
Patrick

Oh sorry, it didn’t seem to affect the run whether there were commas or not. But I have commas in it now.
Also, I put use_file so it uses the dump file, do I not need to do that? How does the model know to use the dump file for everything but the frac?

Thanks,

Ayesha

Hi Ayesha
I think there is a problem with dimensionality. The const_val variable refers to all the variables listed in the var list of strings. Those variable values need to be given for all the strings, I think, even if you are getting them from the file. The frac variable has 13 values, and then the other 19 values have to be defined. Maybe you can define the others as 0, with use_file = true. But that gives 32 values, maybe, if the spinup was done starting with these var names.
You might look at the fortran code to see how it reads in initial values for multidimensional variables like frac.
Patrick

Thank you! Do you know where I find the fortran code for frac by any chance? I’m looking in src/ but can’t find it.

Also, I tried adding more const_val’s but I got the same error code:
[namelist:jules_initial]
dump_file=.true.
file=‘$OUTPUT_FOLDER/jules_triffidC_JULES-ES-like_topT_irrF_spinup.dump.19731229.82800.nc’
const_val=0.00063,0.0,0.0015,0.0,0.00561,0.87806,0.0013,0.0009,0.0,0.0,0.0,0.022,0.09,0.0,0.0,0,0.0,
=0,0,0,0,0,
=0,0,0,0,0,
=0,0,0,0,0,
=0,0,0,0,0,
=0,0,0,0,0,
=0,0,0
nvars=29
use_file=.false.,28*.true.
var =‘frac’,
=‘acclim_ch4’,‘canht’,‘canopy’,‘cs’,‘gs’,
=‘lai’,‘mic_act_ch4’,‘mic_ch4’,‘n_inorg’,‘ns’,
=‘nsnow’,‘rgrain’,‘rgrainl’,‘rho_snow’,‘snow_ds’,
=‘snow_depth’,‘snow_grnd’,‘snow_ice’,‘snow_liq’,‘snow_tile’,
=‘sthuf’,‘sthu_irr’,‘sthzw’,‘substr_ch4’,‘t_soil’,
=‘tsnow’,‘tstar_tile’,‘zw’
var_name=29*‘’

[FATAL ERROR] init_ic: Land ice points and soil points are mutually exclusive
Rank 0 [Fri Mar 31 14:24:19 2023] [c3-0c0s14n1] application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
[FAIL] $RUN_JULES # return-code=134

Hi Ayesha
Your error message says that it fails in the ‘init_ic’ code. So if you want to find that code, you can do this at the linux prompt:
grep -ir ‘init_ic’ *

Or something like that.
The code for reading in the const_val initial conditions is somewhere before the failure point.
The error message might also give a line number and filename for the failure point.
Patrick

Hi Patrick,

Thank you! I just checked job.out to try finding the line number and saw this:
[INFO] init_ic: ‘frac’ will be set to a constant = 6.000000285E-4
(I tried this with commas in the const_val and not, and both gave the same thing).

So I did what you recommended earlier, and changed the initial_conditions.nml file to this:
[namelist:jules_initial]
dump_file=.true.
file=‘$OUTPUT_FOLDER/jules_triffidC_JULES-ES-like_topT_irrF_spinup.dump.19731229.82800.nc’
const_val=0.0006,0.0,0.0015,0.0,0.0056,0.8781,0.0013,0.0,0.0,0.0,0.0,0.022,0.09,0.0,0.0,0.0009,0.0
nvars=29
use_file=28*.true.17*.false.
var =‘acclim_ch4’,‘canht’,‘canopy’,‘cs’,‘gs’,
=‘lai’,‘mic_act_ch4’,‘mic_ch4’,‘n_inorg’,‘ns’,
=‘nsnow’,‘rgrain’,‘rgrainl’,‘rho_snow’,‘snow_ds’,
=‘snow_depth’,‘snow_grnd’,‘snow_ice’,‘snow_liq’,‘snow_tile’,
=‘sthuf’,‘sthu_irr’,‘sthzw’,‘substr_ch4’,‘t_soil’,
=‘tsnow’,‘tstar_tile’,‘zw’,
=‘frac’
var_name=29*‘’

And it seems to work! Thank you so much again.

Ayesha

Hi Ayesha:
I am glad that it seems to work now! Congrats!
Please do let me know if you notice any other problems.
Patrick

Hi Patrick,

Thank you so much for your help!

I managed to use ncap2 to alter the PFT fractions for me, but I don’t know how to schedule it in cylc. Currently I run the spinup 1850-1973. Then I pause the run while I type this:

cd $HOME/roses/u-cs854/output_data
module load nco
cp jules_triffidC_JULES-ES-like_topT_irrF_spinup.dump.19731229.82800.nc tmp.nc
ncap2 -O -s “fracnew=frac” tmp.nc tmp1.nc
mv tmp1.nc tmp.nc
ncap2 -O -s “fracnew(0:4,:)=frac(0:4,:)*0.01” tmp.nc tmp1.nc
mv tmp1.nc tmp.nc
ncap2 -s “fracnew(15,:)=1.0-fracnew(0,:)-fracnew(1,:)-fracnew(2,:)-fracnew(3,:)-fracnew(4,:)-fracnew(5,:)-fracnew(6,:)-fracnew(7,:)-fracnew(8,:)-fracnew(9,:)-fracnew(10,:)-fracnew(11,:)-fracnew(12,:)-fracnew(13,:)-fracnew(14,:)” tmp.nc tmp1.nc
mv tmp1.nc tmp.nc
ncks -x -v frac tmp.nc tmp1.nc
mv tmp1.nc tmp.nc
ncrename -v fracnew,frac tmp.nc
mv tmp.nc jules_triffidC_JULES-ES-like_topT_irrF_spinup.1974_frac_change.nc

and then I trigger the 1974 spinup to start. Do you know if I can schedule this in cylc so this happens automatically? No worries if not!

Thanks,

Ayesha

Hi Ayesha:
You should be able to add an app that calls that script to the rose/cylc suite. Have you studied this tutorial already? Workflow Management with rose/cylc - JASMIN help docs
Patrick

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