;+ ; NAME: ; vt3d_step_cn_nloc ; PURPOSE: (one line) ; step the temperature one time step ; DESCRIPTION: ; step the temperature one time step for multiple locations with ; local mass balance ; CATEGORY: ; Volatile Transport ; CALLING SEQUENCE: ; vt3d_step_cnl_nloc, alpha_i, beta_0, beta_i, gamma_0, gamma_J, temp_0, temp_i ; INPUTS: ; alpha_i: dependance of temp[1..J] on temp[0..J-1], unitless, float[J] ; beta_0: dependance of temp[0] on temp[1], unitless, float[n_loc] ; beta_i: dependance of temp[1..J] on temp[2..J+1], unitless, float[J] ; gamma_0: net flux at upper boundary, K, float, float[n_loc] ; gamma_J: net flux at lower boundary, K, float ; INPUT-OUTPUTS: ; temp_0 : temperature at layer 0, K, float[n_loc] ; temp_i : temperature at layer 1..J, K, float[n_loc,J] ; COMMON BLOCKS: ; None ; SIDE EFFECTS: ; RESTRICTIONS: ; nsurf = 0 or 1 ; PROCEDURE: ; ; MODIFICATION HISTORY: ; Written 2011 Feb 6, by Leslie Young, SwRI ;- pro vt3d_step_cn_nloc, alpha_i, beta_0, beta_i, gamma_0, gamma_J, temp_0, temp_i method = 'mat' if method eq 'loop' then begin n_loc = n_elements(beta_0) for i_loc = 0, n_loc-1 do begin temp_0l = temp_0[i_loc] temp_il = reform(temp_i[i_loc,*]) vt3d_step_cn_single, alpha_i, beta_0[i_loc], beta_i, gamma_0[i_loc], gamma_J, temp_0l, temp_il temp_0[i_loc] = temp_0l temp_i[i_loc,*] = temp_il endfor endif if method eq 'mat' then begin ; first get the right-hand side vt3d_step_expl_nloc, alpha_i/2., beta_0/2., beta_i/2., gamma_0, gamma_J, temp_0, temp_i ; then solve for the final temperature n_loc = n_elements(beta_0) vt3d_step_impl_nloc, alpha_i/2., beta_0/2., beta_i/2., replicate(0.,n_loc), 0., temp_0, temp_i endif end