Stable diags #11, #21, #24#483
Conversation
| real(r_def), parameter :: isa_press_bot = 101325.0_r_def | ||
|
|
||
| ! Pressure (Pa) at 11,000 gpm. | ||
| real(r_def), parameter :: isa_press_mid = 22632.0_r_def |
There was a problem hiding this comment.
Claude says isa_press_mid should be 22632.1 and isa_press_top should be 5474.89. Should we do anything?
| ! Subtract geopotential heights at 850 and 500 hPa from that at 1000 hPa. | ||
| ! | ||
| ! Snow probability: | ||
| ! Implement Boyden (1964), using 850 and 1000 hPa. |
There was a problem hiding this comment.
Claude doesn't ... "think" the code further down matches the Boyden equation.
|
|
||
| call conv_cloud_base_icao_height%write_field() | ||
|
|
||
| ! Is it necessary/safe to remove this field now? |
There was a problem hiding this comment.
Need steering on this question please.
|
|
||
|
|
||
| ! Process every DOF in this cell. | ||
| do df = 1, result_ndf |
There was a problem hiding this comment.
Might be worth having a chat/steer about if/when we can skip this loop, as does the other kernel in this PR.
| ! Lapse rate (degreeC/km) for levels below 11,000 gpm. | ||
| real(r_def), parameter :: isa_lapse_ratel = 6.5e-03_r_def | ||
|
|
||
| ! Lapse rate (degreeC/km) for levels above 20,000 gpm. |
There was a problem hiding this comment.
This comment, as copied from the UM, said 11,000. Claude spotted the error. Worth mentioning just in case.
| if(snow_probability_flag .and. i850 /= -1) then | ||
| gph_850 = plev_geopot(source_map(df) + i850-1) | ||
| snow_probability(result_map(df)) = & | ||
| 5220.0_r_def + 3.86666_r_def*gph_1000 - 4.0_r_def*gph_850 |
There was a problem hiding this comment.
The earliest I've been able to track these magic numbers so far is here.
| <field field_ref="forcing__dt_force" /> | ||
| </file> | ||
|
|
||
| <file id="lfric_aviation" name="lfric_aviation" output_freq="6h" convention="UGRID" enabled=".TRUE."> |
There was a problem hiding this comment.
Couldn't find documentation for the <file> and <field_group> tags.
| </field_group> | ||
|
|
||
| <!-- Section 20 Aviation diagnostics --> | ||
| <field_group operation="instant" freq_op="6h"> |
There was a problem hiding this comment.
KGO? I got the impression there isn't any yet?
79ea31a to
8372788
Compare
| plev_geopot_clim_flag = diag_samp('plev__geopot_clim') | ||
| plev_geopot_flag = init_diag(plev_geopot, 'plev__geopot', activate=plev_geopot_clim_flag) | ||
| if ((plev_geopot_flag .or. plev_geopot_clim_flag) .and. use_xios_io) then | ||
| plev_geopot_flag = init_diag(plev_geopot, 'plev__geopot', & |
There was a problem hiding this comment.
Just an observation: From a software engineering perspective, this module (and others) should probably not know anything about the aviation module. I think it's a pattern which can lead to a rat's nest of dependencies. One solution might be to express field dependencies in a centralised place, which init_diag could check for itself, without needing the activate arg. Is that worth raising in a ticket somewhere?
PR Summary
Three Section 20 aviation diagnostics created from plev_geopot.
Output from suite u-dy804:
geopotential thickness
snow probability
(That ticket contains a incorrect link to the um code, which should be pws_snow_prob_diag.F90.)

icao cloud heights
Note: we have not found a UM Section 20 example of these two fields for comparison.


Sci/Tech Reviewer:
Code Reviewer: Alistair Pirrie (@mo-alistairp)
Code Quality Checklist
Testing
trac.log
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review