pedrocol / basal_mom5-collaborative-project

4 stars 0 forks source link

WMT plots #8

Closed matthew-england-unsw closed 2 years ago

matthew-england-unsw commented 2 years ago

Plot water-mass transformation fields to check DSW formation rates (à la Morrison et al. 2020, Moorman et al. 2021)

pedrocol commented 2 years ago

It took me a while because the basal output was limited to a certain lat value, and the rest of the values were global domain. I had to use a couple workarounds to make the code work. In the following plot we see the WMT analysis for the domain between lat(-80,-59) for the first year mean. In solid lines the control simulation and in dashed lines the basal melt simulation (Tfreezing_min)

Screenshot from 2022-08-18 22-14-02

adele-morrison commented 2 years ago

Nice! Clearly an increase in dense water production there.

It would be interesting to see a time series also, of either the maximum SWMT in each year, or pick a certain density threshold (32.6 perhaps) and plot the formation at that density threshold.

pedrocol commented 2 years ago

Sounds good. By the way, I put the basal melt heat flux as a surface flux, and I also considered the calving flux.

pedrocol commented 2 years ago

In the following figure I'm showing the net transformation for the basal melt at depth case (Tfreezing_min) in the first 5 years. It looks like there is a large transformation in the first year (previous figure, around 3 Sv), but then the net transformation keeps the same values. The first large transformation is explained by the entrainement, right?

Screenshot from 2022-08-18 23-37-32

adele-morrison commented 2 years ago

Interesting it changes so quickly. Actually, I think that script on the cosima recipes is missing the salinity restoring flux which could be important here. The total freshwater flux used to calculate this should be pme_river - (sfc_salt_flux_ice + sfc_salt_flux_restore)/S_ref where S_ref is a reference salinity = 35.

It would also be useful to see the SWMT integrated just over the continental shelf, south of the 1000m isobath, as that's what we've commonly done in other studies.

pedrocol commented 2 years ago

So in this case that correction should be applied in the following way pme_river = pme_river - sfc_salt_flux_ice - sfc_salt_flux_restore Is this correct? Because normally the salinity restoring flux should be added, since it is a source line any other, but maybe I'm wrong

pedrocol commented 2 years ago

I performed the correction pme_river = pme_river - sfc_salt_flux_ice - sfc_salt_flux_restore for both runs (first year), the restoring doesn't seem to affect the overall WMT much Screenshot from 2022-08-19 00-58-30

adele-morrison commented 2 years ago

That's good that restoring doesn't influence it too much. Just checking, the extra basal melt input is included in pme_river right? Or otherwise you're adding it in?

pedrocol commented 2 years ago

I missed that one. Here is the new plot, the difference is a bit smaller. I'll make the time evolving plot tomorrow Screenshot from 2022-08-19 01-34-37 t

StephenGriffies commented 2 years ago

oops, I am a bit concerned about the dimensions of this equation

correction pme_river = pme_river - sfc_salt_flux_ice - sfc_salt_flux_restore

The pme terms are mass fluxes for water, whereas the sfc_salt terms are mass fluxes for salt. Be careful with units.

adele-morrison commented 2 years ago

Yes, sorry! Have amended above, the salt fluxes need a salinity factor in there to convert to freshwater fluxes. @StephenGriffies, can I just check here, is it correct to use a reference salinity value (S_ref = 35) for this, or should we be using SSS?

total FW flux = = pme_river - (sfc_salt_flux_ice + sfc_salt_flux_restore)/S_ref

matthew-england-unsw commented 2 years ago

Thanks for compiling Pedro, and Adele/Steve for the units check. When I used to do the salt flux conversion calculation back in the 90's I recall I'd just take S to be 35, but maybe that's not all that accurate.

StephenGriffies commented 2 years ago

Depends on the purpose.

It is late Sunday, but I have my book open to Section 11.6 and 11.7 where I talk about the choice. I think for the present purpose we need S_ref=SSS (see equation 11.61). Need to think more to be sure, but first need to go watch a bit of Netflix before bed...

pedrocol commented 2 years ago

I used S_ref=SSS for the present diagnostic. The impact of these two terms seems to be very small, since the plots haven't changed much. Screenshot from 2022-08-22 23-15-40

Same thing we comparing several years Screenshot from 2022-08-22 23-15-31

Most of the change seems to happen on the shelf, we see there the about 3Sv that we have seen before at the isopycnal value 32.45 Screenshot from 2022-08-22 23-15-54

When evaluating this on a map, this change does not seem to affect a region in particular, it is in most regions over the shelf Screenshot from 2022-08-22 23-16-05

aekiss commented 2 years ago

Should the conversion of sfc_salt_flux_ice to a freshwater flux use ice_salt_concentration = 0.005 kg salt / kg ice instead of SSS?

adele-morrison commented 2 years ago

There's actually no SSS factor applied to the salt fluxes in the surface water mass transformation calculation (the above comments are incorrect!). The salt mass flux term in the surface water mass transformation is beta salt_flux 1000, where beta has units of kg/(g of salt) and the salt_flux is the model diagnostic with units of (kg of salt)/m^2/s. See updated SWMT script here.

pedrocol commented 2 years ago

Here is the new plot for the first year. There are some changes, but the quantitative analysis remains, there is formation of dense waters of about 3Sv

Screenshot from 2022-08-24 00-50-39

adele-morrison commented 2 years ago

As we discussed last time, the code for this SWMT calculation is currently putting the basal melt in at the surface density at the same lat/lon location. This is clearly wrong, as it is really being input to higher densities at depth. I think we should treat these plots with a fair bit of caution until we fix this.

A proposal for how to fix this: For the basal melt, we could wrap the surface on which we calculate the SWMT down into the water column along the coastline. We would need the amount of heat and FW going into each depth level at each lat/lon location, then we bin these using the time-varying density at those locations.

@pedrocol, what are the output variables for the heat and FW fluxes associated with the basal melt? Are these 3D arrays?

pedrocol commented 2 years ago

Yes, 3D outputs for heat, salt and FW fluxes coming from basal melt

adele-morrison commented 2 years ago

Cool, what are the diagnostic names for those?

On Wed, 7 Sept 2022 at 09:28, Pedro @.***> wrote:

Yes, 3D outputs for heat, salt and FW fluxes coming from basal melt

— Reply to this email directly, view it on GitHub https://github.com/pedrocol/basal_mom5-collaborative-project/issues/8#issuecomment-1238747236, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACA44UYTWWR2HE662XB4K23V47HR3ANCNFSM543MEANA . You are receiving this because you commented.Message ID: @.***>

pedrocol commented 2 years ago

temp_basalmix for the heat flux, salt_basalmix for the salt flux and basal_fwflx for the FW flux

PaulSpence commented 2 years ago

Hi Folks,

I am trying to do something useful for tomorrow's basal hackathon ... building from the existing notebooks. Can someone please tell me how to access the model output data? I am following this code from https://github.com/pedrocol/basal_mom5-collaborative-project/blob/main/notebooks/seaice/seaice.ipynb (it's in other notebooks):

build database for these experiments:

session_name = '/g/data/e14/pc5520/model_data/access-om2/basal_melt_MOM5/basal_melt_MOM5.db' basal_melt_session = cc.database.create_session(session_name)

dir_list = ['/g/data/e14/pc5520/access-om2/archive/01deg_jra55v13_ryf9091_rerun_for_easterlies/accessom2-GPC004/',

'/g/data/e14/pc5520/access-om2/archive/01deg_jra55v13_ryf9091_rerun_for_easterlies/accessom2-GPC005/',

'/g/data/e14/pc5520/access-om2/archive/01deg_jra55v13_ryf9091_rerun_for_easterlies/accessom2-GPC006/',] cc.database.build_index(dir_list,basal_melt_session)

but get a permissions error:

OperationalError: (sqlite3.OperationalError) attempt to write a readonly database [SQL: DELETE FROM ncfiles WHERE ? = ncfiles.experiment_id AND (ncfiles.ncfile NOT IN (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) OR ncfiles.present = 0 OR 1 != 1)]

Thank you,

Paul

On Wed, Sep 7, 2022 at 11:22 AM Pedro @.***> wrote:

temp_basalmix for the heat flux, salt_basalmix for the salt flux and basal_fwflx for the FW flux

— Reply to this email directly, view it on GitHub https://github.com/pedrocol/basal_mom5-collaborative-project/issues/8#issuecomment-1238803761, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSWJXCDILPQXO7UVNQXRB3V47U35ANCNFSM543MEANA . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>

-- I’m sending this message at a time that suits me. I don’t expect you to reply outside of your own work hours.

Paul Spence, Assoc. Prof. ARC Future Fellow Institute for Marine and Antarctic Studies https://www.imas.utas.edu.au/ University of Tasmania, Hobart, Australia https://paulspence.github.io/

pedrocol commented 2 years ago

Hi Paul, I think you don't have write permissions for the directory. I have changed the write permission of the file, let me know if that works now. Otherwise, one easy solution is to provide a session_name on a directory of your own.

adele-morrison commented 2 years ago

Yep, or you could try using my database: session_name = '/g/data/v45/akm157/model_data/access-om2/basal_melt_MOM5/basal_melt_MOM5.db'

and comment out this line: cc.database.build_index(dir_list,basal_melt_session)

On Wed, 7 Sept 2022 at 12:58, Pedro @.***> wrote:

Hi Paul, I think you don't have write permissions for the directory. I have changed the write permission of the file, let me know if that works now. Otherwise, one easy solution is to provide a session_name on a directory of your own.

— Reply to this email directly, view it on GitHub https://github.com/pedrocol/basal_mom5-collaborative-project/issues/8#issuecomment-1238851141, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACA44UY2E32QN7PK5GISTJTV5AAE7ANCNFSM543MEANA . You are receiving this because you commented.Message ID: @.***>

adele-morrison commented 2 years ago

Closing this as it uses old simulations. New issue here.