Comments (4)
Hi @Jez-Carter, good catch. It turns out that when we implemented the sublimation physics the elevation change due to surface processes (accumulation, melt, sublimation) was not properly accounted for. The next release, which should be soon, will fix this issue.
from communityfirnmodel.
Hi @maximusjstevens, thanks for this reply. I found that setting "SUBLIM": false in the json file seemed to help, which aligns with your comment. Although, note I had to change line 454 in firn_density_nospin.py from the commented to the following since I was getting an error message that self.sublim was None:
#self.w_firn = np.mean(self.bdot+self.sublim) * RHO_I / self.rho
self.w_firn = np.mean(self.bdot) * RHO_I / self.rho
Even with setting "SUBLIM": false, I found that I was getting strange behaviour for sites with high melt, where this time it was under-estimating the decrease in elevation with time. To show this I created the following minimal example script where I create an adjusted csv file for SMELT and set the value to a constant 1 m ieq/yr, then I run the CFM with this adjusted csv. I found that the elevation change with time was much less than expected and that it was insensitive to me setting melt even higher.
import pandas as pd
import json
import subprocess
### Adjusting CSV for melt
df = pd.read_csv('/CommunityFirnModel/CFM_main/CFMinput_example/example_SMELT.csv')
df.T[0][:] = 1.0
df.to_csv('/CommunityFirnModel/CFM_main/CFMinput_example/adjusted_SMELT.csv',index=False, header=True)
### Loading and editing JSON file for CFM run
with open('/CommunityFirnModel/CFM_main/example.json', 'r') as read_file:
adjusted_json = json.load(read_file)
adjusted_json['input_type'] = 'csv'
adjusted_json['InputFileNamemelt'] = 'adjusted_SMELT.csv'
adjusted_json['SUBLIM'] = False
with open('/CommunityFirnModel/CFM_main/adjusted.json', 'w') as json_file:
json.dump(adjusted_json, json_file, indent=0)
### Running CFM with edited JSON
subprocess.call(['python','/CommunityFirnModel/CFM_main/main.py','/CommunityFirnModel/CFM_main/adjusted.json','-n'])
The output I got when plotting cumulative elevation was the following:
from communityfirnmodel.
@Jez-Carter - it turns out this is more or less the same issue as with the sublimation, and the solution is to explicitly add in a term dh_melt that is the elevation lowering due to melt. (Likewise I added a dh_sub term for sublimation). I've just released v1.1.11, which hopefully fixes this. It also fixes the issue you noticed where the code will fail if sublim is turned off. I'll appreciate any testing you can do to see if this version fixes your issue!
from communityfirnmodel.
@maximusjstevens that's great news thanks, I've tested the new release and it is producing sensible results so it looks like it solves the issue I was running into. I'll do some more testing over the next week or so and will let you know if anything still seems off. Best, Jez.
from communityfirnmodel.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from communityfirnmodel.