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 – NEMO

Changeset 7017 for branches


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

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

Location:
branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC
Files:
3 edited

Legend:

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

    r6810 r7017  
    10391039      !!                 be calculated and done properly 
    10401040      !! IF( kt == nit000 .or. mod(kt,1920) == 0 ) THEN 
    1041       IF( kt == nittrc000 .or. mod(kt,960) == 0 ) THEN 
     1041      !! IF( kt == nittrc000 .or. mod(kt,960) == 0 ) THEN  
     1042      !!============================= 
     1043      !! Jpalm -- 07-10-2016 -- need to change carb-chem frequency call : 
     1044      !!          we don't want to call on the first time-step of all run submission,  
     1045      !!          but only on the very first time-step, and then every month 
     1046      !!          So we call on nittrc000 if not restarted run,  
     1047      !!          else if one month after last call. 
     1048      !!          assume one month is 30d --> 3600*24*30 : 2592000s 
     1049      !!          try to call carb-chem at 1st month's tm-stp : x * 30d + 1*rdt(i.e: mod = rdt)    
     1050      !!          ++ need to pass carb-chem output var through restarts 
     1051      If ( ( kt == nittrc000 .AND. .NOT.ln_rsttr ) .OR. mod(kt*rdt,2592000.) == rdt ) THEN 
    10421052         !!---------------------------------------------------------------------- 
    10431053         !! Calculate the carbonate chemistry for the whole ocean on the first 
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcini_medusa.F90

    r6798 r7017  
    8080      IF(lwp) WRITE(numout,*) ' trc_ini_medusa: initialisation of MEDUSA model' 
    8181      IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 
    82       IF(lwp) WRITE(numout,*) ' second Test with Julien' 
    8382# if defined key_debug_medusa 
    8483            CALL flush(numout) 
  • 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.