-
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
new CDEPS stream capability to read in forcing files needed by HAMOCC #405
base: master
Are you sure you want to change the base?
Conversation
What is required is a time coordinate like the following:
The follow files do not have this.
What I am currently doing is pointing to a forcing file that is used by CTSM:
This file is used for all the current grids for pre-industrial runs using DATM. |
drivers/nuopc/ocn_stream_ndep.F90
Outdated
stream_taxmode = 'cycle', & | ||
stream_dtlimit = 1.0e30_r8, & | ||
stream_tintalgo = 'linear', & | ||
stream_name = 'Sea surface temperature ', & |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I syuspect this will be changed? - stream_name = Nitrogen deposition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right! Thanks. I'm just starting to test this today.
Dear @mvertens , many thanks for your efforts. The first thing that comes to my mind when initially browsing the changes: is there a good reason to use BLOM naming conventions for the grid size in iHAMOCC (i.e. exchanging iHAMOCC internally used Wrt the input files for N-deposition: I feel it could be good to somehow organize the move from an input stream for NOy only to both NOy and NHx - can you tell me what your |
Regarding the time coordinates, my understanding was
In both cases we don't need new/updated files. We might need to see if everything is available for DATM cases, but for now, if there is a pre-industrial N-deposition available that would be fine from my perspective. |
@jmaerz - I am happy to change the names to kpie and kpje - but this code is no longer in the internal blom code and so all I will do is end up making a copy of these names in the nuopc cap. DIN_LOC_ROOT=/cluster/shared/noresm/inputdata. This already has NOy and NHx but with different names in the forcing data. |
@JorgSchwinger - thanks for confirming what I was suggesting. Somehow I understood that you still wanted NDEP forcing read in even for nuopc. Using the datm functionality removes the need to have this in place. I just need to get this working in the cap. If @jmaerz is in agreement we won't need ndep stream functionality which using nuopc. |
@JorgSchwinger , what we can do is to rewrite the |
@jmaerz - good point about units. |
Well, To briefly summarize the discussion that I had during lunch with Jörg: We agreed on having by default both input-streams defined via nuopc, both, NOy and NHx - so similar to dust, etc. This makes it necessary to reformulate the N-deposition a bit in |
I see that the conversion is done in mo_read_ndep.F90.
I'm not sure I understand what you are suggesting. With NUOPC you always receive ndep (nhx and noy separately) from the mediator. This is either from DATM or CAM. Why do we need to read it in separately in the nuopc cap? And when would you trigger this? With the complexity of supporting both MCT and NUOPC and then asking for stream input from NDEP despite that you always receive it - I think the complexity of supporting all of this will get very confusing. |
Here is one example of the complexity:
So it does not matter what HAMOCC_EXTNCYCLE or HAMOCC_NDEPC are set to.
I think that another call would be helpful again. |
Dear @mvertens , I have feeling, we again misunderstand each other - sorry for this. All I want to say is that via nuopc, it would be good to receive both, NHx and NOy. Then, as you've done already for dust, if the nuopc stream is used (either from CAM or from DATM), |
@jmaerz - thanks for the clarification. That's very helpful. I totally misunderstood what you were saying. |
phy/mod_blom_init.F90
Outdated
call iniswa | ||
if (.not. use_stream_swa) then | ||
call iniswa | ||
end if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fear there has been a misunderstanding about the HAMOCC swa field? For the bromoform-option there has been a swa-file, which contains a pre-industrial swa-climatology (because bromoform production is parameterized using deviations from the swa rather than absolute values). This iniswa
deals with how shortwave absorption is handled in BLOM and need to be called always.
The "normal" short-wave radiation field as far as I am aware always comes from CAM or DATM and is never read through a stream by BLOM.
The reading of the swa-climatology is not done consistently with the other inputs (the bromoform code has not been used a lot). The climatology file is read in in homocc_init
and the just used inside hamocc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JorgSchwinger - thanks for clarifying. I should have seen this.
hamocc/mo_read_fedep.F90
Outdated
@@ -43,7 +43,7 @@ module mo_read_fedep | |||
|
|||
contains | |||
|
|||
subroutine ini_read_fedep(kpie,kpje,omask) | |||
subroutine ini_read_fedep(omask) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to agree with @jmaerz ... All HAMOCC routines are taking the indices as arguments, so why change this here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JorgSchwinger - I'll put the original back in. I was trying to make this consistent with the way streams was being handled.
As a sanity check (until I get the new dataset from @JorgSchwinger ) on the new river nutrient implementation I have used the file /cluster/shared/noresm/inputdata//ocn/blom/bndcon/river_nutrients_GNEWS2000_tnx1v4_20170820.nc |
@mvertens , thanks for testing! - yes, looks good to me as well :-) |
Dear @mvertens, I have produced river nutrient and carbon inputs to be used by HAMOCC on the 0.5x0.5 runoff grid. I am not able to exactly reproduce the "original" files that are currently used for NorESM2. This is (most likely) because the scripts read data from xls-files and they are in matlab, which I don't have so I use octave... In general the deviations are about as expected under such circumstances. I also produced a file on the tnx1v4 grid for comparison. The files are here (@TomasTorsvik can you make sure Mariana has access to NS2980K, takk?): /projects/NS2980K/schwinger/NorESM_inputdata/RIVNUT/GNEWSregrid/river_nutrients_GNEWS2000c70_r05_20240921.nc I also made a dust-file with correct time-coordinate, which you can find here: /projects/NS2980K/schwinger/NorESM_inputdata/dust/NorESM2/dustdep_mhw2006_tnx1v4_20171107_newtime.nc |
@JorgSchwinger , @mvertens , @jmaerz - I have given access to Mariana for the NS2980K storage project. |
@JorgSchwinger - thanks so much for the files! |
|
||
dust(:,:) = dustflx(:,:,kplmon) | ||
|
||
if (debug) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @mvertens , do you want to keep the debug flag here at the end or is it something temporary? If the first, I wonder, if we should use our common hamocc debug flag(s) instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's up to you. Do you always want to see the netcdf file when the model starts?
hamocc/mo_read_ndep.F90
Outdated
@@ -172,32 +172,28 @@ subroutine ini_read_ndep(kpie,kpje) | |||
end subroutine ini_read_ndep | |||
|
|||
|
|||
subroutine get_ndep(kpie,kpje,kbnd,kplyear,kplmon,omask,ndep,patmnhxdep,patmnoydep) | |||
subroutine get_ndep(kplyear, kplmon, omask, ndep, patmnhxdep, patmnoydep) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here the same wrt kpie,...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks for catching this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't sure, if you had already reverted back or not - there were/are a few occasions, were it was introduced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
hamocc/mo_read_ndep.F90
Outdated
|
||
!*********************************************************************************************** | ||
! Read and return CMIP6 n-deposition data for a given month or use atmosphere input | ||
! | ||
! S. Gao *Gfi, Bergen* 19.08.2017 | ||
!*********************************************************************************************** | ||
|
||
use mod_xc, only: mnproc | ||
use mod_xc, only: idm, jdm, nbdy, mnproc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again about kpie, ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -262,30 +259,29 @@ subroutine ini_read_oafx(kpie,kpje,pdlxp,pdlyp,pglat,omask) | |||
end subroutine ini_read_oafx | |||
|
|||
|
|||
subroutine get_oafx(kpie,kpje,kplyear,kplmon,omask,oafx) | |||
subroutine get_oafx(kplyear, kplmon, omask, oafx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kpie,...
@jmaerz - I put the debug in order to trigger generating the netcdf file showing the forcing data. I'm happy to remove it - then you'll always get the file. Is that what you would want? |
I suspect that we at the end would want to have some general output of the input fields (since it will be now regridded internally) - for now, I was just wondering. I would expect that we do the output then at a different place. All fine. |
hamocc/mo_read_ndep.F90
Outdated
@@ -172,15 +172,15 @@ subroutine ini_read_ndep(kpie,kpje) | |||
end subroutine ini_read_ndep | |||
|
|||
|
|||
subroutine get_ndep(kpie,kpje,kbnd,kplyear,kplmon,omask,ndep,patmnhxdep,patmnoydep) | |||
subroutine get_ndep(idm, jdm, kplyear, kplmon, omask, ndep, patmnhxdep, patmnoydep) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kpie,...
This PR has new stream functionality for forcing files.
files for mosart->blom mapping
iron dust deposition data
nitrogen deposition data