From 4fef4ae182a73d9d8c30b77fd4b1f56b3691b0db Mon Sep 17 00:00:00 2001
From: Sabine <sabine.eckhardt@nilu.no>
Date: Thu, 27 Jun 2024 12:14:18 +0200
Subject: [PATCH] adding bca in other routines

---
 source/init_ghg.f90     | 2 +-
 source/main.f90         | 2 +-
 source/mod_settings.f90 | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/source/init_ghg.f90 b/source/init_ghg.f90
index 63cb925..15ab159 100644
--- a/source/init_ghg.f90
+++ b/source/init_ghg.f90
@@ -481,7 +481,7 @@ subroutine init_ghg(files, config, fluxes, obs, states, covar)
 
   ! initial concentrations from termination of trajectories
   ! only do for a fresh run
-  if ( config%restart.eq.0 ) then
+  if ( ( config%restart.eq.0 ).and.( config%spec.ne.'bca') ) then  
     if ( files%init_type.lt.5 ) then
       ! daily or higher frequency
       call init_cini(files, config, obs)
diff --git a/source/main.f90 b/source/main.f90
index 232cca8..d5e9971 100644
--- a/source/main.f90
+++ b/source/main.f90
@@ -89,7 +89,7 @@ program main
 
   if ( config%spec.eq.'co2' ) then
     call init_co2(files, config, fluxes, obs, states, covar)
-  else if (config%spec.eq.'ghg') then
+  else if ((config%spec.eq.'ghg').or.(config%spec.eq.'bca')) then
     call init_ghg(files, config, fluxes, obs, states, covar)
   else
     write(logid,*) 'ERROR: spec must be one of co2 or ghg'
diff --git a/source/mod_settings.f90 b/source/mod_settings.f90
index 7f847fd..4b54e1c 100644
--- a/source/mod_settings.f90
+++ b/source/mod_settings.f90
@@ -117,7 +117,7 @@ module mod_settings
     integer                     :: datei           ! start date (yyyymmdd)
     integer                     :: datef           ! end date (yyyymmdd)
     logical                     :: average_fp      ! average footprints to match observation (true or false)
-    character(len=3)            :: spec            ! species ('co2' or 'ghg')
+    character(len=3)            :: spec            ! species ('co2', 'bca' or 'ghg')
     character(len=max_name_len) :: method          ! inversion method ('analytic' or 'congrad' or 'm1qn3')
     logical                     :: lognormal       ! use log-normal distribution in state space
     real                        :: trunc           ! truncation factor for eigenvalues of B
-- 
GitLab