New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#2739 (diurnal cycle in TOP) – NEMO

Opened 2 years ago

Last modified 2 years ago

#2739 new Bug

diurnal cycle in TOP

Reported by: cperruche Owned by: systeam
Priority: low Milestone:
Component: MULTIPLE Version:
Severity: major Keywords: diurnal cycle
Cc:

Description

Context

Boolean l_trcdm2dc depends on boolean ln_dm2dc defined in namelist. It aims at averaging qsr for biogeochemical tracers if there is a diurnal cycle.

Analysis

(1) The name of the boolean "l_trcdm2dc" is confusing because it has the opposite function to the boolean ln_dm2dc. I suggest to call it "l_trcdc2dm" instead.
(2) Currently, the daily mean on qsr for biogeochemical purposes only works if ln_dm2dc=T that is to say if there is an analytical diurnal cycle. It does not work if there is a natural diurnal cycle with hourly atmospherical forcings for example. I suggest to define a new boolean in namelist_top "ln_trcdc2dm" (instead of the internal boolean l_trcdc2dm) to specify if you want to average qsr or not for biogeochemical tracers => modify trcnam.F90 to read a new parameter
(3) If the analytical diurnal cycle is used (ln_dm2dc=T and ln_trcdc2dm=T), we should keep the mean value in qsr_mean (no need to call subroutine trc_mean_qsr) => modifications in sbcblk.F90 and trcstp.F90

Fix

In trcstp:F90:
No need anymore of this part of the code

   SUBROUTINE trc_stp_ctl
      !!----------------------------------------------------------------------                           
      !!                     ***  ROUTINE trc_stp_ctl  ***                                               
      !! ** Purpose :        Control  + ocean volume
      !!----------------------------------------------------------------------                           
      !
      ! Define logical parameter to control diurnal cycle in PISCES
      l_trcdm2dc = ( l_trcdm2dc .AND. .NOT. ln_dm2dc ) .OR. ( ln_cpl .AND. ncpl_qsr_freq /= 1 .AND. ncpl_qsr_freq /= 0 )
      l_trcdm2dc = l_trcdm2dc .AND. .NOT. l_offline .AND. ln_pisces                                      
      !                                                                                                  
      IF( l_trcdm2dc .AND. lwp )   CALL ctl_warn( 'Coupling with passive tracers and diurnal cycle of shortwave radiation.',   &                 
         &                           'Computation of a daily mean shortwave for PISCES biogeochemical model ' )   
      !  
   END SUBROUTINE trc_stp_ctl                                                                               

and we call trc_mean_qsr only if (ln_dm2dc=F and ln_trcdc2dm=T)

IF( ln_trcdc2dm .AND. .NOT. ln_dm2dc )   CALL trc_mean_qsr( kt )

In sbcblk.F90, I would add:

#if defined key_top
   USE trc
#endif

and

#if defined key_top
      IF( ln_dm2dc .AND. ln_trcdc2dm )  THEN
         qsr_mean(:,:) = zztmp * pdqsr(:,:) * tmask(:,:,1)
      ENDIF
#endif

Commit History (1)

ChangesetAuthorTimeChangeLog
15613cetlod2021-12-22T10:35:54+01:00

r4.0-HEAD : bugfix to better manage the diurnal cycle in TOP, see ticket #2739

Change History (2)

comment:1 Changed 2 years ago by cetlod

In 15613:

Error: Failed to load processor CommitTicketReference
No macro or processor named 'CommitTicketReference' found

comment:2 Changed 2 years ago by cetlod

Bugfix done in r4.0-HEAD

Note: See TracTickets for help on using tickets.