<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Martin,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
That's brilliant, many thanks for your clear advice as ever! <span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">I should be able to finish this part of the setup now.</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
If there's time, it might be worth adding your explanations below to the MITgcm documentation? Maybe I missed it, but I didn't see such a clear explanation within the Diagnostics section of the documentation?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Cheers,<br>
Paul</div>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature">
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin:0px;font-size:15px;font-family:"Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, system-ui, Roboto, "Helvetica Neue", sans-serif;color:rgb(32, 31, 30);text-align:start;background-color:rgb(255, 255, 255)">
<p style="font-size:11pt;font-family:Calibri, sans-serif;margin:0px"><span style="color: rgb(12, 100, 192);"><u> </u></span></p>
<p style="font-size:11pt;font-family:Calibri, sans-serif;margin:0px"><span style="margin:0px;color:rgb(31, 78, 121)">Dr Paul Burns MInstP FRMetS</span></p>
<p style="font-size:11pt;font-family:Calibri, sans-serif;margin:0px"><span style="margin:0px;color:rgb(31, 78, 121)">Research Fellow</span></p>
<p style="font-size:11pt;font-family:Calibri, sans-serif;margin:0px"><span style="margin:0px;color:rgb(31, 78, 121)">Geophysical and Astrophysical Fluid Dynamics Group</span></p>
<p style="font-size:11pt;font-family:Calibri, sans-serif;margin:0px"><span style="margin:0px;color:rgb(31, 78, 121)">Department of Mathematics</span></p>
<p style="font-size:11pt;font-family:Calibri, sans-serif;margin:0px"><span style="margin:0px;color:rgb(31, 78, 121)">Harrison Building</span></p>
<p style="font-size:11pt;font-family:Calibri, sans-serif;margin:0px"><span style="margin:0px;color:rgb(31, 78, 121)">University of Exeter</span></p>
</div>
<br>
</div>
</div>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> MITgcm-support <mitgcm-support-bounces@mitgcm.org> on behalf of Martin Losch <Martin.Losch@awi.de><br>
<b>Sent:</b> 29 March 2022 07:06<br>
<b>To:</b> MITgcm Support <mitgcm-support@mitgcm.org><br>
<b>Subject:</b> Re: [MITgcm-support] High-frequency time series output at a single domain point for computation of a power spectrum</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">CAUTION: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.<br>
<br>
<br>
Hi Paul,<br>
<br>
You need to read the mask in global_ocean.cs32x15 as<br>
dat = np.fromfile('regMask_lat24.bin', dtype='>f8’) (because readBinaryPrec=64, in data)<br>
Then it just contains 1.,2.,3., in a field with Nx=192, Ny=32, corresponding to the data.diagnostics.<br>
<br>
nSetRegMskFile=1, sets number of layers in mask file<br>
<br>
The 3 different floats 1.,2.,3. define the different regions (try to plot the cubed sphere field, another hurdle to take). South of 24S (1), North of 24N (3) and in between (2).<br>
<br>
set_regMask(1:3) = 1, 1, 1,<br>
means that all 3 regions are defined in layer 1 (which is the only layer in this case)<br>
val_regMask(1:3) = 1., 2., 3.,<br>
defines the identifier for the three regions that you find in the regMask_lat24.bin (they should match with what’s in the file, otherwise it does not work).<br>
stat_region(1:3,5) = 1, 3, 0,<br>
tells the model over which regions (now by index) to do the averages (in this case south of 24S (index=1) , north of 24N (index=3), and global(index=0) ).<br>
<br>
The model then does the “statistics” (mean/min/max/std) for these three regions, for all vertical levels together, and for each vertical level individually.<br>
<br>
Martin<br>
<br>
> On 28. Mar 2022, at 18:15, Burns, Paul <P.Burns2@exeter.ac.uk> wrote:<br>
><br>
> Hi Martin,<br>
><br>
> Apologies for the delay, I've been distracted by other tasks. I've just got around to sorting this out again. I have a couple of remaining questions:<br>
> • If I set nSetRegMskFile=1, and so compute my statistics at only 1 level, how do I choose the level? I can't see an obvious way to choose the level.<br>
><br>
> • To try and understand what is happening, I downloaded the binary file regMask_lat24.bin and read it into Python (using dat = np.fromfile('regMask_lat24.bin', dtype='>f4') ). The array 'dat' has length Nx*Ny*2, where Nx and Ny are the number of points
along x and y coordinates, respectively. First of all, following your advice I was expecting dat to have length Nx*Ny..? The values in dat are strange, with non-integers appearing, whereas I was expecting only 0s and 1s. So either I have read in the binary
incorrectly, or I am missing some information about how this works.<br>
><br>
><br>
> Many thanks,<br>
> Paul<br>
><br>
><br>
><br>
> Dr Paul Burns MInstP FRMetS<br>
> Research Fellow<br>
> Geophysical and Astrophysical Fluid Dynamics Group<br>
> Department of Mathematics<br>
> Harrison Building<br>
> University of Exeter<br>
><br>
> From: MITgcm-support <mitgcm-support-bounces@mitgcm.org> on behalf of Martin Losch <Martin.Losch@awi.de><br>
> Sent: 27 January 2022 07:00<br>
> To: mitgcm-support@mitgcm.org <mitgcm-support@mitgcm.org><br>
> Subject: Re: [MITgcm-support] High-frequency time series output at a single domain point for computation of a power spectrum<br>
><br>
> CAUTION: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.<br>
><br>
> The mask array “regMask_lat24.bin” (it’s in input) has the same horizontal dimensions as the model domain, plus a 3rd dimension of the length nSetRegMskFile. In the examples this is just one and there is only 1 level (you can see that because in input the
2D bathymetry files have the same size as regMask_lat24.bin). In theory you could have multiple levels in case you want to do averages of overlapping regions.<br>
><br>
> Martin<br>
> From: MITgcm-support <mitgcm-support-bounces@mitgcm.org> on behalf of Burns, Paul <P.Burns2@exeter.ac.uk><br>
> Sent: Wednesday, January 26, 2022 11:07<br>
> To: MITgcm-support@mitgcm.org<br>
> Subject: Re: [MITgcm-support] High-frequency time series output at a single domain point for computation of a power spectrum<br>
><br>
> Hi Martin,<br>
><br>
> That's great. It looks like the stats part of the Diagnostics package is worth a try. It might be worth me looking at time series at different isolated domain points in the future.<br>
><br>
> I had a look at the global_ocean.cs32x15 example. Do you know if the mask array should have the same dimensions as the model domain?<br>
><br>
> Many thanks for your help,<br>
> Paul<br>
><br>
><br>
> Dr Paul Burns MInstP FRMetS<br>
> Research Fellow<br>
> Geophysical and Astrophysical Fluid Dynamics Group<br>
> Department of Mathematics<br>
> Harrison Building<br>
> University of Exeter<br>
><br>
> From: MITgcm-support <mitgcm-support-bounces@mitgcm.org> on behalf of Martin Losch <Martin.Losch@awi.de><br>
> Sent: 25 January 2022 18:30<br>
> To: MITgcm Support <mitgcm-support@mitgcm.org><br>
> Subject: Re: [MITgcm-support] High-frequency time series output at a single domain point for computation of a power spectrum<br>
><br>
> CAUTION: This email originated from outside of the organisation. Do not click links or open attachments unless you recognise the sender and know the content is safe.<br>
><br>
><br>
> Hi Paul,<br>
><br>
> you can use the statistics part of the diagnostics package and specify a mask for your spefict grid point. The masking is used in verification/global_ocean.cs32x15/input.seaice/data.diagnostics (DIAG_STATIS_PARMS) , but I agree the diagnostics package is
not always straightforward.<br>
><br>
> If it’s just this one-time thing, I would probably just add a print statement at the right place (o:<br>
><br>
> Martin<br>
><br>
> > On 25. Jan 2022, at 13:17, Burns, Paul <P.Burns2@exeter.ac.uk> wrote:<br>
> ><br>
> > Hi,<br>
> ><br>
> > I am using MITgcm and subscribed to the mailing list. I need to write out timeseries at high time frequency and at a single point in the domain, in order to compute a power spectrum. I am currently using the Diagnostics package to write out state fields,
but I am unclear how to modify my setup to write out timeseries data at a single point.<br>
> ><br>
> > I would be grateful if someone could advise me about how to go about this? The Diagnostics package is complex.<br>
> ><br>
> ><br>
> > Many thanks,<br>
> > Paul<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > Dr Paul Burns MInstP FRMetS<br>
> > Research Fellow<br>
> > Geophysical and Astrophysical Fluid Dynamics Group<br>
> > Department of Mathematics<br>
> > Harrison Building<br>
> > University of Exeter<br>
> ><br>
> > _______________________________________________<br>
> > MITgcm-support mailing list<br>
> > MITgcm-support@mitgcm.org<br>
> > <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-support&data=04%7C01%7CP.Burns2%40exeter.ac.uk%7C693157b26e19402df26a08da114a6252%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C637841308415872294%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KC5GacM1IJQm23eLN2RsOmuFUYDl35VKBciQM8zj3zk%3D&reserved=0">
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-support&data=04%7C01%7CP.Burns2%40exeter.ac.uk%7C693157b26e19402df26a08da114a6252%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C637841308415872294%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KC5GacM1IJQm23eLN2RsOmuFUYDl35VKBciQM8zj3zk%3D&reserved=0</a><br>
><br>
> _______________________________________________<br>
> MITgcm-support mailing list<br>
> MITgcm-support@mitgcm.org<br>
> <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-support&data=04%7C01%7CP.Burns2%40exeter.ac.uk%7C693157b26e19402df26a08da114a6252%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C637841308415872294%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KC5GacM1IJQm23eLN2RsOmuFUYDl35VKBciQM8zj3zk%3D&reserved=0">
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-support&data=04%7C01%7CP.Burns2%40exeter.ac.uk%7C693157b26e19402df26a08da114a6252%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C637841308415872294%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KC5GacM1IJQm23eLN2RsOmuFUYDl35VKBciQM8zj3zk%3D&reserved=0</a><br>
<br>
_______________________________________________<br>
MITgcm-support mailing list<br>
MITgcm-support@mitgcm.org<br>
<a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-support&data=04%7C01%7CP.Burns2%40exeter.ac.uk%7C693157b26e19402df26a08da114a6252%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C637841308415872294%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KC5GacM1IJQm23eLN2RsOmuFUYDl35VKBciQM8zj3zk%3D&reserved=0">https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.mitgcm.org%2Fmailman%2Flistinfo%2Fmitgcm-support&data=04%7C01%7CP.Burns2%40exeter.ac.uk%7C693157b26e19402df26a08da114a6252%7C912a5d77fb984eeeaf321334d8f04a53%7C0%7C0%7C637841308415872294%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=KC5GacM1IJQm23eLN2RsOmuFUYDl35VKBciQM8zj3zk%3D&reserved=0</a><br>
</div>
</span></font></div>
</body>
</html>