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 6715 for branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90 – NEMO

Ignore:
Timestamp:
2016-06-16T18:58:14+02:00 (8 years ago)
Author:
jpalmier
Message:

JPALM -- 16-06-2016 -- MEDUSA branch update :

-- pass co2 flux and dms_surf through restart for atm coupling.
-- introduce CFC cycle for dynamic evolution comparison
-- add Tim Graham Age tracer
-- include MEDUSA Q10 modif
-- svn-key removed
-- still need debug stage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90

    r6216 r6715  
    3232   INTEGER , PUBLIC            ::   jpyear         ! Number of years read in CFC1112 file 
    3333   INTEGER , PUBLIC            ::   ndate_beg      ! initial calendar date (aammjj) for CFC 
     34   INTEGER , PUBLIC            ::   simu_type      ! Kind of simulation: 1- Spin-up  
     35                                                   !                     2- Hindcast/projection 
    3436   INTEGER , PUBLIC            ::   nyear_res      ! restoring time constant (year) 
    3537   INTEGER , PUBLIC            ::   nyear_beg      ! initial year (aa)  
     
    8082      ! 
    8183      INTEGER  ::   ji, jj, jn, jl, jm, js 
    82       INTEGER  ::   iyear_beg, iyear_end 
     84      INTEGER  ::   iyear_beg, iyear_end,iyear_tmp 
    8385      INTEGER  ::   im1, im2, ierr 
    8486      REAL(wp) ::   ztap, zdtap         
     
    104106      ! Temporal interpolation 
    105107      ! ---------------------- 
    106       iyear_beg = nyear - 1900 
     108      !! JPALM -- 15-06-2016 -- define 2 kind of CFC run. 
     109      !!                     we want to make cycle experiments,  
     110      !!                     to periodically compare the ocean dynamic within 
     111      !!                     1- the SPIN-UP and 2- Hincast/Projections 
     112      !!                     -- main difference is the way to define the year of 
     113      !!                     simulation, that determine the atm pCFC. 
     114      !!                     1-- Spin-up: our atm forcing is of 30y we cycle on. 
     115      !!                     So we do 90y CFC cycles to be in good 
     116      !!                     correspondance with the atmosphere 
     117      !!                     2-- Hindcast/proj, instead of nyear-1900 we keep 
     118      !!                     the 2 last digit, and enable 3 cycle from 1800 to 2100.   
     119      !!---------------------------------------------------------------------- 
     120      !! 1 -- SPIN-UP 
     121      IF (simu_type==1) THEN 
     122         iyear_tmp = nyear - nyear_res  !! JPALM -- in our spin-up, nyear_res is 1000 
     123         iyear_beg = MOD( iyear_tmp , 90 ) 
     124         !! JPALM -- the pCFC file only got 78 years. 
     125         !!       So if iyear_beg > 78 then we set pCFC to 0 
     126         !!             iyear_beg = 0 as well -- must try to avoid obvious problems 
     127         !!             as Pcfc is set to 0.00 up to year 32, let set iyear_beg to year 10 
     128         !!          else, must add 30 to iyear_beg to match with P_cfc indices 
     129         !!--------------------------------------- 
     130         IF ((iyear_beg > 77) .OR. (iyear_beg==0)) THEN 
     131            iyear_beg = 10 
     132         ELSE  
     133            iyear_beg = iyear_beg + 30 
     134         ENDIF 
     135      !! 
     136      !! 2 -- Hindcast/proj 
     137      ELSEIF (simu_type==2) THEN 
     138         iyear_beg = MOD(nyear, 100) 
     139         IF (iyear_beg < 9)  iyear_beg = iyear_beg + 100 
     140         !! JPALM -- Same than previously, if iyear_beg is out of P_cfc range, 
     141         !!       we want to set p_CFC to 0.00 --> set iyear_beg = 10 
     142         IF ((iyear_beg < 30) .OR. (iyear_beg > 107)) iyear_beg = 10              
     143      ENDIF 
     144      !! 
    107145      IF ( nmonth <= 6 ) THEN 
    108146         iyear_beg = iyear_beg - 1 
     
    246284      !! ** Purpose : sets constants for CFC model 
    247285      !!--------------------------------------------------------------------- 
    248       INTEGER :: jn 
     286      INTEGER :: jl, jn 
    249287 
    250288      ! coefficient for CFC11  
     
    286324      sca(4,2) =  -0.067430 
    287325 
    288       !IF( ln_rsttr ) THEN 
    289       !   IF(lwp) WRITE(numout,*) 
    290       !   IF(lwp) WRITE(numout,*) ' Read specific variables from CFC model ' 
    291       !   IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 
    292       !   ! 
    293       !   DO jn = jp_cfc0, jp_cfc1 
    294       !      CALL iom_get( numrtr, jpdom_autoglo, 'qint_'//ctrcnm(jn), qint_cfc(:,:,jn) )  
    295       !   END DO 
    296       !ENDIF 
     326      !!--------------------------------------------- 
     327      !! JPALM -- re-initialize CFC fields and diags if restart a CFC cycle, 
     328      !!       Or if out of P_cfc range 
     329      IF (simu_type==1) THEN 
     330         iyear_tmp = nyear - nyear_res  !! JPALM -- in our spin-up, nyear_res is 1000 
     331         iyear_beg = MOD( iyear_tmp , 90 ) 
     332         !!--------------------------------------- 
     333         IF ((iyear_beg > 77) .OR. (iyear_beg==0)) THEN 
     334            qtr_cfc(:,:,:) = 0._wp 
     335            IF(lwp) THEN 
     336               WRITE(numout,*)  
     337               WRITE(numout,*) 'restart a CFC cycle or out of P_cfc year bounds zero --' 
     338               WRITE(numout,*) '                          --    set qtr_CFC = 0.00   --' 
     339               WRITE(numout,*) '                          --   set qint_CFC = 0.00   --' 
     340               WRITE(numout,*) '                          --   set trn(CFC) = 0.00   --' 
     341            ENDIF 
     342            qtr_cfc(:,:,:) = 0._wp 
     343            qint_cfc(:,:,:) = 0._wp 
     344            DO jl = 1, jp_cfc 
     345              jn = jp_cfc0 + jl - 1 
     346              trn(:,:,:,jn) = 0._wp 
     347              trb(:,:,:,jn) = 0._wp 
     348            END DO 
     349         ENDIF 
     350      !! 
     351      !! 2 -- Hindcast/proj 
     352      ELSEIF (simu_type==2) THEN 
     353         iyear_beg = MOD(nyear, 100) 
     354         IF (iyear_beg < 9)  iyear_beg = iyear_beg + 100 
     355         IF ((iyear_beg < 30) .OR. (iyear_beg > 107)) THEN 
     356            qtr_cfc(:,:,:) = 0._wp 
     357            IF(lwp) THEN 
     358               WRITE(numout,*) 
     359               WRITE(numout,*) 'restart a CFC cycle or out of P_cfc year bounds zero --' 
     360               WRITE(numout,*) '                          --    set qtr_CFC = 0.00   --' 
     361               WRITE(numout,*) '                          --   set qint_CFC = 0.00   --' 
     362               WRITE(numout,*) '                          --   set trn(CFC) = 0.00   --' 
     363            ENDIF 
     364            qtr_cfc(:,:,:) = 0._wp 
     365            qint_cfc(:,:,:) = 0._wp 
     366            DO jl = 1, jp_cfc 
     367              jn = jp_cfc0 + jl - 1 
     368              trn(:,:,:,jn) = 0._wp 
     369              trb(:,:,:,jn) = 0._wp 
     370            END DO 
     371         ENDIF 
     372      ENDIF 
     373 
    297374      IF(lwp) WRITE(numout,*) 
    298375      ! 
Note: See TracChangeset for help on using the changeset viewer.