-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify the surface air pressure in RCE model based on climt #163
Comments
Thanks for the report! Could you confirm that you are actually using version 0.15.3 ? There have been many updates to climt after that. |
Hi Joy, actually I'm not sure which version I'm using, but I saw it was updated on February 1, 2023. I installed it in July using pip install, so I believe it should be the latest version. |
Hi Joy, do you have any ideas about modifying the surface air pressure in RCE model? Thanks! |
Sorry for the delayed reply, have been travelling. I think the issue is due to the boundary layer component, which is quite simple. if you see the initialization function
you will see that the top of the boundary layer is set to 850 hPa, and setting the surface pressure to below this might be causing the issue that you observe. My suggestion is to set this parameter to maybe 700 hPa (you can try a few options depending on your observations). Also, to ensure the boundary layer is not too deep, maybe you could also play around with the boundary layer influence height
Maybe reduce this by half to ensure the boundary layer is not too deep. Also, you should be setting the surface pressure while creating the model grid. Since climt uses a hybrid sigma grid, the surface pressure is an important part of the grid itself and climt must know about it while creating model state. So, if you make the following change
If I make these two changes, the model runs fine. Please let me know if this solves your problem! |
Just to make more explicit, you can change the arguments to the boundary layer like this
|
Hi Joy, thank you very much for your detailed reply! And sorry for the late reply. |
Hi Joy, thank you very much for your detailed reply! And sorry for the late reply. |
Hello Meng Zuo, sorry for the delayed reply. Could you please send me the script that you have written, and explain a little more what you anticipated and what results you have obtained? @Ai33L might have written some components which may also be of help. |
Hi Joy, thank you very much for your reply. @JoyMonteiro @Ai33L from climt import EmanuelConvection, RRTMGShortwave, RRTMGLongwave, SlabSurface def plot_function(fig, state):
monitor = PlotFunctionMonitor(plot_function) timestep = timedelta(minutes=5) convection = EmanuelConvection() simple_physics = SimplePhysics(top_of_boundary_layer=50000.0) store_quantities = ['air_temperature', state = get_default_state([simple_physics, convection, grid_state = get_grid(p_surf_in_Pa=70000.0) state = get_default_state([simple_physics, convection, state['air_temperature'].values[:] = 270 state['zenith_angle'].values[:] = np.pi/2.5 time_stepper = AdamsBashforth([convection, radiation_lw, radiation_sw, slab]) for i in range(20000):
` And what I anticipate is to get the following result, as Hu and Boos done in their paper based on the CliMT tool. Hu, S., and W. R. Boos, 2017: The Physics of Orographic Elevated Heating in Radiative–Convective Equilibrium. J. Atmos. Sci., 74, 2949–2965, https://doi.org/10.1175/JAS-D-16-0312.1. Thank you very much, and looking forward to your reply. |
Hi @MengZuo Sorry for the delayed response, just seeing this now. I ran your script for a few values of surface pressures. This is what I get, seems similar to the plot you sent - As Joy said, setting surface pressure as an argument and setting top of boundary layer above that level should be sufficient in your case. There should also be no processes below set surface pressure that come into calculations. I find that the model needs around 6 months to equilibriate from initialisation. The results can also vary a bit with surface albedo and how you set boundary layer height. Hope this helps! Please let me know if there's something I missed out. |
Hi @Ai33L @JoyMonteiro |
Hi @MengZuo In your model configuration, area type sets suitable default values for heat capacity, depth and surface material density in the SlabSurface component. You can find the relevant code here - climt/climt/_components/slab_surface.py Lines 113 to 125 in c3bdf05
The easiest way to implement reduced latent heat flux over land in the Simple physics component is to manually set a lower value for surface specific humidity. You can do this by making these changes to your code - add
change
use_external_surface_specific_humidity allows you to manually set surface specific humidity. You've declared simple_physics twice in your code, just do it once. and add these four lines to calculate surface specific humidity before you call simple_physics (inside the time loop). You can change scaling as you wish.
Hope this helps! |
Description
I have recently been learning how to use the RCE model and encountered some issues when trying to modify the surface air pressure.
My purpose is to set the surface air pressure to 700hPa and analyze the elevated heating effect, just like Hu and Boos (2017) did, they used the CliMT (Caballero 2012).
Hu, S., and W. R. Boos, 2017: The Physics of Orographic Elevated Heating in Radiative–Convective Equilibrium. J. Atmos. Sci., 74, 2949–2965, https://doi.org/10.1175/JAS-D-16-0312.1.
My current approach is to adjust the surface air pressure based on gmd_radiative_convective.py. However, I encounter “Segmentation fault (core dumped)” issues when running it.
Do you have suggestions on how to modify the surface air pressure in this model?
I added the following line in gmd_radiative_convective.py:
state['surface_air_pressure'].values[:] = 70000.0
errors are shown here:
19 [[295.72299787]]
[[4201.48460143]]
[[18479.28398476]]
Segmentation fault (core dumped)
The text was updated successfully, but these errors were encountered: