Skip to content

Commit 1e70b0d

Browse files
committed
When meshfile is none, mapalgo needs to be set to none temporarily until we can change answers
1 parent f1f7bde commit 1e70b0d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/biogeochem/AtmCarbonIsotopeStreamType.F90

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,22 @@ subroutine C14Init( this, bounds, fldfilename, meshfile, mapalgo, tintalgo, taxm
177177
integer, intent(in) :: year_last ! last year to use
178178
integer, intent(in) :: model_year_align ! align yearFirst with this model year
179179

180+
character(len=len(mapalgo)) :: str_mapalgo ! Temporary copy of mapalgo so can change input if meshfile is none
181+
180182
! Since C14 data has latitude bands mapalgo and meshfile can neither be set to none
181183
call shr_assert( trim(mapalgo) /= "none", "mapalgo MUST NOT be none for C14 streams"//errMsg( file=sourcefile, line=__LINE__) )
182184
! TODO: Uncomment this error check when we are ready for the test for this to change answers
183185
!call shr_assert( trim(meshfile) /= "none", "meshfile MUST NOT be none for C14 streams"//errMsg( file=sourcefile, line=__LINE__) )
186+
! TOD: Remove this tempoary bit at the same time
187+
if ( trim(meshfile) == "none" )then
188+
str_mapalgo = "none"
189+
else
190+
str_mapalgo = mapalgo
191+
end if
192+
! TODO: End of temporary bit
193+
184194
call this%InitBase( bounds, varnames = (/ varname_c14 /), fldfilename=fldfilename, meshfile=meshfile, &
185-
mapalgo=mapalgo, tintalgo=tintalgo, taxmode=taxmode, name=varname_c14, &
195+
mapalgo=str_mapalgo, tintalgo=tintalgo, taxmode=taxmode, name=varname_c14, &
186196
year_first=year_first, year_last=year_last, model_year_align=model_year_align )
187197
call this%C14InitAllocate( bounds )
188198
call this%Advance( )

0 commit comments

Comments
 (0)