NOC-MSM / SE-NEMO

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

Default runscript.slurm on master contains two errors, partially mirrorred in several copies of stored runscripts on repo #128

Closed chris-O-wilson closed 1 year ago

chris-O-wilson commented 1 year ago

If we all agree that if we initialise a run with tides from rest, it should default to ln_tide_ramp=.T. behaviour, then that should probably be reflected in all copies of the runscript.slurm, both the default and the per-canonical-named-run versions under scripts/run/ and scripts/run//RUNSCRIPTS.

There is also a minor error in the IF loop involving nn_diaharm and ln_tide (one which I introduced long ago, then fixed, but only some versions picked up the fix).

Finally, it could be wise to un-hardwire the '1976' too.

Suggest change of :

     if [ $year -eq $nn_diaharm ] && [ $ln_tide -eq '.true.']
      then
         ln_diaharm='.true.'
      else
         ln_diaharm='.false.'
      fi

      if [ $year -eq 1976 ]
      then
         nn_it000=1
         if [ $nn_spin_cycle -eq 1 ]
         then
            ln_rstart='.false.'
            ln_tide_ramp='.false.'
         else
            ln_rstart='.true.'
            ln_tide_ramp='.false.'
         fi
         nn_rstctl=0
         ln_reset_ts='.true.'
      else
         nn_it000=`./end_time_step $(( $year - 1 )) $rn_rdt $year_st` ; rs0=`printf "%08d" $nn_it000`; nn_it000=$(( $nn_it000 + 1 + $offset ))
         ln_rstart=".true."
         nn_rstctl=2
         ln_tide_ramp='.false.'
         ln_reset_ts='.false.'
      fi

and similar combinations

to the following for all versions:

      if [ $year -eq $nn_diaharm ] && [ $ln_tide ]
      then
         ln_diaharm='.true.'
      else
         ln_diaharm='.false.'
      fi

      if [ $year -eq $year_st ]
      then
         nn_it000=1
         if [ $nn_spin_cycle -eq 1 ]
         then
            ln_rstart='.false.'
            ln_tide_ramp='.true.'
         else
            ln_rstart='.true.'
            ln_tide_ramp='.false.'
         fi
         nn_rstctl=0
         ln_reset_ts='.true.'
      else
         nn_it000=`./end_time_step $(( $year - 1 )) $rn_rdt $year_st` ; rs0=`printf "%08d" $nn_it000`; nn_it000=$(( $nn_it000 + 1 + $offset ))
         ln_rstart=".true."
         nn_rstctl=2
         ln_tide_ramp='.false.'
         ln_reset_ts='.false.'
      fi

I can do this myself when I return next week, but I will assign others too to ensure the error does not cause grief in the meantime.

jdha commented 1 year ago

@chris-O-wilson I had updated this in the runscript_continuous.slurm but forgot to roll it out repo-wide.

I'll update now.

NB. if [ $year -eq $nn_diaharm ] && [ $ln_tide ] is incorrect as $ln_tide is not a bool but a string -> so it should read:

if [ $year -eq $nn_diaharm ] && [ "$ln_tide" = ".true." ]

chris-O-wilson commented 1 year ago

Thanks James!

Chris

On 2 Nov 2023, at 14:40, jdha @.***> 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-wilsonhttps://github.com/chris-O-wilson I had updated this in the runscript_continuous.slurmhttps://github.com/NOC-MSM/SE-NEMO/blob/master/scripts/run/archer2/runscript_continuous.slurm but forgot to roll it out repo-wide.

I'll update now.

NB. if [ $year -eq $nn_diaharm ] && [ $ln_tide ] is incorrect as $ln_tide is not a bool but a string -> so it should read:

if [ $year -eq $nn_diaharm ] && [ "$ln_tide" = ".true." ]

— Reply to this email directly, view it on GitHubhttps://github.com/NOC-MSM/SE-NEMO/issues/128#issuecomment-1790864718, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AF32LSOU2ZV356VFVR4B6SDYCOWG5AVCNFSM6AAAAAA6266URSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJQHA3DINZRHA. You are receiving this because you were mentioned.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.