HCJung-jbnu / ROMS-TOPAZ

ROMS + TOPAZ coupling
0 stars 0 forks source link

TOPAZ pCO2air, pO2air 적용 및 PCO2 DATA 처방 방식 적용 (FENNEL 참조) #25

Closed HCJung-jbnu closed 1 year ago

HCJung-jbnu commented 1 year ago

! O2 partial pressure in the air (parts per million by volume),

 pO2air == 21.0d+4

- 
HCJung-jbnu commented 1 year ago

..... IF (.not.allocated(pCO2air)) THEN allocate ( pCO2air(Ngrids) ) Dmem(1)=Dmem(1)+REAL(Ngrids,r8) END IF

  IF (.not.allocated(pO2air)) THEN
    allocate ( pO2air(Ngrids) )
    Dmem(1)=Dmem(1)+REAL(Ngrids,r8)
  END IF

......

- ~/Nonlinear/Biology/topaz_inp.h
        CASE ('pCO2air')
          Npts=load_r(Nval, Rval, Ngrids, pCO2air)
        CASE ('pO2air')
          Npts=load_r(Nval, Rval, Ngrids, pO2air)

.... WRITE (out,80) pCO2air(ng), 'pCO2air', & & 'CO2 partial pressure in air (parts per million by volume).' WRITE (out,80) pO2air(ng), 'pO2air', & & 'O2 partial pressure in air (parts per million by volume).' ....

- ~/Nonlinear/Biology/topaz.h
    REAL :: pCO2air_secular, pmonth

    REAL, PARAMETER :: pi2 = 6.2831853071796
    REAL, PARAMETER :: D0 = 282.6          ! coefficients
    REAL, PARAMETER :: D1 = 0.125          ! to calculate
    REAL, PARAMETER :: D2 =-7.18           ! secular trend in
    REAL, PARAMETER :: D3 = 0.86           ! atmospheric pCO2
    REAL, PARAMETER :: D4 =-0.99
    REAL, PARAMETER :: D5 = 0.28
    REAL, PARAMETER :: D6 =-0.80
    REAL, PARAMETER :: D7 = 0.06

... !! Calculate pCO2air CALL caldate (tdays(ng), yy_i=year, yd_dp=yday) pmonth=year-1951.0+yday/365.0

if defined PCO2AIR_DATA

   pCO2air_secular=380.464+9.321*SIN(pi2*yday/365.25+ &
 &                 1.068)

elif defined PCO2AIR_SECULAR

   pCO2air_secular=D0+D1*pmonth*12.0+                       &
 &                 D2*SIN(pi2*pmonth+D3)+                   &
 &                 D4*SIN(pi2*pmonth+D5)+                   &
 &                 D6*SIN(pi2*pmonth+D7)

else

   pCO2air_secular=pCO2air(ng)

endif

   TP(ng)%pCO2air=pCO2air_secular*1.0E-6 !!ppm->percentile(volume fraction)
   TP(ng)%pO2air=pO2air(ng)*1.0E-6       !!ppm->percentile(volume fraction)

.....

- Output definition 설정 : topaz_def.h, topaz_def_pio.h -> def_info.F
- Output write 설정 : topaz_wrt.h, topaz_wrt_pio.h -> wrt_info.F
- wnp_carbon.h

/* TOPAZv2 biology model OPTIONS: **


TOPAZ if TOPAZ main model PCO2AIR_DATA if pCO2 climatology from Laurent et al. (2017) PCO2AIR_SECULAR if pCO2 time-depedent evolution SRCSINK_OFF turn off TOPAZ source&sink term CO2_FLUX_OFF turn off CO2 air-sea exchange O2_FLUX_OFF turn off O2 air-sea exchange * /

HCJung-jbnu commented 1 year ago

~/Utility/checkdefs.F

!add pCO2data type options,
# if defined PCO2AIR_DATA & defined TOPAZ
!
      IF (Master) WRITE (stdout,20) 'PCO2AIR_DATA',                     &
     &   'CO2 gas exchange from Laurent et al. (2017)'
      is=LEN_TRIM(Coptions)+1
      Coptions(is:is+14)=' PCO2AIR_DATA,'
# elif defined PCO2AIR_SECULAR & defined TOPAZ
!
      IF (Master) WRITE (stdout,20) 'PCO2AIR_SECULAR',                  &
     &   'CO2 gas exchange time-dependent evolution'
      is=LEN_TRIM(Coptions)+1
      Coptions(is:is+17)=' PCO2AIR_SECULAR,'
# endif