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 7017 for branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/trcrst.F90 – NEMO

Ignore:
Timestamp:
2016-10-11T16:20:23+02:00 (8 years ago)
Author:
jpalmier
Message:

Jpalm -- 11-10-2016 -- Improve MEDUSA reproducibility - change carb-chem calling/restart

File:
1 edited

Legend:

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

    r6829 r7017  
    279279      call trc_rst_dia_stat(zn_dms_srf(:,:), 'DMS surf') 
    280280      call trc_rst_dia_stat(zn_co2_flx(:,:), 'CO2 flux') 
     281      !!   
     282      !! JPALM 14-06-2016 -- add Carbonate chenistry variables through the restart 
     283      !!                  -- needed for monthly call of carb-chem routine and better reproducibility 
     284# if defined key_roam 
     285      IF( iom_varid( numrtr, 'pH_3D', ldstop = .FALSE. ) > 0 ) THEN 
     286         IF(lwp) WRITE(numout,*) 'Carbonate chem variable - reading in ...' 
     287         CALL iom_get( numrtr, jpdom_autoglo, 'pH_3D'   ,  f3_pH(:,:,:)     ) 
     288         CALL iom_get( numrtr, jpdom_autoglo, 'h2CO3_3D',  f3_h2co3(:,:,:)  ) 
     289         CALL iom_get( numrtr, jpdom_autoglo, 'hCO3_3D' ,  f3_hco3(:,:,:)   ) 
     290         CALL iom_get( numrtr, jpdom_autoglo, 'CO3_3D'  ,  f3_co3(:,:,:)    ) 
     291         CALL iom_get( numrtr, jpdom_autoglo, 'omcal_3D',  f3_omcal(:,:,:)  ) 
     292         CALL iom_get( numrtr, jpdom_autoglo, 'omarg_3D',  f3_omarg(:,:,:)  ) 
     293         CALL iom_get( numrtr, jpdom_autoglo, 'CCD_CAL' ,  f2_ccd_cal(:,:)  ) 
     294         CALL iom_get( numrtr, jpdom_autoglo, 'CCD_ARG' ,  f2_ccd_arg(:,:)  ) 
     295         !! 
     296         IF(lwp) WRITE(numout,*) ' MEDUSA averaged Carb-chem stats (min, max, sum) ...' 
     297      call trc_rst_dia_stat( f3_pH(:,:,1)   ,'pH 3D surf') 
     298      call trc_rst_dia_stat( f3_h2co3(:,:,1),'h2CO3 3D surf') 
     299      call trc_rst_dia_stat( f3_hco3(:,:,1) ,'hCO3 3D surf' ) 
     300      call trc_rst_dia_stat( f3_co3(:,:,1)  ,'CO3 3D surf' ) 
     301      call trc_rst_dia_stat( f3_omcal(:,:,1),'omcal 3D surf') 
     302      call trc_rst_dia_stat( f3_omarg(:,:,1),'omarg 3D surf') 
     303      call trc_rst_dia_stat( f2_ccd_cal(:,:),'CCD_CAL') 
     304      call trc_rst_dia_stat( f2_ccd_arg(:,:),'CCD_ARG') 
     305 
     306      ELSE 
     307         IF(lwp) WRITE(numout,*) 'WARNING : No Carbonate-chem variable in the restart.... ' 
     308         IF(lwp) WRITE(numout,*) 'Is not a problem if start a month, but may be very problematic if not ' 
     309         IF(lwp) WRITE(numout,*) 'Check if   mod(kt*rdt,2592000) == rdt'  
     310         IF(lwp) WRITE(numout,*) 'Or don t start from uncomplete restart...'  
     311      ENDIF 
     312# endif 
     313 
     314 
    281315#endif 
    282316      ! 
     
    419453      call trc_rst_dia_stat(zirondep(:,:), 'Iron dep') 
    420454      !!  
     455      !!   
     456      !! JPALM 14-06-2016 -- add Carbonate chenistry variables through the restart 
     457      !!                  -- needed for monthly call of carb-chem routine and better reproducibility 
     458# if defined key_roam 
     459      IF(lwp) WRITE(numout,*) 'Carbonate chem variable - writing out ...' 
     460      CALL iom_rstput( kt, nitrst, numrtw, 'pH_3D'   ,  f3_pH(:,:,:)     ) 
     461      CALL iom_rstput( kt, nitrst, numrtw, 'h2CO3_3D',  f3_h2co3(:,:,:)  ) 
     462      CALL iom_rstput( kt, nitrst, numrtw, 'hCO3_3D' ,  f3_hco3(:,:,:)   ) 
     463      CALL iom_rstput( kt, nitrst, numrtw, 'CO3_3D'  ,  f3_co3(:,:,:)    ) 
     464      CALL iom_rstput( kt, nitrst, numrtw, 'omcal_3D',  f3_omcal(:,:,:)  ) 
     465      CALL iom_rstput( kt, nitrst, numrtw, 'omarg_3D',  f3_omarg(:,:,:)  ) 
     466      CALL iom_rstput( kt, nitrst, numrtw, 'CCD_CAL' ,  f2_ccd_cal(:,:)  ) 
     467      CALL iom_rstput( kt, nitrst, numrtw, 'CCD_ARG' ,  f2_ccd_arg(:,:)  ) 
     468      !! 
     469      IF(lwp) WRITE(numout,*) ' MEDUSA averaged Carb-chem stats (min, max, sum) ...' 
     470      call trc_rst_dia_stat( f3_pH(:,:,1)   ,'pH 3D surf') 
     471      call trc_rst_dia_stat( f3_h2co3(:,:,1),'h2CO3 3D surf') 
     472      call trc_rst_dia_stat( f3_hco3(:,:,1) ,'hCO3 3D surf' ) 
     473      call trc_rst_dia_stat( f3_co3(:,:,1)  ,'CO3 3D surf' ) 
     474      call trc_rst_dia_stat( f3_omcal(:,:,1),'omcal 3D surf') 
     475      call trc_rst_dia_stat( f3_omarg(:,:,1),'omarg 3D surf') 
     476      call trc_rst_dia_stat( f2_ccd_cal(:,:),'CCD_CAL') 
     477      call trc_rst_dia_stat( f2_ccd_arg(:,:),'CCD_ARG') 
     478      !! 
     479# endif 
     480!! 
    421481#endif 
    422482      ! 
Note: See TracChangeset for help on using the changeset viewer.