Changeset 25355


Ignore:
Timestamp:
08/06/20 17:17:11 (5 years ago)
Author:
adhikari
Message:

CHG: adding a switch that allows us to validate our solutions against the Spada benchmarks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/test/NightlyRun/test2084.m

    r25298 r25355  
    88md=model();
    99md.cluster=generic('name',oshostname(),'np',1);
     10
     11% set validation=1 for comparing against the Spada benchark.   
     12validation=0;
    1013
    1114md.materials=materials('litho');
     
    4548        };
    4649
     50% validate elastic loading solutions against the Spada benchmark. {{{
     51if validation
     52        spada_solutions = load('spada_elastic_loading_deg_h_l_k');
     53        spada_d = spada_solutions(:,1);
     54        spada_h = spada_solutions(:,2);
     55        spada_l = spada_solutions(:,3);
     56        spada_k = spada_solutions(:,4);
     57
     58        %rename ISSM solutions. 
     59        issm_d = [1:md.love.sh_nmax]; 
     60        issm_h = md.results.LoveSolution.LoveHr(2:end,1);
     61        issm_l = md.results.LoveSolution.LoveLr(2:end,1);
     62        issm_k = md.results.LoveSolution.LoveKr(2:end,1);
     63
     64        % relative difference for each degree, except for zero. 
     65        diff_h = 1 - issm_h./spada_h; 
     66        diff_l = 1 - issm_l./spada_l; 
     67        diff_k = 1 - issm_k./spada_k; 
     68
     69        figure
     70        plot(spada_d,[diff_h diff_l diff_k]); grid on;
     71        legend('h','l','k'); title('loading love');
     72
     73else
     74        %
     75end
     76% }}}
    4777
    4878md.love.frequencies=([1e-3 1e-2 1e-1 1 -1e-3 -1e-2 -1e-1 -1]*2*pi)'/cst;
     
    71101md.love.nfreq=length(md.love.frequencies);
    72102md=solve(md,'lv');
     103
     104% validate elastic tidal solutions against the Spada benchmark. {{{
     105if validation
     106        spada_solutions = load('spada_elastic_tidal_deg_h_l_k');
     107        spada_d = spada_solutions(:,1);
     108        spada_h = spada_solutions(:,2);
     109        spada_l = spada_solutions(:,3);
     110        spada_k = spada_solutions(:,4);
     111
     112        %rename ISSM solutions. 
     113        issm_d = [2:md.love.sh_nmax]; 
     114        issm_h = md.results.LoveSolution.LoveHr(3:end,1);
     115        issm_l = md.results.LoveSolution.LoveLr(3:end,1);
     116        issm_k = md.results.LoveSolution.LoveKr(3:end,1);
     117
     118        % relative difference for each degree, except for zero and one.
     119        diff_h = 1 - issm_h./spada_h; 
     120        diff_l = 1 - issm_l./spada_l; 
     121        diff_k = 1 - issm_k./spada_k; 
     122
     123        % k seems to have larger relative difference at higher degrees, although values approach zero.
     124        figure
     125        plot(spada_d,issm_k./spada_k);
     126
     127        figure
     128        plot(spada_d,[diff_h diff_l diff_k]); grid on;
     129        legend('h','l','k'); title('tidal love');
     130else
     131        %
     132end
     133% }}}
    73134
    74135%tidal love numbers
Note: See TracChangeset for help on using the changeset viewer.