From 1c791b14b03c57a1925e5ddeddf7f7b9ab0c9636 Mon Sep 17 00:00:00 2001
From: Olivier Sauter <olivier.sauter@epfl.ch>
Date: Thu, 14 Jun 2018 07:27:31 +0000
Subject: [PATCH] add b0

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@10169 d63d8f72-b253-0410-a779-e742ad2e26cf
---
 crpptbx/get_grids_1d.m | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/crpptbx/get_grids_1d.m b/crpptbx/get_grids_1d.m
index a3ba6b05..c39c59f1 100644
--- a/crpptbx/get_grids_1d.m
+++ b/crpptbx/get_grids_1d.m
@@ -10,7 +10,7 @@ function [gdat_data] = get_grids_1d(gdat_data,nbdim_x,nopt,nverbose);
 % nopt = 0: do not fill in, just make the empty structure
 %      = 1: do compute various fields
 %
-% compute psi, rhotor_edge, rhotornorm, volume_edge and rhovol
+% compute psi, rhotor_edge, rhotornorm, volume_edge and rhovol and b0 used for rhotor
 %
 % use gdat calls to psi_axis, psi_edge, rhotor, etc with same basic parameters as data.gdat_params
 %
@@ -22,6 +22,7 @@ if (nopt == 0) || isempty(gdat_data.x) || isempty(gdat_data.t) || isempty(gdat_d
   gdat_data.grids_1d.psi = [];
   gdat_data.grids_1d.rhotor_edge = [];
   gdat_data.grids_1d.volume_edge = [];
+  gdat_data.grids_1d.b0 = [];
   return
 end
 
@@ -102,5 +103,6 @@ for it=1:length(gdat_data.t)
 end
 gdat_data.grids_1d.rhotor_edge=interpos(-63,rhotor_norm.t',rhotor_norm.rhotor_edge,gdat_data.t',-0.01);
 gdat_data.grids_1d.volume_edge=interpos(-63,rhovol.t',rhovol.volume_edge,gdat_data.t',-0.01);
+gdat_data.grids_1d.b0=interpos(-63,rhotor_norm.t',rhotor_norm.b0,gdat_data.t',-0.01);
 
 
-- 
GitLab