<div dir="ltr">Hi Mario,<div><br></div><div>Yes, the scripts demonstrate different approaches for constructing masks that are built on the ECCOv4 grid. I hope they're helpful!<br><br>Regarding your question on averaging over the last day of your run, you will need to create a maskT file of length 2*N, where N is the number of days in your model run. To average over the last day, set the Nth entry of the maskT vector to 1.0, and the rest of the values to 0.0. Additionally, ensure that gencost_avgperiod is set to 'day'.<br><br>If you want to average over a longer period, such as five days, each day that you want to include in the average should have a value of 0.2 in the maskT file. The weights are not automatically normalized.<br><br>It's worth mentioning that although the documentation suggests that the maskT file should be of length N, I've found that using length 2*N avoids "end of file" errors. This is probably because the gencost machinery continues to read the mask file after the forward integration, but I've never done a full investigation. <br><br>Thanks!<br>Dani</div><div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 8, 2023 at 3:00 PM mario wrk <<a href="mailto:wrkmario@gmail.com">wrkmario@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi, Dani,</div><div>A further step I am not sure is how to specify time and space/volume, which will be averaged in the cost function. Can I just use your script here <a href="https://github.com/DanJonesOcean/ECCO_v4_r2_config/tree/main/masks" target="_blank">https://github.com/DanJonesOcean/ECCO_v4_r2_config/tree/main/masks</a></div><div>and then replace these lines? </div><div>For instance, if I need to average over the last day of my run, do I need a time mask file? or just specify <span style="color:rgb(36,41,47);font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap">gencost_avgperiod(1) = 'day'?</span></div><div><table style="border-spacing:0px;border-collapse:collapse;color:rgb(36,41,47);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";font-size:14px"><tbody style="box-sizing:border-box"><tr style="box-sizing:border-box;background-color:transparent"><td id="m_7006566643127824531gmail-LC12" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> &ECCO_GENCOST_NML</td></tr><tr style="box-sizing:border-box"><td id="m_7006566643127824531gmail-L13" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC13" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"># SST</td></tr><tr style="box-sizing:border-box;background-color:transparent"><td id="m_7006566643127824531gmail-L14" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC14" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> gencost_avgperiod(1) = 'day',</td></tr><tr style="box-sizing:border-box"><td id="m_7006566643127824531gmail-L15" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC15" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> gencost_barfile(1) = 'm_sst_day',</td></tr><tr style="box-sizing:border-box;background-color:transparent"><td id="m_7006566643127824531gmail-L16" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC16" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> gencost_datafile(1) = 'lev_clim_temp.bin',</td></tr><tr style="box-sizing:border-box"><td id="m_7006566643127824531gmail-L17" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC17" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> gencost_errfile(1) = 'ones_32b.bin',</td></tr><tr style="box-sizing:border-box;background-color:transparent"><td id="m_7006566643127824531gmail-L18" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC18" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> gencost_name(1) = 'sst-MW',</td></tr><tr style="box-sizing:border-box"><td id="m_7006566643127824531gmail-L19" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC19" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> gencost_spmin(1) = -1.8,</td></tr><tr style="box-sizing:border-box;background-color:transparent"><td id="m_7006566643127824531gmail-L20" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC20" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> gencost_spmax(1) = 40.,</td></tr><tr style="box-sizing:border-box"><td id="m_7006566643127824531gmail-L21" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC21" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> gencost_spzero(1) = 0.,</td></tr><tr style="box-sizing:border-box;background-color:transparent"><td id="m_7006566643127824531gmail-L22" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC22" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> gencost_outputlevel(1)=1,</td></tr><tr style="box-sizing:border-box"><td id="m_7006566643127824531gmail-L23" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC23" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> mult_gencost(1) = 0.1,</td></tr><tr style="box-sizing:border-box;background-color:transparent"><td id="m_7006566643127824531gmail-L24" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC24" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap">#</td></tr><tr style="box-sizing:border-box"><td id="m_7006566643127824531gmail-L25" style="box-sizing:border-box;padding:0px 10px;width:50px;min-width:50px;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;line-height:20px;text-align:right;white-space:nowrap;vertical-align:top"></td><td id="m_7006566643127824531gmail-LC25" style="box-sizing:border-box;padding:0px 10px;line-height:20px;vertical-align:top;overflow:visible;font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap"> &</td></tr></tbody></table></div><div>Best,</div><div>Mario</div><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">On Wed, Mar 8, 2023 at 5:30 PM mario wrk <<a href="mailto:wrkmario@gmail.com" target="_blank">wrkmario@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thank you, Dani, it is indeed much easier, I just need to compile once without explicitly specifying the cost function. It will definitely save a lot of time!</div><div><br></div><div>Best,</div><div>Mario</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div></div>
</blockquote></div></div>
_______________________________________________<br>
MITgcm-support mailing list<br>
<a href="mailto:MITgcm-support@mitgcm.org" target="_blank">MITgcm-support@mitgcm.org</a><br>
<a href="http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support" rel="noreferrer" target="_blank">http://mailman.mitgcm.org/mailman/listinfo/mitgcm-support</a><br>
</blockquote></div>