module m_ECOSM_relaxation use mod_xc use mod_necessary_ecovars, only: init, ipho, isil, idet, inh4, & ifla, idia, ioxy, idom, iopa, & ibg, ifish,imeso,imicro, ifish, & ichlf,ichld,ichlb, & nbio, nsed #if defined (ECO2) use mod_necessary_ecovars, only: idic, ialk #endif /* ECO2 */ #if defined (ECOCCO) use mod_necessary_ecovars, only: icocc, icaco3,ichlc #endif /* ECOCCO */ contains !********************************************************************** subroutine ECOSM_readnutrelax() use mod_year_info, only : year_info, rt, refyear, year_day implicit none include 'common_blocks.h' c integer month call year_day(time,refyear,rt,yrflag) month=rt%imm call ECOSM_nitrrelax(mod(month+10,12)+1,1) call ECOSM_nitrrelax(month ,2) call ECOSM_nitrrelax(mod(month, 12)+1,3) call ECOSM_nitrrelax(mod(month+1, 12)+1,4) call ECOSM_phosrelax(mod(month+10,12)+1,1) call ECOSM_phosrelax(month ,2) call ECOSM_phosrelax(mod(month, 12)+1,3) call ECOSM_phosrelax(mod(month+1, 12)+1,4) call ECOSM_silirelax(mod(month+10,12)+1,1) call ECOSM_silirelax(month ,2) call ECOSM_silirelax(mod(month, 12)+1,3) call ECOSM_silirelax(mod(month+1, 12)+1,4) call ECOSM_oxygrelax(mod(month+10,12)+1,1) call ECOSM_oxygrelax(month ,2) call ECOSM_oxygrelax(mod(month, 12)+1,3) call ECOSM_oxygrelax(mod(month+1, 12)+1,4) #if defined ECO2 call ECOSM_alkrelax(mod(month+10,12)+1,1) call ECOSM_alkrelax(month ,2) call ECOSM_alkrelax(mod(month, 12)+1,3) call ECOSM_alkrelax(mod(month+1, 12)+1,4) call ECOSM_dicrelax(mod(month+10,12)+1,1) call ECOSM_dicrelax(month ,2) call ECOSM_dicrelax(mod(month, 12)+1,3) call ECOSM_dicrelax(mod(month+1, 12)+1,4) #endif rmutr(:,:,idet)=0.0 rmutr(:,:,idom)=0.0 rmutr(:,:,iopa)=0.0 rmutr(:,:,inh4)=0.0 rmutr(:,:,ibg)=0.0 rmutr(:,:,ifla)=0.0 rmutr(:,:,idia)=0.0 rmutr(:,:,imeso)=0.0 rmutr(:,:,imicro)=0.0 rmutr(:,:,ifish)=0.0 rmutr(:,:,ichlb)=0.0 rmutr(:,:,ichlf)=0.0 rmutr(:,:,ichld)=0.0 #if defined (ECOCCO) rmutr(:,:,icocc)=0.0 rmutr(:,:,ichlc)=0.0 rmutr(:,:,icaco3)=0.0 #endif /* ECOCCO */ end subroutine ECOSM_readnutrelax !********************************************************************** subroutine ECOSM_nitrrelax(month,lslot) use mod_za c implicit none include 'common_blocks.h' include 'biovar.h' include 'ECOSMparam1.h' c integer lslot,month c integer ios,lgth integer mnth character preambl(5)*79, cline*80 real xmin, xmax lgth = len_trim(flnmfor) mnth=mod(month-1,12)+1 call zaiopf(flnmforw(1:lgth)//'relax.nitr.a', 'old', 931) if (mnproc.eq.1) then ! .b file from 1st tile only open (unit=uoff+931,file=flnmforw(1:lgth)//'relax.nitr.b', & status='old', action='read') read (uoff+931,'(a79)') preambl endif !1st tile call preambl_print(preambl) do i=1,month do k= 1,kk call zaiord(trwall(1-nbdy,1-nbdy,k,lslot,init),ip,.false., & xmin,xmax,931) enddo enddo trwall(:,:,:,lslot,init)=trwall(:,:,:,lslot,init)* & PrmREDF(1)*PrmREDF(6) call zaiocl(931) close(uoff+931) end subroutine ECOSM_nitrrelax !********************************************************************** subroutine ECOSM_phosrelax(month,lslot) use mod_za c implicit none include 'common_blocks.h' include 'biovar.h' include 'ECOSMparam1.h' c integer lslot,month c integer ios,lgth integer mnth character preambl(5)*79, cline*80 real xmin, xmax lgth = len_trim(flnmfor) mnth=mod(month-1,12)+1 call zaiopf(flnmforw(1:lgth)//'relax.phos.a', 'old', 932) if (mnproc.eq.1) then ! .b file from 1st tile only open (unit=uoff+932,file=flnmforw(1:lgth)//'relax.phos.b', & status='old', action='read') read (uoff+932,'(a79)') preambl endif !1st tile call preambl_print(preambl) do i=1,month do k= 1,kk call zaiord(trwall(1-nbdy,1-nbdy,k,lslot,ipho),ip,.false., & xmin,xmax,932) enddo enddo trwall(:,:,:,lslot,ipho)=trwall(:,:,:,lslot,ipho)* & PrmREDF(2)*PrmREDF(6) call zaiocl(932) close(uoff+932) end subroutine ECOSM_phosrelax !********************************************************************** c subroutine ECOSM_silirelax(month,lslot) use mod_za c implicit none include 'common_blocks.h' include 'biovar.h' include 'ECOSMparam1.h' c integer lslot,month c integer ios,lgth integer mnth character preambl(5)*79, cline*80 real xmin, xmax lgth = len_trim(flnmfor) mnth=mod(month-1,12)+1 call zaiopf(flnmforw(1:lgth)//'relax.sili.a', 'old', 933) if (mnproc.eq.1) then ! .b file from 1st tile only open (unit=uoff+933,file=flnmforw(1:lgth)//'relax.sili.b', & status='old', action='read') read (uoff+933,'(a79)') preambl endif !1st tile call preambl_print(preambl) do i=1,month do k= 1,kk call zaiord(trwall(1-nbdy,1-nbdy,k,lslot,isil),ip,.false., & xmin,xmax,933) enddo enddo trwall(:,:,:,lslot,isil)=trwall(:,:,:,lslot,isil)* & PrmREDF(3)*PrmREDF(6) call zaiocl(933) close(uoff+933) end subroutine ECOSM_silirelax !********************************************************************** c subroutine ECOSM_oxygrelax(month,lslot) use mod_za c implicit none include 'common_blocks.h' include 'biovar.h' include 'ECOSMparam1.h' c integer lslot,month c integer ios,lgth integer mnth character preambl(5)*79, cline*80 real xmin, xmax lgth = len_trim(flnmfor) mnth=mod(month-1,12)+1 call zaiopf(flnmforw(1:lgth)//'relax.oxyg.a', 'old', 934) if (mnproc.eq.1) then ! .b file from 1st tile only open (unit=uoff+934,file=flnmforw(1:lgth)//'relax.oxyg.b', & status='old', action='read') read (uoff+934,'(a79)') preambl endif !1st tile call preambl_print(preambl) do i=1,month do k= 1,kk call zaiord(trwall(1-nbdy,1-nbdy,k,lslot,ioxy),ip,.false., & xmin,xmax,934) enddo enddo trwall(:,:,:,lslot,ioxy)=trwall(:,:,:,lslot,ioxy)* & PrmREDF(7) call zaiocl(934) close(uoff+934) end subroutine ECOSM_oxygrelax !********************************************************************** #if defined (ECO2) c subroutine ECOSM_alkrelax(month,lslot) use mod_za c implicit none include 'common_blocks.h' include 'biovar.h' include 'ECOSMparam1.h' c integer lslot,month c integer ios,lgth integer mnth character preambl(5)*79, cline*80 real xmin, xmax lgth = len_trim(flnmfor) mnth=mod(month-1,12)+1 call zaiopf(flnmforw(1:lgth)//'relax.alkl.a', 'old', 935) if (mnproc.eq.1) then ! .b file from 1st tile only open (unit=uoff+935,file=flnmforw(1:lgth)//'relax.alkl.b', & status='old', action='read') read (uoff+935,'(a79)') preambl endif !1st tile call preambl_print(preambl) do i=1,month do k= 1,kk call zaiord(trwall(1-nbdy,1-nbdy,k,lslot,ialk),ip,.false., & xmin,xmax,935) enddo enddo trwall(:,:,:,lslot,ialk)=trwall(:,:,:,lslot,ialk) call zaiocl(935) close(uoff+935) end subroutine ECOSM_alkrelax !********************************************************************** c subroutine ECOSM_dicrelax(month,lslot) use mod_za c implicit none include 'common_blocks.h' include 'biovar.h' include 'ECOSMparam1.h' c integer lslot,month c integer ios,lgth integer mnth character preambl(5)*79, cline*80 real xmin, xmax lgth = len_trim(flnmfor) mnth=mod(month-1,12)+1 call zaiopf(flnmforw(1:lgth)//'relax.dico.a', 'old', 936) if (mnproc.eq.1) then ! .b file from 1st tile only open (unit=uoff+936,file=flnmforw(1:lgth)//'relax.dico.b', & status='old', action='read') read (uoff+936,'(a79)') preambl endif !1st tile call preambl_print(preambl) do i=1,month do k= 1,kk call zaiord(trwall(1-nbdy,1-nbdy,k,lslot,idic),ip,.false., & xmin,xmax,936) enddo enddo trwall(:,:,:,lslot,idic)=trwall(:,:,:,lslot,idic)*PrmREDF(6) call zaiocl(936) close(uoff+936) end subroutine ECOSM_dicrelax !********************************************************************** #endif /* ECO2 */ end module m_ECOSM_relaxation