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

How to add a time varying variable in the MARBL

ccyao

dachengzi
New Member
Hi, all!
I am doing sensitivity tests in the CESM2.1.3 MARBL. I am trying to add an additional time-varying term in the equation of computing no3 and nh4 interior tendency in the marbl_interior_tendency_mod.F90 to simulate nitrate and ammonium fertilization in the ocean. I wonder how to add a time-varying term in the marbl.

Take no3 for example, the default interior tendency for no3 in the marbl is like in Line 3459:
interior_tendencies(no3_ind,k) = nitrif(k) - denitrif(k) - sed_denitrif(k) - sum(NO3_V(:,k))

While my goal is:
interior_tendencies(no3_ind,k) = nitrif(k) - denitrif(k) - sed_denitrif(k) - sum(NO3_V(:,k)) + nitrate(t)
where nitrate(t) is a time-varying additional numerical term (e.g. nitrate(t) = ln(t+1)), t is the model run time.

I wonder if it is feasible in the marbl and how to add this new variable in the output .nc files.

Thank you for any suggestions!
 

mlevy

Michael Levy
CSEG and Liaisons
Staff member
MARBL relies on the ocean model (POP, in this case) to handle all time-stepping. What you want to do is add a new forcing field to MARBL (this page might be useful in figuring out how to do that) and then make sure POP is setting this new nitrate forcing field correctly at each time step.
 

ccyao

dachengzi
New Member
Thank you, Mike!

I checked the forcing file of NHy flux in this page and found it is a lon*lat*time array, 'time' is the days since the specified time (like 2014-01-01 00:00:00), which means the NHy flux is daily-varing data.

While what I want to do is add a time-varying additional numerical function directly in the source code marbl_interior_tendency_mod.F90. The independent variable is model run time, which means the dependent variable varies over model time step (this time step is less than a day I think). I wonder if there is a model run time or model time step index in the marbl or POP so that I can call this index in the source code to develop the function. I found two possible indices, which are 'timer_ids' and 'cur_time' in the marbl_timing_mod.F90.
I am not sure if it is feasible in the marbl. Looking forward to your thoughts.​
 
Top