-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
time coordinates and file for dust deposition are incorrect for new stream functionality #404
Comments
@monsieuralok - I see that you created the following files:
Can new files please be created with the changes requested above? Moving forwards we will only need one higher resolution data to work with. |
Dear @mvertens let me try to find the original input file, I think this file has been interpolated between different grids a couple of times. I'll search for it now and come back to you. |
@JorgSchwinger - thank you! I'm happy to work with just the original file - that is the advantage of this new capability. |
@mvertens I have found the original input file, but now nird has been shut down, so I can't work on it (the time dimension is also not as requested, I have to find some cdo/ncl magic to adjust this). |
@JorgSchwinger - thanks for tracking this down. For testing I can simply modify one of the current datasets using a simple ncdump/ncgen combination to validate if my code at least produces reasonable results. |
@JorgSchwinger - how can I test to see if using the streams for the iron dust deposition is reasonable (I would assume that if I read in a tnx1v4 dust deposition data from the streams and compared it to the current read it should be similar). I'm not sure what to look for in the output history files from blom - or if any of this information is actually being written out. |
@mvertens please find the adjusted (to meet CDEPS requirements) original dust deposition file here I hope everything is correct with time axis and format, please let me know if not. I did not adjust the units of the original file (kg/m2/s) to the strange units HAMOCC is expecting (kg/m2/month). I guess this can be adjusted through a unit conversion in the stream (use 30 days per month)? Regarding testing the stream capability: Unfortunately, HAMOCC does not output the dust (iron) field, so there is no straightforward way to compare. I can offer to run a longer NOINYOC case with the new stream functionality to compare to a corresponding case with the old input. Finally, I would like to move to a better dust input data set, which will be easy once the new stream-functionality is implemented, right? I will open a separate issue for this |
@JorgSchwinger - thank you!!! It should be easy to do the unit conversion once the data is read in. If you are free tomorrow - or Wednesday - can we have a quick zoom chat just to look over what I've done. I want to make sure that I don't need to call fill_global for my implementation - since I'm not allocating any halo points (as is the case in mo_read_fedep.F90). |
@mvertens I'm happy to have a chat later today. I'm in a seminar until 10 and have a lunch meeting 11:30-12:30 otherwise I'm free |
@JorgSchwinger - in looking at |
Mmmh, I see that we don't have any scaled river input with yearly runoff currently in the boundary folder for rivers (yearly run-off of a historical and future NorESM simulation used to scale the nut. -input climatology) - while I believe that there was such thing for earlier/other NorESM versions developed by S. Gao (https://bg.copernicus.org/articles/20/93/2023/bg-20-93-2023.html). This would be the/a fall-back solution to currently envisaged interactive coupling through MOSART. Hence, I would upvote for cycling over a climatological year for now, hence introducing a time coordinate. |
Thanks @jmaerz. Would it be possible for you or @JorgSchwinger to create that dataset? That would be super helpful while I try to validate the current code I am implementing for fedust. |
Dear @mvertens , I think for now, it would mean to put a time coordinate on the climatological data you referred to above. Let's see, what @JorgSchwinger says and then let's move forward with this - Jörg or I can generate such climatological file. When you @mvertens write duplicate values - does that mean to have values for each simulated year or is it enough to put (any) year as time coordinate (and simply re-use this year as climatology)? Sorry for the latter simple question, but I am not yet familiar with these interfaces. For any scaled input data for 1850-future, we would need a historical and scenario simulations, which is currently likely out of the scope of what we should/want to do at the moment (while having the fallback ready from a technical perspective would be useful, I believe - giving some peace to mind). Maybe we can consider using CMIP6 riverine efflux simulations to scale the data - for technical testing purposes. I'll talk to Jörg about it. |
@jmaerz - we would need to duplicate the data in the file - so if the time coordinate had 2 values (say yearly) then there would have to be duplicate values for that data. |
@mvertens river nutrients is a constant field, yes. CDEPS can interpolate in space AND time but not in space if there is not time-interpolation? Seems unnecessarily restrictive to me :) Anyway, the riverine input data set (GNEWS2) isn't time resolved, so this is what we have. (The scaling with river-runoff has been done, but there are also quite strong assumptions behind this). I'm sure something better will become available in the foreseeable future, but I guess for now we need to duplicate the data. I have looked into creating the input fields on a 0.5 x 0.5 degree grid, but I didn't get the original scripts to work yet (the GNEWS2 data comes in Excel-files...). I'm on it, but it will take a bit more time. |
@JorgSchwinger - CDEPS is designed to read time dependent forcing data with at least 2 time slices. As I mentioned before - we can write functionality in BLOM to simply regrid data without any time axis - but that would not be part of CDEPS. I'm happy to do that and it would not be hard. It could also be reused for other forcing data that I see has no time axis - like SWA. Maybe we should chat before we start duplicating data on the files. |
@JorgSchwinger @jmaerz - the more I've thought about this the more I think that the right solution now is to simply regrid the incoming data if there is not a time coordinate on the file. It will be easy to switch to CDEPS streams if new files come in with time coordinates - but I think that putting the regridding functionality in now will be the right approach and take less time then creating new datasets that have duplicate data. |
@mvertens I agree that this would be the better solution for now (if it doesn't put too much work on you). |
Currently the way CDEPS is normally used we interpolate every time step. We don't simply take the month value and keep it constant for the month (which I think is what hamocc is doing now). This might not be a big difference - but I'm concerned that it's not right. |
@mvertens and @JorgSchwinger , just to mention this: I am a bit concerned with regards to automatized regridding in this particular case for riverine input in general, since i) it needs to consider land-ocean masks conservatively and ii) as far as I am aware of, it sometimes has required to diffuse the source across a number of grid boxes to not run into numerical issues or too unrealistic biogeochemistry values due to too high input into one grid-box (and too low horizontal and/or vertical mixing in the ocean model) - the latter required/s handwork for the riverine input masks. But I am happy to be proven wrong or to learn about new methods to catch those things automatically, when regridding. |
@jmaerz @JorgSchwinger - here is the output of the stream versus original for fedep |
@jmaerz the regridding as it has been done was not conservative. So the (integrated total) riverine input is slightly different on different grids. Given the large uncertainties that come with the input data I don't think this is a huge problem. |
@jmaerz - the regridding can handle conservative masked mapping - but it cannot handle the type of diffusion across grid boxes that you are referring to here. If you need to customize the riverine input - then what I am proposing to do will not work. It would be good to have consensus on this before I do this. |
Is this the same month? Looks quite a bit different off the coast of Africa? |
Same question here. - or is it a time snapshot right, and the monthly mean to the left? |
As mentioned above the mapping of riverine inputs was done in a non-conservative fashion (bilinear interpolation) before, I think we can stick to this (at least when the riverine input comes from a data set and total mass conservation isn't the primary concern) |
@JorgSchwinger - this is the same month - but I am plotting out the first time sample only. Since we are using cyclical time interpolation - and I am starting on Jan. 1 - I think that December is being used. I'll use a differrent time interpolation and see if that fixes things. |
Yes, currently HAMOCC uses constant values per month, I think it is fine to use time interpolation. We probably should add a model output for the actually applied dust input then (before we had the monthly values in the dust-input file, but with CDEPS this is no longer the case) |
A mid-month time slice should then give very similar results, right? |
So the time interpolation can be one of the following: [lower,upper,nearest,linear,coszen] |
There was no particular rationale behind using a constant value per month - it was just the simplest solution. From a physical/biogeochemical point of view linear time interpolation is the right thing to do. So I would leave it at 'linear' (I can implement model output for the dust (or iron) field once the CDEPS implementation is done. |
@JorgSchwinger - so moving it to 'lower' did not really effect the answer very much. I'm wondering if the source of the datasets are different in what I'm comparing. Here is the dataset that is being used in the original: And here is the source of the new dataset you provided: I can't really compare the new streams exactly unless we modify the original tnx1v4 dataset to have the right time coordinates. |
@JorgSchwinger , have you had issues with the riverine diffusion of nutrients previously in iHAMOCC? - I just know it it from previous work and discussions around this question. It seems, that the input is currently already much diffused, which may alleviate the issue. Just for info: I just checked DSi riverine input as an example and differences between tnx0.25 and tnx2 are indeed relatively small (despite the at first look very different input patterns): 5.1263e+09 versus 5.1330e+09 globally. |
@mvertens as mentioned before, the tn1x4 dataset has been interpolated several times. It has not been created from the original data set, which is the T42 version you have. In that file you can see in the history that it was created from the original model output that created the dust deposition. Although the differences in the two plots seem to me larger than just caused by interpolating several times back and forth. Regarding the river-nutrients: I have looked into creating this on a regular grid as a basis for interpolation by CDEPS. The problem with this is that I would need to create a mapping where the data is distributed around the river mouth (i.e. what the runoff-maps are doing). I wonder if this is worth the effort, or should we just go with the existing file for the tnx0.25 grid, which should be high enough resolution to remap to any other grid by CDEPS? |
|
|
More a general question @JorgSchwinger , wrt the riverine input: how is BLOM handling the freshwater fluxes in that respect - does BLOM somewhat offer a diffusive mask to not run into numerical issues with freshwater fluxes or are freshwater fluxes really in one grid cell? - ok, I guess, I should also trace this down to better understand. |
|
@mvertens regarding the nutrients: how is/will the mapping be done for the freshwater inputs in BLOM? For the nutrients, we would like to stay consistent with the freshwater input. |
@JorgSchwinger - are you referring to the liquid and ice runoff coming from MOSART? |
@mvertens , yes, that's @JorgSchwinger and I briefly discussed today - how it is done with the freshwater input from MOSART to BLOM - and whether there are changes anticipated, etc. |
The freshwater runoff->blom mapping is done with conservative mapping followed by nearest neighbor smoothing. It is a custom mapping file that is read in and is the only mapping that is not done with on-line regridding. If you need custom mapping from the file - then the code I'm writing for the mapping is not needed and you will have to generate new nutrient files for every resolution. |
yes, or the runoff coming from DLND (not sure it still comes from DLND, I mean the data model that handles runoff) |
@JorgSchwinger @jmaerz - before I do any more work on this, it would be helpful to have a chat. I would find that very helpful. |
@JorgSchwinger - there is no runoff coming from DLND. All runoff to the ocean comes from MOSART. And the mosart->blom mapping is the only custom mapping that is currently used in noresm2.5. |
To see the rof->ocn mapping code look at noresm2_5_alpha05 |
I should be more available again from tmw afternoon onward. Next week, I have a few meetings and other appointments, but would be generally open - but I also would suggest to have a chat on this topic, since it surfaces a lot of technical intricacies. In addition, maybe it would be good to have a sneak preview on how you currently implement the fluxes e.g. for iron or N-deposition (whichever fluxes you touched already in more detail) - to be able to follow this a bit in code space. |
@jmaerz @JorgSchwinger - tomorrow afternoon works for me. I can show you both the dust code as well as the new code I've implemented for mapping for river nutrients. It would be great to walk you through that. Thinking about this some more - the new blom river nutrient code can also be used to read in a rof->blom mapping file and use that to do the mapping exactly like is done for mosart. @JorgSchwinger - let me know if you can also meet tomorrow afternoon. |
I'm free tomorrow for a chat. What I didn't understand before was that the freshwater is still done with a custom mapping file. I strongly assume that this is mapping from a 0.5 x 0.5 degree "runoff-grid" to the respective model grid (e.g. map_r05_to_tnx1v4_e1000r300_170609)? If this is the case I would tend to suggest to use the same mapping for the river nutrients, too. If a mapping file is available it won't be difficult to create the river nutrient input for the tnx05 grid. |
@JorgSchwinger , let us know what suits you best in terms of time. I should be available from 1PM onward (while there is a minimal risk that this changes, which shouldn't hold us back to try meeting). |
Yes - mapping files are available - see $SRCROOT/ccs_config/maps_nuopc.xml:
Looks like we don't have one for tnx2v1 or tnx0.125v4 which we really should create. |
@mvertens 1PM tomorrow is fine for me. Also later than this works for me (not after 4pm though) |
There we go! I'll provide the river nutrients on the 0.5 x 0.5 "runoff grid" that is used for freshwater and the mapping can be done exactly the same as for the freshwater. No additional mapping grids needed since this is done for BLOM anyway. Would that be an option or am I missing something? |
You have it right. I think we have a solution! I'll walk you both through the code tomorrow. |
In order to use the CDEPS stream functionality for forcing data - the time coordinate needs to be of the form
(since this is a climatology - noleap should be used)
However, looking at the file /cluster/shared/noresm/inputdata/ocn/blom/bndcon/dustdep_mhw2006_tnx1v4_20171107.nc
the time coordinate is
and the values are all zero
Also - the format needs to be cdf5 not classic
To change this you simply need to invoke
nccopy -k cdf5 oldfile newfile
The text was updated successfully, but these errors were encountered: