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.
Changeset 9327 – NEMO

Changeset 9327


Ignore:
Timestamp:
2018-02-15T16:41:25+01:00 (6 years ago)
Author:
jpalmier
Message:

Jpalm -- GMED 380 -- the test used to call the 3D carb chem every month was not working.

I used the same to write the xCO2 everymonth and mot no answer at all.
This has been broken when fixing the restartability issue
see branches/UKMO/dev_r5518_GO6M_dev changes -
We fix this using nsec_month to be sure to call every month
We must double check that this fix pass the restartability test!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90

    r9324 r9327  
    8282                                            gdepw_0, gdepw_n,               & 
    8383                                            nday_year, nsec_day,            & 
    84                                             nyear, nyear_len,               & 
     84                                            nyear, nyear_len, ndastp,       & 
     85                                            nsec_month,                     & 
    8586                                            rdt, tmask, mig, mjg, nimpp,    & 
    8687                                            njmpp  
     
    349350         ENDIF 
    350351      ENDIF 
     352  
     353      !! Writing xCO2 in output on start and on the 1st tsp of each  month 
    351354      IF ( (kt == nittrc000 .AND. .NOT.ln_rsttr) .OR.                        & 
    352            ((86400*mod(nn_date0,100) + mod(kt*rdt,2592000.)) == rdt) ) THEN 
    353            IF ( lwp )  WRITE(numout,*) ' *** final atm xCO2 ***' 
    354            call trc_rst_dia_stat(f_xco2a(:,:), 'atm xCO2') 
     355           ( nsec_month .LE. INT(rdt) ) )  THEN 
     356           IF ( lwp )  WRITE(numout,*) ' *** Atm xCO2 *** -- kt:', kt,       & 
     357                                       ';  current date:', ndastp 
     358          call trc_rst_dia_stat(f_xco2a(:,:), 'atm xCO2') 
    355359      ENDIF 
    356360# endif 
     
    379383      !!          x * 30d + 1*rdt(i.e: mod = rdt)    
    380384      !!          ++ need to pass carb-chem output var through restarts 
    381       If ( (kt == nittrc000 .AND. .NOT.ln_rsttr) .OR.                        & 
    382            ((86400*mod(nn_date0,100) + mod(kt*rdt,2592000.)) == rdt) ) THEN 
     385      !!If ( (kt == nitt8rc000 .AND. .NOT.ln_rsttr) .OR.          & 
     386      !!     ( (mod(kt*rdt,2592000.)) == rdt) THEN 
     387      !!============================= 
     388      !! (Jpalm -- updated for restartability issues) 
     389      !! We want this to be start of month or if starting afresh from   
     390      !! climatology - marc 20/6/17  
     391      !!If ( (kt == nittrc000 .AND. .NOT.ln_rsttr) .OR.                         &  
     392      !!     ((86400*mod(nn_date0,100) + mod(kt*rdt,2592000.)) == rdt) ) THEN  
     393      !!============================= 
     394      !! Jpalm -- 15-02-2018 -- need to change 3D carb-chem call freq again. 
     395      !! previous call did not work, probably the (86400*mod(nn_date0,100) part 
     396      !! should not be in... 
     397      !! now use the NEMO calendar tool : nsec_month to be sure to call  
     398      !! at the beginning of a new month . 
     399      IF ( (kt == nittrc000 .AND. .NOT.ln_rsttr) .OR.                        & 
     400           ( nsec_month .LE. INT(rdt) ) )  THEN 
     401           IF ( lwp )  WRITE(numout,*)                                       &          
     402                              ' *** 3D carb chem call *** -- kt:', kt,       & 
     403                              ';  current date:', ndastp  
    383404         !!--------------------------------------------------------------- 
    384405         !! Calculate the carbonate chemistry for the whole ocean on the first 
Note: See TracChangeset for help on using the changeset viewer.