Pull request to put the Isca Mars configurations into Isca's master - #299
Pull request to put the Isca Mars configurations into Isca's master#299sit23 wants to merge 107 commits into
Conversation
…my module in order that we can correctly calculate rrsun using the true anomaly rather than the mean anomaly. Have also added multiplication by rrsun to two-stream-grey-rad, which makes no difference to results in initial tests when ecc = 0.0
…ue anomaly, and therefore be able to do mars time-telling.
… expects orbital_period in seconds, but I had supplied it in days. This is because Alex's code expects it in days. Will fix Alex code to make it consistent.
…e of surface optical depths and albedos, assuming transparancy in the visible. Useful for working out rough values for optical depths and albedos for a simple mars model.
…ay is not the same as one mars day. Have altered rotation rate and orbital rate such that each can be set as an integer, and we end up with a length of sol which is also an integer. This can then be used as the averaging period.
…dependently. Then also only calculating rh when rh is asked for. Model now runs and looks vaguely mars-like, but dates of equinox etc still not right.
…nml, and ability to use specified temperatures for evaporation calculations in surface flux. This means that, when using a dry model where temperatures are outside standard range for sat specific humidity calculations, then false temps can be used to stop it failing.
Cores on a Mac cannot be tied in the same way that they can on linux, so core affinity is not possible. Here I am just stubbing out the core affinity functions to mimic the linux case where it cannot get the affinity info. More info in links inline in `affinity.c`.
…xis. For some reason, the interpolator will get rid of such variables when used on its own, so I modified the python to add them back.
…o idealized moist phys back in teh old GFDLMoistmodel repo on the local_heating_dev branch. This seems to work now, and should hopefully be useful. Only tried the Isidoro option, and not the input file option, but this should be fine.
Adding mac functionality to local heating branch
…cal prescribed heating input files. Seems to work alright, but problem is that local heating code always reads zeros no matter what I seem to do. Reading the created files into RRTM as an ozone does work, and reading ozone-1990 into local heating does not. Very odd. Tried everything I can think of, but we'll have to carry on testing.
…not being passed time, and therefore was not being fed to the correct interpolator within the interface type structure.
Updating from master
Local dry heating
Conflicts: src/atmos_param/two_stream_gray_rad/two_stream_gray_rad.F90
…p dry heating test case and associated script for generating heating rate. This now produced a heating array of zeros purely for test purposes.
…s and not automated compile tests.
…ing discovered by pytest.
…mn variants to prevent compilation failure.
…ase. Confirmed results bitwise identical, and have made it so that the max number of processors used for parallel compilation is 8, as this gives 32% speedup on serial compilation, but more cores does not give compilation speedup.
…oducible as random seed was not set. Now added as namelist parameter for both test cases, and verified that runs are reproducible.
…so non-Titan cases stay bit-identical to master Both update_tracers's grid-tracer branch (spectral_dynamics.F90) and the bucket-water diffusion call (idealized_moist_phys.F90) unconditionally ran a grid->spherical->grid round-trip that was only meant to support new, opt-in Titan features (do_spec_tracer_filter, damping_coeff_bucket damping). Even with those options left at their defaults (off), the round-trip isn't a no-op - it silently low-pass-filters real grid-scale structure (e.g. via floating-point reassociation in the tracer tendency, or truncation of land/ocean boundaries in the bucket case) - which broke bit-reproducibility against master for frierson, bucket_model, and realistic_continents_variable_qflux. Both call sites are now branched on their respective flags: the Titan path runs unchanged when requested, and everything else falls back to the exact pre-existing formulation. Verified bit-identical to master (eb64615) for frierson, bucket_model, and realistic_continents_variable_qflux. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
7f4201d ("Important fix for two-stream") corrected frac_of_day to account for total elapsed seconds rather than just the current day's remainder, needed for solar day lengths > 86400s (Mars, Titan) where the model's internal "days" bookkeeping (fixed 86400s calendar units) and the actual solar day length diverge. Master never needed this fix and still uses the original formulation. For day_in_s == 86400 (Earth-standard), the original formulation was already correct, but the code ran the total-elapsed-seconds path unconditionally. Since that path needs mod() to strip the accumulated whole-days component back out, it introduces a small precision loss vs directly using r_seconds - breaking bit-reproducibility against master for any do_seasonal Earth-day-length case (e.g. variable_co2_grey). Branch on day_in_s == 86400 instead: Earth-standard runs get the exact pre-7f4201dd formulation back, non-Earth day lengths keep 7f4201d's fix unchanged. Verified bit-identical to master for variable_co2_grey (and frierson, bucket_model together). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Having put all of the Mars-related modifications into this P/R, nearly all of the trip tests. However, I worked with Claude to find the causes of these trip test failures, and have identified and fixed all of them. The summary of this investigation (generated by Claude) is given below: SummaryThree genuine numerical regressions between
All three are now bit-identical to master. Socrates-based trip tests ( Fix 1 —
|
|
The plan for this branch now is to attempt to track down the cause of the top-down test divergence bug. If this can be found, a fix will be applied, and then this branch can be merged. |
The Isca Mars configurations haven't ever been merged into the master, and I'd like to make sure this is done ASAP.
In this P/R I have put in my grey-radiation Mars and Socrates Mars configurations without dust as test cases that can be run with the trip tests. These are the ones that are described in this paper:
https://www.mdpi.com/2073-4433/10/12/803
I'd also like to get in Emily Ball's Isca-Mars configurations that built on my Mars stuff, but I wanted to do this first. This P/R is ready for merging (pending passing the trip tests).