ldong@unm_edu
New Member
Hi there,
I am doing aquaplanet simulation using cesm CAM standalone scripts with cam4 physics. As for use_case, I used aquaplanet_cam4.xml. After configuration and building namelist, I desire to add a few more new namelist variables which are not present in the output "atm_in" file. For instance, I wanted to add 'cldfrc_dp1=0.14D0' (the deep convection parameter for cloud fraction calculation) in the atm_in file. Below is what I did in editing the namelist related files.
1. In the source code models/atm/cam/src/physics/cam/cloud_fraction.F90, I first defined the new namelist variable and then added it to the existing namelist group by doing:
real(r8) :: cldfrc_dp1 = unset_r8
...
namelist /cldfrc_nl/ cldfrc_dp1, cldfrc_freeze_dry, cldfrc_ice, cldfrc_rhminl, cldfrc_rhminh
2. In namelist_definition.xml (in the CAM standalone bld directory), I added following content in the Cloud Fraction section.
Default: set by build-namelist
3. In namelist_default_cam.xml, I added the following content in the Cloud Fraction section.
0.14D0
4. In the build-namelist script, I added the following content in the Cloud Fraction section.
add_default($nl, 'cldfrc_dp1');
5. Then configure with the modified source code "cloud_fraction.F90" in the mod source directory. Build the model and build namelist. Then I did see the new namelist parameter 'cldfrc_dp1=0.14D0' showing up in the atm_in file.
6. Run the model, but it crashed returning an error message "ENDRUN:cldfrc_readnl:: ERROR reading namelist"
Did I miss something here? I'd appreciate if anyone can advise how to properly add a new namelist variable. Thanks.
Li
I am doing aquaplanet simulation using cesm CAM standalone scripts with cam4 physics. As for use_case, I used aquaplanet_cam4.xml. After configuration and building namelist, I desire to add a few more new namelist variables which are not present in the output "atm_in" file. For instance, I wanted to add 'cldfrc_dp1=0.14D0' (the deep convection parameter for cloud fraction calculation) in the atm_in file. Below is what I did in editing the namelist related files.
1. In the source code models/atm/cam/src/physics/cam/cloud_fraction.F90, I first defined the new namelist variable and then added it to the existing namelist group by doing:
real(r8) :: cldfrc_dp1 = unset_r8
...
namelist /cldfrc_nl/ cldfrc_dp1, cldfrc_freeze_dry, cldfrc_ice, cldfrc_rhminl, cldfrc_rhminh
2. In namelist_definition.xml (in the CAM standalone bld directory), I added following content in the Cloud Fraction section.
Default: set by build-namelist
3. In namelist_default_cam.xml, I added the following content in the Cloud Fraction section.
0.14D0
4. In the build-namelist script, I added the following content in the Cloud Fraction section.
add_default($nl, 'cldfrc_dp1');
5. Then configure with the modified source code "cloud_fraction.F90" in the mod source directory. Build the model and build namelist. Then I did see the new namelist parameter 'cldfrc_dp1=0.14D0' showing up in the atm_in file.
6. Run the model, but it crashed returning an error message "ENDRUN:cldfrc_readnl:: ERROR reading namelist"
Did I miss something here? I'd appreciate if anyone can advise how to properly add a new namelist variable. Thanks.
Li