Changeset 25448


Ignore:
Timestamp:
08/23/20 22:29:05 (5 years ago)
Author:
adhikari
Message:

CHG: more accurate definition of eustatic sea level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/contrib/adhikari/sphericalharmonic_slr_solver/SHslr.m

    r25369 r25448  
    9494        % Test whether mass is conserved (to ensure the solution is trustworthy!) {{{
    9595        % ocean-average sea level and eustatic value must be equal!
    96         avg_eustatic = -force_lm(1)/oce_lm(1); % see equation B16
    97         barystatic = sum(sealevel.*ocean)/nnz(ocean); % we can do this because of equal-area pixelization
    98         sol_diff = abs(abs(barystatic) - abs(avg_eustatic))/abs(barystatic)*100; % per cent
     96        barystatic = -force_lm(1)/oce_lm(1); % see equation B16
     97        gmsl = sum(sealevel.*ocean)/nnz(ocean); % we can do this because of equal-area pixelization
     98        sol_diff = abs(abs(gmsl) - abs(barystatic))/abs(gmsl)*100; % per cent
    9999        if (sol_diff > 1) % per cent.
    100100                error('Ocean-average (eustatic - sealevel) is NOT negligible. Returning.');
Note: See TracChangeset for help on using the changeset viewer.