From 82842c4ab1345f73ee0198d1ddc7b3de58e572c9 Mon Sep 17 00:00:00 2001 From: ronesy <rlt@nilu.no> Date: Mon, 25 Nov 2024 14:05:16 +0100 Subject: [PATCH] change name aero -> aer to be consistent with 3-character species names --- settings/{SETTINGS_aero_config => SETTINGS_aer_config} | 4 ++-- settings/{SETTINGS_aero_files => SETTINGS_aer_files} | 6 +++--- source/calc_conc.f90 | 4 ++-- source/main.f90 | 4 ++-- source/mod_settings.f90 | 2 +- source/simulate.f90 | 10 +++++----- 6 files changed, 15 insertions(+), 15 deletions(-) rename settings/{SETTINGS_aero_config => SETTINGS_aer_config} (98%) rename settings/{SETTINGS_aero_files => SETTINGS_aer_files} (94%) diff --git a/settings/SETTINGS_aero_config b/settings/SETTINGS_aer_config similarity index 98% rename from settings/SETTINGS_aero_config rename to settings/SETTINGS_aer_config index 511cd86..f0112a0 100644 --- a/settings/SETTINGS_aero_config +++ b/settings/SETTINGS_aer_config @@ -73,8 +73,8 @@ satellite: .false. # Use ground-based observations (true or false) ground: .true. -# Species ("co2" or "ghg" or "aero") -spec: aero +# Species ("co2" or "ghg" or "aer") +spec: aer # Coefficient to convert from grid units of ppt to ppb coeff: 1.0 diff --git a/settings/SETTINGS_aero_files b/settings/SETTINGS_aer_files similarity index 94% rename from settings/SETTINGS_aero_files rename to settings/SETTINGS_aer_files index 3274512..9b3ff4b 100644 --- a/settings/SETTINGS_aero_files +++ b/settings/SETTINGS_aer_files @@ -46,7 +46,7 @@ file_log: flexinvert.log # Regions mask file: # needs to correspond to flexpart domain and resolution (if using nested output needs to correspond to nest) -file_regions: /mypath/output/regions_aero.nc +file_regions: /mypath/output/regions_aer.nc varname_regs: regions lonname_regs: longitude latname_regs: latitude @@ -68,7 +68,7 @@ latname_lsm: lat # Global prior flux file: flux kg/m2/h # needs to correspond to flexpart domain and resolution # generic name with year YYYY -filename_flx: AERO_TOTAL_YYYY_10x10.nc +filename_flx: AER_TOTAL_YYYY_10x10.nc varname_flx: emis lonname_flx: longitude latname_flx: latitude @@ -84,6 +84,6 @@ latnest_flx: timenest_flx: # Receptor list file: -file_recept: /mypath/input/reclist_aero.txt +file_recept: /mypath/input/reclist_aer.txt diff --git a/source/calc_conc.f90 b/source/calc_conc.f90 index 98f266c..b6d392a 100644 --- a/source/calc_conc.f90 +++ b/source/calc_conc.f90 @@ -76,7 +76,7 @@ subroutine calc_conc(config, fluxes, obs, ngrid, gtime, hnest, hbkg, iobs, ix1, flxbg = fluxes%flxnee(:,:,ind) + & fluxes%flxff(:,:,ind) + & fluxes%flxocn(:,:,ind) - else if (( trim(config%spec).eq.'ghg' ) .or. ( trim(config%spec).eq.'aero' )) then + else if (( trim(config%spec).eq.'ghg' ) .or. ( trim(config%spec).eq.'aer' )) then ! GHG or aerosol species flxbg = fluxes%flx(:,:,ind) endif @@ -162,7 +162,7 @@ subroutine calc_conc(config, fluxes, obs, ngrid, gtime, hnest, hbkg, iobs, ix1, else obs%err(iobs) = sqrt(obs%measerr(iobs)**2 + (sum(obs%cini(iobs,:))*config%cinierr)**2 + bkgerr) endif - else if ( trim(config%spec).eq.'aero' ) then + else if ( trim(config%spec).eq.'aer' ) then ! aerosols obs%err(iobs) = sqrt(obs%measerr(iobs)**2 + bkgerr) endif diff --git a/source/main.f90 b/source/main.f90 index f5ee070..1abf8c2 100644 --- a/source/main.f90 +++ b/source/main.f90 @@ -91,10 +91,10 @@ program main call init_co2(files, config, fluxes, obs, states, covar) else if ( config%spec.eq.'ghg' ) then call init_ghg(files, config, fluxes, obs, states, covar) - else if ( config%spec.eq.'aero' ) then + else if ( config%spec.eq.'aer' ) then call init_aero(files, config, fluxes, obs, states, covar) else - write(logid,*) 'ERROR: spec must be one of co2, ghg, aero' + write(logid,*) 'ERROR: spec must be one of co2, ghg, aer' stop endif diff --git a/source/mod_settings.f90 b/source/mod_settings.f90 index 2320915..331460c 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' or 'aero') + character(len=3) :: spec ! species ('co2' or 'ghg' or 'aer') 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 diff --git a/source/simulate.f90 b/source/simulate.f90 index 23bebb8..6c8b253 100644 --- a/source/simulate.f90 +++ b/source/simulate.f90 @@ -173,7 +173,7 @@ subroutine simulate(iter, files, config, fluxes, obs, states, grad_o, cost_o) ftime(n) = juldate(int(dates(n)/1d6),int(dates(n)-floor(dates(n)/1d6)*1d6)) end do factor(:,:,:) = 1. - if ( config%spec.ne.'aero' ) then + if ( config%spec.ne.'aer' ) then filefactor = trim(path_flexrec)//'factor_drygrid' inquire ( file=trim(filefactor),exist=lexist ) if ( lexist ) then @@ -239,7 +239,7 @@ subroutine simulate(iter, files, config, fluxes, obs, states, grad_o, cost_o) end do ! convert s.m3/kg to s.m2/kg grid = grid/outheight(1) - if ( config%spec.eq.'aero' ) then + if ( config%spec.eq.'aer' ) then ! convert to match concentration units grid = grid*config%coeff else @@ -262,7 +262,7 @@ subroutine simulate(iter, files, config, fluxes, obs, states, grad_o, cost_o) if ( allocated(factor_nest) ) deallocate(factor_nest) allocate ( factor_nest(nnxgrid,nnygrid,nread) ) factor(:,:,:) = 1. - if ( config%spec.ne.'aero' ) then + if ( config%spec.ne.'aer' ) then filefactor = trim(path_flexrec)//'factor_drygrid_nest' inquire ( file=trim(filefactor),exist=lexist ) if ( lexist ) then @@ -316,7 +316,7 @@ subroutine simulate(iter, files, config, fluxes, obs, states, grad_o, cost_o) ! convert s.m3/kg to s.m2/kg gridnest = gridnest/outheight(1) ! convert from equivalent ppt to observation units (e.g. ppmv) - if ( config%spec.eq.'aero' ) then + if ( config%spec.eq.'aer' ) then gridnest = gridnest*config%coeff else gridnest = gridnest*config%coeff*mmair/config%molarmass @@ -592,7 +592,7 @@ subroutine simulate(iter, files, config, fluxes, obs, states, grad_o, cost_o) endif ! check if background missing (not for aerosols) - if ( config%spec.ne.'aero'.and.sum(obs%cini(i,:)).eq.0. ) then + if ( config%spec.ne.'aer'.and.sum(obs%cini(i,:)).eq.0. ) then write(logid,*) 'ERROR: background zero for observation ',i stop endif -- GitLab