Skip to content

add C14 parameter to standard output#39

Merged
adconnolly merged 1 commit intoCLUBB_MLfrom
37-add-capability-to-save-c14-profiles
Apr 22, 2026
Merged

add C14 parameter to standard output#39
adconnolly merged 1 commit intoCLUBB_MLfrom
37-add-capability-to-save-c14-profiles

Conversation

@vopikamm
Copy link
Copy Markdown
Collaborator

Addresses #37 and adds the C14 parameter to the standard output. I've tested this using the BOMEX standalone case with and without ML:

image

@vopikamm vopikamm linked an issue Apr 15, 2026 that may be closed by this pull request
@Mikolaj-A-Kowalski
Copy link
Copy Markdown
Collaborator

Are you using the net we have exchanged on Slack?

I have compiled and run your branch but I got a bit of an odd result in the first time-step.

ds["C14"].squeeze()                                                                                                                                                                                                     
<xarray.DataArray 'C14' (time: 360, altitude: 88)> Size: 253kB                                                                                                                                                              
array([[-1.71311645e+02,  5.19327327e-01,  5.19575674e-01, ...,                                                                                                                                                             
         1.55899370e-02,  1.52468670e-02,  1.52471099e-02],                                                                                                                                                                 
       [ 3.12299937e-01,  3.51418629e-01,  4.12061253e-01, ...,                                                                                                                                                             
        -3.30185398e-03, -8.81445554e-03,  1.52605575e-02],                                                                                                                                                                 
       [ 3.16363637e-01,  3.49657864e-01,  4.03101725e-01, ...,                                                                                                                                                             
        -1.64021835e-02, -2.24910771e-02,  1.52682230e-02],                                                                                                                                                                 
       ...,                                                                                                                                                                                                                 
       [ 2.80529182e-01,  3.74172122e-01,  4.67505057e-01, ...,                                                                                                                                                             
        -5.08136576e-02, -4.54842023e-02,  1.52781552e-02],                                                                                                                                                                 
       [ 2.80168390e-01,  3.74270290e-01,  4.67796175e-01, ...,                                                                                                                                                             
        -5.08136542e-02, -4.54842009e-02,  1.52781614e-02],                                                                                                                                                                 
       [ 2.79783057e-01,  3.74376861e-01,  4.68141330e-01, ...,                                                                                                                                                             
        -5.08136502e-02, -4.54841994e-02,  1.52781675e-02]],                                                                                                                                                                
      shape=(360, 88))                                                                                                                                                                                                      
Coordinates:                                                                                                                                                                                                                
  * time       (time) datetime64[ns] 3kB 1969-06-22T00:01:00 ... 1969-06-22T0...                                                                                                                                            
  * altitude   (altitude) float64 704B 0.0 40.0 80.0 ... 3.44e+03 3.48e+03                                                                                                                                                  
    longitude  float64 8B -56.5                                                                                                                                                                                             
    latitude   float64 8B 15.0                                                                                                                                                                                              
Attributes:
    valid_range:  [-1.79769313e+308  1.79769313e+308]
    long_name:    C_14 parameter
    units:    

I mean this shockingly low value of -1.71311645e+02 in the t=0 bottom(?) corner. Otherwise I get plot that looks the same ;-)

Copy link
Copy Markdown
Collaborator

@Mikolaj-A-Kowalski Mikolaj-A-Kowalski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

The only thing I am worried about is this odd value I got in the 'corner'. However I would doubt it is related to the output writing itself.

Otherwise just a question!

Comment thread src/CLUBB_core/stats_zm_module.F90
@vopikamm
Copy link
Copy Markdown
Collaborator Author

Are you using the net we have exchanged on Slack?

yes exactly.

I mean this shockingly low value of -1.71311645e+02 in the t=0 bottom(?) corner. Otherwise I get plot that looks the same ;-)

I get the same worrying value for the first time-step. I don't know enough about the case and the net, but probably it gets initialized from a velocity field far from what the net has every seen (maybe from rest?). Then it doesn't know what to do

@Mikolaj-A-Kowalski
Copy link
Copy Markdown
Collaborator

@adconnolly @jatkinson1000

If you can have a glance so we can merge promptly to keep the momentum going ;-) (totally not because the batching PR I will be opening soon is rebased on top of this one 😅... )

I am a bit worried about this odd C14 value at the start, but with all likelihood it is not related to the output. So we should track it via a separate issue.

@vopikamm
Copy link
Copy Markdown
Collaborator Author

I am a bit worried about this odd C14 value at the start, but with all likelihood it is not related to the output. So we should track it via a separate issue.

I created a separate issue #41 and assigned @adconnolly for now. I agree that we need to know where this comes from.

Copy link
Copy Markdown
Collaborator

@adconnolly adconnolly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also a little confused about the iC14 = 0 discussed in a resolved comment, actually I'm confused on why all the variables' indices are set to 0 in that file, but I'm happy to assume it is just some goofy initialization/declaration thing. In any case it doesn't seem related to the bigger issue of the weird values, but the new PR can address that. So I agree with consensus to merge and keep the ball rolling - but not because the batching PR is rebased on top of this one, Mikolaj has made that clear :)

@adconnolly adconnolly merged commit 11c3618 into CLUBB_ML Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add capability to save C14 profiles

3 participants