Reading atmospheric deposition into FABM

16 views
Skip to first unread message

David Amptmeijer

unread,
Jun 13, 2022, 5:07:33 AM6/13/22
to FABM-users
Dear FABM users,

I am trying to use FABM for bioaccumulation modelling and I would like to read in seasonal atmospheric data of pollution deposition to the surface layer.

I am working using GOTM at the moment so I think I could read the values into GOTM the same way as precipitation is read in, but that would mean that the solution only works for GOTM.

I was wondering if somebody was aware of a way i could attach a file with pollution input (at least monthly, but can also be secondly) that I read in using the fabm.yaml and then would have acces to in do_surface in my fabm setup?

Kind regards and thank you in advance.

David

Jorn Bruggeman

unread,
Jun 13, 2022, 5:33:47 AM6/13/22
to fabm-...@googlegroups.com

Hi David,

 

For that, you can add a surface flux module (built into FABM) to your fabm.yaml, and then configure it in gotm.yaml to be read from file. In fabm.yaml, you’d add something like this under instances:

 

dep:

  model: external_surface_flux

  coupling:

    target: <STATE_VARIABLE_TO_ADD_FLUX_TO>

 

and then in gotm.yaml, under fabm/input:

 

dep/flux:

  method: file

  file: <FILEPATH>

 

Note that the units of the flux should then be state variable units * meter / second, e.g., mmol m-2 s-1 if you state variable is in mmol m-3.

 

Hope this helps,

 

Jorn

--
You received this message because you are subscribed to the Google Groups "FABM-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fabm-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fabm-users/848f1469-b2b1-4be1-a7b0-a033def52960n%40googlegroups.com.

David Amptmeijer

unread,
Jun 15, 2022, 7:04:08 AM6/15/22
to fabm-...@googlegroups.com
Hey Jorn,

Thank you very much for your quick answer. This helps a lot. I had 2 follow-up questions if I may.

In our case I expect the deposition of pollutants to happen both via wet deposition, in which case the prescribed value addition to the state variable is perfect.
But in addition to this, I would like to have a variable atmospheric concentration (horizontal_dependendency) that I could use to estimate the air-sea exchange. If I use to try to couple the code below to a dependency it gives me the error:

FATAL ERROR: couple_variables: Attempt to couple state variable dep/target to non-state variable

Is there also a way I could do this?

Additionally, I was wondering what the input file should look like? I currently made the mercury deposition file in the same format as the precip.dat

1979-12-31 23:30:00 1
1980-01-01 00:30:00 1
1980-01-01 01:30:00 1
etc etc

but I get the following error:

 /fabm/input/dep/flux must be a constant or a dictionary with further information. It cannot be null.

Is there a specific format or structure that this file must have?



Kind regards and thank you for your help,

David



Op ma 13 jun. 2022 om 11:33 schreef Jorn Bruggeman <jo...@bolding-bruggeman.com>:
You received this message because you are subscribed to a topic in the Google Groups "FABM-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fabm-users/JS9jZ9PUWzA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fabm-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fabm-users/00d001d87f08%24ad226cd0%2407674670%24%40bolding-bruggeman.com.


--
Vriendelijke groet,
David Amptmeijer

Jorn Bruggeman

unread,
Jun 15, 2022, 7:22:13 AM6/15/22
to fabm-...@googlegroups.com

Hi David,

 

Calculation of air-sea exchange would presumably depend on variables like wind speed, and therefore require custom logic, typically within do_surface in the module that also defines your tracer. Like this, for instance: https://github.com/fabm-model/fabm/blob/25c4d1cb3afcaca87dc103cc60f0a9e8abac0796/src/models/gotm/ergom.F90#L407-L427 In that case, you could in that module add a surface dependency for the atmospheric concentration. You then link that to a file with the concentrations in the fabm/input section in gotm.yaml. Thus, you would not use the built-in external_surface_flux module.

 

Regarding the error message: that is not about the file format, which looks ok, but about the entry in gotm.yaml. That should look like:

 

fabm:

  input:

    dep/flux:

      method: file

      file: <PATH>

 

Perhaps the method and file lines are missing, or not sufficiently indented?

 

Cheers,

David Amptmeijer

unread,
Jun 16, 2022, 4:53:50 AM6/16/22
to fabm-...@googlegroups.com
Hey Jorn,

Thank you very much for your suggestion. Both the air sea exchange and wet deposition work as intended this way.

Kind regards

David

Op wo 15 jun. 2022 om 13:22 schreef Jorn Bruggeman <jo...@bolding-bruggeman.com>:
Reply all
Reply to author
Forward
0 new messages