Conversation
|
We should be able to show this as b4b-dev, so will likely rebase to b4b-dev, once we can show that. |
|
@swensosc raised the question whether this will be in clm6. I will add a milestone to the PR. |
slevis resolved conflicts: bld/namelist_files/namelist_defaults_ctsm.xml
slevis resolved conflicts: bld/namelist_files/namelist_defaults_ctsm.xml
…the ifx compiler happy
Update to ifx compiler
|
This has been blocked by #3391 This was also a desired feature highlighted in the LMWG meeting, so we need to start working on this so it can be used by more people. |
|
I'll update this to the latest, so that we can create a branch tag with this for some coupled model testing that is desired. |
|
@swensosc the following were previously shown to have strong influence on arctic snow melt (based on attributes in our latest parameter file). From these, the most influential is likely xdrdt. @olyson summarized the following based on our dead veg work a few years ago: Regarding increasing albedo, our best bets are probably xdrdt and upplim_destruct_metamorph. Increasing xdrdt from 1 to 5 decreased albedo by maybe 2-4% over Antarctica so reversing that would hopefully result in an increase by that amount. Decreasing upplim_destruct_metamorph from 250 to 100 decreased albedo by 1-2%, so maybe we could go to 400 to increase albedo (we are at 250 now). fresh_snw_rds_max is also a possibility, it is now 400 and an increase from about 204 to 400 decreased albedo by 1-2% also, so we could try going back down to 200 or so. Not clear that the combined effects of these would be a simple sum, there must be some kind of upper limit on fresh snow albedo. Maybe first try a couple of these in land-only mode to make sure we get the magnitude and direction we are expecting in Antarctica. |
ctsm5.3.022: Bring in changes needed for the ifx compiler
Conflicts: bld/namelist_files/namelist_defaults_ctsm.xml
Conflicts: bld/CLMBuildNamelist.pm bld/namelist_files/namelist_defaults_ctsm.xml src/biogeophys/SoilHydrologyMod.F90 src/main/atm2lndType.F90
|
@swensosc do you have a distributed parameter file/mesh that I can test with? |
|
OK, I updated to the latest on b4b-dev, which is up to ctsm5.4.021. A good number of tests passed, but a lot failed, many with a build error. Hopefully, the build error is simple. Here's the summary.... I'll push the update, and then see if the build error is easy. I also think we should test on Izumi with nag, as that can often find legit problems. |
| nparams = 0 | ||
| do n=1,nvariables | ||
| call ncd_inqvname(ncid,n,varname,var_desc) | ||
| if (.not. any(varname == (/'time','lat','lon'/))) then |
There was a problem hiding this comment.
This actually results in a build problem with at least the gnu compiler. The '(/ /)' syntax for strings requires that the strings be of the same length. So a space could be added to the end of lat and lon for example. But, then the string match isn't going to work. A "trim" can certainly be added to "varname" and probably to the array? So maybe this will work...
| if (.not. any(varname == (/'time','lat','lon'/))) then | |
| if (.not. any(trim(varname) == trim( (/'time','lat','lon'/) ) ) ) then |
There was a problem hiding this comment.
Nope, trim only takes scalar arguments. I'm trying to think of a way to use index to check for substrings, but not seeing a way to get that to work. So it probably needs an additional loop to go through the dimension names so trim can be used on both sides. Which means some overhead to save the array and such. A little annoying, but not hard to do...
|
I didn't know about the string length constraint.
Would it work to do this?
any((/trim(varname) == 'time',trim(varname) == 'lat',trim(varname) ==
'lon'/)) )
…On Fri, Mar 6, 2026 at 11:10 AM Erik Kluzek ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/cpl/share_esmf/DistParamStreamMod.F90
<#3405 (comment)>:
> +
+ call control%ReadNML( bounds, NLFileName )
+
+ if ( use_distributed_parameters )then
+
+ ! query parameter file
+ call getfil (control%stream_fldFileName_distparams, locfn, 0)
+ call ncd_pio_openfile (ncid, trim(locfn), 0)
+
+ call ncd_inqnvars(ncid,nvariables=nvariables)
+
+ allocate(stream_varnames_in(nvariables))
+ nparams = 0
+ do n=1,nvariables
+ call ncd_inqvname(ncid,n,varname,var_desc)
+ if (.not. any(varname == (/'time','lat','lon'/))) then
Nope, trim only takes scalar arguments. I'm trying to think of a way to
use index to check for substrings, but not seeing a way to get that to
work. So it probably needs an additional loop to go through the dimension
names so trim can be used on both sides. Which means some overhead to save
the array and such. A little annoying, but not hard to do...
—
Reply to this email directly, view it on GitHub
<#3405 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGRN57GILBBRATKECC5O7T34PMICTAVCNFSM6AAAAACDTR7VNWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTSMBVGIYTMNZUGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It does! So I'll go with that for now. the above isn't as clean as the original, but better than the loop suggestion. So longer term, we'll probably do something else -- but this is a decent starting point. |
|
Things that I see needed to get a branch tag done today:
|
|
you could do something like this (maybe in a function), but I don't know
that it's worth the effort:
character(len=4) :: ex_varnames(3) ! variable names to
ignore
...
ex_varnames = (/'time','lat','lon'/)
...
any((/(trim(varname) == trim(ex_varnames(ig)),ig=1,3)/))
…On Fri, Mar 6, 2026 at 11:33 AM Erik Kluzek ***@***.***> wrote:
*ekluzek* left a comment (ESCOMP/CTSM#3405)
<#3405 (comment)>
I didn't know about the string length constraint. Would it work to do
this? any((/trim(varname) == 'time',trim(varname) == 'lat',trim(varname) ==
'lon'/)) )
It does! So I'll go with that for now. the above isn't as clean as the
original, but better than the loop suggestion. So longer term, we'll
probably do something else -- but this is a decent starting point.
—
Reply to this email directly, view it on GitHub
<#3405 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGRN57DZEVC2MXFSHH3DG734PMKYTAVCNFSM6AAAAACDTR7VNWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DAMJTGMZTQOBXGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
…engths, so make it explicit as suggested by @swensosc
|
gnu tests are now working. And the same tests fail as for #3391 with only one new additional one: SETPARAMFILE_Ld5.f10_f10_mg37.I1850Clm60BgcCrujra.derecho_gnu.clm-default but we won't worry about that for now. |
… particulars outside of the grid don't matter
Conflicts: .gitmodules bld/namelist_files/namelist_defaults_ctsm.xml
… too that should be identical (and I showed was at this point)
Description of changes
Make some parameters spatially distributed, with data ingested via streams file.
Specific notes
Contributors other than yourself, if any:
CTSM Issues Fixed (include github issue #):
See this discussion:
#2395
Are answers expected to change (and if so in what way)? No
Any User Interface Changes (namelist or namelist defaults changes)? Yes
New namelist parameters:
- use_distributed_parameters
- stream_fldfilename_distparam
- stream_meshfile_distparam
Does this create a need to change or add documentation? Did you do so? Yes No
Testing performed, if any: @ekluzek will do regular