Note - it's important to create this case on derecho and not casper - when I tried to create it on casper I encountered the following error:
(base) mmkupilas@casper-login1:/glade/derecho/scratch/mmkupilas/cesm_sims/MesoS2D/f.e23.FWmaHIST.ne30pg3_me30pg3_mg17_L135.001> ./case.setup --reset
Successfully cleaned .case.run
Successfully cleaned env_mach_specific.xml
Successfully cleaned Macros.cmake
Successfully cleaned cmake_macros
Setting resource.RLIMIT_STACK to -1 from (8388608, -1)
job is case.run USER_REQUESTED_WALLTIME None USER_REQUESTED_QUEUE None WALLTIME_FORMAT %H:%M:%S
Creating batch scripts
Writing case.run script from input template /glade/derecho/scratch/mmkupilas/tag_cam6_4_028/ccs_config/machines/template.case.run
Creating file .case.run
Writing case.st_archive script from input template /glade/derecho/scratch/mmkupilas/tag_cam6_4_028/ccs_config/machines/template.st_archive
Creating file case.st_archive
Running cam.case_setup.py
ERROR: Could not make directory '/glade/scratch/mmkupilas/f.e23.FWmaHIST.ne30pg3_me30pg3_mg17_L135.001/bld/cpl/obj', error: [Errno 13] Permission denied: '/glade/scratch'
Note:
I created cesm_dirs to store my run directories as by default they were scattered around in /glade/derecho/scratch/mmkupilas/
Edit env_build.xml:
./xmlchange CAM_CONFIG_OPTS="-phys cam7 -nlev 135 -age_of_air_trcs -chem waccm_ma_mam5 -cppdefs -Dwaccm_debug -pcols 9"
See arguments to configure
Edit user_nl_cam:
dust_emis_fact = 1.3 ! MMK Tuning parameter for dust emissions - not radiative emission, but just dust input rate from surface mineral erosion?
ncdata='/glade/campaign/cgd/amp/pel/inic/L135_ne30pg3_ne30pg3_mg17.cam.i.1979-01-11-00000.nc'
bnd_topo= '/glade/work/juliob/bndtopo/ne30pg3_gmted2010_modis_bedmachine_nc3000_Laplace0100_noleak_20240720.nc' ! MMK Full pathname of time-invariant boundary dataset for topography fields.
effgw_beres_dp = 0.70D0 ! Efficiency associated with convective gravity waves from the Beres scheme (deep convection).
gw_qbo_hdepth_scaling = 0.25D0 ! Scaling factor for heating depth in gravity waves from convection. If less than 1.0 this acts as an effective reduction of the gravity wave phase speeds needed to drive the QBO.
effgw_cm = 1.0D0 ! Efficiency associated with gravity waves from frontogenesis.
effgw_rdg_beta = 1.2D0
effgw_rdg_beta_max = 1.2D0
gw_top_taper = .false. ! MMK Whether or not to apply tapering at the top of the model (above 0.6E-02 Pa) to reduce undesired effects of gravity waves in the thermosphere/ionosphere.
inithist = 'YEARLY' ! Frequency that initial files will be output: 6-hourly, daily, monthly, yearly, or never. Valid values: 'NONE', '6-HOURLY', 'DAILY', 'MONTHLY', 'YEARLY', 'CAMIOP', 'ENDOFRUN'.
Check env_workflow.xml for clock settings
<"JOB_WALLCLOCK_TIME" value = "12:00:00">
<"JOB_WALLCLOCK_TIME" value = "03:00:00">
./preview_namelists
./preview_run
./case.build
Build failed
errors:
search mmk in build log
co2_cycle?
dycore errors? undefined references to hycoef variables
physics errors? undefined references to sw_kb
[x] Try removing everything from user_nl_cam - does it build fine?
No - needed input for ncdata - added ncdata as above, and running ./case.build
Model built successfully - now let's start adding all other parts to user_nl_cam to understand what is going on.
Added dust emission factor - compiled fine
Added topo file - compiled fine
Added history file parameters - compiled fine
Added phys_grid_ctem parameters - compiled fine
Added moving mountains PBL parameter - compiled fine
Added GW parameters - compiled fine
Added INITHIST and dycore parameters - compiled fine
Strange - when I add all parts of the original entry, the model compiles fine. Previously it did not, even though user_nl_cam was identical. Perhaps it had something to do with calling ./case.build with nohup.
Model built sucessfully
Following: https://github.com/NCAR/wawg_dev/issues/55
CASE NAME f.e23.FWmaHIST.ne30pg3_me30pg3_mg17_L135.001
KEYWORDS 1deg, ne30, WACCM, 135L, tag cam6_4_028, derecho, cam7 physics
DESCRIPTION 1 degree SE WACCM 5 day test run to validate personal usability of tag.
TAG DIR /glade/derecho/scratch/mmkupilas/tag_cam6_4_028
CASE DIR /glade/derecho/scratch/mmkupilas/cesm_sims/MesoS2D/f.e23.FWmaHIST.ne30pg3_me30pg3_mg17_L135.001
RUN DIR /glade/derecho/scratch/mmkupilas/cesm_dirs/f.e23.FWmaHIST.ne30pg3_me30pg3_mg17_L135.001/run
ARCHIVE DIR /glade/derecho/scratch/mmkupilas/archive/f.e23.FWmaHIST.ne30pg3_me30pg3_mg17_L135.001
CREATE NEWCASE /glade/derecho/scratch/mmkupilas/tag_cam6_4_028/cime/scripts/create_newcase --compset FWmaHIST --res ne30pg3_ne30pg3_mg17 --case /glade/derecho/scratch/mmkupilas/cesm_sims/MesoS2D/f.e23.FWmaHIST.ne30pg3_me30pg3_mg17_L135.001 --project P93300043 --run-unsupported
WORKFLOW
ssh derecho
cd /glade/derecho/scratch/mmkupilas/
git clone https://github.com/ESCOMP/CAM.git tag_cam_6_4_028
cd tag_cam_6_4_028
git checkout cam6_4_028
./bin/git-fleximod update
create newcase
cd CASE DIR
./case.setup
./xmlchange RUNDIR=/glade/derecho/scratch/mmkupilas/cesm_dirs/f.e23.FWmaHIST.ne30pg3_me30pg3_mg17_L135.001/run
Note: I created cesm_dirs to store my run directories as by default they were scattered around in /glade/derecho/scratch/mmkupilas/
Edit env_build.xml: ./xmlchange CAM_CONFIG_OPTS="-phys cam7 -nlev 135 -age_of_air_trcs -chem waccm_ma_mam5 -cppdefs -Dwaccm_debug -pcols 9" See arguments to configure
Edit user_nl_cam:
dust_emis_fact = 1.3 ! MMK Tuning parameter for dust emissions - not radiative emission, but just dust input rate from surface mineral erosion? ncdata='/glade/campaign/cgd/amp/pel/inic/L135_ne30pg3_ne30pg3_mg17.cam.i.1979-01-11-00000.nc' bnd_topo= '/glade/work/juliob/bndtopo/ne30pg3_gmted2010_modis_bedmachine_nc3000_Laplace0100_noleak_20240720.nc' ! MMK Full pathname of time-invariant boundary dataset for topography fields.
interpolate_output = .true.,.true.,.true.,.true. interpolate_nlat = 192,192,192,192 interpolate_nlon = 288,288,288,288
empty_htapes=.true.
fincl1 = 'U','V','Q','T','PSL','OMEGA','PS','PRECT','OMEGA500','OMEGA850' fincl2 = 'U','V','Q','T','PSL','OMEGA','PS','PRECT','OMEGA500','OMEGA850' fincl3 = 'NETDT', 'HDEPTH', 'MAXQ0' fincl8 = 'Uzm','Vzm','Wzm','THzm', 'VTHzm','WTHzm','UVzm','UWzm'
mfilt = 0, 5, 20, 30 avgflag_pertape = 'A','A','I','A' nhtfrq = 0,-24,-6,-24
phys_grid_ctem_nfreq = -6 ! MMK "nfreq" bewteen TEM calculations phys_grid_ctem_za_nlat = 90 phys_grid_ctem_zm_nbas = 120
! Uncomment this line if you want to turn-off the PBL-based moving mountain GWs use_gw_movmtn_pbl = .false.
qbo_use_forcing = .false. ! TRUE implies qbo package is active. use_gw_rdg_beta = .true. use_gw_convect_dp = .true. use_gw_front = .true.
effgw_beres_dp = 0.70D0 ! Efficiency associated with convective gravity waves from the Beres scheme (deep convection). gw_qbo_hdepth_scaling = 0.25D0 ! Scaling factor for heating depth in gravity waves from convection. If less than 1.0 this acts as an effective reduction of the gravity wave phase speeds needed to drive the QBO. effgw_cm = 1.0D0 ! Efficiency associated with gravity waves from frontogenesis. effgw_rdg_beta = 1.2D0 effgw_rdg_beta_max = 1.2D0 gw_top_taper = .false. ! MMK Whether or not to apply tapering at the top of the model (above 0.6E-02 Pa) to reduce undesired effects of gravity waves in the thermosphere/ionosphere.
inithist = 'YEARLY' ! Frequency that initial files will be output: 6-hourly, daily, monthly, yearly, or never. Valid values: 'NONE', '6-HOURLY', 'DAILY', 'MONTHLY', 'YEARLY', 'CAMIOP', 'ENDOFRUN'.
se_statefreq = 144 se_rsplit = 2 se_nsplit = 4
XML CHANGES ./xmlchange RUN_REFDATE=1980-01-01 ./xmlchange RUN_STARTDATE=1980-01-01 ./xmlchange STOP_OPTION=nmonths ./xmlchange STOP_N=3 ./xmlchange CONTINUE_RUN=FALSE ./xmlchange RESUBMIT=4 ./xmlchange DOUT_S_SAVE_INTERIM_RESTART_FILES=TRUE ./xmlchange DOUT_S_ROOT=/glade/derecho/scratch/mmkupilas/archive/f.e23.FWmaHIST.ne30pg3_me30pg3_mg17_L135.001 ./xmlchange DOUT_S=TRUE
;env_mach_pes.xml ./xmlchange NTASKS=-20 ; 20*128=2160
Check env_workflow.xml for clock settings <"JOB_WALLCLOCK_TIME" value = "12:00:00"> <"JOB_WALLCLOCK_TIME" value = "03:00:00">
./preview_namelists ./preview_run
./case.build
Build failed
errors:
[x] Try removing everything from user_nl_cam - does it build fine?
./case.submit
Model running successfully - what's next