NOC-MSM / SE-NEMO

Shelf Enabled Global NEMO
GNU General Public License v3.0
2 stars 1 forks source link

Iwd #125

Closed jasontempestholt closed 1 year ago

jasontempestholt commented 1 year ago

Correction to N2 mean calculation and initialization of tdiss

jasontempestholt commented 1 year ago

h2rough is used to calculate tdiss which is used across halo boundary, hence h3rough needs to be valid in halos. Andrew C's advice is to not assume this is done on reading the data in. Given this is only one on init seams safer to leave in.

jasontempestholt commented 1 year ago

agreed , not the best place for it here feel free to delete and I'll add to a debug branch

chris-O-wilson commented 1 year ago

h2rough is used to calculate tdiss which is used across halo boundary, hence h3rough needs to be valid in halos. Andrew C's advice is to not assume this is done on reading the data in. Given this is only one on init seams safer to leave in.

Fair point about tdiss halos, although it's those that we should probably really care about.

If we knew that h2rough would not be used other than in the tdiss calculation, as it stands, then a halo exchange immediately after the DO-loops where tdiss is defined as a function of h2rough and N2mean could be cleaner and safest, as it would then catch uninitialised halos in both of these vars. Not critical to this iteration of the code, but it might be something for later perhaps.

jasontempestholt commented 1 year ago

we'll want to leave the halo exchange as is - these are super expensive so need to avoid putting them in the time stepping part if possilbe

chris-O-wilson commented 1 year ago

Of course! Very good point Jason!

Chris

On 1 Nov 2023, at 14:23, jasontempestholt @.***> wrote:

Caution: This email has originated from outside of the organisation. Do not click links or open attachments unless you have verified the sender and content is safe. Thank you.

we'll want to leave the halo exchange as is - these are super expensive so need to avoid putting them in the time stepping part if possilbe

— Reply to this email directly, view it on GitHubhttps://github.com/NOC-MSM/SE-NEMO/pull/125#issuecomment-1789047800, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AF32LSM5NQMFGSWRRMLRL5DYCJLOBAVCNFSM6AAAAAA6ZD55HCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBZGA2DOOBQGA. You are receiving this because your review was requested.Message ID: @.***>

This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. The National Oceanography Centre (NOC) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. NOC does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. Opinions, conclusions or other information in this message and attachments that are not related directly to NOC business are solely those of the author and do not represent the views of NOC.

chris-O-wilson commented 1 year ago

Please ignore this last comment/question - it’s nonsense!

Chris

On 1 Nov 2023, at 14:21, chris-O-wilson @.***> wrote:

Caution: This email has originated from outside of the organisation. Do not click links or open attachments unless you have verified the sender and content is safe. Thank you.

@chris-O-wilson commented on this pull request.


On MY_SRC_TIDE/sbctide.F90https://github.com/NOC-MSM/SE-NEMO/pull/125#discussion_r1378866252:

As h2rough has been initialised to zero already on line 71, couldn't the following code

    ! mask hrough in shllow water
     DO ji=2,jpim1
      DO jj=2,jpjm1
       h2rough(ji,jj) = h2rough(ji,jj) * h2rough(ji,jj) ! read in h, need h^2
       IF ( gdepw_0(ji,jj,mbkt(ji,jj)+1) < tdiss_mindepth ) THEN
        h2rough(ji,jj) = 0.0
       ENDIF
      ENDDO
     ENDDO

be replaced by

    ! mask hrough in shllow water
     DO ji=2,jpim1
      DO jj=2,jpjm1
       IF ( gdepw_0(ji,jj,mbkt(ji,jj)+1) >= tdiss_mindepth ) THEN
        h2rough(ji,jj) = h2rough(ji,jj) * h2rough(ji,jj) ! read in h, need h^2
       ENDIF
      ENDDO
     ENDDO

as it's simpler and more efficient?

— Reply to this email directly, view it on GitHubhttps://github.com/NOC-MSM/SE-NEMO/pull/125#pullrequestreview-1708327238, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AF32LSKK4OQY7RBHW7VVSZ3YCJLHTAVCNFSM6AAAAAA6ZD55HCVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMBYGMZDOMRTHA. You are receiving this because you are subscribed to this thread.Message ID: @.***>

This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. The National Oceanography Centre (NOC) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. NOC does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses. Opinions, conclusions or other information in this message and attachments that are not related directly to NOC business are solely those of the author and do not represent the views of NOC.