Opened 6 years ago

Closed 3 years ago

#553 closed task (fixed)

bug-fix: factor should be 1/2 instead of 1/e at top level [infinite until adjoint available]

Reported by: Ian Culverwell Owned by: Ian Culverwell
Priority: normal Milestone: ROPP9.1 carry over
Component: ropp_fm Version: 11.0
Keywords: Cc:

Description

Attachments (2)

fm_pk.png (44.3 KB ) - added by Ian Culverwell 3 years ago.
fm_pk.png
ad_pk2.png (66.5 KB ) - added by Ian Culverwell 3 years ago.
ad_pk2.png

Download all attachments as: .zip

Change history (8)

comment:1 by Ian Culverwell, 6 years ago

Component: ROPP(all)ropp_fm
Summary: bug-fix: factor should be 1/2 instead of 1/e at top level [infinite without adjoint]bug-fix: factor should be 1/2 instead of 1/e at top level [infinite until adjoint available]

comment:2 by Ian Culverwell, 3 years ago

FM Replace

  x%pres(n_flv) = EXP(-1.0_wp) * ( p_hlv(n_hlv-1) - p_hlv(n_hlv) )

by

   x%pres(n_flv) = 0.5_wp * ( p_hlv(n_hlv-1) - p_hlv(n_hlv) )

in ropp_fm_state2state_ecmwf.f90.

As foreshadowed in https://trac.romsaf.org/ropp/ticket/552#comment:6, this changes

 Old FM: x%pres =    101269.99138593674        101209.97415781021        101149.95692968369        101089.93970155716        101015.13269403949        100925.53590713069        100835.93912031502        100746.33931443095        100636.05050034821        100505.07871657610        100374.10995066166        100243.13816726208        100086.72280311584        99904.866874217987        99723.010945320129        99541.155016422272        99330.173054337502        99090.065070986748        98849.957075715065        98609.849080443382        98337.932267785072        98034.203594923019        97730.471903085709        97426.743230223656        97089.455959200859        96718.604052066803        96347.749125957489        95976.894199848175        95571.585571765900        95131.823194026947        94692.060768604279        94252.298343181610        93777.984189987183        93269.115290045738        92760.243371129036        92251.374471187592        91708.574330806732        91131.836912035942        90555.096569657326        89978.359341621399        89368.963479995728        88726.902946829796        88084.839203953743        87442.778480052948        86769.911894202232        86066.236236691475        85362.563598155975        84658.890959620476        83926.773789525032        83166.212278604507        82405.647939443588        81645.086619257927        80858.889570832253        80047.053775191307        79235.217979550362        78423.382565379143        77589.089038968086        76732.337400317192        75875.585761666298        75018.833741545677        74143.101927638054        73248.393338918686        72353.684750199318        71458.973142504692        70548.995131254196        69623.750716447830        68698.506301641464        67773.258867859840        66836.615023016930        65888.577786087990        64940.540549159050        63992.502549290657        63037.033995985985        62074.137161672115        61111.241836845875        60148.345002532005        59182.002758979797        58212.214343249798        57242.423655092716        56272.634476423264        55303.340944647789        54334.543059766293        53365.746684372425        52396.948799490929        51432.465043663979        50472.295416891575        49512.124280631542        48551.953890919685        47599.729417264462        46655.450876057148        45711.173097789288        44766.894556581974        43833.937635272741        42912.302333861589        41990.666269510984        41069.030205160379        40161.762145906687        39268.862091749907        38375.961274653673        37483.060457557440        36607.176849991083        35748.310451954603        34889.444816857576        34030.578418821096        33190.908026695251        32370.434403419495        31549.960780143738        30729.487156867981        29929.854602366686        29151.063879579306        28372.273156791925        27593.481671065092        26836.566329002380        26101.527893543243        25366.490409709513        24631.452351622283        23918.648974597454        23228.080278635025        22537.510819733143        21846.942123770714        21178.218981623650        20531.339961756021        19884.460273291916        19237.581253424287        18613.447177596390        18012.057471554726        17410.667049745098        16809.276580763981        16231.263521313667        15676.627871394157        15121.992984414101        14567.358097434044        14036.450912989676        13529.270691727288        13022.090482257772        12514.910642465111        12031.513354484923        11571.899381256662        11112.285789498128        10652.671816269867        10216.598750527191        9804.0665922701010        9391.5340525432839        8979.0015120794124        8589.4722700099010        8222.9467085415308        7856.4215285428872        7489.8959670745171        7145.5562591552734        6823.4027862548828        6501.2493133544922        6179.0960311889648        5879.1055679321289        5601.2775421142578        5323.4493255615234        5045.6211090087891        4788.4050369262695        4551.8011093139648        4315.1973724365234        4078.5936355590820        3864.8078918457031        3673.8403320312500        3482.8727722167969        3291.9053077697754        3119.3550109863281        2965.2217864990234        2811.0885620117188        2656.9553375244141        2517.6869392395020        2393.2832717895508        2268.8795089721680        2144.4757461547852        2032.0696830749512        1931.6613197326660        1831.2529563903809        1730.8445930480957        1640.1196956634521        1559.0782642364502        1478.0367851257324        1396.9953060150146        1323.7696170806885        1258.3596229553223        1192.9496288299561        1127.5396823883057        1068.4379100799561        1015.6443119049072        962.85076141357422        910.05721092224121        862.35508918762207        819.74449157714844        777.13391780853271        734.52332019805908        696.02215290069580        661.63041591644287        627.23870277404785        592.84698963165283        561.77198886871338        534.01374816894531        506.25553131103516        478.49729061126709        453.28738689422607        430.62582015991211        407.96425342559814        385.30269861221313        364.53740596771240        345.66838741302490        326.79936885833740        307.93035030364990        290.53124189376831        274.60204362869263        258.67284536361694        242.74364709854126        228.00470590591431        214.45603370666504        200.90736150741577        187.35868334770203        174.82171654701233        163.29645514488220        151.77119374275208        140.24593234062195        129.62750792503357        119.91592645645142        110.20434498786926        100.49275755882263        91.638317704200745        83.641025424003601        75.643733143806458        67.646440863609314        60.494989156723022        54.189375042915344        47.883759438991547        41.578145325183868        36.122170090675354        31.515835225582123        26.909501850605011        22.303167730569839        10.000000149011612     
 JKN FM: x%pres =    101269.98990353283        101209.97267505448        101149.95544596070        101089.93821687988        101015.12938281008        100925.53259288461        100835.93580323779        100746.33599402005        100636.04339782870        100505.07160558137        100374.10283008868        100243.13103695579        100086.70903526731        99904.853081330672        99722.997127224764        99541.141173047130        99330.148870686768        99090.040828766432        98849.932774732617        98609.824720094650        98337.893180934756        98034.164385431373        97730.432571705969        97426.703777785558        97089.396937581259        96718.544802241333        96347.689648060987        95976.834492134862        95571.501258413075        95131.738490810530        94691.975672050059        94252.212849572839        93777.869137745336        93268.999607292571        92760.127053780307        92251.257514941040        91708.423207504078        91131.684829152393        90554.943518229178        89978.205312443373        89368.771280972098        88726.709353372091        88084.644199100134        87442.582047308213        86769.674119169344        86065.996517636086        85362.321907145888        84658.647255498421        83926.486608580846        83165.922467036216        82405.355453029566        81644.791412851118        80858.549945760125        80046.710705614241        79234.871394866117        78423.032393486370        77588.694852915272        76731.938813643894        75875.182673570511        75018.426049928210        74142.652057063751        73247.937979377093        72353.223753471029        71458.506373707947        70548.489522108197        69623.238388035883        68697.987072961143        67772.732543598861        66836.054711127144        65888.009411983527        64939.963877419839        63991.917332178964        63036.421138702972        62073.514801366262        61110.609670102800        60147.702711313723        59181.340607476355        58211.541153979466        57241.739060418775        56271.938087565242        55302.633793376888        54333.823303874400        53365.013861638727        52396.202422026290        51431.718157902396        50471.534317270663        49511.348420669863        48551.162689262208        47598.948878500996        46654.654541536082        45710.360312248689        44766.064623266298        43833.130202898894        42911.477556534686        41989.823388544304        41068.168407958874        40160.934978665115        39268.016115241044        38375.095610550714        37482.174173856001        36606.337220921800        35747.450652293221        34888.563850332270        34029.675213663111        33190.062916682487        32369.567871444764        31549.071711911929        30728.574348812384        29929.010213556401        29150.196934015155        28371.382409028738        27592.565780920191        26835.727447806526        26100.665390410966        25365.602912741953        24630.538364150801        23917.818197454410        23227.224796452781        22536.629122186536        21846.032557344075        21177.395665714474        20530.490699450933        19883.583379735272        19236.674873815638        18612.637525167382        18011.220783623728        17409.801453025721        16808.380015662231        16230.473787639439        15675.810197889559        15121.145316503967        14566.478150597617        14035.687278534548        13528.478421530826        13021.267354874501        12514.054148585919        12030.781727016139        11571.138692580773        11111.493632374581        10651.845471701241        10215.904628868448        9803.3432554317933        9390.7789359057479        8978.2116944862901        8588.8205297391596        8222.2659146352471        7855.7089662730787        7489.1485229055543        7144.9510211733905        6822.7689664113650        6500.5840779611599        6178.3961047842695        5878.5584492383950        5600.7032772360744        5322.8450814523221        5044.9835826160561        4787.9178459611148        4551.2885867898312        4314.6567409529762        4078.0216284725943        3864.4146701317936        3673.4266646714882        3482.4364160815198        3291.4436300216498        3119.0376350979705        2964.8879085937292        2810.7363716235013        2656.5827088931687        2517.4307799086973        2393.0137925814051        2268.5952493988957        2144.1749904721460        2031.8629321861201        1931.4438187981291        1831.0235260039344        1730.6018484088102        1639.9528231265624        1558.9027151295527        1477.8516070847104        1396.7993822097123        1323.6349314129891        1258.2179338645228        1192.8001688292277        1127.3815489553963        1068.3292025965802        1015.5299521491312        962.73012970551576        909.92957827485770        862.26734945685223        819.65219021594248        777.03655370138131        734.42030587591660        695.95133690521709        661.55591783404475        627.16011885777164        592.76384512709353        561.71483169498038        533.95361930131696        506.19210450436935        478.43018279830864        453.24017484160646        430.57612264958931        407.91179464365570        385.24715322856230        364.49670466361215        345.62546364570323        326.75396585107057        307.88216404094453        290.49484582409787        274.56353553587149        258.63196497738312        242.70008286693746        227.97115360765849        214.42036091312897        200.86928175037249        187.31784844975076        174.79005025398769        163.26255271685605        151.73471526559587        140.20645398879947        129.59718269265977        119.88314368608759        110.16867086580203        100.45363256181662        91.609225483918294        83.609148927911122        75.608482672097111        67.607017023715485        60.467587328200629        54.158780166767826        47.849128533974820        41.538250134516808        36.097673294186322        31.487750245045444        26.876595109399126        22.263435738208226        7.3575889330654638     
 IDC FM: x%pres =    101269.98990353265        101209.97267505448        101149.95544596070        101089.93821687970        101015.12938281008        100925.53259288479        100835.93580323762        100746.33599402005        100636.04339782870        100505.07160558137        100374.10283008868        100243.13103695579        100086.70903526731        99904.853081330672        99722.997127224764        99541.141173047130        99330.148870686593        99090.040828766432        98849.932774732617        98609.824720094824        98337.893180934931        98034.164385431548        97730.432571705969        97426.703777785558        97089.396937581259        96718.544802241333        96347.689648060987        95976.834492134862        95571.501258413075        95131.738490810705        94691.975672050059        94252.212849572839        93777.869137745511        93268.999607292746        92760.127053780307        92251.257514941215        91708.423207504078        91131.684829152393        90554.943518229178        89978.205312443373        89368.771280972098        88726.709353372091        88084.644199100134        87442.582047308213        86769.674119169198        86065.996517636086        85362.321907146033        84658.647255498421        83926.486608580846        83165.922467036216        82405.355453029566        81644.791412851118        80858.549945760271        80046.710705614241        79234.871394866263        78423.032393486370        77588.694852915272        76731.938813643763        75875.182673570380        75018.426049928079        74142.652057063620        73247.937979377224        72353.223753471029        71458.506373707831        70548.489522108197        69623.238388035883        68697.987072961259        67772.732543598977        66836.054711127261        65888.009411983643        64939.963877419839        63991.917332179073        63036.421138702863        62073.514801366262        61110.609670102800        60147.702711313614        59181.340607476355        58211.541153979466        57241.739060418877        56271.938087565337        55302.633793376888        54333.823303874400        53365.013861638727        52396.202422026290        51431.718157902396        50471.534317270663        49511.348420669863        48551.162689262288        47598.948878500996        46654.654541536082        45710.360312248689        44766.064623266298        43833.130202898967        42911.477556534686        41989.823388544304        41068.168407958874        40160.934978665115        39268.016115241044        38375.095610550714        37482.174173856067        36606.337220921800        35747.450652293286        34888.563850332335        34029.675213663111        33190.062916682429        32369.567871444706        31549.071711911929        30728.574348812384        29929.010213556401        29150.196934015155        28371.382409028738        27592.565780920191        26835.727447806479        26100.665390410966        25365.602912741997        24630.538364150801        23917.818197454410        23227.224796452781        22536.629122186536        21846.032557344075        21177.395665714474        20530.490699450896        19883.583379735235        19236.674873815638        18612.637525167382        18011.220783623696        17409.801453025753        16808.380015662231        16230.473787639439        15675.810197889559        15121.145316503967        14566.478150597617        14035.687278534548        13528.478421530803        13021.267354874501        12514.054148585919        12030.781727016139        11571.138692580773        11111.493632374581        10651.845471701241        10215.904628868448        9803.3432554317933        9390.7789359057479        8978.2116944862901        8588.8205297391432        8222.2659146352325        7855.7089662730650        7489.1485229055406        7144.9510211733905        6822.7689664113650        6500.5840779611599        6178.3961047842804        5878.5584492383950        5600.7032772360744        5322.8450814523221        5044.9835826160470        4787.9178459611148        4551.2885867898312        4314.6567409529762        4078.0216284725943        3864.4146701317936        3673.4266646714882        3482.4364160815198        3291.4436300216557        3119.0376350979705        2964.8879085937292        2810.7363716235013        2656.5827088931687        2517.4307799086973        2393.0137925814051        2268.5952493988957        2144.1749904721460        2031.8629321861165        1931.4438187981291        1831.0235260039312        1730.6018484088102        1639.9528231265624        1558.9027151295527        1477.8516070847079        1396.7993822097123        1323.6349314129891        1258.2179338645251        1192.8001688292256        1127.3815489553942        1068.3292025965802        1015.5299521491321        962.73012970551667        909.92957827485850        862.26734945685223        819.65219021594248        777.03655370138131        734.42030587591717        695.95133690521777        661.55591783404532        627.16011885777164        592.76384512709399        561.71483169498083        533.95361930131651        506.19210450436890        478.43018279830909        453.24017484160646        430.57612264958931        407.91179464365570        385.24715322856230        364.49670466361215        345.62546364570323        326.75396585107057        307.88216404094453        290.49484582409764        274.56353553587149        258.63196497738312        242.70008286693727        227.97115360765849        214.42036091312897        200.86928175037249        187.31784844975076        174.79005025398769        163.26255271685605        151.73471526559587        140.20645398879947        129.59718269265989        119.88314368608759        110.16867086580203        100.45363256181662        91.609225483918294        83.609148927911122        75.608482672097111        67.607017023715485        60.467587328200629        54.158780166767826        47.849128533974820        41.538250134516808        36.097673294186322        31.487750245045444        26.876595109399126        22.263435738208226        7.3575889330654638     

to

 Old FM: x%pres =    101269.99138593674        101209.97415781021        101149.95692968369        101089.93970155716        101015.13269403949        100925.53590713069        100835.93912031502        100746.33931443095        100636.05050034821        100505.07871657610        100374.10995066166        100243.13816726208        100086.72280311584        99904.866874217987        99723.010945320129        99541.155016422272        99330.173054337502        99090.065070986748        98849.957075715065        98609.849080443382        98337.932267785072        98034.203594923019        97730.471903085709        97426.743230223656        97089.455959200859        96718.604052066803        96347.749125957489        95976.894199848175        95571.585571765900        95131.823194026947        94692.060768604279        94252.298343181610        93777.984189987183        93269.115290045738        92760.243371129036        92251.374471187592        91708.574330806732        91131.836912035942        90555.096569657326        89978.359341621399        89368.963479995728        88726.902946829796        88084.839203953743        87442.778480052948        86769.911894202232        86066.236236691475        85362.563598155975        84658.890959620476        83926.773789525032        83166.212278604507        82405.647939443588        81645.086619257927        80858.889570832253        80047.053775191307        79235.217979550362        78423.382565379143        77589.089038968086        76732.337400317192        75875.585761666298        75018.833741545677        74143.101927638054        73248.393338918686        72353.684750199318        71458.973142504692        70548.995131254196        69623.750716447830        68698.506301641464        67773.258867859840        66836.615023016930        65888.577786087990        64940.540549159050        63992.502549290657        63037.033995985985        62074.137161672115        61111.241836845875        60148.345002532005        59182.002758979797        58212.214343249798        57242.423655092716        56272.634476423264        55303.340944647789        54334.543059766293        53365.746684372425        52396.948799490929        51432.465043663979        50472.295416891575        49512.124280631542        48551.953890919685        47599.729417264462        46655.450876057148        45711.173097789288        44766.894556581974        43833.937635272741        42912.302333861589        41990.666269510984        41069.030205160379        40161.762145906687        39268.862091749907        38375.961274653673        37483.060457557440        36607.176849991083        35748.310451954603        34889.444816857576        34030.578418821096        33190.908026695251        32370.434403419495        31549.960780143738        30729.487156867981        29929.854602366686        29151.063879579306        28372.273156791925        27593.481671065092        26836.566329002380        26101.527893543243        25366.490409709513        24631.452351622283        23918.648974597454        23228.080278635025        22537.510819733143        21846.942123770714        21178.218981623650        20531.339961756021        19884.460273291916        19237.581253424287        18613.447177596390        18012.057471554726        17410.667049745098        16809.276580763981        16231.263521313667        15676.627871394157        15121.992984414101        14567.358097434044        14036.450912989676        13529.270691727288        13022.090482257772        12514.910642465111        12031.513354484923        11571.899381256662        11112.285789498128        10652.671816269867        10216.598750527191        9804.0665922701010        9391.5340525432839        8979.0015120794124        8589.4722700099010        8222.9467085415308        7856.4215285428872        7489.8959670745171        7145.5562591552734        6823.4027862548828        6501.2493133544922        6179.0960311889648        5879.1055679321289        5601.2775421142578        5323.4493255615234        5045.6211090087891        4788.4050369262695        4551.8011093139648        4315.1973724365234        4078.5936355590820        3864.8078918457031        3673.8403320312500        3482.8727722167969        3291.9053077697754        3119.3550109863281        2965.2217864990234        2811.0885620117188        2656.9553375244141        2517.6869392395020        2393.2832717895508        2268.8795089721680        2144.4757461547852        2032.0696830749512        1931.6613197326660        1831.2529563903809        1730.8445930480957        1640.1196956634521        1559.0782642364502        1478.0367851257324        1396.9953060150146        1323.7696170806885        1258.3596229553223        1192.9496288299561        1127.5396823883057        1068.4379100799561        1015.6443119049072        962.85076141357422        910.05721092224121        862.35508918762207        819.74449157714844        777.13391780853271        734.52332019805908        696.02215290069580        661.63041591644287        627.23870277404785        592.84698963165283        561.77198886871338        534.01374816894531        506.25553131103516        478.49729061126709        453.28738689422607        430.62582015991211        407.96425342559814        385.30269861221313        364.53740596771240        345.66838741302490        326.79936885833740        307.93035030364990        290.53124189376831        274.60204362869263        258.67284536361694        242.74364709854126        228.00470590591431        214.45603370666504        200.90736150741577        187.35868334770203        174.82171654701233        163.29645514488220        151.77119374275208        140.24593234062195        129.62750792503357        119.91592645645142        110.20434498786926        100.49275755882263        91.638317704200745        83.641025424003601        75.643733143806458        67.646440863609314        60.494989156723022        54.189375042915344        47.883759438991547        41.578145325183868        36.122170090675354        31.515835225582123        26.909501850605011        22.303167730569839        10.000000149011612     
 JKN FM: x%pres =    101269.98990353283        101209.97267505448        101149.95544596070        101089.93821687988        101015.12938281008        100925.53259288461        100835.93580323779        100746.33599402005        100636.04339782870        100505.07160558137        100374.10283008868        100243.13103695579        100086.70903526731        99904.853081330672        99722.997127224764        99541.141173047130        99330.148870686768        99090.040828766432        98849.932774732617        98609.824720094650        98337.893180934756        98034.164385431373        97730.432571705969        97426.703777785558        97089.396937581259        96718.544802241333        96347.689648060987        95976.834492134862        95571.501258413075        95131.738490810530        94691.975672050059        94252.212849572839        93777.869137745336        93268.999607292571        92760.127053780307        92251.257514941040        91708.423207504078        91131.684829152393        90554.943518229178        89978.205312443373        89368.771280972098        88726.709353372091        88084.644199100134        87442.582047308213        86769.674119169344        86065.996517636086        85362.321907145888        84658.647255498421        83926.486608580846        83165.922467036216        82405.355453029566        81644.791412851118        80858.549945760125        80046.710705614241        79234.871394866117        78423.032393486370        77588.694852915272        76731.938813643894        75875.182673570511        75018.426049928210        74142.652057063751        73247.937979377093        72353.223753471029        71458.506373707947        70548.489522108197        69623.238388035883        68697.987072961143        67772.732543598861        66836.054711127144        65888.009411983527        64939.963877419839        63991.917332178964        63036.421138702972        62073.514801366262        61110.609670102800        60147.702711313723        59181.340607476355        58211.541153979466        57241.739060418775        56271.938087565242        55302.633793376888        54333.823303874400        53365.013861638727        52396.202422026290        51431.718157902396        50471.534317270663        49511.348420669863        48551.162689262208        47598.948878500996        46654.654541536082        45710.360312248689        44766.064623266298        43833.130202898894        42911.477556534686        41989.823388544304        41068.168407958874        40160.934978665115        39268.016115241044        38375.095610550714        37482.174173856001        36606.337220921800        35747.450652293221        34888.563850332270        34029.675213663111        33190.062916682487        32369.567871444764        31549.071711911929        30728.574348812384        29929.010213556401        29150.196934015155        28371.382409028738        27592.565780920191        26835.727447806526        26100.665390410966        25365.602912741953        24630.538364150801        23917.818197454410        23227.224796452781        22536.629122186536        21846.032557344075        21177.395665714474        20530.490699450933        19883.583379735272        19236.674873815638        18612.637525167382        18011.220783623728        17409.801453025721        16808.380015662231        16230.473787639439        15675.810197889559        15121.145316503967        14566.478150597617        14035.687278534548        13528.478421530826        13021.267354874501        12514.054148585919        12030.781727016139        11571.138692580773        11111.493632374581        10651.845471701241        10215.904628868448        9803.3432554317933        9390.7789359057479        8978.2116944862901        8588.8205297391596        8222.2659146352471        7855.7089662730787        7489.1485229055543        7144.9510211733905        6822.7689664113650        6500.5840779611599        6178.3961047842695        5878.5584492383950        5600.7032772360744        5322.8450814523221        5044.9835826160561        4787.9178459611148        4551.2885867898312        4314.6567409529762        4078.0216284725943        3864.4146701317936        3673.4266646714882        3482.4364160815198        3291.4436300216498        3119.0376350979705        2964.8879085937292        2810.7363716235013        2656.5827088931687        2517.4307799086973        2393.0137925814051        2268.5952493988957        2144.1749904721460        2031.8629321861201        1931.4438187981291        1831.0235260039344        1730.6018484088102        1639.9528231265624        1558.9027151295527        1477.8516070847104        1396.7993822097123        1323.6349314129891        1258.2179338645228        1192.8001688292277        1127.3815489553963        1068.3292025965802        1015.5299521491312        962.73012970551576        909.92957827485770        862.26734945685223        819.65219021594248        777.03655370138131        734.42030587591660        695.95133690521709        661.55591783404475        627.16011885777164        592.76384512709353        561.71483169498038        533.95361930131696        506.19210450436935        478.43018279830864        453.24017484160646        430.57612264958931        407.91179464365570        385.24715322856230        364.49670466361215        345.62546364570323        326.75396585107057        307.88216404094453        290.49484582409787        274.56353553587149        258.63196497738312        242.70008286693746        227.97115360765849        214.42036091312897        200.86928175037249        187.31784844975076        174.79005025398769        163.26255271685605        151.73471526559587        140.20645398879947        129.59718269265977        119.88314368608759        110.16867086580203        100.45363256181662        91.609225483918294        83.609148927911122        75.608482672097111        67.607017023715485        60.467587328200629        54.158780166767826        47.849128533974820        41.538250134516808        36.097673294186322        31.487750245045444        26.876595109399126        22.263435738208226        10.000000149011612     
 IDC FM: x%pres =    101269.98990353265        101209.97267505448        101149.95544596070        101089.93821687970        101015.12938281008        100925.53259288479        100835.93580323762        100746.33599402005        100636.04339782870        100505.07160558137        100374.10283008868        100243.13103695579        100086.70903526731        99904.853081330672        99722.997127224764        99541.141173047130        99330.148870686593        99090.040828766432        98849.932774732617        98609.824720094824        98337.893180934931        98034.164385431548        97730.432571705969        97426.703777785558        97089.396937581259        96718.544802241333        96347.689648060987        95976.834492134862        95571.501258413075        95131.738490810705        94691.975672050059        94252.212849572839        93777.869137745511        93268.999607292746        92760.127053780307        92251.257514941215        91708.423207504078        91131.684829152393        90554.943518229178        89978.205312443373        89368.771280972098        88726.709353372091        88084.644199100134        87442.582047308213        86769.674119169198        86065.996517636086        85362.321907146033        84658.647255498421        83926.486608580846        83165.922467036216        82405.355453029566        81644.791412851118        80858.549945760271        80046.710705614241        79234.871394866263        78423.032393486370        77588.694852915272        76731.938813643763        75875.182673570380        75018.426049928079        74142.652057063620        73247.937979377224        72353.223753471029        71458.506373707831        70548.489522108197        69623.238388035883        68697.987072961259        67772.732543598977        66836.054711127261        65888.009411983643        64939.963877419839        63991.917332179073        63036.421138702863        62073.514801366262        61110.609670102800        60147.702711313614        59181.340607476355        58211.541153979466        57241.739060418877        56271.938087565337        55302.633793376888        54333.823303874400        53365.013861638727        52396.202422026290        51431.718157902396        50471.534317270663        49511.348420669863        48551.162689262288        47598.948878500996        46654.654541536082        45710.360312248689        44766.064623266298        43833.130202898967        42911.477556534686        41989.823388544304        41068.168407958874        40160.934978665115        39268.016115241044        38375.095610550714        37482.174173856067        36606.337220921800        35747.450652293286        34888.563850332335        34029.675213663111        33190.062916682429        32369.567871444706        31549.071711911929        30728.574348812384        29929.010213556401        29150.196934015155        28371.382409028738        27592.565780920191        26835.727447806479        26100.665390410966        25365.602912741997        24630.538364150801        23917.818197454410        23227.224796452781        22536.629122186536        21846.032557344075        21177.395665714474        20530.490699450896        19883.583379735235        19236.674873815638        18612.637525167382        18011.220783623696        17409.801453025753        16808.380015662231        16230.473787639439        15675.810197889559        15121.145316503967        14566.478150597617        14035.687278534548        13528.478421530803        13021.267354874501        12514.054148585919        12030.781727016139        11571.138692580773        11111.493632374581        10651.845471701241        10215.904628868448        9803.3432554317933        9390.7789359057479        8978.2116944862901        8588.8205297391432        8222.2659146352325        7855.7089662730650        7489.1485229055406        7144.9510211733905        6822.7689664113650        6500.5840779611599        6178.3961047842804        5878.5584492383950        5600.7032772360744        5322.8450814523221        5044.9835826160470        4787.9178459611148        4551.2885867898312        4314.6567409529762        4078.0216284725943        3864.4146701317936        3673.4266646714882        3482.4364160815198        3291.4436300216557        3119.0376350979705        2964.8879085937292        2810.7363716235013        2656.5827088931687        2517.4307799086973        2393.0137925814051        2268.5952493988957        2144.1749904721460        2031.8629321861165        1931.4438187981291        1831.0235260039312        1730.6018484088102        1639.9528231265624        1558.9027151295527        1477.8516070847079        1396.7993822097123        1323.6349314129891        1258.2179338645251        1192.8001688292256        1127.3815489553942        1068.3292025965802        1015.5299521491321        962.73012970551667        909.92957827485850        862.26734945685223        819.65219021594248        777.03655370138131        734.42030587591717        695.95133690521777        661.55591783404532        627.16011885777164        592.76384512709399        561.71483169498083        533.95361930131651        506.19210450436890        478.43018279830909        453.24017484160646        430.57612264958931        407.91179464365570        385.24715322856230        364.49670466361215        345.62546364570323        326.75396585107057        307.88216404094453        290.49484582409764        274.56353553587149        258.63196497738312        242.70008286693727        227.97115360765849        214.42036091312897        200.86928175037249        187.31784844975076        174.79005025398769        163.26255271685605        151.73471526559587        140.20645398879947        129.59718269265989        119.88314368608759        110.16867086580203        100.45363256181662        91.609225483918294        83.609148927911122        75.608482672097111        67.607017023715485        60.467587328200629        54.158780166767826        47.849128533974820        41.538250134516808        36.097673294186322        31.487750245045444        26.876595109399126        22.263435738208226        10.000000149011612     

The fractional differences between IDC and JKN are now really at the bit level, while the frac diff between either of them and the old formulation is < 0.2%, which sounds reasonable. (More reasonable than the 30% difference at the top before the bug-fix.)

fm_pk.png

Understandably this causes the ECMWF core tests to fail:

************************** SUMMARY OF ROPP_FM TEST RESULTS ***************************
--------------------------------------------------------------------------------------
|                   Test name    |              Description       |    Run? |  PASS? |
--------------------------------------------------------------------------------------
|                     t_fascod_1 |                   FM FASCOD 1D |     Run | *FAIL* |
|                  t_fascod_tl_1 |                FM_TL FASCOD 1D |     Run |  PASS  |
|                  t_fascod_ad_1 |                FM_AD FASCOD 1D |     Run |  PASS  |
|                     t_fascod_2 |             FM FASCOD 1D -comp |     Run | *FAIL* |
|                  t_fascod_tl_2 |          FM_TL FASCOD 1D -comp |     Run |  PASS  |
|                  t_fascod_ad_2 |          FM_AD FASCOD 1D -comp |     Run |  PASS  |
|                     t_fascod_3 |           FM FASCOD 1D -new_op |     Run | *FAIL* |
|                  t_fascod_tl_3 |        FM_TL FASCOD 1D -new_op |     Run |  PASS  |
|                  t_fascod_ad_3 |        FM_AD FASCOD 1D -new_op |     Run |  PASS  |
|                     t_fascod_4 |     FM FASCOD 1D -comp -new_op |     Run | *FAIL* |
|                  t_fascod_tl_4 |  FM_TL FASCOD 1D -comp -new_op |     Run |  PASS  |
|                  t_fascod_ad_4 |  FM_AD FASCOD 1D -comp -new_op |     Run |  PASS  |
|                     t_twodop_1 |                        FM TWOD |     Run |  PASS  |
|                     t_twodtl_1 |                     FM_TL TWOD |     Run |  PASS  |
|                     t_twodad_1 |                     FM_AD TWOD |     Run |  PASS  |
|                     t_twodop_2 |                  FM TWOD -comp |     Run |  PASS  |
|                     t_twodtl_2 |               FM_TL TWOD -comp |     Run |  PASS  |
|                     t_twodad_2 |               FM_AD TWOD -comp |     Run |  PASS  |
|                       t_iono_1 |                   FM L1 and L2 |     Run | *FAIL* |
|                    t_iono_tl_1 |                FM_TL L1 and L2 |     Run |  PASS  |
|                    t_iono_ad_1 |                FM_AD L1 and L2 |     Run |  PASS  |
|                      t_fm_1D_1 |         FM 1D; default options |     Run |  PASS  |
|                      t_fm_1D_2 |        FM 1D; compress factors |     Run |  PASS  |
|                      t_fm_2D_1 |         FM 2D; default options |     Run |  PASS  |
|                      t_fm_2D_2 |        FM 2D; compress factors |     Run |  PASS  |
|                    t_fm_iono_1 |             FM iono; L_neutral |     Run |  PASS  |
|                    t_fm_iono_2 |             FM iono; L1 and L2 |     Run |  PASS  |
--------------------------------------------------------------------------------------

The reference files have therefore been updated, at r6875. We now have a clean sweep of passes.

by Ian Culverwell, 3 years ago

Attachment: fm_pk.png added

fm_pk.png

comment:3 by Ian Culverwell, 3 years ago

TL

This involves replacing

  p_flv   (n_flv) = EXP(-1.0_wp) * ( p_hlv   (n_hlv-1) - p_hlv   (n_hlv) )
  p_flv_tl(n_flv) = EXP(-1.0_wp) * ( p_hlv_tl(n_hlv-1) - p_hlv_tl(n_hlv) )

by

  p_flv   (n_flv) = 0.5_wp * ( p_hlv   (n_hlv-1) - p_hlv   (n_hlv) )
  p_flv_tl(n_flv) = 0.5_wp * ( p_hlv_tl(n_hlv-1) - p_hlv_tl(n_hlv) )

in ropp_fm_state2state_ecmwf_tl.f90.

This has no effect on p_flv_tl(n_flv), since

  p_hlv_tl = x%bk * psfc_tl

and all the x%bk are zero long before we reach the top of the model (which means that we have fixed levels aloft), so p_hlv_tl(n_hlv-1) = p_hlv_tl(n_hlv) = 0, and therefore p_flv_tl(n_flv) = 0 before and after the bug is fixed.

Check that it still passes all the core tests:

************************** SUMMARY OF ROPP_FM TEST RESULTS ***************************
--------------------------------------------------------------------------------------
|                   Test name    |              Description       |    Run? |  PASS? |
--------------------------------------------------------------------------------------
|                     t_fascod_1 |                   FM FASCOD 1D |     Run |  PASS  |
|                  t_fascod_tl_1 |                FM_TL FASCOD 1D |     Run |  PASS  |
|                  t_fascod_ad_1 |                FM_AD FASCOD 1D |     Run |  PASS  |
|                     t_fascod_2 |             FM FASCOD 1D -comp |     Run |  PASS  |
|                  t_fascod_tl_2 |          FM_TL FASCOD 1D -comp |     Run |  PASS  |
|                  t_fascod_ad_2 |          FM_AD FASCOD 1D -comp |     Run |  PASS  |
|                     t_fascod_3 |           FM FASCOD 1D -new_op |     Run |  PASS  |
|                  t_fascod_tl_3 |        FM_TL FASCOD 1D -new_op |     Run |  PASS  |
|                  t_fascod_ad_3 |        FM_AD FASCOD 1D -new_op |     Run |  PASS  |
|                     t_fascod_4 |     FM FASCOD 1D -comp -new_op |     Run |  PASS  |
|                  t_fascod_tl_4 |  FM_TL FASCOD 1D -comp -new_op |     Run |  PASS  |
|                  t_fascod_ad_4 |  FM_AD FASCOD 1D -comp -new_op |     Run |  PASS  |
|                     t_twodop_1 |                        FM TWOD |     Run |  PASS  |
|                     t_twodtl_1 |                     FM_TL TWOD |     Run |  PASS  |
|                     t_twodad_1 |                     FM_AD TWOD |     Run |  PASS  |
|                     t_twodop_2 |                  FM TWOD -comp |     Run |  PASS  |
|                     t_twodtl_2 |               FM_TL TWOD -comp |     Run |  PASS  |
|                     t_twodad_2 |               FM_AD TWOD -comp |     Run |  PASS  |
|                       t_iono_1 |                   FM L1 and L2 |     Run |  PASS  |
|                    t_iono_tl_1 |                FM_TL L1 and L2 |     Run |  PASS  |
|                    t_iono_ad_1 |                FM_AD L1 and L2 |     Run |  PASS  |
|                      t_fm_1D_1 |         FM 1D; default options |     Run |  PASS  |
|                      t_fm_1D_2 |        FM 1D; compress factors |     Run |  PASS  |
|                      t_fm_2D_1 |         FM 2D; default options |     Run |  PASS  |
|                      t_fm_2D_2 |        FM 2D; compress factors |     Run |  PASS  |
|                    t_fm_iono_1 |             FM iono; L_neutral |     Run |  PASS  |
|                    t_fm_iono_2 |             FM iono; L1 and L2 |     Run |  PASS  |
--------------------------------------------------------------------------------------

comment:4 by Ian Culverwell, 3 years ago

AD

This involves replacing

  p_hlv_ad(n_hlv-1) = p_hlv_ad(n_hlv-1) + EXP(-1.0_wp) * x_ad%pres(n_flv)
  p_hlv_ad(n_hlv)   = p_hlv_ad(n_hlv  ) - EXP(-1.0_wp) * x_ad%pres(n_flv)

by

  p_hlv_ad(n_hlv-1) = p_hlv_ad(n_hlv-1) + 0.5_wp * x_ad%pres(n_flv)
  p_hlv_ad(n_hlv)   = p_hlv_ad(n_hlv  ) - 0.5_wp * x_ad%pres(n_flv)

in ropp_fm_state2state_ecmwf_ad.f90.

This has no effect on p_hlv_ad, which is to be expected because there's no difference to the input, because that's the output from the TL (see above):

 JKN AD: p_hlv_ad =   -4.6552158343741289E-006   4.1692164285878687E-010   4.1745989029038739E-010   4.1768514787455501E-010   5.2088792148531145E-010   6.2531018294643984E-010   6.2577014659272627E-010   6.2721654822675128E-010   7.7252256105842367E-010   9.1981306321669533E-010   9.2174504312882957E-010   9.2371113431619843E-010   1.1054683441251118E-009   1.2886528024532770E-009   1.2929647693893587E-009   1.2968160896414915E-009   1.5092438079888678E-009  -6.5843550107526052E-007  -4.2999961739399219E-007   3.6086977691946343E-007   1.9290522682718653E-007   9.7198859314278751E-008   5.9953034736896587E-008   4.1735704660714374E-008   3.3124320614266462E-008   1.0598946069176737E-005   4.4127164180070289E-006  -7.2034974096506915E-006  -1.5999365709632764E-006  -9.0369862533001919E-007   2.9953041142481013E-006   2.0211110021662801E-006  -2.2205816603108885E-006  -1.3315331652912453E-006  -1.4815355081091103E-006  -2.1528743468126731E-006  -5.2459333093691010E-007   6.4347188468252044E-007   1.3408808598751505E-006   1.1518420458503809E-006  -6.5006626108269608E-007  -7.4519366711903786E-007  -1.6345524878916501E-006  -7.5674763032611454E-007   7.0846402357399411E-007   2.7927033345861654E-007   8.3524252554161580E-008  -4.4749779381364745E-007  -6.3947406572296191E-007  -1.3462615080345706E-007  -6.9020336404383448E-007  -6.1170817735516168E-007   3.4431001603014945E-007   7.6140378835160656E-009   2.2575491488252379E-007   1.1532021634019524E-006   5.4252897927799248E-007  -1.7634025093453019E-007   4.3777464361362782E-008  -2.4342733347899122E-007  -1.5428254338739416E-007   5.8810152411961836E-008   5.3661228873298989E-008  -4.1102841888584095E-007  -3.1682486603814642E-007   1.3891746115508006E-007   8.7860848623966714E-008  -7.9782075297220420E-008  -4.3563270763229047E-008   4.6029522804129255E-008   2.9658124031211086E-008   3.8970092523850385E-008   1.6565820858880476E-008  -9.9249506600357948E-009  -5.2091446947594806E-008  -2.5569905765029791E-008   6.5519743794958832E-009  -3.4456841484577260E-009   2.7201564994680624E-009   4.2889199022394216E-009   5.6106011930680071E-008   3.2014613367552409E-009  -9.3389653494028026E-008  -5.6264262988696618E-008  -4.2467467504549421E-009   2.8638962759852627E-008  -1.1128804865547893E-008  -5.7180763478695431E-008   2.4236489590698999E-008   1.2074469302229368E-007   6.1849416634846628E-008   4.6914503089775451E-009  -1.8742339581695031E-007  -6.0864529368391670E-008   1.8667928029180673E-007   5.8514701848482451E-008  -6.3183175474993356E-009  -1.1006039783588878E-007  -1.5177328761015950E-007   1.7960640976447752E-008   1.1268531547852786E-007   2.9803056497899714E-008  -3.1145252200973647E-010   4.6024478691589831E-008   7.2175597547299557E-008  -9.4103696273104958E-008  -1.5784232877838158E-007   9.7633167723818726E-008   8.3723408788559655E-008  -1.3012011915310762E-007  -3.4470234963482685E-008   1.3058567037100294E-007   1.0628668914530897E-007   6.5859243922093767E-008  -1.2115278871688385E-008  -8.5138552793199260E-008  -6.7394118778937883E-008  -5.4466071185825819E-008  -1.7130210270349533E-008   4.4873608911281842E-008   4.5200122763713096E-008   2.9311626564418192E-009  -3.1340218968704159E-008   3.5055492387305607E-008   1.0057913965174968E-007   1.8576808062238141E-008  -2.5699773005092728E-008  -1.0742719425183665E-009  -8.4455795904607943E-011  -1.2966752957316015E-009  -4.8004798398078427E-010   8.7609450616291847E-011   1.8914158479907531E-010   7.4632994241020825E-011   4.4653502946696396E-010   2.9109889615103516E-010  -1.7209933268417914E-010  -4.2341491627412818E-011   2.6106278530819201E-010   2.5711754964984502E-010  -4.2996401579704501E-011   5.0182150019579809E-010  -2.3423640179654685E-010  -3.2414986674933049E-009  -8.1383662817693421E-009  -6.0189915674396430E-009   2.8169833076251967E-010   6.8752481437650890E-009   2.3198025831250161E-009  -6.4548735071270460E-009   7.3303804751562629E-010   2.2813441266030992E-009  -5.6708178272620563E-009  -4.5447647219362225E-009   2.4883617107417476E-009   1.5702257345071637E-009   1.9223586081998686E-009   2.1704401325988590E-009  -3.9931289843702763E-009  -2.7261526807472403E-009   1.1286414850622096E-009   2.8114485012686140E-010   2.8389837437350106E-009   1.6295992567547676E-009  -1.7112126002862503E-009  -6.6444902479715362E-010   1.4006914699952009E-009   2.0068734613288601E-009  -1.3982849604896438E-009  -1.8198441937055450E-009   1.1129254753115431E-009  -1.6737664447473979E-009  -5.1402444176906241E-010   3.4565848445114382E-009   6.8305143853953595E-010  -1.4000906248340317E-009  -1.8530100859415973E-009  -1.2914699212593597E-009   1.2190284106627634E-009   1.6052514839046329E-009  -2.8409926464276821E-010   3.4947409162991086E-010   3.8606651405322021E-010  -1.3321682656494927E-009  -2.4135663753290322E-010   1.6192516490202222E-009   6.8252689280844209E-010  -5.6550164180817632E-010  -7.3236954224867979E-010   5.5273744379203092E-010   1.3723139363481688E-009   2.7422830709097403E-010  -9.8400767959796231E-010  -1.4570108794823238E-010   3.0155457036874135E-010  -1.9579581585160783E-010  -1.9327971555447162E-010  -4.4007833784267951E-011   2.3729515914354334E-010  -4.5876224489406106E-011   1.0744950290880205E-010   4.9848838462866719E-010  -1.3262280623803780E-010   6.1068999867719105E-011   4.7852586633673347E-010  -4.9086586111578408E-011  -1.2384241079346064E-010  -1.9644584761664243E-011   4.1574916685543005E-011   1.3000727838464482E-010  -4.9140679392726829E-011  -5.4658534010217272E-011   1.4728572652469249E-010   6.7577117146931521E-011  -1.1384155146720972E-010  -1.0631576543632346E-010  -3.8916345228144126E-012   1.6676649188255648E-010   1.3654362272886183E-011  -2.3959164568023837E-011   1.2870520682799151E-011   3.4212917212843266E-011   7.2456333608825194E-012  -7.1645631553415028E-012   2.4515857914762459E-012   1.5958676557631971E-011  -2.1661094355575559E-011  -4.4742284319878594E-011  -3.6723676448773535E-011  -1.3398591563835924E-011   1.3178564142122992E-011   3.3766847620073792E-011   7.0235143932310566E-012  -3.6936999710822987E-011  -2.1803997460210275E-011   1.8803350199666562E-010  -1.0003550552229347E-009   2.4950559370465908E-008
 IDC AD: p_hlv_ad =   -4.6552158343741365E-006   4.1692164286862525E-010   4.1745989028852603E-010   4.1768514787344535E-010   5.2088792148472146E-010   6.2531018294489591E-010   6.2577014659484157E-010   6.2721654822826264E-010   7.7252256105614210E-010   9.1981306321902374E-010   9.2174504312311003E-010   9.2371113432035832E-010   1.1054683441255140E-009   1.2886528024537264E-009   1.2929647693883380E-009   1.2968160896408260E-009   1.5092438079884319E-009  -6.5843550137143670E-007  -4.2999961756291089E-007   3.6086977763926525E-007   1.9290522655494337E-007   9.7198859312598238E-008   5.9953034755260261E-008   4.1735704664299018E-008   3.3124320615330336E-008   1.0598946066703103E-005   4.4127164209248337E-006  -7.2034974099299820E-006  -1.5999365709272809E-006  -9.0369862569723847E-007   2.9953041147956234E-006   2.0211110014940747E-006  -2.2205816596768471E-006  -1.3315331656893643E-006  -1.4815355078830542E-006  -2.1528743473823130E-006  -5.2459333057738866E-007   6.4347188470713183E-007   1.3408808601264143E-006   1.1518420456237827E-006  -6.5006626120270371E-007  -7.4519366699652301E-007  -1.6345524880485613E-006  -7.5674763034107653E-007   7.0846402373987705E-007   2.7927033343142340E-007   8.3524252580155327E-008  -4.4749779383758122E-007  -6.3947406570821676E-007  -1.3462615080909492E-007  -6.9020336401380208E-007  -6.1170817736025743E-007   3.4431001600754383E-007   7.6140378998739659E-009   2.2575491487547648E-007   1.1532021633899178E-006   5.4252897927148727E-007  -1.7634025091029827E-007   4.3777464350873126E-008  -2.4342733346820341E-007  -1.5428254340114998E-007   5.8810152408082426E-008   5.3661228878692895E-008  -4.1102841887414004E-007  -3.1682486604448900E-007   1.3891746114810051E-007   8.7860848624115792E-008  -7.9782075303684976E-008  -4.3563270753796488E-008   4.6029522802028613E-008   2.9658124037740439E-008   3.8970092517168990E-008   1.6565820856634145E-008  -9.9249506593784972E-009  -5.2091446944775880E-008  -2.5569905766242742E-008   6.5519743805394278E-009  -3.4456841469364548E-009   2.7201564976723526E-009   4.2889199021716590E-009   5.6106011930774939E-008   3.2014613360776146E-009  -9.3389653491195547E-008  -5.6264262994029537E-008  -4.2467467488286389E-009   2.8638962761478931E-008  -1.1128804864967676E-008  -5.7180763481578731E-008   2.4236489590414396E-008   1.2074469302509228E-007   6.1849416634101239E-008   4.6914503088259262E-009  -1.8742339580487564E-007  -6.0864529374002416E-008   1.8667928028536927E-007   5.8514701848231729E-008  -6.3183175470542198E-009  -1.1006039783501888E-007  -1.5177328761308007E-007   1.7960640978917700E-008   1.1268531547735557E-007   2.9803056498458756E-008  -3.1145252176240285E-010   4.6024478689663678E-008   7.2175597549334130E-008  -9.4103696271549805E-008  -1.5784232878061097E-007   9.7633167725968495E-008   8.3723408786506447E-008  -1.3012011915098835E-007  -3.4470234964322942E-008   1.3058567037033548E-007   1.0628668914365895E-007   6.5859243923465960E-008  -1.2115278872648920E-008  -8.5138552792248889E-008  -6.7394118778948048E-008  -5.4466071186184961E-008  -1.7130210270256360E-008   4.4873608911558398E-008   4.5200122763169301E-008   2.9311626566459542E-009  -3.1340218968984527E-008   3.5055492387988315E-008   1.0057913965069428E-007   1.8576808062304210E-008  -2.5699773004564180E-008  -1.0742719429105427E-009  -8.4455796190905080E-011  -1.2966752948879567E-009  -4.8004798404685284E-010   8.7609450751605360E-011   1.8914158406469774E-010   7.4632994737382132E-011   4.4653502933694441E-010   2.9109889630350109E-010  -1.7209933256728859E-010  -4.2341491752773694E-011   2.6106278493210938E-010   2.5711754989379051E-010  -4.2996401334064946E-011   5.0182150005434359E-010  -2.3423640172539608E-010  -3.2414986676290420E-009  -8.1383662814949034E-009  -6.0189915675853327E-009   2.8169833076744305E-010   6.8752481437041026E-009   2.3198025830267603E-009  -6.4548735068788653E-009   7.3303804749445047E-010   2.2813441265323719E-009  -5.6708178272773029E-009  -4.5447647219209759E-009   2.4883617106966431E-009   1.5702257345418921E-009   1.9223586082024097E-009   2.1704401325912357E-009  -3.9931289843813936E-009  -2.7261526807341113E-009   1.1286414850600920E-009   2.8114485012867458E-010   2.8389837437019763E-009   1.6295992568005074E-009  -1.7112126003139907E-009  -6.6444902478285994E-010   1.4006914700045712E-009   2.0068734613229309E-009  -1.3982849604873145E-009  -1.8198441937063921E-009   1.1129254753150371E-009  -1.6737664447463392E-009  -5.1402444178727362E-010   3.4565848445241437E-009   6.8305143853720661E-010  -1.4000906248389550E-009  -1.8530100859454090E-009  -1.2914699212562892E-009   1.2190284106567680E-009   1.6052514839131032E-009  -2.8409926464253329E-010   3.4947409162355149E-010   3.8606651405824947E-010  -1.3321682656482486E-009  -2.4135663753046800E-010   1.6192516490154577E-009   6.8252689281103612E-010  -5.6550164180903658E-010  -7.3236954224756806E-010   5.5273744379833734E-010   1.3723139363385338E-009   2.7422830709404452E-010  -9.8400767959229777E-010  -1.4570108794825885E-010   3.0155457036408266E-010  -1.9579581585193209E-010  -1.9327971555417053E-010  -4.4007833783843193E-011   2.3729515914175663E-010  -4.5876224488691422E-011   1.0744950290833221E-010   4.9848838463030832E-010  -1.3262280623997009E-010   6.1068999863761873E-011   4.7852586634197449E-010  -4.9086586111300475E-011  -1.2384241079244155E-010  -1.9644584762855383E-011   4.1574916686079018E-011   1.3000727838363897E-010  -4.9140679391873179E-011  -5.4658534010637480E-011   1.4728572652462632E-010   6.7577117147143279E-011  -1.1384155146780736E-010  -1.0631576543563524E-010  -3.8916345232064962E-012   1.6676649188299323E-010   1.3654362272687660E-011  -2.3959164568096629E-011   1.2870520682938117E-011   3.4212917213319722E-011   7.2456333600023992E-012  -7.1645631549312212E-012   2.4515857917177827E-012   1.5958676557228307E-011  -2.1661094355433284E-011  -4.4742284319792567E-011  -3.6723676449130877E-011  -1.3398591563511669E-011   1.3178564142007186E-011   3.3766847620202833E-011   7.0235143930490769E-012  -3.6936999710736960E-011  -2.1803997460213584E-011   1.8803350199668548E-010  -1.0003550552229380E-009   2.4950559370465908E-008

 JKN AD: psfc_ad  =   -2.6720709049206906E-006
 IDC AD: psfc_ad  =   -2.6720709049315555E-006

 Old AD: p_hlv_ad =   -4.6552163845525900E-006   4.1582077109397493E-010   4.1635816280203531E-010   4.1651452764170079E-010   5.1951220279253867E-010   6.2372874824120711E-010   6.2411869229084390E-010   6.2546745207596797E-010   7.7048422729836508E-010   9.1748425381089907E-010   9.1931632153604920E-010   9.2115957980189349E-010   1.1025562967462568E-009   1.2853779768510217E-009   1.2895629366164046E-009   1.2932686165328341E-009   1.5052754159762414E-009  -2.1785329122861658E-006  -1.4263047340785841E-006   1.1889423419880274E-006   6.3470450685775308E-007   3.1799578849211400E-007   1.9480776433135338E-007   1.3450580314285478E-007   1.0538795413932676E-007   3.6679444338711251E-005   1.5403134844282212E-005  -2.4896741895914440E-005  -5.5737064347679242E-006  -3.1680913810074778E-006   1.0865427465189641E-005   7.3412957990398944E-006  -8.0328016994969838E-006  -4.8368712757360533E-006  -5.5071808972239310E-006  -7.9662361261905248E-006  -1.8287968306233450E-006   2.4718307751021244E-006   5.0735192125872010E-006   4.5339449787149943E-006  -2.1319764732383514E-006  -2.6189803347088318E-006  -6.0159709793511514E-006  -2.8130077697060499E-006   2.6465458968218071E-006   1.1118120178799825E-006   3.5512753888009767E-007  -1.7900858896846008E-006  -2.5379927229452360E-006  -4.5208775452897348E-007  -3.0947657974536970E-006  -2.7112929810048760E-006   1.5520509457476084E-006  -3.6160055516633912E-007   4.4312364619341791E-007   4.7795212214735367E-006   2.3151668861563909E-006  -6.5898149980613214E-007   2.4247155206935330E-007  -1.1675412816295009E-006  -7.5139453546014927E-007   3.8406408134747906E-007   3.4224827072653220E-007  -2.8442786843828964E-006  -2.1659136874393916E-006   1.1676028798792630E-006   7.7207057360412896E-007  -9.1096078788331094E-007  -5.1763876300343729E-007   5.7951676915570188E-007   5.7537217013760864E-007   6.6689094587605907E-007   2.8038630101438946E-007  -1.1643581119570172E-007  -6.7326923971728432E-007  -2.6987108042351803E-007   1.8461791988177166E-007  -4.1438939234399476E-007  -1.0928265389874357E-006  -2.9137865320106682E-007  -3.8842423315993727E-007   1.5945955275396069E-007   1.2165929737095732E-006   6.7944117487258568E-007   6.9939842695770080E-008  -3.0059396691029070E-007   9.1591392057407878E-008   6.3364158065781152E-007  -3.2429932296594143E-008  -8.9830428565152982E-007  -4.2779238002005885E-007  -2.3886614263345756E-008   1.2137678877477031E-006   3.2924479664365233E-007  -1.2139582321715520E-006  -3.6702576497913781E-007   5.0465387267885283E-008   6.5870061870102528E-007   8.5542273376509149E-007  -1.3749919668201653E-007  -6.3890836022222817E-007  -1.6673382990011336E-007  -2.8776707133272100E-009  -2.3837580914830354E-007  -3.5559544191121042E-007   5.1681274189780603E-007   7.9634153976675489E-007  -5.2253169917276209E-007  -4.2063467240530805E-007   6.3342612833156222E-007   1.2463099986521361E-007  -6.7724012744272086E-007  -5.2562509530661129E-007  -2.9895053513759610E-007   8.1365797104144494E-008   4.0827195382816548E-007   3.1472307407947221E-007   2.4795546075333988E-007   6.9160695068119606E-008  -2.0493863086734955E-007  -1.9541397372528005E-007  -7.4224374491435569E-009   1.3867675657556652E-007  -1.5268767001826435E-007  -4.1348883893883681E-007   1.5808558101927034E-007   3.8901052363527657E-007  -1.1535792404832750E-007   8.1252277084425432E-008   4.2074537698442795E-007   1.7005733639351340E-007  -5.0112382467628866E-008  -3.1205165647309915E-007  -1.8765457817684026E-007  -3.6898362829717652E-007  -1.7962638037503434E-007   4.5240379008330620E-007   3.4579994289111354E-007  -2.8709543022658292E-007  -2.5988392054762199E-007   2.6892262749335614E-007   1.5857994436816598E-007   9.6981583436147731E-008  -6.3642815820475817E-008  -2.7086950091904952E-007  -1.8617135424112240E-007   2.1230562005520603E-008   2.2874958471775148E-007   7.0478329529069544E-008  -1.8947357460679970E-007   2.7646162540158747E-008   6.4184560833052305E-008  -1.1981285153687217E-007  -7.6970153345552073E-008   8.7090895578182240E-008   5.4823779870550666E-008   6.6396582185945968E-008   6.6404481869486482E-008  -1.1270699827769030E-007  -6.3904035123867831E-008   4.2384734006036069E-008   2.0939706545831121E-008   1.0475070986105183E-007   5.7683538398690461E-008  -4.5985451964963776E-008  -1.1328908459117208E-008   5.7404995303250962E-008   6.8093464889033965E-008  -3.5885674890602697E-008  -4.0898804688282672E-008   3.5396824021491323E-008  -4.0508801824075100E-008  -2.4226938594900682E-009   8.9552616897419143E-008   1.8836458192068788E-008  -2.0442823100182411E-008  -2.6781663638633067E-008  -1.6135640087062755E-008   2.8286455621570606E-008   3.2058988233243617E-008  -8.1552280421800793E-010   1.0158412465466121E-008   1.0025657127386516E-008  -1.7808791743789088E-008   2.2830792269040230E-009   3.1209655716809776E-008   1.4596468439760273E-008  -5.4910582643551625E-009  -6.8368175890971954E-009   1.2574175611894136E-008   2.3694380820922656E-008   6.3131744935575032E-009  -1.1809983961072000E-008   1.3093226689876330E-009   7.5713982846095255E-009   5.1400667195966348E-010   5.4199721913842316E-010   2.7579563730199802E-009   6.9643936329621698E-009   2.5732097813989811E-009   5.0298674556686664E-009   1.0034317012718445E-008   7.7489056984459495E-010   4.3035968917853113E-009   9.5959456124564777E-009   1.5670584203770407E-009   8.8826951660899190E-010   2.5042098255340840E-009   3.4205076975911027E-009   4.4195618274570148E-009   1.9078881738415649E-009   2.0672591497932680E-009   4.9393557154682225E-009   3.4181285412234135E-009   1.1072184837844229E-009   1.4093449084394081E-009   3.2267037683312277E-009   5.4541450393123346E-009   2.9756064941716341E-009   2.6810561638725797E-009   3.7111220252023256E-009   3.8251664991262372E-009   3.4216345885537941E-009   2.1795341904356852E-009   2.8081487350569240E-009   3.1509486977473107E-009   3.6659380422627764E-009   4.3967770028820375E-009   4.0471606461912722E-009   3.1780214386541374E-009   3.2115054768767537E-009   3.3776092177472428E-009   3.5971112890141247E-009   3.8811647026399880E-009   3.8961859792191984E-009   1.6023436755458499E-009   2.3013006529855512E-008   0.0000000000000000     
 Old AD: x_ad%pres=    1.1004655896748789E-012   1.1012780718058310E-012   1.1021770228680443E-012   1.2390770167766355E-012   1.5124612765757849E-012   1.6504286391756196E-012   1.6524803810264289E-012   1.8457406895348035E-012   2.2311369702176298E-012   2.4265245602060034E-012   2.4309199136186082E-012   2.6722420268107176E-012   3.1522247854810820E-012   3.3975016675114246E-012   3.4061674488062390E-012   3.6888657524098932E-012   4.2485051331724149E-012   3.0414181194746840E-006  -1.0504619291046945E-006  -6.0550325328054219E-007  -2.7799242180457855E-007  -1.6354260831599319E-007  -1.0613727060286996E-007  -7.9389123981819798E-008  -6.5138290084592483E-008  -5.2129098574370145E-005   3.0200963379270027E-005   5.1694582723128784E-006   2.7768762388401364E-006   1.7511248219282867E-006  -1.7506256755761215E-005   6.8848007713787915E-006   4.7385588597178424E-006   2.2698873306816621E-006   5.7846182804039575E-006   5.8421726410029815E-006  -3.2425373145400097E-006  -4.1120955997953116E-007  -7.0611161303112726E-006   3.0474257026892520E-007   2.6619334472295470E-006   1.0837514902862348E-006   7.6870978186280207E-006  -3.5883165793752061E-006  -2.8383067084441484E-007  -1.3827486712535398E-006   8.4258542171836921E-007   1.8439799660280273E-006   1.9534412716954794E-006  -1.3234878246402620E-006   6.1440639661062875E-006  -1.9573993282536671E-006  -4.5579723192580432E-007   1.1970092867816896E-006  -1.6365627918840317E-006  -5.6229498807713240E-006   2.0912387668461819E-006  -1.1319161217873572E-006   7.3802525222481047E-007   1.1109183290121985E-006   8.1348167383642734E-008  -7.3350885762718067E-007   1.5815757591338940E-007   4.7178303716907081E-006  -1.0317766762947377E-006  -1.0255955013008732E-006  -3.4130836934217033E-007   2.0089901850808104E-006  -1.0679418538544388E-006   3.5094407160876186E-009  -1.0976068707415810E-006  -1.5593806660332302E-007  -3.7226055103725734E-007   5.8774730761846850E-007   6.5479563393938622E-007  -1.6836708370041641E-007  -1.8782465145776975E-007   1.0130282883049134E-006   1.1785543495336563E-006  -5.9225506399786767E-007   1.4873477309091944E-006  -1.8095793601067959E-006  -8.0741616477656708E-007  -6.6357607787597535E-007   5.1886423581170456E-007   1.3841641863630221E-007  -3.4540881423500766E-007  -1.0385202226080610E-006   1.1591066524126677E-006   8.7808689100055586E-007   9.8557179455328782E-008  -4.1888634117413267E-008  -2.7700021493864556E-006   2.0066866015793724E-006   7.9024156176997355E-007   5.8148855230366972E-008  -1.7257091438937898E-007  -1.3694687236629840E-006  -6.4217961424804272E-007   9.5939076837720330E-007   5.4207200203103163E-007  -1.5173441298563587E-007   1.5812291146568287E-007   4.1174602121619403E-007   4.4387061421112600E-007  -1.6745733755606605E-006  -2.2765534736470443E-007   1.4755009098411259E-006  -4.7544365849255687E-007  -1.0542364981953843E-006   7.4414109030515566E-007   8.7215652800816725E-007   3.8930024298492833E-007   3.4011509107061686E-007  -5.3123213890525238E-007  -4.5525204956671785E-007  -3.0817332609287646E-007  -2.9663503160705381E-007   1.2617358556239494E-007   3.7476047943769712E-007   1.0500811375245719E-007  -8.5283980121870205E-008  -2.5567369720113822E-007   6.3609303255309437E-007   3.9053389848006359E-007  -6.7539912626183507E-007  -1.5109368027950284E-007   3.8280093475063860E-007  -5.5088871297455610E-007  -2.9173606847847453E-007  -4.7893114172025702E-008   1.4952856036355168E-007   4.7684107857720771E-007  -1.0493017914655621E-007   8.4991656231130234E-007  -4.9899007649538511E-007  -4.0531290371816077E-007  -2.8563843316600908E-007   8.6818537949746363E-007  -3.5648745559156121E-007  -1.8005183278132728E-007  -1.3582293688847315E-007  -5.8066501813614860E-008   1.8066685116738591E-007   3.4582952779613876E-007   1.2077697330027599E-008  -5.4484972735467861E-008  -3.9199381636622976E-007   2.6085222139818290E-007   1.0401157045887071E-007  -1.5997127349105452E-007   3.7827232939205338E-008   1.9161547699788342E-007  -4.8689713844288116E-008  -1.2114807717142786E-007   1.5852335890468439E-008  -1.4613724574342909E-007   1.9050785227107265E-008   2.0001303948355177E-007  -8.0275903025776750E-008  -1.4604687308647705E-009  -4.0188217300520251E-008  -1.6476799879457631E-007   5.4708446835960082E-008   3.3576381200713617E-008  -1.2635540181123711E-008  -1.0016524125968051E-007  -3.1378834917334286E-008   1.0148718625415932E-007  -2.4384158208845336E-008  -4.4369620359502995E-008   1.2362925808924425E-007  -1.2201771723473020E-007  -4.9580889009990171E-008   1.3834052559500174E-008   2.4355365820776960E-008   2.5470176087081263E-008   4.0403197030714327E-009  -5.8740248542280513E-008  -1.6385131395590342E-009   2.7397275682205886E-009  -2.2573529946956395E-008   3.5242871825128770E-009   2.9679196351542360E-008  -3.5306535577440420E-008  -2.3783267208999170E-008  -3.8707315683665636E-009   1.3890111206261171E-008  -1.8324181460777734E-009  -2.2386656643138363E-008  -2.2261667271054352E-008   1.0490056127168216E-008   1.1149674787945592E-008  -1.4274798756191533E-008  -1.4084653776137410E-010  -1.2897468074384411E-009  -1.6953087406402738E-010  -5.4798545940889972E-009  -7.9983507299352023E-009   2.8615730308439142E-009  -1.2840167080959857E-008  -6.1766124526951722E-009   4.4571938920409331E-009  -1.3110777158816235E-008  -5.0365047128668655E-009   1.8649804751098575E-009  -3.9438263573500272E-009  -1.0761956150709587E-009  -5.7220943181402464E-009  -2.8309751952430851E-009  -1.0660829747640048E-009  -3.2010893203038160E-009  -6.4100137072989683E-009  -2.2901199505749442E-010  -2.2353706576995606E-009  -7.7962136058377310E-010  -5.7339914001578103E-009  -4.8325668542546401E-009  -1.0464577605504412E-009  -4.4092621070723826E-009  -2.9618759067531605E-009  -4.6437867241389682E-009  -2.1519308403247024E-009  -2.2241296209711529E-009  -3.3989369168475739E-009  -2.8650944013252155E-009  -4.5413065920199389E-009  -4.3426572348951124E-009  -3.8012713422713778E-009  -2.5620423614154456E-009  -3.8656018436141592E-009  -2.8026015103254308E-009  -4.3944387595568349E-009  -3.4258030643229057E-009  -4.4452440668523519E-009   1.8086125506599400E-009  -4.9901118740931816E-008
 Old AD: SUM(x_ad%pres*bkk) =   -3.4436803358563923E-006
 Old AD: SUM(p_hlv_ad*x%bk) =    7.7166130628043100E-007
 Old AD: psfc_ad  =   -2.6720190295759615E-006

ad_pk2.png

by Ian Culverwell, 3 years ago

Attachment: ad_pk2.png added

ad_pk2.png

comment:5 by Ian Culverwell, 3 years ago

Old code:

t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6675009824E+01   5.6675922134E+01   9.9998390304E-01  -1.6096957208E-05
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2203924854E-06  -1.2203645691E-06   1.0000228753E+00   2.2875319027E-05
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6571637154E+02   1.6571893630E+02   9.9998452345E-01  -1.5476552199E-05
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.1194008302E-06  -1.1193765584E-06   1.0000216833E+00   2.1683307841E-05
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.0940552695E+02   3.0941064813E+02   9.9998344862E-01  -1.6551384048E-05
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1316938069E-06   2.1316959234E-06   9.9999900711E-01  -9.9289407668E-07
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7820209639E+02   1.7820500702E+02   9.9998366694E-01  -1.6333063728E-05
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.4916158840E-07   3.4918026693E-07   9.9994650749E-01  -5.3492506902E-05
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2309095564E+02   2.2309482337E+02   9.9998266329E-01  -1.7336705272E-05
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.6035860644E-07   2.6035428962E-07   1.0000165806E+00   1.6580565412E-05
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6846615240E+01   5.6847529346E+01   9.9998392003E-01  -1.6079970168E-05
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2053743437E-06  -1.2053457596E-06   1.0000237145E+00   2.3714453218E-05
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6580871330E+02   1.6581128014E+02   9.9998451950E-01  -1.5480496027E-05
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2246220831E-06  -1.2245983064E-06   1.0000194159E+00   1.9415867178E-05
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.1044102809E+02   3.1044617063E+02   9.9998343503E-01  -1.6564972277E-05
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1259067952E-06   2.1259085784E-06   9.9999916123E-01  -8.3877299157E-07
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7888156377E+02   1.7888448521E+02   9.9998366856E-01  -1.6331439332E-05
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   4.7346723722E-07   4.7348356775E-07   9.9996550984E-01  -3.4490162156E-05
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2458805857E+02   2.2459195048E+02   9.9998267121E-01  -1.7328785474E-05
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.4841981056E-07   1.4841465876E-07   1.0000347122E+00   3.4712179792E-05
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6687815592E+01   5.6688728313E+01   9.9998389942E-01  -1.6100577477E-05
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2288295301E-06  -1.2288015962E-06   1.0000227326E+00   2.2732580055E-05
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6566436837E+02   1.6566693437E+02   9.9998451109E-01  -1.5488906584E-05
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.1210643567E-06  -1.1210400876E-06   1.0000216487E+00   2.1648704840E-05
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.0957269353E+02   3.0957781822E+02   9.9998344620E-01  -1.6553799268E-05
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1316878893E-06   2.1316900058E-06   9.9999900710E-01  -9.9289921550E-07
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7845298128E+02   1.7845589873E+02   9.9998365172E-01  -1.6348275775E-05
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.4918791581E-07   3.4920659439E-07   9.9994651140E-01  -5.3488603969E-05
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2332420600E+02   2.2332807767E+02   9.9998266373E-01  -1.7336267074E-05
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.6039273108E-07   2.6038841426E-07   1.0000165784E+00   1.6578394280E-05
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6857016264E+01   5.6857930755E+01   9.9998391621E-01  -1.6083791488E-05
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2065953436E-06  -1.2065667682E-06   1.0000236832E+00   2.3683193351E-05
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6575772354E+02   1.6576029161E+02   9.9998450735E-01  -1.5492645527E-05
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2248689789E-06  -1.2248451994E-06   1.0000194143E+00   1.9414291543E-05
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.1062351750E+02   3.1062866417E+02   9.9998343143E-01  -1.6568572684E-05
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1259884252E-06   2.1259902084E-06   9.9999916120E-01  -8.3880305498E-07
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7913644136E+02   1.7913936991E+02   9.9998365211E-01  -1.6347885083E-05
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   4.7350037593E-07   4.7351670650E-07   9.9996551215E-01  -3.4487852276E-05
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2483850993E+02   2.2484240650E+02   9.9998266981E-01  -1.7330190254E-05
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.4843261802E-07   1.4842746628E-07   1.0000347088E+00   3.4708826591E-05
****************************
********** *FAIL* **********
****************************

As expected: inconsistent TL and AD.

JKN code:

t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6675009824E+01   5.6675009824E+01   1.0000000000E+00   2.8835430242E-15
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2203924854E-06  -1.2203924854E-06   1.0000000000E+00   3.4009234663E-12
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6571637154E+02   1.6571637154E+02   1.0000000000E+00   7.0318344276E-15
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.1194008302E-06  -1.1194008302E-06   1.0000000000E+00   5.3989419300E-12
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.0940552695E+02   3.0940552695E+02   1.0000000000E+00  -5.2175961805E-14
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1316938069E-06   2.1316938069E-06   1.0000000000E+00   2.5027220143E-12
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7820209639E+02   1.7820209639E+02   1.0000000000E+00  -1.1483383869E-14
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.4916158840E-07   3.4916158841E-07   9.9999999999E-01  -9.1503631659E-12
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2309095564E+02   2.2309095564E+02   1.0000000000E+00  -2.7263524873E-14
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.6035860644E-07   2.6035860645E-07   9.9999999999E-01  -6.7032869475E-12
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6846615240E+01   5.6846615240E+01   1.0000000000E+00  -6.6246274886E-15
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2053743437E-06  -1.2053743437E-06   1.0000000000E+00   2.3489958942E-12
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6580871330E+02   1.6580871330E+02   1.0000000000E+00  -3.7710780998E-15
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2246220831E-06  -1.2246220831E-06   1.0000000000E+00   4.7469233141E-12
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.1044102809E+02   3.1044102810E+02   1.0000000000E+00  -5.8959928671E-14
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1259067952E-06   2.1259067952E-06   1.0000000000E+00   2.1360031590E-12
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7888156377E+02   1.7888156377E+02   1.0000000000E+00  -1.0009794505E-14
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   4.7346723722E-07   4.7346723723E-07   9.9999999999E-01  -7.2495875748E-12
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2458805857E+02   2.2458805857E+02   1.0000000000E+00  -3.5560663380E-14
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.4841981056E-07   1.4841981056E-07   9.9999999999E-01  -8.7524091213E-12
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6687815592E+01   5.6687815592E+01   1.0000000000E+00   7.6459299814E-15
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2288295301E-06  -1.2288295301E-06   1.0000000000E+00   2.0730715909E-12
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6566436837E+02   1.6566436837E+02   1.0000000000E+00   8.5780997177E-15
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.1210643567E-06  -1.1210643567E-06   1.0000000000E+00   4.0428201249E-12
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.0957269353E+02   3.0957269353E+02   1.0000000000E+00  -5.5269309712E-14
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1316878893E-06   2.1316878893E-06   1.0000000000E+00   2.1401441913E-12
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7845298128E+02   1.7845298128E+02   1.0000000000E+00  -1.3856247750E-14
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.4918791581E-07   3.4918791581E-07   9.9999999999E-01  -5.7146987460E-12
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2332420600E+02   2.2332420600E+02   1.0000000000E+00  -3.0543980814E-14
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.6039273108E-07   2.6039273108E-07   9.9999999999E-01  -5.1708999064E-12
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6857016264E+01   5.6857016264E+01   1.0000000000E+00   1.0497488916E-14
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2065953436E-06  -1.2065953436E-06   1.0000000000E+00   1.5735386030E-12
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6575772354E+02   1.6575772354E+02   1.0000000000E+00   2.7434459232E-15
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2248689789E-06  -1.2248689789E-06   1.0000000000E+00   4.3861982943E-12
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.1062351750E+02   3.1062351750E+02   1.0000000000E+00  -5.8010301100E-14
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1259884252E-06   2.1259884252E-06   1.0000000000E+00   2.1815400535E-12
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7913644136E+02   1.7913644136E+02   1.0000000000E+00  -9.8368928809E-15
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   4.7350037593E-07   4.7350037593E-07   9.9999999999E-01  -1.1267005076E-11
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2483850993E+02   2.2483850993E+02   1.0000000000E+00  -3.0085445978E-14
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.4843261802E-07   1.4843261802E-07   9.9999999999E-01  -8.8691724638E-12
****************************
********** PASS **********
****************************

Max frac diff between norms ~ 9 10-12.

IDC code:

t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6675009824E+01   5.6675009824E+01   1.0000000000E+00   1.0029714867E-14
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2203924854E-06  -1.2203924854E-06   1.0000000000E+00   1.3523876274E-12
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6571637154E+02   1.6571637154E+02   1.0000000000E+00  -3.6016712922E-15
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.1194008302E-06  -1.1194008302E-06   1.0000000000E+00   6.9614948501E-13
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.0940552695E+02   3.0940552695E+02   1.0000000000E+00   1.4513735854E-14
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1316938069E-06   2.1316938069E-06   1.0000000000E+00  -4.5496812041E-13
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7820209639E+02   1.7820209639E+02   1.0000000000E+00  -1.2759315410E-15
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.4916158840E-07   3.4916158840E-07   1.0000000000E+00  -4.4879248018E-13
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2309095564E+02   2.2309095564E+02   1.0000000000E+00   8.5357764789E-15
t_fascod_ad_1.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.6035860644E-07   2.6035860644E-07   1.0000000000E+00  -5.5611641343E-13
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6846615240E+01   5.6846615240E+01   1.0000000000E+00  -7.1245993746E-15
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2053743437E-06  -1.2053743437E-06   1.0000000000E+00   8.8893270696E-14
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6580871330E+02   1.6580871330E+02   1.0000000000E+00  -1.7141264090E-16
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2246220831E-06  -1.2246220831E-06   1.0000000000E+00  -3.9907563444E-12
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.1044102809E+02   3.1044102809E+02   1.0000000000E+00   2.3803697911E-15
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1259067952E-06   2.1259067952E-06   1.0000000000E+00  -8.1619147008E-13
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7888156377E+02   1.7888156377E+02   1.0000000000E+00   7.1498532180E-15
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   4.7346723722E-07   4.7346723723E-07   1.0000000000E+00  -4.8847530327E-12
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2458805857E+02   2.2458805857E+02   1.0000000000E+00  -8.0992258231E-15
t_fascod_ad_2.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.4841981056E-07   1.4841981056E-07   1.0000000000E+00   1.8781404446E-12
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6687815592E+01   5.6687815592E+01   1.0000000000E+00  -1.4539801276E-14
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2288295301E-06  -1.2288295301E-06   1.0000000000E+00  -1.0741026788E-12
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6566436837E+02   1.6566436837E+02   1.0000000000E+00  -1.6469951458E-14
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.1210643567E-06  -1.1210643567E-06   1.0000000000E+00  -4.8720487539E-12
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.0957269353E+02   3.0957269353E+02   1.0000000000E+00  -1.8361896914E-15
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1316878893E-06   2.1316878893E-06   1.0000000000E+00   5.5669179577E-13
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7845298128E+02   1.7845298128E+02   1.0000000000E+00   5.2558181122E-15
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.4918791581E-07   3.4918791581E-07   1.0000000000E+00  -8.4915444570E-13
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2332420600E+02   2.2332420600E+02   1.0000000000E+00   5.5997298159E-15
t_fascod_ad_3.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.6039273108E-07   2.6039273108E-07   1.0000000000E+00   1.1381103120E-12
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   5.6857016264E+01   5.6857016264E+01   1.0000000000E+00   6.8733558380E-15
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2065953436E-06  -1.2065953436E-06   1.0000000000E+00  -8.5170453271E-13
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.6575772354E+02   1.6575772354E+02   1.0000000000E+00   1.0287922212E-15
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =  -1.2248689789E-06  -1.2248689789E-06   1.0000000000E+00   3.2017812625E-13
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   3.1062351750E+02   3.1062351750E+02   1.0000000000E+00   5.8559294486E-15
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.1259884252E-06   2.1259884252E-06   1.0000000000E+00   2.1813408443E-13
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.7913644136E+02   1.7913644136E+02   1.0000000000E+00   1.4279360634E-15
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   4.7350037593E-07   4.7350037593E-07   1.0000000000E+00  -4.9225365619E-12
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   2.2483850993E+02   2.2483850993E+02   1.0000000000E+00   1.0871211572E-14
t_fascod_ad_4.log:norm1, norm2, norm1/norm2, (norm1-norm2)/norm2 =   1.4843261802E-07   1.4843261802E-07   1.0000000000E+00   6.0610321444E-12
****************************
********** PASS **********
****************************

Max frac diff between norms ~ 6 10-12.

comment:6 by Ian Culverwell, 3 years ago

Resolution: fixed
Status: newclosed
Version: 9.011.0

That's good enough, and passes all core tests:

************************** SUMMARY OF ROPP_FM TEST RESULTS ***************************
--------------------------------------------------------------------------------------
|                   Test name    |              Description       |    Run? |  PASS? |
--------------------------------------------------------------------------------------
|                     t_fascod_1 |                   FM FASCOD 1D |     Run |  PASS  |
|                  t_fascod_tl_1 |                FM_TL FASCOD 1D |     Run |  PASS  |
|                  t_fascod_ad_1 |                FM_AD FASCOD 1D |     Run |  PASS  |
|                     t_fascod_2 |             FM FASCOD 1D -comp |     Run |  PASS  |
|                  t_fascod_tl_2 |          FM_TL FASCOD 1D -comp |     Run |  PASS  |
|                  t_fascod_ad_2 |          FM_AD FASCOD 1D -comp |     Run |  PASS  |
|                     t_fascod_3 |           FM FASCOD 1D -new_op |     Run |  PASS  |
|                  t_fascod_tl_3 |        FM_TL FASCOD 1D -new_op |     Run |  PASS  |
|                  t_fascod_ad_3 |        FM_AD FASCOD 1D -new_op |     Run |  PASS  |
|                     t_fascod_4 |     FM FASCOD 1D -comp -new_op |     Run |  PASS  |
|                  t_fascod_tl_4 |  FM_TL FASCOD 1D -comp -new_op |     Run |  PASS  |
|                  t_fascod_ad_4 |  FM_AD FASCOD 1D -comp -new_op |     Run |  PASS  |
|                     t_twodop_1 |                        FM TWOD |     Run |  PASS  |
|                     t_twodtl_1 |                     FM_TL TWOD |     Run |  PASS  |
|                     t_twodad_1 |                     FM_AD TWOD |     Run |  PASS  |
|                     t_twodop_2 |                  FM TWOD -comp |     Run |  PASS  |
|                     t_twodtl_2 |               FM_TL TWOD -comp |     Run |  PASS  |
|                     t_twodad_2 |               FM_AD TWOD -comp |     Run |  PASS  |
|                       t_iono_1 |                   FM L1 and L2 |     Run |  PASS  |
|                    t_iono_tl_1 |                FM_TL L1 and L2 |     Run |  PASS  |
|                    t_iono_ad_1 |                FM_AD L1 and L2 |     Run |  PASS  |
|                      t_fm_1D_1 |         FM 1D; default options |     Run |  PASS  |
|                      t_fm_1D_2 |        FM 1D; compress factors |     Run |  PASS  |
|                      t_fm_2D_1 |         FM 2D; default options |     Run |  PASS  |
|                      t_fm_2D_2 |        FM 2D; compress factors |     Run |  PASS  |
|                    t_fm_iono_1 |             FM iono; L_neutral |     Run |  PASS  |
|                    t_fm_iono_2 |             FM iono; L1 and L2 |     Run |  PASS  |
--------------------------------------------------------------------------------------

Committed rough and ready changes to code at r6876.

Closing ticket - see #552 for further developments.

Note: See TracTickets for help on using tickets.