Skip to content
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

Cloud effect on tendencies #153

Open
wmcfarlane-smith opened this issue Feb 23, 2022 · 8 comments
Open

Cloud effect on tendencies #153

wmcfarlane-smith opened this issue Feb 23, 2022 · 8 comments

Comments

@wmcfarlane-smith
Copy link

I'm trying to create a relative humidity scheme that calculates cloud cover and cloud water mass from specific humidity. The problem I'm having is that when the cloud cover and water mass are changed it doesn't seem to affect anything else such as the air temperature tendency. What do I need to do so that the clouds do affect the rest of the model?

@JoyMonteiro
Copy link
Member

You could take a look at the example where clouds and cloud water are prescribed:
https://github.com/CliMT/climt/blob/develop/examples/radiative_heating_rrtmg_clouds.py

Could you try out RRTMG along with your RH cloud scheme using this template and check if the issue still persists?

@wmcfarlane-smith
Copy link
Author

Hi Joy,

It does seem like my clouds affect the plotted tendencies in that example. When I give the state values for cloud cover and water content how does CliMT then calculate tendencies? Is it just done straight away automatically? In the model I'm running I define the state like this:

timestep = timedelta(minutes = 20)
convection = climt.EmanuelConvection()
radiation_timestep = timedelta(minutes = 60)
radiation_sw = sympl.UpdateFrequencyWrapper(climt.RRTMGShortwave(mcica=True),
                                        radiation_timestep)
radiation_lw = sympl.UpdateFrequencyWrapper(climt.RRTMGLongwave(mcica=True),
                                        radiation_timestep)
simple_physics = sympl.TimeDifferencingWrapper(climt.SimplePhysics())
slab = climt.SlabSurface()
instellation = climt.Instellation()
nx = 62
ny = 62
nz = 15
grid = climt.get_grid(nx=nx, ny=ny, nz=nz)
dycore = climt.GFSDynamicalCore([simple_physics, slab, radiation_sw, radiation_lw,
                                 convection], number_of_damped_levels=5)
state = climt.get_default_state([dycore], grid_state=grid)

whereas in the example the shortwave and longwave states are kept separate. Might this be the cause of the problem?

1 similar comment
@wmcfarlane-smith
Copy link
Author

Hi Joy,

It does seem like my clouds affect the plotted tendencies in that example. When I give the state values for cloud cover and water content how does CliMT then calculate tendencies? Is it just done straight away automatically? In the model I'm running I define the state like this:

timestep = timedelta(minutes = 20)
convection = climt.EmanuelConvection()
radiation_timestep = timedelta(minutes = 60)
radiation_sw = sympl.UpdateFrequencyWrapper(climt.RRTMGShortwave(mcica=True),
                                        radiation_timestep)
radiation_lw = sympl.UpdateFrequencyWrapper(climt.RRTMGLongwave(mcica=True),
                                        radiation_timestep)
simple_physics = sympl.TimeDifferencingWrapper(climt.SimplePhysics())
slab = climt.SlabSurface()
instellation = climt.Instellation()
nx = 62
ny = 62
nz = 15
grid = climt.get_grid(nx=nx, ny=ny, nz=nz)
dycore = climt.GFSDynamicalCore([simple_physics, slab, radiation_sw, radiation_lw,
                                 convection], number_of_damped_levels=5)
state = climt.get_default_state([dycore], grid_state=grid)

whereas in the example the shortwave and longwave states are kept separate. Might this be the cause of the problem?

@JoyMonteiro
Copy link
Member

The dynamical core will call each physics component separately and sum up the resulting tendencies. So, yes it should "just work", as long as the tracer corresponding to cloud liquid water is registered as a tracer with sympl.

To register a tracer, you can use sympl's registration function:
https://github.com/mcgibbon/sympl/blob/f97e21153c27e1659612699fd717be093ff106d6/sympl/_core/tracers.py#L25

You can check if mass_content_of_cloud_liquid_water_in_atmosphere_layer is registered as a tracer by checking the spectral_names attribute of the dynamical core:

def spectral_names(self):

We haven't really tried this functionality out, so please let us know if you face any hiccups.

In case you haven't already, I would recommend testing your cloud component with the 1-D model to ensure it is working as expected (mass conservation etc.,).

Finally, I would appreciate if you could eventually contribute your cloud component to climt!

@JoyMonteiro
Copy link
Member

I just realised looking at the model script you have pasted, that the cloud component was not part of the "physics suite". Were you just testing the model with static values of cloud water?

@JoyMonteiro
Copy link
Member

JoyMonteiro commented Feb 25, 2022

Actually, looking at the gfs component, the input state is used to directly compute tendencies:

tendencies, diagnostics = self._tendency_component(state, timestep)

This means that cloud heating tendencies should be computed even if the clouds themselves are not
advected around by the dynamical core. Could you attach your current script? I'll take a look and write back.

@wmcfarlane-smith
Copy link
Author

You can check if mass_content_of_cloud_liquid_water_in_atmosphere_layer is registered as a tracer by checking the spectral_names attribute of the dynamical core

I can't seem to get the spectral_names function to work. It just says that it's not an attribute of climt.

I just realised looking at the model script you have pasted, that the cloud component was not part of the "physics suite".

I'm not quite sure what you mean by this. Do I need to add an argument to SimplePhysics? I would like the values of cloud water to vary.

Could you attach your current script?

Yes, here's the cloud scheme so far (not yet finished, currently water is double counted as vapour and liquid in clouds but I was trying to make it work before I ironed out those details)
RH_cloud_scheme.txt

And this is the model I am running (cloud scheme is currently commented out)
3D_model_clouds.txt

It is possible that it is working and I'm just checking if it's working in the wrong way but it seems to me like the air temperature tendencies aren't different when clouds are present. But I imagine you'll be better placed to tell if it's working than I am.

Another thing that you might be able to help with while you're looking at it is that the surface temperature doesn't seem to change from what I set it to initially. I imagine that just involves changing a setting that I'm not aware of.

Finally, I would appreciate if you could eventually contribute your cloud component to climt!

Yes, I definitely will once it's done!

@JoyMonteiro
Copy link
Member

Unfortunately climt does not yet have an inbuilt component to create clouds, though it can do convection. This is on the roadmap for the next year. You can of course implement your own cloud scheme and use it. We will be happy to guide you through the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants