Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Tracers with SCAM

Hi,

This is a newbie question. Do the tracer subroutines in tracers.F90 and tracer_suite.F90 work with SCAM? I copied these files to the mymods directory and then changed the value of tracers_flag to .true., but the values that are output for TT_LW, TT_MD, TT_HI, etc. are all NaN's.

I need to define a set of tracers and plan to follow the example of these files if they work.

Thanks,
Bill Gustafson

-------------------------------------------------------
Atmospheric Science and Global Change Division
Pacific Northwest National Laboratory
 
Hi,

Here is an update regarding my post about getting tracers to work with SCAM (v3.1). It turns out that there are bugs which prevent them from working, at least with IOP data (that is all I've tried).

Here is a brief summary of what must be fixed to use tracers with SCAM:

1) In scm_initial.F90, when using IOP data, the q3 array has different time steps copied around during setup, resulting in an uninitialized time being copied over the initialized tracer values. Here is a code snippet with some context for fixing this (the code between the "wig's" is added):
-----snippet from scm_inital.F90-----

if (use_iop) then
call setiopupdate
call readiopdata(error_code)
!wig++
! Tracers are only initialized at time "1" so need to copy them into time "n3"
! before they get thrashed in the copies just below...
if( tracers_flag ) then
do i=2,ptimelevels
q3(:,:,4:trac_ncnst+3,:,i) = q3(:,:,4:trac_ncnst+3,:,1)
end do
end if
!wig--
!
! read_inidat reads all values in at (:,:,1) and these values
! are copied into all three time levels below. Readiopdata is called
! in the time loop and reads values into the n3 position so we must
! update the (:,:,1) position to let initial readiopcall work with
! model code.
-----end snippet

also, towards the top of the file, add some "uses" for the tracer modules:
use tracers, only: tracers_flag !wig
use tracers_suite,only: trac_ncnst !wig

2) In tracers.F90, the tracer type needs to be changed from "dry" to "wet" in the cnst_add call within tracers_register. Without this, the qminus array in the time stepping is messed up.

Ideally, running the tracers as dry is more desirable, but I was not able to figure out how to get this to happen. I hope this info is helpful if anybody else runs into the same problems I did.

-Bill
 
Top