@@ -918,7 +918,7 @@ def radiation_loop(self, quant, write, read, rt_plot):
918
918
quant .dev_F_add_heat_sum = gpuarray .to_gpu (quant .F_add_heat_sum )
919
919
920
920
# cp is required for temp. iteration, but only for physical timestepping
921
- if quant .physical_tstep != 0 :
921
+ if quant .physical_tstep != 0 and quant . input_kappa_value != "vertical_file" :
922
922
if quant .iter_value % 10 == 0 :
923
923
self .interpolate_kappa_and_cp (quant )
924
924
@@ -1000,7 +1000,17 @@ def convection_loop(self, quant, write, read, rt_plot):
1000
1000
quant .T_lay = quant .dev_T_lay .get ()
1001
1001
quant .p_lay = quant .dev_p_lay .get ()
1002
1002
quant .p_int = quant .dev_p_int .get ()
1003
- quant .kappa_lay = quant .dev_kappa_lay .get ()
1003
+ #quant.kappa_lay = quant.dev_kappa_lay.get()
1004
+
1005
+
1006
+ if quant .input_kappa_value == "vertical_file" :
1007
+ quant .dev_kappa_lay = gpuarray .to_gpu (quant .kappa_lay )
1008
+ quant .dev_c_p_lay = gpuarray .to_gpu (quant .c_p_lay )
1009
+
1010
+ else :
1011
+ quant .kappa_lay = quant .dev_kappa_lay .ge
1012
+
1013
+
1004
1014
if quant .iso == 0 :
1005
1015
quant .kappa_int = quant .dev_kappa_int .get ()
1006
1016
hsfunc .conv_check (quant )
@@ -1049,12 +1059,16 @@ def convection_loop(self, quant, write, read, rt_plot):
1049
1059
elif quant .opacity_mixing == "on-the-fly" :
1050
1060
hsfunc .calculate_vmr_for_all_species (quant )
1051
1061
hsfunc .calculate_meanmolecularmass (quant )
1052
-
1053
- self .interpolate_kappa_and_cp (quant )
1054
- quant .kappa_lay = quant .dev_kappa_lay .get ()
1055
- if quant .iso == 0 :
1062
+
1063
+ if quant .input_kappa_value != "vertical_file" : # no mesh-grid interpolation #shami added 2023
1064
+ self .interpolate_kappa_and_cp (quant )
1065
+ quant .kappa_lay = quant .dev_kappa_lay .get ()
1066
+ if quant .iso == 0 and quant .input_kappa_value != "vertical_file" :
1056
1067
quant .kappa_int = quant .dev_kappa_int .get ()
1057
- quant .c_p_lay = quant .dev_c_p_lay .get () # needed by convective adjustment
1068
+
1069
+ if quant .input_kappa_value != "vertical_file" :
1070
+ quant .c_p_lay = quant .dev_c_p_lay .get () # needed by convective adjustment
1071
+
1058
1072
quant .meanmolmass_lay = quant .dev_meanmolmass_lay .get ()
1059
1073
quant .T_lay = quant .dev_T_lay .get ()
1060
1074
quant .F_smooth_sum = quant .dev_F_smooth_sum .get ()
@@ -1096,8 +1110,13 @@ def convection_loop(self, quant, write, read, rt_plot):
1096
1110
quant .F_net_diff = quant .dev_F_net_diff .get ()
1097
1111
1098
1112
# required to mark convective zones
1099
- self .interpolate_kappa_and_cp (quant )
1100
- quant .kappa_lay = quant .dev_kappa_lay .get ()
1113
+ # required to mark convective zones
1114
+ if quant .input_kappa_value != "vertical_file" : # no mesh-grid interpolation #shami added 2023
1115
+ self .interpolate_kappa_and_cp (quant )
1116
+ quant .kappa_lay = quant .dev_kappa_lay .get ()
1117
+
1118
+ # self.interpolate_kappa_and_cp(quant)
1119
+ # quant.kappa_lay = quant.dev_kappa_lay.get()
1101
1120
if quant .iso == 0 :
1102
1121
quant .kappa_int = quant .dev_kappa_int .get ()
1103
1122
quant .T_lay = quant .dev_T_lay .get ()
0 commit comments